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/bts.h b/src/bts.h
index d321b8d..15a72bd 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -88,6 +88,10 @@
CTR_TBF_ALLOC_ALGO_A,
CTR_TBF_ALLOC_ALGO_B,
CTR_TBF_ALLOC_FAIL,
+ CTR_TBF_ALLOC_FAIL_NO_TFI,
+ CTR_TBF_ALLOC_FAIL_NO_USF,
+ CTR_TBF_ALLOC_FAIL_NO_SLOT_COMBI,
+ CTR_TBF_ALLOC_FAIL_NO_SLOT_AVAIL,
CTR_RLC_SENT,
CTR_RLC_RESENT,
CTR_RLC_RESTARTED,
@@ -319,11 +323,11 @@
return bts->statg;
}
-static inline void bts_do_rate_ctr_inc(struct gprs_rlcmac_bts *bts, unsigned int ctr_id) {
+static inline void bts_do_rate_ctr_inc(const struct gprs_rlcmac_bts *bts, unsigned int ctr_id) {
rate_ctr_inc(&bts->ratectrs->ctr[ctr_id]);
}
-static inline void bts_do_rate_ctr_add(struct gprs_rlcmac_bts *bts, unsigned int ctr_id, int inc) {
+static inline void bts_do_rate_ctr_add(const struct gprs_rlcmac_bts *bts, unsigned int ctr_id, int inc) {
rate_ctr_add(&bts->ratectrs->ctr[ctr_id], inc);
}