zephyr/drivers/ieee802154
Florian Grandel b674ed6b8b net: pkt: decouple from ieee802154 internals
This change implements part two of the program laid out in the TSCH RFC,
see #50336#issuecomment-1250250154 :

> Consolidate IEEE 802.15.4 options in net_pkt

This change improves decoupling of generic net core code from
IEEE 802.15.4 internals. It also simplifies IEEE 802.15.4
attribute cloning and thereby makes it easier to maintain and less
error prone (and probably even faster as individual bits are no longer
copied over separately).

This enables us to extend and design IEEE 802.15.4 L2 attributes inside
the package in isolation from the net core code which will no longer
have to be changed when introducing changes or additions to the flags.

This flexibility will be built upon in later change sets to model the
IEEE 802.15.4 attributes closer to the spec.

The solution is inspired by Linux's sk_buff->cb attribute which addresses
the same concern as the attribute introduced in this change set:
https://elixir.bootlin.com/linux/v6.0.1/source/include/linux/skbuff.h#L871

As the inline comment says: The cb attribute can be made a union or even a
uint8[something] in the future, if further L2s need a control block, too.
Right now such full indirection would make the code overly abstract, so
I chose to compromise with maintainability in mind.

Care has been taken to ensure that this changes does not introduce
additional padding into the net package. To maintain zero-padding, future
changes to the net packet struct will have to ensure that the
IEEE 802.15.4 struct is 4-byte aligned (iff the IEEE 802.15.4 struct
continues with max uint32_t scalar members) which is no deviation from
the previous implementation.

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-10-17 16:54:37 +02:00
..
CMakeLists.txt
Kconfig
Kconfig.b91
Kconfig.cc13xx_cc26xx
Kconfig.cc1200
Kconfig.cc2520
Kconfig.dw1000
Kconfig.kw41z
Kconfig.mcr20a
Kconfig.nrf5
Kconfig.rf2xx
Kconfig.uart_pipe
ieee802154_b91.c drivers: ieee802154: don't allocate rx pkt from tx pool 2022-10-17 16:54:37 +02:00
ieee802154_b91.h
ieee802154_cc13xx_cc26xx.c
ieee802154_cc13xx_cc26xx.h
ieee802154_cc13xx_cc26xx_subg.c
ieee802154_cc13xx_cc26xx_subg.h
ieee802154_cc1200.c drivers: ieee802154: don't allocate rx pkt from tx pool 2022-10-17 16:54:37 +02:00
ieee802154_cc1200.h
ieee802154_cc1200_regs.h
ieee802154_cc1200_rf.h
ieee802154_cc2520.c drivers: ieee802154: don't allocate rx pkt from tx pool 2022-10-17 16:54:37 +02:00
ieee802154_cc2520.h
ieee802154_cc2520_regs.h
ieee802154_dw1000.c drivers: ieee802154: don't allocate rx pkt from tx pool 2022-10-17 16:54:37 +02:00
ieee802154_dw1000_regs.h
ieee802154_kw41z.c drivers: ieee802154: don't allocate rx pkt from tx pool 2022-10-17 16:54:37 +02:00
ieee802154_mcr20a.c drivers: ieee802154: don't allocate rx pkt from tx pool 2022-10-17 16:54:37 +02:00
ieee802154_mcr20a.h
ieee802154_mcr20a_regs.h
ieee802154_nrf5.c drivers: ieee802154: nrf: wrapped pkt attribute access 2022-10-17 16:54:37 +02:00
ieee802154_nrf5.h
ieee802154_rf2xx.c net: pkt: decouple from ieee802154 internals 2022-10-17 16:54:37 +02:00
ieee802154_rf2xx.h drivers: ieee802154: rf2xx: Add support to Sub-Giga 2022-09-09 10:31:35 -07:00
ieee802154_rf2xx_iface.c
ieee802154_rf2xx_iface.h
ieee802154_rf2xx_regs.h drivers: ieee802154: rf2xx: Add support to Sub-Giga 2022-09-09 10:31:35 -07:00
ieee802154_uart_pipe.c
ieee802154_uart_pipe.h