zephyr/tests/bsim/bluetooth/host
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
..
adv Test: Bluetooth: controller: add CI testing for advertising chaining 2023-10-06 16:04:11 +03:00
att Bluetooth: Host: Add const prefix for UUID 2023-12-07 16:16:43 +00:00
gatt tests: bsim: gatt: ccc_store: Reproduce the subscription lost issue 2023-12-12 15:32:45 +01:00
id/settings tests bsim settings: Fix main return 2023-08-09 16:09:47 +00:00
iso/cis tests bsim cis: Fix sim_id collision 2023-10-30 11:35:45 +01:00
l2cap Bluetooth: L2CAP: Prepend SDU header immediately 2024-01-16 11:29:43 +00:00
misc Tests: Bluetooth: Fix conn_stress compilation warn 2023-12-27 16:07:46 +00:00
privacy tests: bsim: bluetooth: host: privacy: peripheral: test rpa sharing mode 2023-11-14 09:22:51 +01:00
security Bluetooth: Host: Add const prefix for UUID 2023-12-07 16:16:43 +00:00
compile.sh tests: Bluetooth: add babblesim connection stress test 2023-12-12 21:43:45 +02:00