Skip to content

Bluetooth: L2CAP patches tracker - #67511

Closed
jori-nordic wants to merge 8 commits into
zephyrproject-rtos:mainfrom
jori-nordic:l2cap-single-tx-rework
Closed

Bluetooth: L2CAP patches tracker#67511
jori-nordic wants to merge 8 commits into
zephyrproject-rtos:mainfrom
jori-nordic:l2cap-single-tx-rework

Conversation

@jori-nordic
jori-nordic force-pushed the l2cap-single-tx-rework branch 2 times, most recently from b906460 to 0789f2b Compare January 12, 2024 08:07
If $BASH_SOURCE is the empty string, then those two tests end up with
the same simulation ID. That's not a good time.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
It seems like a nice idea at first, but leads to hard-to-debug
situations for the application.

The previous behavior can be implemented by the app by defining
`alloc_seg` and allocating from the same pool as `buf`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This simplifies the code.

It also saves memory in the metadata structure (`sent` is almost
rendered useless), and allows sending buffers that fit MTU without a
wasteful segmentation.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Separate most of the param checking in `bt_l2cap_chan_send()`, with the
logic in `bt_l2cap_dyn_chan_send()`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Always pull from the channel queue from the system workqueue context.
This simplifies debugging.

This also allows us to remove `sent` from the metadata struct.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
@jori-nordic
jori-nordic force-pushed the l2cap-single-tx-rework branch from 0789f2b to 517b884 Compare January 12, 2024 09:02
Remove the logic for adding the SDU length when allocating segments. That
section was dead code after the recent patches.

Inline the remainder of the logic into `l2cap_chan_le_send()`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Fix the handling of buffers with fragments. What seems to have been
broken is the metadata reference that was not passed to the next frag in
the chain.

Add a test to regression too.

The main user of this is IPSP.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
They're still subject to change.
At least now the users have some idea of what's happening.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
@jori-nordic

Copy link
Copy Markdown
Contributor Author

all merged 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant