Bluetooth: host: Add lower bound for CONFIG_BT_BUF_ACL_RX_COUNT

See comment above assert for more.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This commit is contained in:
Jonathan Rico 2024-07-08 14:52:07 +02:00 committed by Anas Nashif
commit 4afe745a1d
16 changed files with 55 additions and 11 deletions

View file

@ -3,7 +3,7 @@ CONFIG_ASSERT=y
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_MAX_CONN=16
CONFIG_BT_MAX_CONN=1
CONFIG_BT_BUF_CMD_TX_COUNT=10

View file

@ -42,6 +42,7 @@ CONFIG_BT_CTLR_DATA_LENGTH_MAX=27
CONFIG_BT_CTLR_RX_BUFFERS=10
CONFIG_BT_MAX_CONN=10
CONFIG_BT_BUF_ACL_RX_COUNT=11
CONFIG_LOG=y
CONFIG_ASSERT=y

View file

@ -34,6 +34,7 @@ CONFIG_BT_CTLR_DATA_LENGTH_MAX=81
CONFIG_BT_CTLR_RX_BUFFERS=10
CONFIG_BT_MAX_CONN=10
CONFIG_BT_BUF_ACL_RX_COUNT=11
CONFIG_LOG=y
CONFIG_ASSERT=y

View file

@ -42,6 +42,7 @@ CONFIG_BT_CTLR_DATA_LENGTH_MAX=27
CONFIG_BT_CTLR_RX_BUFFERS=10
CONFIG_BT_MAX_CONN=10
CONFIG_BT_BUF_ACL_RX_COUNT=11
CONFIG_LOG=y
CONFIG_ASSERT=y

View file

@ -2,6 +2,7 @@ CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_MAX_CONN=12
CONFIG_BT_BUF_ACL_RX_COUNT=13
CONFIG_BT_MAX_PAIRED=12
CONFIG_BT_SMP=y
CONFIG_BT_PRIVACY=y

View file

@ -26,11 +26,10 @@ CONFIG_BT_AUTO_PHY_UPDATE=n
CONFIG_BT_AUTO_DATA_LEN_UPDATE=n
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n
# As many host buffers as connection slots
# The whole test hinges on bufs <= links, which is a valid
# configuration at the time of writing this test.
CONFIG_BT_MAX_CONN=3
CONFIG_BT_BUF_ACL_RX_COUNT=3
# It passes with 4
# CONFIG_BT_BUF_ACL_RX_COUNT=4
CONFIG_BT_BUF_ACL_RX_COUNT=4
# This test will fail when CONFIG_BT_MAX_CONN == CONFIG_BT_BUF_ACL_RX_COUNT
# CONFIG_BT_BUF_ACL_RX_COUNT=3
CONFIG_BT_HCI_ACL_FLOW_CONTROL=y

View file

@ -23,8 +23,8 @@ LOG_MODULE_REGISTER(dut, CONFIG_APP_LOG_LEVEL);
#define NUM_TESTERS CONFIG_BT_MAX_CONN
/* This test will fail when CONFIG_BT_MAX_CONN == CONFIG_BT_BUF_ACL_RX_COUNT */
BUILD_ASSERT(CONFIG_BT_BUF_ACL_RX_COUNT == CONFIG_BT_MAX_CONN);
/* Build with the minimum possible amount of RX buffers */
BUILD_ASSERT(CONFIG_BT_BUF_ACL_RX_COUNT == (CONFIG_BT_MAX_CONN + 1));
struct tester {
size_t sdu_count;
@ -151,7 +151,7 @@ void entrypoint_dut(void)
* Test purpose:
*
* Verifies that we are able to do L2CAP recombination on multiple links
* when we only have as many buffers as links.
* when we have the smallest possible amount of ACL buffers.
*
* Devices:
* - `dut`: receives L2CAP PDUs from testers

View file

@ -12,6 +12,7 @@ CONFIG_BT_AUTO_DATA_LEN_UPDATE=y
CONFIG_BT_MAX_CONN=250
CONFIG_BT_ID_MAX=250
CONFIG_BT_BUF_ACL_RX_COUNT=251
# L2CAP, ATT and SMP usage cause data transmission deadlock due to shortage
# of buffers when transactions crossover amongst the connections in the same