1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys
Marian Buschsieweke 276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.

To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.

This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
..
analog_util sys/analog_util: Add Kconfig support 2021-02-22 14:54:14 +01:00
app_metadata sys/app_metadata: Add Kconfig support 2021-02-22 14:54:14 +01:00
arduino Merge pull request #17479 from gschorcht/cxxexflags_cpp+14 2022-01-17 13:42:41 +01:00
auto_init sys/auto_init: model auto_init_security in Kconfig 2022-05-03 16:06:22 +02:00
base64 sys/base64: Add Kconfig support 2021-02-22 14:54:14 +01:00
benchmark sys/benchmark: fix divide by zero if runs < 1000 2022-02-08 12:52:48 +01:00
bhp Kconfig/bhp_*: add initial Kconfig modelling 2022-08-11 10:57:55 +02:00
bitfield sys/bitfield: improve documentation of bf_get_unset() 2022-03-08 10:28:31 +01:00
bloom sys/bloom: Add Kconfig support 2021-02-22 14:54:14 +01:00
bus sys/bus: model Kconfig 2022-03-11 09:24:12 +01:00
can sys/can: migrate to ztimer 2022-01-10 12:21:40 +01:00
cb_mux sys/cb_mux: Add Kconfig support 2021-02-22 14:54:14 +01:00
checksum sys/checksum: add module to Kconfig 2020-11-27 09:20:05 +01:00
chunked_ringbuffer sys/chunked_ringbuffer: model in Kconfig 2022-03-04 09:35:50 +01:00
clif sys/clif: fix attribute parsing and comply with tests 2021-03-05 16:47:53 +01:00
color
congure sys/shell_commands: convert to SHELL_COMMAND() 2022-06-07 09:25:04 +02:00
cpp11-compat core: implement core_mutex_mitigate_priority_inversion 2022-08-05 13:08:52 +02:00
cpp_new_delete sys: remove -std=c++11 2022-01-13 17:50:59 +01:00
crypto sys/crypto: remove deprecated CIPHER_AES_128 2022-01-07 11:14:10 +01:00
cxx_ctor_guards doc: Improve C++ documentation 2021-12-15 18:58:23 +01:00
div
ecc treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
eepreg sys/eepreg: Add Kconfig support 2021-02-22 14:54:14 +01:00
embunit sys/embunit/Kconfig: make module available only for testing 2020-12-02 10:14:43 +01:00
entropy_source sys/entropy_source: fix typo (sates => states) 2021-01-08 10:15:33 +01:00
event sys/event: ensure that a queue has a waiter before waiting for flags 2022-04-14 17:10:24 +02:00
evtimer sys/evtimer: use now returned by set 2021-12-14 13:24:29 +01:00
fido2 sys/fido2: documentation changes && code cleanup 2022-04-12 16:01:50 +02:00
fmt sys/fmt: fix print() for native 2022-06-10 11:02:40 +02:00
frac sys/frac: add module to Kconfig 2021-01-18 14:14:13 +01:00
fs sys/fs/constfs: allow to host arbitrary data 2022-06-12 19:39:27 +02:00
fuzzing sys/fuzzing: fix compilation with NDEBUG 2021-12-09 16:44:19 +01:00
hashes treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
include sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
iolist sys/iolist: introduce iolist_to_buffer() 2022-05-02 23:23:52 +02:00
isrpipe sys/isrpipe: add isrpipe_write 2021-12-07 13:00:58 +01:00
libc/include/sys
log sys/log/kconfig: change entry-point 2021-12-10 18:54:29 +01:00
luid sys/luid: add module to Kconfig 2021-01-26 17:40:30 +01:00
malloc_thread_safe sys/malloc_thread_safe: mark functions "used" 2022-02-15 12:28:16 +01:00
matstat sys/matstat: Add Kconfig support 2021-02-22 14:54:14 +01:00
memarray sys/memarray: Add Kconfig support 2021-02-22 14:54:14 +01:00
mineplex sys/mineplex: Add Kconfig support 2021-02-22 14:54:14 +01:00
net Merge pull request #18383 from jia200x/pr/kw2xrf_radio_hal 2022-08-16 11:42:03 +02:00
newlib_syscalls_default sys/syscalls: add libc_gettimeofday 2022-03-24 11:36:49 +01:00
od sys/od/kconfig: add od_string 2022-03-11 09:20:24 +01:00
oneway-malloc sys/oneway-malloc: Add Kconfig support 2021-02-22 14:54:15 +01:00
phydat sys/phydat: fix phydat_to_json dim precondition 2022-05-19 07:29:51 +02:00
picolibc_syscalls_default sys/picolibc_syscalls_default: make stdin and stderr strong refs 2021-10-20 11:21:57 +02:00
pipe
pm_layered sys/pm_layered: rename val_u8 -> blockers 2022-04-06 12:29:25 +02:00
posix sys/posix/select: remove conditional compilation for ESP32 2022-05-18 07:27:23 +02:00
progress_bar sys/progress_bar: add Konfig configuration 2021-04-07 12:05:00 +02:00
ps schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
puf_sram
random random: use void * in random_bytes() 2022-07-26 19:46:14 +02:00
riotboot sys/riotboot/hdr: change header validation log to DEBUG 2022-04-14 11:53:31 +02:00
rtc_utils sys: move rtc utility functions to their own module 2021-12-20 13:04:20 +01:00
rust_riotmodules rust_riotmodules: pub use instead of extern crate 2022-07-10 21:27:13 +02:00
rust_riotmodules_standalone rust: Bring lock files in sync with toml files 2022-08-01 16:28:12 +02:00
saul_reg drivers/saul: use const qualifier for data to write 2022-05-23 08:35:27 +02:00
sched_round_robin sys/sched_round_robin: Add a round robin scheduler module 2021-11-11 13:18:52 +01:00
schedstatistics schedstatistics: Convert to ztimer 2021-12-07 16:31:15 +01:00
sema sys/sema: use sema_ztimer64 to implement old sema api 2022-03-10 14:19:44 +01:00
sema_inv sys/sema_inv: add inverse Semaphore 2021-01-17 00:17:58 +01:00
senml sys/senml: add SenML modules 2022-02-11 12:38:21 +01:00
seq sys/seq: Add Kconfig support 2021-02-22 14:54:15 +01:00
shell Merge pull request #18133 from fabian18/gcoap_fileserver_file_and_directory_creation 2022-08-04 16:14:29 +02:00
shell_lock sys/shell_lock: add telnet support 2022-06-08 13:01:23 +02:00
ssp sys/ssp: use a random value as the canary 2020-01-20 14:51:26 +01:00
stdio_nimble sys/stdio_nimble: fiter conn_handle 2022-04-27 10:10:32 +02:00
stdio_null
stdio_rtt stdio_rtt: Add unit clarification to poll define 2021-12-07 10:04:04 +01:00
stdio_semihosting stdio_semihosting: Add unit clarification to poll define 2021-11-03 11:39:26 +01:00
stdio_uart sys/stdio_uart: implementation of stdio_available 2022-01-03 16:14:11 +01:00
suit nanocoap: make use of coap_request_ctx_t 2022-07-17 14:29:39 +02:00
test_utils sys/test_utils/netdev_eth_minimal: model in Kconfig 2022-07-22 15:57:20 +02:00
timex sys/timex: Add Kconfig support 2021-02-22 14:54:15 +01:00
trace treewide: make all modules use Kconfig ZTIMER_USEC indirection 2022-03-17 14:33:07 +01:00
trickle sys/trickle: migrate to ZTIMER_MSEC 2021-06-14 09:04:25 +02:00
tsrb sys/tsrb: add peek functions 2021-11-24 17:54:44 +01:00
universal_address
uri_parser sys/uri_parser: enforce maximum port length 2022-05-11 21:15:55 +02:00
usb Merge pull request #17380 from qmk/bind_extra_usb_config 2022-01-09 17:58:38 +01:00
usb_board_reset sys/usb_board_reset: Model kconfig 2021-12-06 09:05:37 +01:00
ut_process ut_process: add ; after DEBUG() 2021-12-09 11:20:44 +01:00
uuid
vfs Merge pull request #17651 from benpicco/fs/constfs-cleanup 2022-05-19 23:23:49 +02:00
vfs_util sys/vfs_util: add recursive unlink 2022-08-03 22:09:21 +02:00
xtimer sys/xtimer: switch default backend to ztimer 2022-03-18 08:23:00 +01:00
zptr
ztimer sys/ztimer: no log for stdio_rtt/semihosting 2022-06-07 08:51:10 +02:00
ztimer64 sys/ztimer64: properly clear timer on removal 2022-03-01 11:03:10 +01:00
doc.txt
Kconfig Kconfig/bhp_*: add initial Kconfig modelling 2022-08-11 10:57:55 +02:00
Kconfig.newlib sys/syscalls: add libc_gettimeofday 2022-03-24 11:36:49 +01:00
Kconfig.picolibc sys/libc: model Kconfig 2021-10-01 11:26:15 +02:00
Kconfig.stdio drivers/ethos: model in Kconfig 2022-07-22 16:06:36 +02:00
Makefile sys/bhp_event: add Event based implementation for Bottom Half Processor 2022-08-11 10:57:54 +02:00
Makefile.dep sys/net/gnrc/netif: allow checking if a netdev is legacy or new API 2022-08-17 12:56:07 +02:00
Makefile.include sys/bhp_event: add Event based implementation for Bottom Half Processor 2022-08-11 10:57:54 +02:00