Bluetooth: controller: Add remote proc ctx pool

Add a separate procedure context pool for remote initiated procedures.
Make it configurable in size by BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM.
Fix all unit tests referring to the amount of free context buffers.

Fixes #41823

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
This commit is contained in:
Thomas Ebert Hansen 2022-02-10 15:38:58 +01:00 committed by Carles Cufí
commit 33cb9e3433
20 changed files with 165 additions and 121 deletions

View file

@ -533,15 +533,25 @@ config BT_CTLR_LLCP_COMMON_TX_CTRL_BUF_NUM
Configure between 0 and (4 - BT_CTLR_LLCP_PER_CONN_TX_CTRL_BUF_NUM) * BT_CTLR_LLCP_CONN
config BT_CTLR_LLCP_PROC_CTX_BUF_NUM
int "Number of control procedure contexts to be available across all connections"
int "Number of local control procedure contexts to be available across all connections"
default 2 if BT_CTLR_LLCP_CONN = 1
default BT_CTLR_LLCP_CONN if BT_CTLR_LLCP_CONN > 1
range 2 255
help
Set the number control procedure contexts that is to be available.
This defines the size of the pool of control procedure contexts available
for handlign control procedures. This pool is shared across all
connections (local vs remote initiate), with allocation through a queue
for handling local initiated control procedures.
This pool is shared across all connections, with allocation through a queue.
config BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM
int "Number of remote control procedure contexts to be available across all connections"
default BT_CTLR_LLCP_CONN
range 1 255
help
Set the number control procedure contexts that is to be available.
This defines the size of the pool of control procedure contexts available
for handling remote initiated control procedures.
This pool is shared across all connections, with allocation through a queue.
endif #!BT_LL_SW_LLCP_LEGACY