-
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
drivers/at86rf215: make use of packet queue if available #14954
Conversation
30a423b
to
55c5a72
Compare
55c5a72
to
bb2f88e
Compare
Makefile.dep
Outdated
@@ -206,6 +206,9 @@ ifneq (,$(filter gnrc_netif,$(USEMODULE))) | |||
ifneq (,$(filter gnrc_lorawan,$(USEMODULE))) | |||
USEMODULE += gnrc_netif_lorawan | |||
endif | |||
ifneq (,$(filter netif_pktq,$(USEMODULE))) |
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.
Not sure how this would be expressed in the build system: but shouldn't netif_pktq
rather be a feature that the driver may request? If a stack does not support this for whatever reason you would still be able to use it without netif_pktq
and the user wouldn't be bothered with such a low-level decision.
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.
Are you suggesting something like FEATURE_OPTIONAL
?
IIRC modules can't provide features with the current build system.
Or should I just add USEMODULE += netif_pktq
to the driver's Makefile.dep
and drop the blocking code entirely?
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 meant the first, but did not know, that it is not easily realizable, currently. I would not enforce the packet queue, as one might want to optimize it out.
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 meant the first, but did not know, that it is not easily realizable, currently. I would not enforce the packet queue, as one might want to optimize it out.
For now FEATURES_OPTIONAL
does not apply to this use case. The only thing that kind of resembles this is DEFAULT_MODULE
but that has its own issues, would only work if gnrc_netif_pktq
has no dependencies of its own.
AFAIK this seems like the right way for the use to include netif_pktq
if solicited, its an opt-in
policy, the only opt-out
option for modules is DEFAULT_MODULE
.
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.
@miri64 I think the way it is modeled currently is OK considered our current buildystem, should we go ahead with this one? Are there any other showstoppers?
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.
So many options which one should I take? 😄
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 would prefer the last one :-).
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.
Pulling in at86rf215_blocking_send
when gnrc_netif_pktq
is not selected sounds like the best approach.
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.
The only problem I see is that now drivers can't depend on having a netif_pktq
available and still have to implement a fall-back blocking send :\
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.
That will be addressed by @jia200x's new API though, right?
bb2f88e
to
5b19c7b
Compare
5b19c7b
to
b543a34
Compare
Is everything good on your side here @miri64 ? |
Works as advertised. On the |
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
3d8d4ed
to
57211c8
Compare
Murdock is very unhappy :-/ |
57211c8
to
7fc042e
Compare
Contribution description
Instead of making the driver block until the hardware finishes TXing, we can now simply queue the packet and rely on it getting re-send when the hardware is ready.
This allows to remove an ugly hack where we call the ISR in a loop to achieve blocking send while still servicing radio events.
Testing procedure
Use the
netif_pktq
module and send fragmented packets.master
netif_pktq
Issues/PRs references
uses feature from #11263