bts: Add new stats to detect TBF allocation failure reasons
This is specially useful to detect for instance if a cell is handling
too many users, ending up in TFI or USF exhaustions. This information
can be later in the future used to tune TBF allocation algorithm behavior
(either manually/statially through config file, or
automatically/dynamically in code based on some thresholds).
Related: OS#5042
Change-Id: I5402e937ff8d800684655e500ef8e5c867141dc3
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 1dc31f6..dd921e7 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -647,6 +647,7 @@
if (!max_ul_slots || !max_dl_slots) {
LOGP(DRLCMAC, LOGL_NOTICE,
"No valid UL/DL slot combination found\n");
+ bts_do_rate_ctr_inc(trx->bts, CTR_TBF_ALLOC_FAIL_NO_SLOT_COMBI);
return -EINVAL;
}
@@ -719,6 +720,7 @@
if (!sl) {
LOGP(DRLCMAC, LOGL_NOTICE, "No %s slots available\n",
tbf->direction != GPRS_RLCMAC_DL_TBF ? "uplink" : "downlink");
+ bts_do_rate_ctr_inc(trx->bts, CTR_TBF_ALLOC_FAIL_NO_SLOT_AVAIL);
return -EINVAL;
}
@@ -771,6 +773,7 @@
if (!ul_slots) {
LOGP(DRLCMAC, LOGL_NOTICE, "No USF available\n");
+ bts_do_rate_ctr_inc(trx->bts, CTR_TBF_ALLOC_FAIL_NO_USF);
return -EBUSY;
}