diff options
-rw-r--r-- | CommonLibs/osmo_signal.h | 3 | ||||
-rw-r--r-- | CommonLibs/trx_rate_ctr.cpp | 12 | ||||
-rw-r--r-- | CommonLibs/trx_rate_ctr.h | 3 | ||||
-rw-r--r-- | Transceiver52M/Transceiver.cpp | 20 |
4 files changed, 33 insertions, 5 deletions
diff --git a/CommonLibs/osmo_signal.h b/CommonLibs/osmo_signal.h index 13646a1..003e7af 100644 --- a/CommonLibs/osmo_signal.h +++ b/CommonLibs/osmo_signal.h @@ -65,4 +65,7 @@ struct trx_counters { unsigned int tx_trxd_fn_repeated; unsigned int tx_trxd_fn_outoforder; unsigned int tx_trxd_fn_skipped; + unsigned int rx_empty_burst; + unsigned int rx_clipping; + unsigned int rx_no_burst_detected; }; diff --git a/CommonLibs/trx_rate_ctr.cpp b/CommonLibs/trx_rate_ctr.cpp index 1f44404..e902ff1 100644 --- a/CommonLibs/trx_rate_ctr.cpp +++ b/CommonLibs/trx_rate_ctr.cpp @@ -107,6 +107,9 @@ const struct value_string trx_chan_ctr_names[] = { { TRX_CTR_TRX_TRXD_FN_REPEATED, "tx_trxd_fn_repeated" }, { TRX_CTR_TRX_TRXD_FN_OUTOFORDER, "tx_trxd_fn_outoforder" }, { TRX_CTR_TRX_TRXD_FN_SKIPPED, "tx_trxd_fn_skipped" }, + { TRX_CTR_TRX_RX_EMPTY_BURST, "rx_empty_burst" }, + { TRX_CTR_TRX_RX_CLIPPING, "rx_clipping" }, + { TRX_CTR_TRX_RX_NO_BURST_DETECTED, "rx_no_burst_detected" }, { 0, NULL } }; @@ -122,6 +125,9 @@ static const struct rate_ctr_desc trx_chan_ctr_desc[] = { [TRX_CTR_TRX_TRXD_FN_REPEATED] = { "trx:tx_trxd_fn_repeated", "Number of Tx burts received from TRXD with repeated FN" }, [TRX_CTR_TRX_TRXD_FN_OUTOFORDER] = { "trx:tx_trxd_fn_outoforder","Number of Tx burts received from TRXD with a past FN" }, [TRX_CTR_TRX_TRXD_FN_SKIPPED] = { "trx:tx_trxd_fn_skipped", "Number of Tx burts potentially skipped due to FN jumps" }, + [TRX_CTR_TRX_RX_EMPTY_BURST] = { "trx:rx_empty_burst", "Number of Rx bursts empty" }, + [TRX_CTR_TRX_RX_CLIPPING] = { "trx:rx_clipping", "Number of Rx bursts discarded due to clipping" }, + [TRX_CTR_TRX_RX_NO_BURST_DETECTED] = { "trx:rx_no_burst_detected", "Number of Rx burts discarded due to burst detection error" }, }; static const struct rate_ctr_group_desc trx_chan_ctr_group_desc = { @@ -182,6 +188,12 @@ static int trx_rate_ctr_timerfd_cb(struct osmo_fd *ofd, unsigned int what) { rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_outoforder - ctr->current); ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TRXD_FN_SKIPPED]; rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_skipped - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_RX_EMPTY_BURST]; + rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_empty_burst - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_RX_CLIPPING]; + rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_clipping - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_RX_NO_BURST_DETECTED]; + rate_ctr_add(ctr, trx_ctrs_pending[chan].rx_no_burst_detected - ctr->current); /* Mark as done */ trx_ctrs_pending[chan].chan = PENDING_CHAN_NONE; } diff --git a/CommonLibs/trx_rate_ctr.h b/CommonLibs/trx_rate_ctr.h index c4c05ef..72125c2 100644 --- a/CommonLibs/trx_rate_ctr.h +++ b/CommonLibs/trx_rate_ctr.h @@ -15,6 +15,9 @@ enum TrxCtr { TRX_CTR_TRX_TRXD_FN_REPEATED, TRX_CTR_TRX_TRXD_FN_OUTOFORDER, TRX_CTR_TRX_TRXD_FN_SKIPPED, + TRX_CTR_TRX_RX_EMPTY_BURST, + TRX_CTR_TRX_RX_CLIPPING, + TRX_CTR_TRX_RX_NO_BURST_DETECTED, }; struct ctr_threshold { diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index c92a61b..c3ef377 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -638,6 +638,7 @@ int Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi) GSM::Time burstTime; SoftVector *rxBurst; TransceiverState *state = &mStates[chan]; + bool ctr_changed = false; /* Blocking FIFO read */ radioVector *radio_burst = mReceiveFIFO[chan]->read(); @@ -687,7 +688,9 @@ int Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi) } if (max_i < 0) { - LOGCHAN(chan, DTRXDUL, FATAL) << "Received empty burst"; + LOGCHAN(chan, DTRXDUL, INFO) << "Received empty burst"; + state->ctrs.rx_empty_burst++; + ctr_changed = true; goto ret_idle; } @@ -713,10 +716,15 @@ int Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi) /* Detect normal or RACH bursts */ rc = detectAnyBurst(*burst, mTSC, BURST_THRESH, mSPSRx, type, max_toa, &ebp); if (rc <= 0) { - if (rc == -SIGERR_CLIP) - LOGCHAN(chan, DTRXDUL, NOTICE) << "Clipping detected on received RACH or Normal Burst"; - else if (rc != SIGERR_NONE) - LOGCHAN(chan, DTRXDUL, NOTICE) << "Unhandled RACH or Normal Burst detection error"; + if (rc == -SIGERR_CLIP) { + LOGCHAN(chan, DTRXDUL, INFO) << "Clipping detected on received RACH or Normal Burst"; + state->ctrs.rx_clipping++; + ctr_changed = true; + } else if (rc != SIGERR_NONE) { + LOGCHAN(chan, DTRXDUL, INFO) << "Unhandled RACH or Normal Burst detection error"; + state->ctrs.rx_no_burst_detected++; + ctr_changed = true; + } goto ret_idle; } @@ -743,6 +751,8 @@ int Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi) return 0; ret_idle: + if (ctr_changed) + dispatch_trx_rate_ctr_change(state, chan); bi->idle = true; delete radio_burst; return 0; |