1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/net/gnrc
Marian Buschsieweke 89c69c5450
sys/net/gnrc/tx_sync: new module
The new `gnrc_tx_sync` module allows users of the GNRC network stack to
synchronize with the actual transmission of outgoing packets. This is directly
integrated into gnrc_sock. Hence, if `gnrc_tx_sync` is used, calls to e.g.
sock_udp_send() will block until the network stack has processed the message.

Use cases:
1. Prevent packet drop when sending at high rate
    - If the application is sending faster than the stack can handle, the
      message queues will overflow and outgoing packets are lost
2. Passing auxiliary data about the transmission back the stack
    - When e.g. the number of required retransmissions, the transmission time
      stamp, etc. should be made available to a user of an UDP sock, a
      synchronization mechanism is needed
3. Simpler error reporting without footguns
    - The current approach of using `core/msg` for passing up error messages is
      difficult to use if other message come in. Currently, gnrc_sock is
      busy-waiting and fetching messages from the message queue until the number
      of expected status reports is received. It will enqueue all
      non-status-report messages again at the end of the queue. This has
      multiple issues:
        - Busy waiting is especially in lower power scenarios with time slotted
          MAC protocols harmful, as the CPU will remain active and consume
          power even though the it could sleep until the TX slot is reached
        - The status reports from the network stack are send to the user thread
          blocking. If the message queue of the user thread is full, the network
          stack would block until the user stack can fetch the messages. If
          another higher priority thread would start sending a message, it
          would busy wait for its status reports to completely come in. Hence,
          the first thread doesn't get CPU time to fetch messages and unblock
          the network stack. As a result, the system would lock up completely.
    - Just adding the error/status code to the gnrc_tx_sync_t would preallocate
      and reserve memory for the error reporting. That way gnrc_sock does not
      need to search through the message queue for status reports and the
      network stack does not need to block for the user thread fetching it.
2021-02-03 15:16:42 +01:00
..
dhcpv6/client gnrc_dhcpv6_client: configure prefix as compression context on 6LBRs 2020-03-09 14:21:53 +01:00
gomach all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
icmpv6 sys/include: fix typos 2019-11-23 22:39:37 +01:00
ipv6 gnrc_ipv6_nib_nc: error on non-link-local address without ARSM 2020-09-01 11:12:55 +02:00
lorawan gnrc/lorawan : Add IN_865 channel frequencies 2020-10-13 13:38:19 +05:30
lwmac all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
mac all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
netif drivers/nrf24l01p_ng: netdev driver for nrf24l01+ 2021-01-24 20:49:39 +01:00
rpl gnrc/rpl: Move GNRC_RPL_CLEANUP_TIME to 'CONFIG_' namespace 2020-05-14 15:56:58 +02:00
sixlowpan gnrc_sixlowpan_frag_sfr: provide statistics sub-module 2020-12-14 13:00:37 +01:00
tcp all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
icmpv6.h gnrc_ipv6: gnrc_icmpv6: simplify access to network interfaces 2018-01-17 16:48:58 +01:00
ipv6.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
lorawan.h gnrc_lorawan: uncrustify files 2020-09-30 14:18:54 +02:00
ndp.h all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
netapi.h Merge pull request #10441 from miri64/gnrc_netapi/enh/codesize-opt 2018-12-12 09:51:02 +01:00
neterr.h all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
netif.h Merge pull request #15120 from benpicco/driver/at86rf215-trim 2020-12-02 16:53:02 +01:00
netreg.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
nettype.h sys/net/gnrc/tx_sync: new module 2021-02-03 15:16:42 +01:00
pkt.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
pktbuf.h sys/net/gnrc_pktbuf: deduplicate code 2021-01-26 10:50:19 +01:00
pktdump.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
pktqueue.h doc: Fix 'must not'/'may not' wording 2017-12-19 09:00:12 +01:00
priority_pktqueue.h doc: Fix 'must not'/'may not' wording 2017-12-19 09:00:12 +01:00
rpl.h gnrc/rpl: document implementation status 2020-10-08 12:10:05 +02:00
sixlowpan.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
tcp.h sys/net/gnrc: fix typos 2020-10-02 08:13:18 +02:00
tx_sync.h sys/net/gnrc/tx_sync: new module 2021-02-03 15:16:42 +01:00
udp.h gnrc/udp: Configure queue size with exponent 2020-06-15 07:30:51 +02:00