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.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/23110 ) Change subject: bts: Add new stats to detect TBF allocation failure reasons ...................................................................... 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 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_ts_alloc.cpp 3 files changed, 15 insertions(+), 3 deletions(-) Approvals: fixeria: Looks good to me, approved osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 8d1fb3f..55d45b8 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -100,7 +100,11 @@ { "tbf:reused", "TBF Reused "}, { "tbf:alloc:algo-a", "TBF Alloc Algo A "}, { "tbf:alloc:algo-b", "TBF Alloc Algo B "}, - { "tbf:alloc:failed", "TBF Alloc Failure "}, + { "tbf:alloc:failed", "TBF Alloc Failure (any reason)"}, + { "tbf:alloc:failed:no_tfi", "TBF Alloc Failure (TFIs exhausted)"}, + { "tbf:alloc:failed:no_usf", "TBF Alloc Failure (USFs exhausted)"}, + { "tbf:alloc:failed:no_slot_combi", "TBF Alloc Failure (No valid UL/DL slot combination found)"}, + { "tbf:alloc:failed:no_slot_avail", "TBF Alloc Failure (No slot available)"}, { "rlc:sent", "RLC Sent "}, { "rlc:resent", "RLC Resent "}, { "rlc:restarted", "RLC Restarted "}, @@ -609,6 +613,7 @@ if (best_trx_nr == 0xff || best_cnt == 0) { LOGP(DRLCMAC, LOGL_NOTICE, "No TFI available (suggested TRX: %d).\n", use_trx); + bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_FAIL_NO_TFI); return -EBUSY; } 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); } 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; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/23110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5402e937ff8d800684655e500ef8e5c867141dc3 Gerrit-Change-Number: 23110 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: osmith <osmith at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210301/00ea4d26/attachment.htm>