Repository navigation
doip: a tester that stops reading holds the others up 1 s, not 10 - #37
Merged
Merged
Conversation
SO_SNDTIMEO needs CONFIG_NET_CONTEXT_SNDTIMEO: without it the option is refused and a blocked send waits CONFIG_NET_SOCKET_MAX_SEND_WAIT, 10 s, with every other tester unanswered meanwhile.
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.
What
CONFIG_NET_CONTEXT_SNDTIMEO=yin the ethernet snippet, and a test of a tester that stops reading.Why
lib/doipsetsSO_SNDTIMEOto 1 s so that a tester that stops reading its socket is closed rather than waited on. Zephyr refuses that option unlessCONFIG_NET_CONTEXT_SNDTIMEOis built in, and the result was not checked. A blocked send then waits the stack's default,CONFIG_NET_SOCKET_MAX_SEND_WAIT, 10 s, and the DoIP thread answers no other tester meanwhile. UDS on CAN has its own thread and was not affected.Tested
NUCLEO-H753ZI, one tester sending 600 requests and reading none, a second tester asking TesterPresent throughout:
testing/suites/doip/test_entity.py: 11 passed on the board (twice) and on the Renode bench. The new test fails without the option.Note
The stalled connection's remaining bytes stay queued in the stack after the entity closes it, until the tester reads or closes. The entity's own socket count drops at once, which is what the test checks.