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 uploaded this change for review. ( 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, 16 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/10/23110/1 diff --git a/src/bts.cpp b/src/bts.cpp index 8d1fb3f..52c3856 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 (ALL)"}, + { "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 "}, @@ -580,7 +584,7 @@ * that is currently not used in any PDCH of a the TRX with least TFIs currently * assigned. Negative values indicate errors. */ -int bts_tfi_find_free(const struct gprs_rlcmac_bts *bts, enum gprs_rlcmac_tbf_direction dir, +int bts_tfi_find_free(struct gprs_rlcmac_bts *bts, enum gprs_rlcmac_tbf_direction dir, uint8_t *_trx, int8_t use_trx) { uint8_t trx_from, trx_to, trx; @@ -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..f780f43 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, @@ -284,7 +288,7 @@ return bts->cur_fn; } -int bts_tfi_find_free(const struct gprs_rlcmac_bts *bts, enum gprs_rlcmac_tbf_direction dir, +int bts_tfi_find_free(struct gprs_rlcmac_bts *bts, enum gprs_rlcmac_tbf_direction dir, uint8_t *_trx, int8_t use_trx); int bts_rcv_rach(struct gprs_rlcmac_bts *bts, const struct rach_ind_params *rip); diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 1dc31f6..cb49848 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -305,7 +305,7 @@ * \param[out] trx_no_ TRX number on which TFI was found * \returns negative error code or 0 on success */ -static int tfi_find_free(const struct gprs_rlcmac_bts *bts, const gprs_rlcmac_trx *trx, const GprsMs *ms, +static int tfi_find_free(struct gprs_rlcmac_bts *bts, const gprs_rlcmac_trx *trx, const GprsMs *ms, enum gprs_rlcmac_tbf_direction dir, int8_t use_trx, uint8_t *trx_no_) { int tfi; @@ -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: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210225/da753728/attachment.htm>