Skip to content

Commit 8d2b527

Browse files
Kalle KietäväinenChromeos LUCI
authored andcommitted
drivers: bluetooth: hci: Increase default RX stack size
The `BT_DRV_RX_STACK_SIZE` config is used by HCI drivers to determine a suitable stack size for their RX thread. These threads handle the HCI transport and pass HCI messages to the Bluetooth host via `bt_hci_recv()`. Previously, the default stack size was 256 bytes, but it seems to be too small currently. Measuring the peak stack usage of `bt_hci_recv()` in different scenarios indicates that the function needs over 300 bytes of stack. Thus, an RX thread stack size of 512 should cover that and leave some margin. (cherry picked from commit fa9126f) Original-Signed-off-by: Kalle Kietäväinen <[email protected]> GitOrigin-RevId: fa9126f Cr-Build-Id: 8724909411128659441 Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8724909411128659441 Copybot-Job-Name: zephyr-main-copybot-downstream Change-Id: Ib8b717485f4ad87c630aead18b4523cb002a68dc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6196366 Tested-by: ChromeOS Prod (Robot) <[email protected]> Bot-Commit: ChromeOS Prod (Robot) <[email protected]> Commit-Queue: ChromeOS Prod (Robot) <[email protected]>
1 parent 7a487db commit 8d2b527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bluetooth/hci/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ config BT_DRV_RX_STACK_SIZE
295295
default BT_RX_STACK_SIZE if (BT_H4 || BT_HCI_RAW_H4)
296296
default BT_STM32_IPM_RX_STACK_SIZE if BT_STM32_IPM
297297
default HCI_NXP_RX_STACK_SIZE if HCI_NXP_RX_THREAD
298-
default 256
298+
default 512
299299
help
300300
Stack size for the HCI driver's RX thread.
301301

0 commit comments

Comments
 (0)