Bluetooth: controller: split: Reduce event done queue size
Reduce the maximum number of pending event done elements by decoupling it from the maximum pipeline elements. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
e8b776a9b0
commit
f6799ff57e
2 changed files with 6 additions and 6 deletions
|
@ -11,6 +11,7 @@
|
|||
#define TICKER_USER_ID_THREAD MAYFLY_CALL_ID_PROGRAM
|
||||
|
||||
#define EVENT_PIPELINE_MAX 5
|
||||
#define EVENT_DONE_MAX 3
|
||||
|
||||
#define HDR_ULL(p) ((void *)((u8_t *)(p) + sizeof(struct evt_hdr)))
|
||||
#define HDR_ULL2LLL(p) ((struct lll_hdr *)((u8_t *)(p) + \
|
||||
|
|
|
@ -128,18 +128,17 @@ static MFIFO_DEFINE(prep, sizeof(struct lll_event), EVENT_PIPELINE_MAX);
|
|||
* Queue of pointers to struct node_rx_event_done.
|
||||
* The actual backing behind these pointers is mem_done
|
||||
*/
|
||||
static MFIFO_DEFINE(done, sizeof(struct node_rx_event_done *),
|
||||
EVENT_PIPELINE_MAX);
|
||||
static MFIFO_DEFINE(done, sizeof(struct node_rx_event_done *), EVENT_DONE_MAX);
|
||||
|
||||
/* Backing storage for elements in mfifo_done */
|
||||
static struct {
|
||||
void *free;
|
||||
u8_t pool[sizeof(struct node_rx_event_done) * EVENT_PIPELINE_MAX];
|
||||
u8_t pool[sizeof(struct node_rx_event_done) * EVENT_DONE_MAX];
|
||||
} mem_done;
|
||||
|
||||
static struct {
|
||||
void *free;
|
||||
u8_t pool[sizeof(memq_link_t) * EVENT_PIPELINE_MAX];
|
||||
u8_t pool[sizeof(memq_link_t) * EVENT_DONE_MAX];
|
||||
} mem_link_done;
|
||||
|
||||
#define PDU_RX_CNT (CONFIG_BT_CTLR_RX_BUFFERS + 3)
|
||||
|
@ -1125,10 +1124,10 @@ static inline int init_reset(void)
|
|||
|
||||
/* Initialize done pool. */
|
||||
mem_init(mem_done.pool, sizeof(struct node_rx_event_done),
|
||||
EVENT_PIPELINE_MAX, &mem_done.free);
|
||||
EVENT_DONE_MAX, &mem_done.free);
|
||||
|
||||
/* Initialize done link pool. */
|
||||
mem_init(mem_link_done.pool, sizeof(memq_link_t), EVENT_PIPELINE_MAX,
|
||||
mem_init(mem_link_done.pool, sizeof(memq_link_t), EVENT_DONE_MAX,
|
||||
&mem_link_done.free);
|
||||
|
||||
/* Allocate done buffers */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue