-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/openwsn: add sock_udp [upstream implementation] #15310
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, except 3 minor comments that can be squashed right away.
@aabadie I addressed your changes. I also fixed some more dependencies I found as well as bumped the version of the pkg (new merged changes since.) |
Is there a way to provide a |
I'll take a look at those applications. |
ifneq (,$(filter netif,$(USEMODULE))) | ||
USEMODULE += fmt | ||
endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unrelated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It popped out because netif netif_addr_to_str
urtility uses fmt
and the dependency is not explicitly made, should I split this commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #14758 (review) for a similar discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointer, took a quick look your suggestion makes sense.
Ah, found it. Searched on master, not |
Yes |
Note that here I opted by adding the missing functionalities to the sock implementation as a patch, I could have also copied the implementation here. |
I actually was thinking about this. Having a Also there are already some divergences in their implementation and our API:
Not sure there are more issues (unittests might reveal that), but those are the ones I found so far. |
#14704 is a good example for an ongoing change on our side. |
They implemented there |
So you would prefer a verbatim copy and "enhancement" of their implementation? |
I would prefer our own (to our definition "correct") implementation in |
Apparently they took some liberties already, see my list of divergences. |
BTW the degrading maintainability of the large number of patches was one of the reasons, why the original OpenWSN port was removed. We should be careful not to repeat the same mistake. |
I saw it as a trade-off:
I'll go with the first one then, I'll add some tests as well. I'm currently on another subject, so it will take me a couple of days to go back to this, but thanks a lot for the feedback @miri64! |
This will need a rebase on master due to #14703 being merged now. I'll point out inline how this PR can be changed to adapt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline how to adapt to the API extension of the SOCK API
Closing since #15536 is in. |
Contribution description
This PR adds
sock_udp
forOpenWSN
, this allows easily running modules likegcoap
orsuit
on top of OpenWSN. In a follow up I'll add an example show casing this (an easy test can be done in this poc branch https://github.com/fjmolinas/RIOT/tree/poc/openwsn_sock_examples).The pkg version has been bumped and the test application updated.
Testing procedure
Run
tests/pkg_openwsn
according to the readme.Issues/PRs references