Bluetooth: Host: Deprecate BT_BUF_ACL_RX_COUNT
symbol
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 <theo.battrel@nordicsemi.no>
This commit is contained in:
parent
9b19a90daa
commit
66ff97e69b
26 changed files with 68 additions and 53 deletions
|
@ -60,27 +60,3 @@ BUILD_ASSERT(!IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE), "Immediate logging "
|
|||
"on selected backend(s) not "
|
||||
"supported with the software Link Layer");
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CONN) && defined(CONFIG_BT_HCI_HOST)
|
||||
/* 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.
|
||||
*/
|
||||
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)
|
||||
BUILD_ASSERT(CONFIG_BT_BUF_ACL_RX_COUNT > CONFIG_BT_MAX_CONN);
|
||||
|
||||
#else /* !CONFIG_BT_HCI_ACL_FLOW_CONTROL */
|
||||
|
||||
/* BT_BUF_RX_COUNT is defined in include/zephyr/bluetooth/buf.h */
|
||||
BUILD_ASSERT(BT_BUF_RX_COUNT > CONFIG_BT_MAX_CONN,
|
||||
"BT_BUF_RX_COUNT needs to be greater than CONFIG_BT_MAX_CONN. "
|
||||
"In order to do that, increase CONFIG_BT_BUF_ACL_RX_COUNT.");
|
||||
|
||||
#endif /* CONFIG_BT_HCI_ACL_FLOW_CONTROL */
|
||||
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue