Skip to content
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/gnrc_netif: add support for priority queues #18496

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

jia200x
Copy link
Member

@jia200x jia200x commented Aug 21, 2022

Contribution description

This PR adds support for gnrc_netif priority queues.
Since some drivers run a Bottom Half Processor in the same gnrc_netif thread, events from MAC layers (e.g submac) can delay IRQ offloading. To avoid that, a second event queue with high priority is introduced if MODULE_BHP_EVENT is present.

I also use this queue for the event based Bottom Half Processor of kw2xrf radios.

Testing procedure

Make sure all unittests pass. Also, kw2xrf should still work in GNRC.
Since I'm currently on the train I couldn't test it on real hardware. I will post tests results asap.

Issues/PRs references

This should make MAC layers such as the SubMAC or openDSME more robust.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me

sys/net/gnrc/netif/gnrc_netif.c Outdated Show resolved Hide resolved
sys/net/gnrc/netif/init_devs/auto_init_kw2xrf.c Outdated Show resolved Hide resolved
@jia200x jia200x force-pushed the pr/gnrc_netif_multi_queue branch from 3166c98 to e2efc90 Compare August 22, 2022 12:45
@jia200x
Copy link
Member Author

jia200x commented Aug 22, 2022

amended and squashed directly

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Aug 22, 2022
@jia200x jia200x force-pushed the pr/gnrc_netif_multi_queue branch from e2efc90 to c99bb72 Compare August 22, 2022 14:32
@jia200x
Copy link
Member Author

jia200x commented Aug 22, 2022

I already tested this one with #18472 and it definitely helps the SubMAC or any MAC layer in the middle

@benpicco
Copy link
Contributor

CI is unhappy

@jia200x jia200x force-pushed the pr/gnrc_netif_multi_queue branch from c99bb72 to 5fd601a Compare August 22, 2022 16:00
@jia200x
Copy link
Member Author

jia200x commented Aug 22, 2022

I forgot GNRC LoRaWAN and the other MACs use event_post too... Just amended and squashed directly.

@jia200x jia200x merged commit 3998781 into RIOT-OS:master Aug 22, 2022
@jia200x
Copy link
Member Author

jia200x commented Aug 22, 2022

Thanks for the review!

@maribu maribu added this to the Release 2022.10 milestone Oct 14, 2022
maribu added a commit to maribu/RIOT that referenced this pull request Apr 30, 2024
maribu added a commit to maribu/RIOT that referenced this pull request May 8, 2024
ant9000 pushed a commit to ant9000/RIOT that referenced this pull request Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants