diff options
Diffstat (limited to 'CommonLibs')
-rw-r--r-- | CommonLibs/osmo_signal.h | 3 | ||||
-rw-r--r-- | CommonLibs/trx_rate_ctr.cpp | 16 | ||||
-rw-r--r-- | CommonLibs/trx_rate_ctr.h | 3 | ||||
-rw-r--r-- | CommonLibs/trx_vty.c | 7 |
4 files changed, 18 insertions, 11 deletions
diff --git a/CommonLibs/osmo_signal.h b/CommonLibs/osmo_signal.h index ee7e2a4..ceb7d6f 100644 --- a/CommonLibs/osmo_signal.h +++ b/CommonLibs/osmo_signal.h @@ -48,9 +48,10 @@ enum SS_DEVICE { /* signal cb for signal <SS_DEVICE,S_DEVICE_COUNTER_CHANGE> */ struct device_counters { size_t chan; - unsigned int rx_underruns; unsigned int rx_overruns; unsigned int tx_underruns; unsigned int rx_dropped_events; unsigned int rx_dropped_samples; + unsigned int tx_dropped_events; + unsigned int tx_dropped_samples; }; diff --git a/CommonLibs/trx_rate_ctr.cpp b/CommonLibs/trx_rate_ctr.cpp index 43e4189..a9ef88c 100644 --- a/CommonLibs/trx_rate_ctr.cpp +++ b/CommonLibs/trx_rate_ctr.cpp @@ -93,20 +93,22 @@ const struct value_string rate_ctr_intv[] = { }; const struct value_string trx_chan_ctr_names[] = { - { TRX_CTR_RX_UNDERRUNS, "rx_underruns" }, { TRX_CTR_RX_OVERRUNS, "rx_overruns" }, { TRX_CTR_TX_UNDERRUNS, "tx_underruns" }, { TRX_CTR_RX_DROP_EV, "rx_drop_events" }, { TRX_CTR_RX_DROP_SMPL, "rx_drop_samples" }, + { TRX_CTR_TX_DROP_EV, "tx_drop_events" }, + { TRX_CTR_TX_DROP_SMPL, "tx_drop_samples" }, { 0, NULL } }; static const struct rate_ctr_desc trx_chan_ctr_desc[] = { - [TRX_CTR_RX_UNDERRUNS] = { "device:rx_underruns", "Number of Rx underruns" }, - [TRX_CTR_RX_OVERRUNS] = { "device:rx_overruns", "Number of Rx overruns" }, - [TRX_CTR_TX_UNDERRUNS] = { "device:tx_underruns", "Number of Tx underruns" }, + [TRX_CTR_RX_OVERRUNS] = { "device:rx_overruns", "Number of Rx overruns in FIFO queue" }, + [TRX_CTR_TX_UNDERRUNS] = { "device:tx_underruns", "Number of Tx underruns in FIFO queue" }, [TRX_CTR_RX_DROP_EV] = { "device:rx_drop_events", "Number of times Rx samples were dropped by HW" }, [TRX_CTR_RX_DROP_SMPL] = { "device:rx_drop_samples", "Number of Rx samples dropped by HW" }, + [TRX_CTR_TX_DROP_EV] = { "device:tx_drop_events", "Number of times Tx samples were dropped by HW" }, + [TRX_CTR_TX_DROP_SMPL] = { "device:tx_drop_samples", "Number of Tx samples dropped by HW" } }; static const struct rate_ctr_group_desc trx_chan_ctr_group_desc = { @@ -126,8 +128,6 @@ static int rate_ctr_timerfd_cb(struct osmo_fd *ofd, unsigned int what) { if (ctrs_pending[chan].chan == PENDING_CHAN_NONE) continue; LOGCHAN(chan, DMAIN, INFO) << "rate_ctr update"; - ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_UNDERRUNS]; - rate_ctr_add(ctr, ctrs_pending[chan].rx_underruns - ctr->current); ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_OVERRUNS]; rate_ctr_add(ctr, ctrs_pending[chan].rx_overruns - ctr->current); ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TX_UNDERRUNS]; @@ -136,6 +136,10 @@ static int rate_ctr_timerfd_cb(struct osmo_fd *ofd, unsigned int what) { rate_ctr_add(ctr, ctrs_pending[chan].rx_dropped_events - ctr->current); ctr = &rate_ctrs[chan]->ctr[TRX_CTR_RX_DROP_SMPL]; rate_ctr_add(ctr, ctrs_pending[chan].rx_dropped_samples - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TX_DROP_EV]; + rate_ctr_add(ctr, ctrs_pending[chan].tx_dropped_events - ctr->current); + ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TX_DROP_SMPL]; + rate_ctr_add(ctr, ctrs_pending[chan].tx_dropped_samples - ctr->current); /* Mark as done */ ctrs_pending[chan].chan = PENDING_CHAN_NONE; diff --git a/CommonLibs/trx_rate_ctr.h b/CommonLibs/trx_rate_ctr.h index 6e4fa4d..155f413 100644 --- a/CommonLibs/trx_rate_ctr.h +++ b/CommonLibs/trx_rate_ctr.h @@ -4,11 +4,12 @@ #include <osmocom/vty/command.h> enum TrxCtr { - TRX_CTR_RX_UNDERRUNS, TRX_CTR_RX_OVERRUNS, TRX_CTR_TX_UNDERRUNS, TRX_CTR_RX_DROP_EV, TRX_CTR_RX_DROP_SMPL, + TRX_CTR_TX_DROP_EV, + TRX_CTR_TX_DROP_SMPL, }; struct ctr_threshold { diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c index e184f49..bac9653 100644 --- a/CommonLibs/trx_vty.c +++ b/CommonLibs/trx_vty.c @@ -384,14 +384,15 @@ static int vty_intv_name_2_id(const char* str) { return -1; } -#define THRESHOLD_ARGS "(rx_underruns|rx_overruns|tx_underruns|rx_drop_events|rx_drop_samples)" +#define THRESHOLD_ARGS "(rx_overruns|tx_underruns|rx_drop_events|rx_drop_samples|tx_drop_events|tx_drop_samples)" #define THRESHOLD_STR_VAL(s) "Set threshold value for rate_ctr device:" OSMO_STRINGIFY_VAL(s) "\n" #define THRESHOLD_STRS \ - THRESHOLD_STR_VAL(rx_underruns) \ THRESHOLD_STR_VAL(rx_overruns) \ THRESHOLD_STR_VAL(tx_underruns) \ THRESHOLD_STR_VAL(rx_drop_events) \ - THRESHOLD_STR_VAL(rx_drop_samples) + THRESHOLD_STR_VAL(rx_drop_samples) \ + THRESHOLD_STR_VAL(tx_drop_events) \ + THRESHOLD_STR_VAL(tx_drop_samples) #define INTV_ARGS "(per-second|per-minute|per-hour|per-day)" #define INTV_STR_VAL(s) "Threshold value sampled " OSMO_STRINGIFY_VAL(s) "\n" #define INTV_STRS \ |