-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Controller: ISO Sync Receiver with ticks_slot_window #75760
Changes from all commits
db72c46
0e02ef4
cbd9524
e728cfb
ab2b255
0da05fc
33f21ee
309b3ec
1196492
0c4ab4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Additionally, it doesn't look like these new Kconfig options are ever tested There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I will add modified bsim tests to cover the enhancements, the bap_broadcast_sink variant with XO clock drifts to have ACL connection in a sink drift over the BIG sync events, and measure SDU drops. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -430,6 +430,13 @@ config BT_CTLR_ADV_RESERVE_MAX | |
corresponding to the Advertising Data present at the time of the | ||
start/enable of Advertising is used. | ||
|
||
config BT_CTLR_ADV_AUX_SLOT_WINDOW | ||
bool "Reschedule Extended Advertising Auxiliary PDUs" | ||
depends on BT_BROADCASTER && BT_CTLR_ADV_EXT | ||
select BT_TICKER_EXT | ||
Comment on lines
+435
to
+436
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the reasoning behind There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, will fix this to be |
||
help | ||
Reschedule Extended Advertising Auxiliary PDUs. | ||
|
||
config BT_CTLR_ADV_ISO_RESERVE_MAX | ||
bool "Use maximum Broadcast ISO event time reservation" | ||
depends on BT_CTLR_ADV_ISO | ||
|
@@ -540,6 +547,16 @@ config BT_CTLR_SYNC_ISO_RESERVE_MAX | |
disabled, then time reservation does not include the pre-transmissions | ||
and any Control subevents. | ||
|
||
config BT_CTLR_SYNC_ISO_SLOT_WINDOW_JITTER | ||
bool "Wrap ISO Synchronized Receiver event around overlapping roles" | ||
depends on BT_CTLR_SYNC_ISO && !BT_CTLR_SYNC_ISO_RESERVE_MAX | ||
select BT_TICKER_EXT | ||
help | ||
Wrap ISO Synchronized Receiver event around overlapping roles using | ||
Comment on lines
+550
to
+555
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I may just be unaware, but what are There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
ticker ticks_slot_window feature with jitter in window. | ||
LLL implementation can use the ticks_drifts value to determine the | ||
correct subevents to setup for reception. | ||
|
||
config BT_CTLR_ADV_ENABLE_STRICT | ||
bool "Enforce Strict Advertising Enable/Disable" | ||
depends on BT_BROADCASTER | ||
|
@@ -749,6 +766,19 @@ config BT_CTLR_CENTRAL_RESERVE_MAX | |
Note, currently this value is only used to space multiple central | ||
connections and not for actual ticker time reservations. | ||
|
||
config BT_CTLR_PERIPHERAL_RESERVE_MAX | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be placed next to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, that is peripheral ISO related. Where as this new one is related to normal peripheral ACL scheduling. |
||
bool "Use maximum data PDU size time reservation for Peripheral" | ||
depends on BT_PERIPHERAL | ||
default y | ||
help | ||
Use the maximum data PDU size time reservation considering the Data | ||
length could be updated from default 27 bytes to maximum support size. | ||
|
||
If maximum time reservation is disabled then time reservation required | ||
for empty PDU transmission is used. Overlapping radio events will use | ||
the is_abort_cb mechanism to decide on continuation of the connection | ||
event. | ||
|
||
config BT_CTLR_EVENT_OVERHEAD_RESERVE_MAX | ||
bool "Reserve maximum event overhead in time reservations" | ||
default y | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ | |
uint16_t latency; | ||
|
||
uint16_t latency_prepare; | ||
uint16_t lazy_prepare; | ||
uint16_t latency_event; | ||
uint16_t event_counter; | ||
|
||
|
@@ -69,12 +70,21 @@ | |
struct { | ||
uint8_t initiated:1; | ||
uint8_t cancelled:1; | ||
uint8_t forced:1; | ||
}; | ||
|
||
struct { | ||
uint8_t initiated:1; | ||
uint8_t cancelled:1; | ||
uint8_t forced:1; | ||
} central; | ||
Comment on lines
70
to
80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the difference between these 2 structs now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unnamed struct is now used by a common code block and hence did not want to have a named reference as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest to put that in a comment, as that is non-obvious. Looks more like a merge conflict gone wrong :P |
||
|
||
#if defined(CONFIG_BT_PERIPHERAL) | ||
struct { | ||
uint8_t initiated:1; | ||
uint8_t cancelled:1; | ||
uint8_t forced:1; | ||
uint8_t latency_enabled:1; | ||
Check notice on line 87 in subsys/bluetooth/controller/ll_sw/lll_conn.h GitHub Actions / Run compliance checks on patch series (PR)You may want to run clang-format on this change
|
||
|
||
uint32_t window_widening_periodic_us; | ||
uint32_t window_widening_max_us; | ||
|
@@ -160,6 +170,7 @@ | |
void lll_conn_flush(uint16_t handle, struct lll_conn *lll); | ||
|
||
void lll_conn_prepare_reset(void); | ||
int lll_conn_is_abort_cb(void *next, void *curr, lll_prepare_cb_t *resume_cb); | ||
void lll_conn_abort_cb(struct lll_prepare_param *prepare_param, void *param); | ||
void lll_conn_isr_rx(void *param); | ||
void lll_conn_isr_tx(void *param); | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -59,6 +59,7 @@ | |||||
|
||||||
static uint8_t crc_expire; | ||||||
static uint8_t crc_valid; | ||||||
static uint8_t is_aborted; | ||||||
static uint16_t trx_cnt; | ||||||
|
||||||
#if defined(CONFIG_BT_CTLR_LE_ENC) | ||||||
|
@@ -142,12 +143,25 @@ | |||||
trx_cnt = 0U; | ||||||
crc_valid = 0U; | ||||||
crc_expire = 0U; | ||||||
is_aborted = 0U; | ||||||
|
||||||
#if defined(CONFIG_BT_CTLR_LE_ENC) | ||||||
mic_state = LLL_CONN_MIC_NONE; | ||||||
#endif /* CONFIG_BT_CTLR_LE_ENC */ | ||||||
} | ||||||
|
||||||
int lll_conn_is_abort_cb(void *next, void *curr, lll_prepare_cb_t *resume_cb) | ||||||
{ | ||||||
struct lll_conn *lll = curr; | ||||||
|
||||||
/* Do not abort if near supervision timeout */ | ||||||
if (lll->forced) { | ||||||
return 0; | ||||||
} | ||||||
|
||||||
return -ECANCELED; | ||||||
} | ||||||
|
||||||
void lll_conn_abort_cb(struct lll_prepare_param *prepare_param, void *param) | ||||||
{ | ||||||
struct event_done_extra *e; | ||||||
|
@@ -156,6 +170,17 @@ | |||||
|
||||||
/* NOTE: This is not a prepare being cancelled */ | ||||||
if (!prepare_param) { | ||||||
/* Get reference to LLL connection context */ | ||||||
lll = param; | ||||||
|
||||||
/* For a peripheral role, ensure at least one PDU is tx-ed | ||||||
* back to central, otherwise let the supervision timeout | ||||||
* countdown be started. | ||||||
*/ | ||||||
if (lll->role && (trx_cnt <= 1U)) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If
Suggested change
The above assumes that the |
||||||
is_aborted = 1U; | ||||||
} | ||||||
|
||||||
/* Perform event abort here. | ||||||
* After event has been cleanly aborted, clean up resources | ||||||
* and dispatch event done. | ||||||
|
@@ -171,9 +196,26 @@ | |||||
err = lll_hfclock_off(); | ||||||
LL_ASSERT(err >= 0); | ||||||
|
||||||
/* Accumulate the latency as event is aborted while being in pipeline */ | ||||||
/* Get reference to LLL connection context */ | ||||||
lll = prepare_param->param; | ||||||
lll->latency_prepare += (prepare_param->lazy + 1); | ||||||
|
||||||
/* Accumulate the latency as event is aborted while being in pipeline */ | ||||||
lll->lazy_prepare = prepare_param->lazy; | ||||||
lll->latency_prepare += (lll->lazy_prepare + 1U); | ||||||
|
||||||
#if defined(CONFIG_BT_PERIPHERAL) | ||||||
if (lll->role) { | ||||||
/* Accumulate window widening */ | ||||||
lll->periph.window_widening_prepare_us += | ||||||
lll->periph.window_widening_periodic_us * | ||||||
(prepare_param->lazy + 1); | ||||||
if (lll->periph.window_widening_prepare_us > | ||||||
lll->periph.window_widening_max_us) { | ||||||
lll->periph.window_widening_prepare_us = | ||||||
lll->periph.window_widening_max_us; | ||||||
} | ||||||
Check notice on line 216 in subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c GitHub Actions / Run compliance checks on patch series (PR)You may want to run clang-format on this change
|
||||||
} | ||||||
#endif /* CONFIG_BT_PERIPHERAL */ | ||||||
|
||||||
/* Extra done event, to check supervision timeout */ | ||||||
e = ull_event_done_extra_get(); | ||||||
|
@@ -867,6 +909,7 @@ | |||||
e->type = EVENT_DONE_EXTRA_TYPE_CONN; | ||||||
e->trx_cnt = trx_cnt; | ||||||
e->crc_valid = crc_valid; | ||||||
e->is_aborted = is_aborted; | ||||||
|
||||||
#if defined(CONFIG_BT_CTLR_LE_ENC) | ||||||
e->mic_state = mic_state; | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always get sad when I see more Kconfig options for the LL :( It's already way too hard to configure, and we keep adding more and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Kconfig's have been added incrementally, atleast trying to keep existing features not being disturbed too much. Most internal once should get hidden under the
Advanced Features
but some of them are being be used outside. But hopefully will make them defaults in the future when the options form matured options in default builds of samples. Least or seldom used Kconfigs can be delete there after.