Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: tests: shell: br : increase rfcomm dlc stack size #83250

Merged

Conversation

makeshi
Copy link
Contributor

@makeshi makeshi commented Dec 20, 2024

For the shell RFCOMM case, these is a stack overflow problem when do disconnect, so need to increase the CONFIG_BT_RFCOMM_DLC_STACK_SIZE. After testing, the stack here requires at least 388 bytes. With an additional 10% buffer, so set this size to 420.

@jhedberg
Copy link
Member

How tight on memory are you with the platforms that you're targeting for? Generally, it's better to avoid special-casing applications and having conditional defaults, if a single default value can cover most cases. Maybe consider removing the conditional default for HFP in subsys/bluetooth/classic/Kconfig and just have a single default of 512? (again, I don't know the memory situation for your platforms, so please correct me if you think this is a bad idea)

@jhedberg jhedberg assigned lylezhu2012 and unassigned jhedberg and alwa-nordic Dec 20, 2024
@jhedberg jhedberg added the area: Bluetooth Classic Bluetooth Classic (BR/EDR) label Dec 20, 2024
@makeshi
Copy link
Contributor Author

makeshi commented Dec 20, 2024

@jhedberg My platform is based on NXP's EVK1170, which uses an ARM Cortex-M7 core.
With a default single-core configuration of 512 meet my requirements. And @lylezhu2012 How about this proposal using single default of 512 by removing the conditional default for HFP ?

@lylezhu2012
Copy link
Contributor

And @lylezhu2012 How about this proposal using single default of 512 by removing the conditional default for HFP ?

Yes. I think we can do it.

@makeshi
Copy link
Contributor Author

makeshi commented Dec 20, 2024

And @lylezhu2012 How about this proposal using single default of 512 by removing the conditional default for HFP ?

Yes. I think we can do it.

OK, I will update the PR with the proposal

For the shell RFCOMM case, these is a stack overflow problem when do
disconnect, so need to increase the CONFIG_BT_RFCOMM_DLC_STACK_SIZE.
Set CONFIG_BT_RFCOMM_DLC_STACK_SIZE default 512.

Signed-off-by: Make Shi <[email protected]>
@makeshi makeshi force-pushed the bt_shell_br_stack_size branch from 429a290 to eed2b4c Compare December 20, 2024 09:51
@kartben kartben merged commit 3f4ff78 into zephyrproject-rtos:main Dec 24, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Classic Bluetooth Classic (BR/EDR) area: Bluetooth Host area: Bluetooth size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants