1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/sys/net/gnrc/netif
Marian Buschsieweke 973b6f69bf
sys/net/netopt: change NETOPT_STATS semantics
Instead of retrieving a pointer with NETOPT_STATS, retrieve the current
data. This avoids data corruptions when reading from one thread (e.g.
the thread running the shell (ifconfig command)) while another thread
is updating it (e.g. the netif thread).

The issue affects all boards, as users typically expect the count of
TX packets and the number of TX bytes to refer to the same state. For
16 bit and 8 bit platforms even a single netstat entry can read back
corrupted.

This fixes the issue by just copying the whole netstat_t struct over
without requiring explicit locking on the user side. A multi-threaded
network stack still needs to synchronize the thread responding to
netopt_get with the thread writing to the netstat_t structure, but that
is an implementation detail no relevant to the user of the API.
2022-06-28 16:57:43 +02:00
..
ethernet sys/net/gnrc/netif/ethernet: Support RX timestamp 2021-01-06 20:30:14 +01:00
hdr treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
ieee802154 gnrc_netif_ieee802154: avoid explicit cast to netdev 2021-07-09 11:35:19 +02:00
init_devs Merge pull request #17709 from benpicco/cpu/native-tap_wired 2022-06-01 02:24:43 +02:00
lorawan gnrc_netif: use event queue for ISR offload 2022-05-10 17:48:42 +02:00
pktq gnrc_netif_pktq: protect against concurrent access 2022-06-01 12:13:31 +02:00
_netif.c sys/net/gnrc/netif: use container_of() 2021-12-03 10:12:33 +01:00
gnrc_netif_device_type.c drivers/slipdev: report NETOPT_ADDRESS to simulate l2 address 2021-06-21 12:42:03 +02:00
gnrc_netif_raw.c treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
gnrc_netif.c sys/net/netopt: change NETOPT_STATS semantics 2022-06-28 16:57:43 +02:00
Kconfig gnrc_netif_pktq: create dedicated Kconfig 2022-05-30 11:13:52 +02:00
Makefile gnrc_netif: add a send queue 2020-09-02 12:30:22 +02:00