Skip to content

RFC L2CAP fragmentation changes

Mat Martineau linux-arm-msm linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Bluetooth: Calculate L2CAP FCS on fragmented skbuffs.net/bluetooth/l2cap.c+38 -192 replies
2/7Bluetooth: Use enhanced L2CAP header structure and symbolic values.net/bluetooth/l2cap.c+13 -104 replies
3/7Bluetooth: Add FCS awareness to L2CAP HCI fragmentation.net/bluetooth/l2cap.c+34 -56 replies
4/7Bluetooth: Linearize received L2CAP skbuffs.net/bluetooth/bnep/core.c net/bluetooth/cmtp/core.c net/bluetooth/hidp/core.c +1 more+20 -52 replies
5/7Bluetooth: Handle fragmented skbs in bt_sock_stream_recvmsg()net/bluetooth/af_bluetooth.c+28 -22 replies
6/7Bluetooth: Reassemble enhanced L2CAP PDUs using skb fragments.include/net/bluetooth/l2cap.h net/bluetooth/l2cap.c+36 -312 replies
7/7Bluetooth: Do not limit enhanced L2CAP max PDU size to HCI MTU.net/bluetooth/l2cap.c+8 -81 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/7] L2CAP fragmentation changes

Since the previous L2CAP patch set has not been fully merged, I'm only posting these patches for review at this time.

ERTM and streaming mode currently have a limitation where the trasmitted PDU size cannot exceed the HCI MTU. This is a problem with some basebands with small HCI MTU values (some are around 300 bytes), since it is not possible to use larger BR/EDR packets over the air when the PDUs are too small. Bandwidth is also wasted with extra L2CAP header overhead. Patches 1-3 add the capability to calculate checksums on PDUs that have HCI continuation fragments.

Patches 4-6 change the way ERTM PDUs are reassembled, to avoid extra data copying at receive time. At higher AMP data rates, this efficiency improvement becomes more important. Each PDU is linked together using skbuff fragments, similar to the way outgoing data uses skbuff frag_lists for HCI continuations. This way, L2CAP must only copy the data to a linear buffer when it is copied out to userspace.

Patch 7 changes the max PDU size configuration to allow larger PDU sizes to be set up, enabling ERTM and streaming mode to send larger PDUs.