[riot-notifications] [RIOT-OS/RIOT] gnrc_netif_pktq: schedule immediately if timer us is equal to zero (#16745)

José Alamos notifications at github.com
Mon Aug 16 14:52:49 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 schedules dequeues in `gnrc_netif_pktq` immediately if `CONFIG_GNRC_NETIF_PKTQ_TIMER_US` is equal to zero.
This avoids an extra context switch.

This PR also sets the default timer to zero in order to schedule a packet immediately if the lower layer (either network device or dedicated MAC layer) is busy. This reduces the RTT considerably when using MAC layers that might return -EBUSY if the transmit function is called inside the RX function (e.g SubMAC and hopefully soon [OpenDSME](https://opendsme.org))

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
This was tested using the reworked version of the SubMAC, but it could be tested with current master as well. Make sure pinging large packets (e.g 1024) works as expected using GNRC_NETIF_PKTQ.
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
None so far
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 --

  * gnrc_netif_pktq: send schedule msg directly if dequeue timer is zero
  * gnrc_netif_pktq: set default dequeue timer to zero

-- File Changes --

    M sys/include/net/gnrc/netif/conf.h (2)
    M sys/net/gnrc/netif/Kconfig (2)
    M sys/net/gnrc/netif/pktq/gnrc_netif_pktq.c (13)

-- 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/646e327c/attachment.htm>

More information about the notifications mailing list