-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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: Host: Deprecate BT_BUF_ACL_RX_COUNT
symbol
#81747
base: main
Are you sure you want to change the base?
Bluetooth: Host: Deprecate BT_BUF_ACL_RX_COUNT
symbol
#81747
Conversation
9d08004
to
195310d
Compare
BT_BUF_ACL_RX_COUNT
symbol
195310d
to
29f6d3c
Compare
29f6d3c
to
744924d
Compare
By default, the number of incoming ACL data buffers is equal to | ||
CONFIG_BT_MAX_CONN + 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this +1
because SMP needs an MTU of 69, and Controller sends two HCI ACL Data packets towards Host?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the explanation:
zephyr/include/zephyr/bluetooth/buf.h
Lines 93 to 100 in 744924d
/* The host needs more ACL buffers than maximum ACL links. This is because of | |
* the way we re-assemble ACL packets into L2CAP PDUs. | |
* | |
* We keep around the first buffer (that comes from the driver) to do | |
* re-assembly into, and if all links are re-assembling, there will be no buffer | |
* available for the HCI driver to allocate from. | |
* | |
* Fixing it properly involves a re-design of the HCI driver interface. |
744924d
to
d34ac1a
Compare
Because the number of ACL RX buffers must be at least the number of maximum connections plus one, increasing `CONFIG_BT_MAX_CONN` could inadvertently lead to a build failure if the number of ACL RX buffers is not also increased. This dependency may not be obvious to users. To address this issue, this commit deprecates the `CONFIG_BT_BUF_RX_COUNT` Kconfig symbol and computes the value in `buf.h` using the new `BT_BUF_RX_COUNT` define. Note that the default value and the minimum range value have been changed to 0 to "disable" the option. Additionally, to allow users to increase the number of ACL RX buffers, this commit introduces the new `CONFIG_BT_BUF_RX_COUNT_EXTRA` Kconfig symbol. The value of this symbol will be added to the computed value of `BT_BUF_RX_COUNT`. The configurations of tests and samples have been updated to reflect these changes. Signed-off-by: Théo Battrel <[email protected]>
d34ac1a
to
f2ba815
Compare
Because the number of ACL RX buffers must be at least the number of maximum connections plus one, increasing
CONFIG_BT_MAX_CONN
could inadvertently lead to a build failure if the number of ACL RX buffers is not also increased. This dependency may not be obvious to users.To address this issue, this commit deprecates the
CONFIG_BT_BUF_RX_COUNT
Kconfig symbol and computes the value inbuf.h
using the newBT_BUF_RX_COUNT
define.Additionally, to allow users to increase the number of ACL RX buffers, this commit introduces the new
CONFIG_BT_BUF_RX_COUNT_EXTRA
Kconfig symbol. The value of this symbol will be added to the computed value ofBT_BUF_RX_COUNT
.The configurations of tests and samples have been updated to reflect these changes.