zephyr/tests
Jonathan Rico 38c39af4df Bluetooth: L2CAP: Prepend SDU header immediately
Previously it was not always possible to prepend the header.

It was not possible if the application neglected to reserve the space
for headers.  This is bad because it forces a buffer segment allocation
even if the buffer had enough room for the headers. E.g. a payload of 10
bytes in a netbuf of 30 bytes would have been segmented.

We now explicitly reject the buffer if it does not have the headroom.

This allows us to do a nice thing; simplify L2CAP segmentation.

We convert the SDU from the application into a PDU payload, by
prepending the SDU header, i.e. the SDU length in the original buffer.

This PDU payload is ready to be chunked into PDUs without having to keep
track of where in the SDU we are. This has the effect of removing a
bunch of logic in the segmentation machine.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-01-16 11:29:43 +00:00
..
application_development code_relocation: Add NOKEEP option 2024-01-15 13:20:17 +01:00
arch tests: Refactor ACPI info sample 2023-12-19 11:04:19 +01:00
benchmarks tests: latency_measure: Update sample output 2024-01-08 10:10:21 +01:00
bluetooth Bluetooth: Audio: Fix off-by-one error in codec.c:ltv_set_val 2024-01-16 10:00:04 +01:00
boards tests/boards/native_sim/rtc: Rename testcase 2023-11-30 09:42:25 -05:00
boot test: mcuboot: enable test on rt1010/1015/1040 and k22f/82f platforms 2023-12-18 09:28:34 +01:00
bsim Bluetooth: L2CAP: Prepend SDU header immediately 2024-01-16 11:29:43 +00:00
cmake tests/cmake/*: Switch to native_sim 2023-11-27 16:06:42 +00:00
crypto tests: crypto: rand32: Check return code of sys_csrand_get 2024-01-03 23:57:13 -06:00
drivers test: bmi160: rename test directory 2024-01-16 10:01:00 +01:00
kconfig/configdefault tests: Remove stray uses of CONFIG_ZTEST_NEW_API 2023-10-26 10:55:38 +02:00
kernel tests/kernel/context: Improve to resist parallel threads interrupting 2024-01-15 09:58:26 +01:00
lib posix: Fix name collision with __bswap 2024-01-10 18:13:44 +00:00
misc tests/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
modules tests: modules: nanopb: Add a custom nested library 2023-12-01 10:50:26 +00:00
net tests: net: socket: Add correct path to socket.h for POSIX_API 2024-01-16 10:00:45 +01:00
posix tests: posix: separate suite for pthread_t and pthread_attr_t 2024-01-16 00:35:45 -05:00
robot Twister: Add integration with renode-test 2023-05-26 09:43:49 -04:00
subsys tests: modem: pipe: mock: Implement TRANSMIT_IDLE event 2024-01-15 15:11:50 +01:00
unit tests: unit: util: Add test for CONCAT macro 2024-01-12 09:57:57 +01:00
ztest ztest: fix ztest_run_test_suite usage and macros 2024-01-09 08:15:22 -05:00
test_config.yaml twister: tests: Add some generic driver tests to the scope 2023-11-30 19:38:50 -05:00