-
Notifications
You must be signed in to change notification settings - Fork 2.1k
net: Introduce iolists #8351
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
net: Introduce iolists #8351
Conversation
sys/include/net/gnrc/pkt.h
Outdated
@@ -106,10 +106,11 @@ typedef struct gnrc_pktsnip { | |||
* | |||
* @internal | |||
*/ | |||
unsigned int users; |
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.
Maybe move the doc for the field as well ;-)
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.
yup :) done
sys/include/net/gnrc/pkt.h
Outdated
@@ -106,10 +106,11 @@ typedef struct gnrc_pktsnip { | |||
* | |||
* @internal | |||
*/ | |||
unsigned int users; | |||
/* the first three fields *MUST* be identical to iolist_t! */ |
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.
I think you can group fields with @{
@}
as well.
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.
Hm, I thought this to be an implementation detail, thus the comment is not doxygen (/*
).
|
5242784
to
93f1df7
Compare
c6915b7
to
9a39582
Compare
3955e58
to
154a882
Compare
I don't think this should go into the release, but I'd like to merge it early after as it goes stale rather quick... |
Help with testing different drivers is much appretiated! If a ping goes through correctly, it should be fine to check a box. ;) |
sys/include/iolist.h
Outdated
*/ | ||
|
||
/** | ||
* @defgroup sys_util iolist scatter / gather IO |
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.
why not sys_iolist ?
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.
or sys_util_iolist
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.
fixed
I can test the LoRa related stuff (sx127x and loramac) but not before next week. |
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.
I tested it with RN2483 and SX1276 (LoRaWAN) and it works. I briefly tested with XBee and it works (only ifconfig but no send/receive).
This PR is very nice, I think it should be merged soon since it touches many parts of the code and we are at the very beginning of a new release cycle. |
Can you please update the list above.
Since this is touching the |
154a882
to
dc004b0
Compare
|
And identical method used for testing tests/lwmac, txtsnd also works for that test. |
Nice! btw, feel free to check the boxes. I find it quite satisfying. ;) |
And last one for today: openthread also verified by reproducing the steps described in tests/openthread/README.md. |
enc28j60 tested and works. 2 more to go! |
75a71bf
to
c4b1fa6
Compare
I took the liberty to rebase and squash. |
Agreed. |
@bergzand I think your comments have been addressed? |
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.
ACK. Note that I only tested the code, I haven't done an in depth review of the code.
+1 If there is nobody using the w5100 anymore, maybe it is better to phase it out. But that is something for a different discussion. |
Looking at the driver authorship, the initial contribution is from @haukepetersen. Maybe he knows where to find the hardware for testing ? |
Thanks a lot for the help with testing! &go. |
🎉 |
Contribution description
netdev used to use
struct iovec
for its send function. While being the standard for scatter/gather IO (well, we had to add the header as newlib doesn't support it), it is a little clumsy to use, as usually the size of the needed array is not known in stacked environments like a network stack.This PR introduces "iolists", which are basically a linked list of IO vectors, not unlike GNRC's pktsnips.
netdev is changed to use iolists.
gnrc_pktsnip_t
is rearranged so its beginning matchesiolist_t
, so pktsnips can be directly handed to netdev's send() function.This is WIP, only netdev_tap and at86rf2xx has been adapted, and only gnrc_ethernet and gnrc_ieee802154.Issues/PRs references
Probably solves bullet point #2 of #6299.
Testing checklist