[riot-notifications] [RIOT-OS/RIOT] gnrc_netif: use event loops by default to process ISR (#16748)

José Alamos notifications at github.com
Mon Aug 16 15:49:29 CEST 2021

The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.

### Contribution description
This PR removes the NETDEV_MSG_TYPE_EVENT and forces GNRC Netif to do the Bottom Half processing (ISR offload) using event loops instead of msg queues.

Msg queues are not safe for processing ISR because they might be lost. Indeed this might happen often if the device is under stress (e.g Border Router). Losing these events tend to have catastrophic consequences such as:
- Radios might stop receiving frames if the FB is lock and nobody cares to read the framebuffer
- The IEEE 802.15.4 SubMAC might be go to the wrong state if one of the radio events get lost.

I suspect some of the BR freezes might be related to this.

This PR also removes the `gnrc_netif_events` since it's not optional anymore. We should adapt it in the future to use `thread_flags` directly though (I know @maribu already did this in one of the `confirm_send` PRs).
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes

### Testing procedure
Make sure GNRC netif works properly.
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output

### Issues/PRs references
Depends on #16747, otherwise that radio won't work anymore.
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * drivers/at86rf215: remove msg queue dependency
  * gnrc_netif: use events instead of msg queue for ISR offload
  * gnrc_netif: use event queue for ISR offload
  * link_layer/gomach: use event queue for ISR offload
  * link_layer/lwmac: use event queue for ISR offload

-- File Changes --

    M drivers/at86rf215/at86rf215_netdev.c (14)
    M drivers/include/at86rf215.h (1)
    M makefiles/pseudomodules.inc.mk (1)
    M sys/include/net/gnrc/netif.h (2)
    M sys/include/net/gnrc/netif/internal.h (5)
    M sys/net/gnrc/Makefile.dep (7)
    M sys/net/gnrc/link_layer/gomach/gomach.c (10)
    M sys/net/gnrc/link_layer/lwmac/lwmac.c (10)
    M sys/net/gnrc/netif/gnrc_netif.c (98)
    M sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c (7)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210816/503e7542/attachment.htm>

More information about the notifications mailing list