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/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26384 ) Change subject: stats: add bsc.paging:expired ...................................................................... stats: add bsc.paging:expired Similar to paging:attempted, count paging:expired not only per BTS, but also for the whole BSC. Add the timer bsc_T3113 to increase the counter only once if paging expires, and not once per BTS where paging expired. Related: SYS#4878 Change-Id: I9c118e7e3d61ed8c9f1951111255b196905eba4d --- M include/osmocom/bsc/bsc_stats.h M include/osmocom/bsc/bsc_subscriber.h M src/osmo-bsc/bsc_stats.c M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/paging.c 5 files changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/84/26384/1 diff --git a/include/osmocom/bsc/bsc_stats.h b/include/osmocom/bsc/bsc_stats.h index 9140f85..801a2c1 100644 --- a/include/osmocom/bsc/bsc_stats.h +++ b/include/osmocom/bsc/bsc_stats.h @@ -76,6 +76,7 @@ BSC_CTR_PAGING_ATTEMPTED, BSC_CTR_PAGING_DETACHED, BSC_CTR_PAGING_RESPONDED, + BSC_CTR_PAGING_EXPIRED, BSC_CTR_PAGING_NO_ACTIVE_PAGING, BSC_CTR_UNKNOWN_UNIT_ID, BSC_CTR_MSCPOOL_SUBSCR_NO_MSC, diff --git a/include/osmocom/bsc/bsc_subscriber.h b/include/osmocom/bsc/bsc_subscriber.h index 6fffafd..7736f38 100644 --- a/include/osmocom/bsc/bsc_subscriber.h +++ b/include/osmocom/bsc/bsc_subscriber.h @@ -5,6 +5,7 @@ #include <stdint.h> #include <osmocom/core/linuxlist.h> +#include <osmocom/core/timer.h> #include <osmocom/core/use_count.h> #include <osmocom/gsm/protocol/gsm_23_003.h> #include <osmocom/gsm/gsm48.h> @@ -17,6 +18,9 @@ char imsi[GSM23003_IMSI_MAX_DIGITS+1]; uint32_t tmsi; + + /* Paging expired timer to increase bsc.paging:expired */ + struct osmo_timer_list bsc_T3113; }; const char *bsc_subscr_name(struct bsc_subscr *bsub); diff --git a/src/osmo-bsc/bsc_stats.c b/src/osmo-bsc/bsc_stats.c index c789aea..b48c90a 100644 --- a/src/osmo-bsc/bsc_stats.c +++ b/src/osmo-bsc/bsc_stats.c @@ -93,6 +93,7 @@ [BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber"}, [BSC_CTR_PAGING_DETACHED] = {"paging:detached", "Paging request send failures because no responsible BTS was found"}, [BSC_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful response"}, + [BSC_CTR_PAGING_EXPIRED] = {"paging:expired", "Paging Request expired because of timeout T3113"}, [BSC_CTR_PAGING_NO_ACTIVE_PAGING] = {"paging:no_active_paging", "Paging response without an active paging request (arrived after paging expiration?)"}, [BSC_CTR_UNKNOWN_UNIT_ID] = {"abis:unknown_unit_id", "Connection attempts from unknown IPA CCM Unit ID"}, diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 904da62..bac691a 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -335,6 +335,48 @@ return bsc_paging_start(&paging); } +static void bsc_paging_T3113_expired(void *data) +{ + struct bsc_paging_params *params = (struct bsc_paging_params *)data; + + log_set_context(LOG_CTX_BSC_SUBSCR, params->bsub); + LOGP(DPAG, LOGL_DEBUG, "T3113 expired for %s, increasing bsc.paging:expired\n", + bsc_subscr_name(params->bsub)); + log_set_context(LOG_CTX_BSC_SUBSCR, NULL); + + rate_ctr_inc(rate_ctr_group_get_ctr(bsc_gsmnet->bsc_ctrs, BSC_CTR_PAGING_EXPIRED)); +} + +/*! Start the BSC's T3113 to increase the bsc.paging:expired if needed */ +void bsc_paging_start_timer(struct bsc_paging_params *params) +{ + struct gsm_bts *bts_i; + unsigned int timeout_s = 0; + struct timeval now; + + osmo_gettimeofday(&now, NULL); + + /* T3113 may be different per BTS (especially if set to dynamic), so + * get the max of T3113 of all BTS where the subscriber was paged */ + llist_for_each_entry(bts_i, &bsc_gsmnet->bts_list, list) { + struct gsm_paging_request *req; + + llist_for_each_entry(req, &bts_i->paging.pending_requests, entry) { + struct timeval remaining; + + if (req->bsub != params->bsub) + continue; + + osmo_timer_remaining(&req->T3113, &now, &remaining); + timeout_s = OSMO_MAX(timeout_s, remaining.tv_sec); + break; + } + } + + osmo_timer_setup(¶ms->bsub->bsc_T3113, bsc_paging_T3113_expired, params); + osmo_timer_schedule(¶ms->bsub->bsc_T3113, timeout_s, 0); +} + int bsc_paging_start(struct bsc_paging_params *params) { rate_ctr_inc(rate_ctr_group_get_ctr(bsc_gsmnet->bsc_ctrs, BSC_CTR_PAGING_ATTEMPTED)); @@ -388,6 +430,8 @@ break; } + bsc_paging_start_timer(params); + bsc_subscr_put(params->bsub, BSUB_USE_PAGING_START); log_set_context(LOG_CTX_BSC_SUBSCR, NULL); return 0; diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index 04512be..b4a3881 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -411,6 +411,8 @@ return 1; } + osmo_timer_del(&bsub->bsc_T3113); + return 0; } @@ -479,6 +481,9 @@ count++; } } + + osmo_timer_del(&bsub->bsc_T3113); + return count; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26384 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9c118e7e3d61ed8c9f1951111255b196905eba4d Gerrit-Change-Number: 26384 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211126/a6764965/attachment.htm>