aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-06 13:10:36 +0300
committerlaforge <laforge@osmocom.org>2022-03-09 07:22:27 +0000
commitd84567779c9dd17dffa6fa9905952af06b3cedc7 (patch)
tree35953aa596406ca0f7df0d244950d165550d486c
parentff30ca63a93a4170eda07eec3e0cd6205c7d92d6 (diff)
osmo-bts-trx: new rate counter 'trx_sched:dl_fh_cache_miss'
This new rate counter allows to monitor the efficiency of the radio carrier cache used for routing Downlink bursts when baseband frequency hopping is in use. Change-Id: Ie6da829e47298476267c8df2dcedafad564cbbb4 Related: SYS#5855
-rw-r--r--src/osmo-bts-trx/l1_if.h1
-rw-r--r--src/osmo-bts-trx/main.c4
-rw-r--r--src/osmo-bts-trx/scheduler_trx.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/l1_if.h b/src/osmo-bts-trx/l1_if.h
index 50369d9d..18d84c2f 100644
--- a/src/osmo-bts-trx/l1_if.h
+++ b/src/osmo-bts-trx/l1_if.h
@@ -30,6 +30,7 @@
enum {
BTSTRX_CTR_SCHED_DL_MISS_FN,
BTSTRX_CTR_SCHED_DL_FH_NO_CARRIER,
+ BTSTRX_CTR_SCHED_DL_FH_CACHE_MISS,
BTSTRX_CTR_SCHED_UL_FH_NO_CARRIER,
};
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 5d680f05..75b15fea 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -70,6 +70,10 @@ static const struct rate_ctr_desc btstrx_ctr_desc[] = {
"trx_sched:dl_fh_no_carrier",
"Frequency hopping: no carrier found for a Downlink burst (check hopping parameters)"
},
+ [BTSTRX_CTR_SCHED_DL_FH_CACHE_MISS] = {
+ "trx_sched:dl_fh_cache_miss",
+ "Frequency hopping: no Downlink carrier found in cache (lookup performed)"
+ },
[BTSTRX_CTR_SCHED_UL_FH_NO_CARRIER] = {
"trx_sched:ul_fh_no_carrier",
"Frequency hopping: no carrier found for an Uplink burst (check hopping parameters)"
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 8118223e..3a6418bb 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -148,9 +148,12 @@ static struct phy_instance *dlfh_route_br(const struct trx_dl_burst_req *br,
if (ts->fh_trx_list[idx] != NULL)
return ts->fh_trx_list[idx]->pinst;
+ struct bts_trx_priv *priv = (struct bts_trx_priv *) ts->trx->bts->model_priv;
+
/* The "cache" may not be filled yet, lookup the transceiver */
llist_for_each_entry(trx, &ts->trx->bts->trx_list, list) {
if (trx->arfcn == ts->hopping.arfcn_list[idx]) {
+ rate_ctr_inc2(priv->ctrs, BTSTRX_CTR_SCHED_DL_FH_CACHE_MISS);
ts->fh_trx_list[idx] = trx;
return trx->pinst;
}
@@ -160,7 +163,6 @@ static struct phy_instance *dlfh_route_br(const struct trx_dl_burst_req *br,
"for a Downlink burst (fn=%u, tn=%u, " SCHED_FH_PARAMS_FMT ")\n",
br->fn, br->tn, SCHED_FH_PARAMS_VALS(ts));
- struct bts_trx_priv *priv = (struct bts_trx_priv *) ts->trx->bts->model_priv;
rate_ctr_inc2(priv->ctrs, BTSTRX_CTR_SCHED_DL_FH_NO_CARRIER);
return NULL;