zephyr/subsys/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
..
a2dp_internal.h
a2dp.c
addr_internal.h
addr.c
adv.c bluetooth: fixes shadow variables 2023-08-17 13:00:09 +02:00
adv.h
aes_ccm.c
at.c
at.h
att_internal.h Bluetooth: ATT: call-back on buffer destroy 2023-12-15 17:14:56 +02:00
att.c Bluetooth: ATT: call-back on buffer destroy 2023-12-15 17:14:56 +02:00
avdtp_internal.h
avdtp.c Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
br.c bluetooth: fixes shadow variables 2023-08-17 13:00:09 +02:00
br.h
buf.c Bluetooth: Host: Use actual user_data size 2023-12-11 12:50:54 +01:00
CMakeLists.txt Bluetooth: Host: CMake dependency for Mesh Bsim 2023-10-20 15:07:51 +02:00
conn_internal.h Bluetooth: Host: Add LE Power Control Request Procedure APIs 2023-11-29 09:59:39 +01:00
conn.c Bluetooth: Use CONFIG_BT_CONN_TX_USER_DATA_SIZE 2023-11-30 10:06:19 +01:00
crypto.c
crypto.h
data.c
direction_internal.h
direction.c
ecc.c bluetooth: fixes shadow variables 2023-08-17 13:00:09 +02:00
ecc.h bluetooth: fixes shadow variables 2023-08-17 13:00:09 +02:00
gatt_internal.h
gatt.c Bluetooth: ATT: Reject read-by-uuid rsp outside range 2023-12-21 09:18:14 +01:00
hci_common.c
hci_core.c Bluetooth: Host: add hci error to errno translation for INVALID_PARAM 2023-12-22 09:52:29 +01:00
hci_core.h bluetooth: id: make sharing RPA between adv sets optional 2023-11-14 09:22:51 +01:00
hci_ecc.c
hci_ecc.h
hci_raw_internal.h
hci_raw.c Bluetooth: Host: Use actual user_data size 2023-12-11 12:50:54 +01:00
hfp_hf.c Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
hfp_internal.h
id.c bluetooth: add HCI driver parameter to set controller's public address 2023-11-29 10:44:25 +01:00
id.h
iso_internal.h Bluetooth: Host: iso_data extend bt_buf_data 2023-12-11 12:50:54 +01:00
iso.c Bluetooth: Host: Use actual user_data size 2023-12-11 12:50:54 +01:00
Kconfig drivers: bluethooth: stm32wba: Add HCI driver for STM32WBA 2023-12-18 17:31:08 +00:00
Kconfig.gatt Bluetooth: ATT: Internalize ATT PDU TX pool 2023-12-15 17:14:56 +02:00
Kconfig.l2cap
keys_br.c
keys.c
keys.h
l2cap_br_interface.h Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
l2cap_br_internal.h Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
l2cap_br.c Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
l2cap_internal.h Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
l2cap.c Bluetooth: L2CAP: Prepend SDU header immediately 2024-01-16 11:29:43 +00:00
long_wq.c bluetooth: Make long workqueue init priority configurable 2023-09-11 19:57:08 +02:00
long_wq.h
monitor.c
monitor.h
rfcomm_internal.h
rfcomm.c Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
scan.c
scan.h
sdp_internal.h
sdp.c Bluetooth: L2CAP: separate BR/EDR and LE internal headers 2024-01-11 10:04:53 +01:00
settings.c
settings.h
smp_null.c
smp.c include: util: Add mem_xor functions 2024-01-05 09:06:36 +01:00
smp.h
ssp.c
ssp.h
testing.c Bluetooth: Mesh: Make bt_mesh_model as rodata 2023-11-16 16:52:14 +01:00
testing.h Bluetooth: Mesh: Make bt_mesh_model as rodata 2023-11-16 16:52:14 +01:00
uuid.c