[riot-notifications] [RIOT-OS/RIOT] WIP: sys/net/gnrc/netif: make use of confirm_send (#15821)

Marian Buschsieweke notifications at github.com
Wed Jan 20 17:53:59 CET 2021


### Contribution description

- adapt `gnrc_netif.c` to make use of `netdev_driver_t::confirm_send`, if not `NULL
    - As the new API is explicitly non-blocking, this requires now IRQs to be processed while waiting for TX completion.
    - While TX is in progress, IPC messages (which might contain additional data to send) must not be received. To implement this `core/thread_flags` is used to wait for TX completion and IRQs
    - As a result, IRQs are no longer been lost. Hence, it provides the feature `gnrc_netif_events` provides, but with less ROM. Consequently, `gnrc_netif_events` is dropped
    - As nice side effect, now all events can be reported from IRQ context. This can be beneficial for peripheral radios
    - If `confirm_send()` is provided, the pkgsnip is now released by `gnrc_netif.c`, rather by each adaption layer individually. This is needed, as the driver might still operate on the buffer during TX - e.g. peripheral network interfaces with DMA that supports scatter/gather, no copy of the outgoing frame is needed.
- adapt `gnrc_netif_ethernet.c` to only release the packet buffer if `confirm_send` is not provided
- implement `confirm_send` for the STM32 Ethernet driver

### Testing procedure

- There should be no regressions on drivers not using `confirm_send()`
- There should be no regressions on the STM32 Ethernet driver

### Issues/PRs references

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

  https://github.com/RIOT-OS/RIOT/pull/15821

-- Commit Summary --

  * cpu/stm32/periph_eth: fix error handling
  * cpu/stm32/periph_eth: improve debugging output
  * sys/net/gnrc/netif: use confirm_send(), drop gnrc_netif_events
  * sys/net/gnrc/netif/ethernet: adapt to new API
  * cpu/stm32/periph/eth: update to new API

-- File Changes --

    M cpu/stm32/periph/eth.c (87)
    M cpu/stm32/periph/eth_common.c (4)
    M makefiles/pseudomodules.inc.mk (1)
    M sys/Makefile.dep (6)
    M sys/include/net/gnrc/netif.h (10)
    M sys/net/gnrc/netif/ethernet/gnrc_netif_ethernet.c (5)
    M sys/net/gnrc/netif/gnrc_netif.c (391)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/15821.patch
https://github.com/RIOT-OS/RIOT/pull/15821.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15821
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210120/68056022/attachment.htm>


More information about the notifications mailing list