Retry the ISO TP flow control wait up to N_Bs#10915
Closed
aidangarske wants to merge 1 commit into
Closed
Conversation
Member
Author
|
Closing this. I opened it believing it was the cause of a can-bus stall found by CI in wolfSSL/wolfssl-examples#598. Testing that example against this branch showed it is not: the client there never calls wolfSSL_read, so flow control was never sent at all and no timeout value would have helped. The real cause was in the example. The underlying observation may still be worth something to someone with a real ISO-TP peer: isotp_receive_flow_control() waits for flow control with a single 100ms poll and treats a miss as fatal, while every other ISO-TP receive in wolfio.c retries, and ISO 15765-2 puts N_Bs nearer 1000ms. But I have no reproducer for it, so it should not sit here as an open PR on a justification I already disproved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
isotp_receive_flow_control()waits for flow control with a single 100msrecv_fncall and treats a miss as fatal, while every other ISO-TP receive in the same file retries (ISOTP_Receiveloopsdo { ... } while (ret == 0)). A peer that is a few milliseconds late aborts an otherwise healthy transfer.ISO 15765-2 calls this timeout N_Bs and puts it around 1000ms, so this retries to that deadline instead of giving up after one poll. Still bounded, no behaviour change when flow control arrives promptly.
Honest scope: I found this while investigating a
can-busstall in wolfSSL/wolfssl-examples#598 and initially believed it was the cause. It is not — building that example against this branch still fails the same way, so the stall has a different root cause I have not yet identified. This change stands on its own as a correctness fix to the flow control wait, but it does not close that issue.