Change in osmo-trx[master]: Add rate counter for missing Txbursts when scheduled towards the radi...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Jul 14 09:43:07 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/19207 )

Change subject: Add rate counter for missing Txbursts when scheduled towards the radioInterface
......................................................................

Add rate counter for missing Txbursts when scheduled towards the radioInterface

Related: OS#4487
Change-Id: Ibb2c492b3c67cbab11fbb936ae3a090fb5756aa8
---
M CommonLibs/osmo_signal.h
M CommonLibs/trx_rate_ctr.cpp
M CommonLibs/trx_rate_ctr.h
M CommonLibs/trx_vty.c
M Transceiver52M/Transceiver.cpp
5 files changed, 20 insertions(+), 6 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  daniel: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/CommonLibs/osmo_signal.h b/CommonLibs/osmo_signal.h
index 5cd90c6..13646a1 100644
--- a/CommonLibs/osmo_signal.h
+++ b/CommonLibs/osmo_signal.h
@@ -60,7 +60,8 @@
 /* signal cb for signal <SS_DEVICE,S_TRX_COUNTER_CHANGE> */
 struct trx_counters {
 	size_t chan;
-	unsigned int tx_stale_bursts; /* Amount of Tx bursts dropped to to arriving too late from TRXD */
+	unsigned int tx_stale_bursts;
+	unsigned int tx_unavailable_bursts;
 	unsigned int tx_trxd_fn_repeated;
 	unsigned int tx_trxd_fn_outoforder;
 	unsigned int tx_trxd_fn_skipped;
diff --git a/CommonLibs/trx_rate_ctr.cpp b/CommonLibs/trx_rate_ctr.cpp
index 8b2597d..e45aba8 100644
--- a/CommonLibs/trx_rate_ctr.cpp
+++ b/CommonLibs/trx_rate_ctr.cpp
@@ -103,6 +103,7 @@
 	{ TRX_CTR_DEV_TX_DROP_EV,	"tx_drop_events" },
 	{ TRX_CTR_DEV_TX_DROP_SMPL,	"tx_drop_samples" },
 	{ TRX_CTR_TRX_TX_STALE_BURSTS,	"tx_stale_bursts" },
+	{ TRX_CTR_TRX_TX_UNAVAILABLE_BURSTS, "tx_unavailable_bursts" },
 	{ 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" },
@@ -117,6 +118,7 @@
 	[TRX_CTR_DEV_TX_DROP_EV]		= { "device:tx_drop_events",	"Number of times Tx samples were dropped by HW" },
 	[TRX_CTR_DEV_TX_DROP_SMPL]		= { "device:tx_drop_samples",	"Number of Tx samples dropped by HW" },
 	[TRX_CTR_TRX_TX_STALE_BURSTS]		= { "trx:tx_stale_bursts",	"Number of Tx burts dropped by TRX due to arriving too late" },
+	[TRX_CTR_TRX_TX_UNAVAILABLE_BURSTS]	= { "trx:tx_unavailable_bursts","Number of Tx burts unavailable (not enqueued) at the time they should be transmitted" },
 	[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" },
@@ -172,6 +174,8 @@
 		LOGCHAN(chan, DMAIN, INFO) << "rate_ctr update";
 		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TX_STALE_BURSTS];
 		rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_stale_bursts - ctr->current);
+		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TX_UNAVAILABLE_BURSTS];
+		rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_unavailable_bursts - ctr->current);
 		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TRXD_FN_REPEATED];
 		rate_ctr_add(ctr, trx_ctrs_pending[chan].tx_trxd_fn_repeated - ctr->current);
 		ctr = &rate_ctrs[chan]->ctr[TRX_CTR_TRX_TRXD_FN_OUTOFORDER];
diff --git a/CommonLibs/trx_rate_ctr.h b/CommonLibs/trx_rate_ctr.h
index cef3c21..c4c05ef 100644
--- a/CommonLibs/trx_rate_ctr.h
+++ b/CommonLibs/trx_rate_ctr.h
@@ -11,6 +11,7 @@
 	TRX_CTR_DEV_TX_DROP_EV,
 	TRX_CTR_DEV_TX_DROP_SMPL,
 	TRX_CTR_TRX_TX_STALE_BURSTS,
