Bluetooth: controller: Implement low latency ULL processing
Implement a lower ISR latency ULL processing design. Instead of looping use ISR/mayfly tail-chaining to process successive ULL messages. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
34f6d08ff0
commit
23269d9891
2 changed files with 39 additions and 5 deletions
|
@ -513,6 +513,15 @@ config BT_CTLR_LOW_LAT
|
|||
Consequently, this reduces on-air radio utilization due to redundant
|
||||
radio state switches.
|
||||
|
||||
config BT_CTLR_LOW_LAT_ULL
|
||||
prompt "Low latency ULL"
|
||||
bool
|
||||
depends on BT_CTLR_LOW_LAT
|
||||
default y
|
||||
help
|
||||
Low latency ULL implementation that uses tailchaining instead of while
|
||||
loop to demux rx messages from LLL.
|
||||
|
||||
endif # BT_LL_SW_SPLIT
|
||||
|
||||
config BT_CTLR_RADIO_ENABLE_FAST
|
||||
|
|
|
@ -1275,7 +1275,9 @@ static inline void rx_demux_conn_tx_ack(u8_t ack_last, u16_t handle,
|
|||
memq_link_t *link,
|
||||
struct node_tx *node_tx)
|
||||
{
|
||||
#if !defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
|
||||
do {
|
||||
#endif /* CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
/* Dequeue node */
|
||||
lll_conn_ack_dequeue();
|
||||
|
||||
|
@ -1308,10 +1310,17 @@ static inline void rx_demux_conn_tx_ack(u8_t ack_last, u16_t handle,
|
|||
}
|
||||
|
||||
link = lll_conn_ack_by_last_peek(ack_last, &handle, &node_tx);
|
||||
} while (link);
|
||||
|
||||
/* trigger thread to call ll_rx_get() */
|
||||
ll_rx_sched();
|
||||
#if defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
|
||||
if (!link)
|
||||
#else /* CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
} while (link);
|
||||
#endif /* CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
|
||||
{
|
||||
/* trigger thread to call ll_rx_get() */
|
||||
ll_rx_sched();
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
|
@ -1319,7 +1328,9 @@ static void rx_demux(void *param)
|
|||
{
|
||||
memq_link_t *link;
|
||||
|
||||
#if !defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
|
||||
do {
|
||||
#endif /* CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
struct node_rx_hdr *rx;
|
||||
|
||||
link = memq_peek(memq_ull_rx.head, memq_ull_rx.tail,
|
||||
|
@ -1341,14 +1352,20 @@ static void rx_demux(void *param)
|
|||
rx_demux_conn_tx_ack(rx->ack_last, handle,
|
||||
link_tx, node_tx);
|
||||
} else
|
||||
#endif
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
{
|
||||
nack = rx_demux_rx(link, rx);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
|
||||
if (!nack) {
|
||||
ull_rx_sched();
|
||||
}
|
||||
#else /* !CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
if (nack) {
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
|
||||
#if defined(CONFIG_BT_CONN)
|
||||
} else {
|
||||
|
@ -1360,10 +1377,18 @@ static void rx_demux(void *param)
|
|||
if (link) {
|
||||
rx_demux_conn_tx_ack(ack_last, handle,
|
||||
link, node_tx);
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
|
||||
ull_rx_sched();
|
||||
#endif /* CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
|
||||
} while (link);
|
||||
#endif /* CONFIG_BT_CTLR_LOW_LAT_ULL */
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue