mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 11:03:11 +00:00
feat(ble_log): consume frame_sn on loss path and bump BLE_LOG_VERSION
Add BLE_LOG_GET_FRAME_SN() on the buffer-full loss path so the SN counter advances even when frames are dropped. This allows the console to detect firmware-side buffer loss via SN gaps. Bump BLE_LOG_VERSION to reflect the semantic change.
This commit is contained in:
@@ -173,6 +173,7 @@ void ble_log_stat_mgr_update(ble_log_src_t src_code, uint32_t len, bool lost)
|
||||
/* Update aligned counters */
|
||||
uint32_t bytes_cnt = len + BLE_LOG_FRAME_OVERHEAD;
|
||||
if (lost) {
|
||||
BLE_LOG_GET_FRAME_SN(&(stat_mgr->frame_sn)); /* consume SN for loss detection */
|
||||
stat_mgr->lost_frame_cnt++;
|
||||
stat_mgr->lost_bytes_cnt += bytes_cnt;
|
||||
} else {
|
||||
|
||||
@@ -130,7 +130,7 @@ bool ble_log_cas_acquire(volatile bool *cas_lock);
|
||||
void ble_log_cas_release(volatile bool *cas_lock);
|
||||
#endif /* UNIT_TEST */
|
||||
|
||||
#define BLE_LOG_VERSION (3)
|
||||
#define BLE_LOG_VERSION (4)
|
||||
|
||||
/* TYPEDEF */
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user