aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-07-27 11:52:42 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-07-27 11:52:46 +0200
commit1d165a043e956c6a86a3d36f089fb940234b33b6 (patch)
tree03fcd556cd12df06c26a6a32b8005901cc8ed1f2 /CommonLibs
parent199a306d279df09d7624b9c12e3005a301c21257 (diff)
Transceiver: Add several rate_ctr for rx error conditions
Since there's now a rate counter, we can drop log level for those events which can be bursty and hence print lots of output in short periods of time, which may affect performance. This way setting them to INFO it's enough to avoid getting them in stderr unless explicitly configured by the user (for instance to debug stuff), while still allowing a good enough level to be enabled for other targets such as gsmtap. Related: OS#4679 Change-Id: I000f7112e35ac68d3d922444f78468b1ea74cbba
Diffstat (limited to 'CommonLibs')
-rw-r--r--CommonLibs/osmo_signal.h3
-rw-r--r--CommonLibs/trx_rate_ctr.cpp12
-rw-r--r--CommonLibs/trx_rate_ctr.h3
3 files changed, 18 insertions, 0 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 {