drivers/at86rf215: make use of packet queue if available#14954
drivers/at86rf215: make use of packet queue if available#14954benpicco merged 1 commit intoRIOT-OS:masterfrom
Conversation
30a423b to
55c5a72
Compare
55c5a72 to
bb2f88e
Compare
Makefile.dep
Outdated
| ifneq (,$(filter gnrc_lorawan,$(USEMODULE))) | ||
| USEMODULE += gnrc_netif_lorawan | ||
| endif | ||
| ifneq (,$(filter netif_pktq,$(USEMODULE))) |
There was a problem hiding this comment.
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.
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.
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.
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.
@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.
So many options which one should I take? 😄
There was a problem hiding this comment.
I would prefer the last one :-).
There was a problem hiding this comment.
Pulling in at86rf215_blocking_send when gnrc_netif_pktq is not selected sounds like the best approach.
There was a problem hiding this comment.
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.
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 |
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_pktqmodule and send fragmented packets.master
netif_pktq
Issues/PRs references
uses feature from #11263