+	TRX_CTR_TRX_TX_UNAVAILABLE_BURSTS,
 	TRX_CTR_TRX_TRXD_FN_REPEATED,
 	TRX_CTR_TRX_TRXD_FN_OUTOFORDER,
 	TRX_CTR_TRX_TRXD_FN_SKIPPED,
diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index 941a435..e37ecaf 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -390,7 +390,7 @@
 	return -1;
 }
 
-#define THRESHOLD_ARGS "(rx_overruns|tx_underruns|rx_drop_events|rx_drop_samples|tx_drop_events|tx_drop_samples|tx_stale_bursts|tx_trxd_fn_repeated|tx_trxd_fn_outoforder|tx_trxd_fn_skipped)"
+#define THRESHOLD_ARGS "(rx_overruns|tx_underruns|rx_drop_events|rx_drop_samples|tx_drop_events|tx_drop_samples|tx_stale_bursts|tx_unavailable_bursts|tx_trxd_fn_repeated|tx_trxd_fn_outoforder|tx_trxd_fn_skipped)"
 #define THRESHOLD_STR_VAL(s) "Set threshold value for rate_ctr device:" OSMO_STRINGIFY_VAL(s) "\n"
 #define THRESHOLD_STRS \
 	THRESHOLD_STR_VAL(rx_overruns) \
@@ -400,6 +400,7 @@
 	THRESHOLD_STR_VAL(tx_drop_events) \
 	THRESHOLD_STR_VAL(tx_drop_samples) \
 	THRESHOLD_STR_VAL(tx_stale_bursts) \
+	THRESHOLD_STR_VAL(tx_unavailable_bursts) \
 	THRESHOLD_STR_VAL(tx_trxd_fn_repeated) \
 	THRESHOLD_STR_VAL(tx_trxd_fn_outoforder) \
 	THRESHOLD_STR_VAL(tx_trxd_fn_skipped) \
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 7aaf1d4..5e42178 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -431,13 +431,14 @@
   std::vector<signalVector *> bursts(mChans);
   std::vector<bool> zeros(mChans);
   std::vector<bool> filler(mChans, true);
-  bool stale_bursts_changed;
+  bool ratectr_changed;
 
   TN = nowTime.TN();
 
   for (size_t i = 0; i < mChans; i ++) {
     state = &mStates[i];
-    stale_bursts_changed = false;
+    ratectr_changed = false;
+
     zeros[i] = state->chanType[TN] == NONE;
 
     Mutex *mtx = mTxPriorityQueues[i].getMutex();
@@ -447,7 +448,7 @@
       LOGCHAN(i, DTRXDDL, NOTICE) << "dumping STALE burst in TRX->SDR interface ("
                   << burst->getTime() <<" vs " << nowTime << "), retrans=" << state->mRetrans;
       state->ctrs.tx_stale_bursts++;
-      stale_bursts_changed = true;
+      ratectr_changed = true;
       if (state->mRetrans)
         updateFillerTable(i, burst);
       delete burst;
@@ -467,11 +468,17 @@
     } else {
       modFN = nowTime.FN() % state->fillerModulus[TN];
       bursts[i] = state->fillerTable[modFN][TN];
+      if (state->chanType[TN] != NONE) {
+        LOGCHAN(i, DTRXDDL, NOTICE) << "No Tx burst available for " << nowTime
+                                    << ", retrans=" << state->mRetrans;
+        state->ctrs.tx_unavailable_bursts++;
+        ratectr_changed = true;
+      }
     }
 
     mtx->unlock();
 
-    if (stale_bursts_changed)
+    if (ratectr_changed)
       dispatch_trx_rate_ctr_change(state, i);
   }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/19207
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibb2c492b3c67cbab11fbb936ae3a090fb5756aa8
Gerrit-Change-Number: 19207
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200714/f0a486a1/attachment.htm>


More information about the gerrit-log mailing list