1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include
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
..
can all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
checksum
crypto sys/crypto: OCB add const 2020-10-05 12:32:51 +02:00
ecc
embUnit
entropy_source sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event sys/event: Allow shared thread for multiple queues 2020-12-03 15:28:35 +01:00
fs pkg/fatfs: bump version to r0.14 2020-11-17 11:29:28 +01:00
hashes sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation. 2020-11-04 09:57:32 +01:00
isrpipe
net sys/net/gnrc/tx_sync: new module 2021-02-03 15:16:42 +01:00
riotboot sys/riotboot: add DFU support to riotboot 2021-01-12 11:34:22 +01:00
suit suit/transport/coap: make blocksize configurable 2020-12-03 10:51:42 +01:00
sys sys/bus: add system buses 2020-11-12 22:50:53 +01:00
test_utils
usb usbus/dfu: introduce initial Device Firmware Upgrade support for USBUS 2021-01-12 11:34:22 +01:00
xtimer xtimer: introduce xtimer_msleep() 2020-10-24 21:38:25 +02:00
ztimer sys/ztimer: fix xtimer_compat 2020-12-14 10:46:51 +01:00
analog_util.h
app_metadata.h
architecture.h sys/architecture: add comment on pronunciation 2020-12-15 10:29:58 +01:00
atomic_utils.h sys/atomic_utils: return previous value 2020-12-16 18:09:35 +01:00
auto_init.h sys/auto_init: Added auto-init for multimedia 2020-06-28 21:06:14 +02:00
base64.h sys/base64: Use void pointer for buffers in API 2020-07-02 11:10:06 +02:00
bcd.h
benchmark.h sys/benchmark: don't disable interrupts 2020-07-28 16:03:00 +02:00
bit.h sys/bit: provide CPU_HAS_SRAM_BITBAND 2021-01-20 09:18:09 +01:00
bitfield.h
bloom.h
byteorder.h core/byteorder: add helpers to convert from little endian to host byte order 2020-11-29 21:41:14 +01:00
c11_atomics_compat.hpp
cb_mux.h
clif.h
color.h
div.h
eepreg.h
embUnit.h
entropy_source.h sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
event.h sys/event: Allow shared thread for multiple queues 2020-12-03 15:28:35 +01:00
evtimer_mbox.h evtimer: add mbox support 2020-08-21 15:19:22 +02:00
evtimer_msg.h
evtimer.h Merge pull request #13661 from jue89/feature/evtimer_on_ztimer 2020-09-27 14:07:04 +02:00
fmt_table.h
fmt.h
frac.h sys/frac: make gcd32() public 2020-10-22 11:10:14 +02:00
fuzzing.h
hashes.h
iolist.h
isrpipe.h
luid.h sys/luid: add luid_netdev_get_eui48() & luid_netdev_get_eui64() 2020-08-18 11:45:45 +02:00
matstat.h
memarray.h memarray: Add extend and reduce functions 2021-01-15 11:39:08 +01:00
mineplex.h
od.h sys/od: allow to specify address offset with od_hex_dump_ext() 2021-01-11 14:35:40 +01:00
phydat.h
pipe.h
pm_layered.h cpu/native: pm: fix build with pm_layered 2020-12-08 18:24:02 +01:00
progress_bar.h
ps.h
ptrtag.h sys: Add helpers for pointer tagging 2020-11-17 10:10:28 +01:00
puf_sram.h
random.h sys/random: add option to use HWRNG as source of randomness 2020-07-08 18:23:18 +02:00
saul_reg.h sys/saul_reg: add saul_reg_find_type_and_name 2021-01-18 22:28:28 +01:00
schedstatistics.h all: remove traces of kernel_types.h 2020-11-25 17:52:34 +01:00
sema_inv.h sys/sema_inv: add inverse Semaphore 2021-01-17 00:17:58 +01:00
sema.h sys/sema: add same_get_value() 2021-01-15 15:22:31 +01:00
seq.h
shell_commands.h
shell.h sys/shell: Add optional hooks for shell commands 2020-07-07 17:00:38 +02:00
stdio_base.h
stdio_rtt.h
stdio_semihosting.h
stdio_uart.h
suit.h suit: Adapt manifest handling to use common storage backend 2020-09-30 14:32:27 +02:00
timex.h sys/timex: change type of NS_PER_SEC 2020-12-02 17:53:00 +01:00
tm.h
trace.h
trickle.h
tsrb.h sys/tsrb: Make thread-safe 2020-10-13 10:32:41 +02:00
unaligned.h sys/unaligned: Add 64 bit version 2020-08-14 12:21:24 +02:00
universal_address.h
uri_parser.h uri_parser: parse interface in IPv6 addresses 2020-11-11 22:47:30 +01:00
usb_board_reset_internal.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb_board_reset.h usb_board_reset: Split headers into public and private 2020-07-01 13:22:25 +02:00
usb.h usb: Add configuration options for USB peripheral serial 2020-12-17 11:37:04 +01:00
utlist.h
uuid.h
vfs.h sys/vfs: adapt to changed thread define location 2020-11-23 16:56:34 +01:00
volatile_utils.h sys/atomic_utils: return previous value 2020-12-16 18:09:35 +01:00
xtimer.h all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
zptr.h sys/zptr: fix typos 2020-10-02 08:15:00 +02:00
ztimer.h ztimer: expose ztimer_is_set() to public API 2021-01-18 17:50:50 +01:00