Skip to content

Conversation

@cvinayak
Copy link
Contributor

No description provided.

@cvinayak cvinayak force-pushed the github_v3_5_99_ncs1_branch_ncsidb_1718_preview_3 branch from 70e7b0a to a624939 Compare November 11, 2025 12:25
@cvinayak cvinayak force-pushed the github_v3_5_99_ncs1_branch_ncsidb_1718_preview_3 branch 2 times, most recently from ca1a41d to 2bb4fd4 Compare November 12, 2025 12:24
cvinayak and others added 8 commits November 12, 2025 14:16
…r in rx pool"

This reverts commit fa2f75e.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
… BT_CTLR"

This reverts commit 7af2bc5.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…allocation failure"

This reverts commit eabfcff.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
…pool

The Bluetooth data buffer API currently lacks a mechanism to notify when
a buffer is freed in the RX pool. This limitation forces HCI drivers to
adopt inefficient workarounds to manage buffer allocation.

HCI drivers face two suboptimal options:

- Blocking calls: Use bt_buf_get_rx with K_FOREVER, which blocks the
  execution context until a buffer becomes available.
- Polling: Repeatedly call bt_buf_get_rx with K_NO_WAIT, which increases
  CPU load and reduces efficiency.

This commit introduces a callback mechanism that is triggered each time
a buffer is freed in the RX pool. With this feature, HCI drivers can:

- Call bt_buf_get_rx with K_NO_WAIT.
- Wait for the callback notification if a NULL buffer is returned,
  avoiding unnecessary polling.

The new callback improves efficiency by enabling event-driven behavior
for buffer management, reducing CPU overhead while maintaining
responsiveness.

Signed-off-by: Pavel Vasilyev <[email protected]>
(cherry picked from commit c2488fd)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
This code can be found (kinda) duplicated all over
`tests/bsim/bluetooth`.

Put it in a common place.

Refactoring the current tests will be done in a future commit.

Signed-off-by: Jonathan Rico <[email protected]>
(cherry picked from commit 389192a)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Adds two macros to the babblekit library:
* DEFINE_FLAG_STATIC
* TEST_ASSERT_NO_MSG

Signed-off-by: Håvard Reierstad <[email protected]>
(cherry picked from commit c2c4f2e)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
This commit adds a stress test to verify that the HCI driver does not
drop any data. Specifically, it tests whether the HCI IPC driver can
reliably pass data between the Host and Controller.

Due to the current HCI IPC driver implementation, this test is
guaranteed to fail if Controller-to-Host HCI ACL data flow control is
disabled.

Signed-off-by: Pavel Vasilyev <[email protected]>
(cherry picked from commit a43b893)
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Port GATT notify_stress test.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
@cvinayak cvinayak force-pushed the github_v3_5_99_ncs1_branch_ncsidb_1718_preview_3 branch from 2bb4fd4 to 72b6ee7 Compare November 12, 2025 13:17
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.

4 participants