lwip: enable LWIP_SO_RCVTIMEO if sock layer is used#17779
Merged
benpicco merged 2 commits intoRIOT-OS:masterfrom Mar 10, 2022
Merged
lwip: enable LWIP_SO_RCVTIMEO if sock layer is used#17779benpicco merged 2 commits intoRIOT-OS:masterfrom
benpicco merged 2 commits intoRIOT-OS:masterfrom
Conversation
Contributor
|
Did you check weather lwip sock_* depends on any timer (on the first glance it did not) - on the second |
Contributor
Author
|
lwip will pull in |
This is now set automatically
79a1873 to
eb45c72
Compare
yarrick
approved these changes
Mar 9, 2022
miri64
reviewed
Mar 10, 2022
|
|
||
| ifneq (,$(filter lwip_sock_%,$(USEMODULE))) | ||
| USEMODULE += lwip_sock | ||
| CFLAGS += -DLWIP_SO_RCVTIMEO |
Member
There was a problem hiding this comment.
Would preferred this switch to be in pkg/lwip/include/lwipopts.h. Could this maybe be done as a follow-up?
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.
Contribution description
It is extremely counter-intuitive that LWIP will by default ignore timeouts unless
LWIP_SO_RCVTIMEOis set.When using the sock API, the application should not have to care what backend is used and timeouts are part of the sock API - so always enable timeouts in LWIP when the sock API is in use.
Testing procedure
lwip tests should still pass without manually setting
LWIP_SO_RCVTIMEOtests/lwip_sock_udp
Issues/PRs references