Bluetooth: host: Add config option for discardable buffer size.
Add option to set the size of the discardable buffer pool. This saves memory for the MESH use case where we expect a large number of advertise reports. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
87812c9633
commit
afa9c42d75
2 changed files with 12 additions and 1 deletions
|
@ -60,6 +60,16 @@ config BT_DISCARDABLE_BUF_COUNT
|
|||
it will not cause the allocation for other critical events to
|
||||
block and may even eliminate deadlocks in some cases.
|
||||
|
||||
config BT_DISCARDABLE_BUF_SIZE
|
||||
int "Size of discardable event buffers"
|
||||
range 44 257
|
||||
default 257 if BT_BREDR
|
||||
default 44
|
||||
help
|
||||
Size of buffers in the separate discardable event buffer pool.
|
||||
The minimum size is set based on the Advertising Report. Setting
|
||||
the buffer size different than BT_RX_BUF_LEN can save memory.
|
||||
|
||||
config BT_HCI_TX_STACK_SIZE
|
||||
# NOTE: This value is derived from other symbols and should only be
|
||||
# changed if required by architecture
|
||||
|
|
|
@ -168,8 +168,9 @@ NET_BUF_POOL_FIXED_DEFINE(num_complete_pool, 1, BT_BUF_RX_SIZE, NULL);
|
|||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_DISCARDABLE_BUF_COUNT)
|
||||
#define DISCARDABLE_EVENT_SIZE BT_BUF_SIZE(CONFIG_BT_DISCARDABLE_BUF_SIZE)
|
||||
NET_BUF_POOL_FIXED_DEFINE(discardable_pool, CONFIG_BT_DISCARDABLE_BUF_COUNT,
|
||||
BT_BUF_RX_SIZE, NULL);
|
||||
DISCARDABLE_EVENT_SIZE, NULL);
|
||||
#endif /* CONFIG_BT_DISCARDABLE_BUF_COUNT */
|
||||
|
||||
struct event_handler {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue