diff options
author | Harald Welte <laforge@osmocom.org> | 2022-05-06 15:41:51 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-05-06 15:41:51 +0200 |
commit | e9d654757a4cbf5675c42e019b70b7d2fe62c782 (patch) | |
tree | aff373e97c34c935e05bb7e9e22d327cc18505d4 | |
parent | 6b073296f907d1ed41668bf1b454170e3d1100c5 (diff) |
HACK: queue limitlaforge/queue-limit
Change-Id: I6523c6816a4d16b71084d004e979be40cf0aeeb0
-rw-r--r-- | include/osmocom/bsc/bts.h | 1 | ||||
-rw-r--r-- | src/osmo-bsc/bts.c | 3 | ||||
-rw-r--r-- | src/osmo-bsc/paging.c | 6 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 9c954415a..464fc2405 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -55,6 +55,7 @@ enum bts_counter_id { BTS_CTR_PAGING_EXPIRED, BTS_CTR_PAGING_NO_ACTIVE_PAGING, BTS_CTR_PAGING_MSC_FLUSH, + BTS_CTR_PAGING_OVERLOAD, BTS_CTR_CHAN_ACT_TOTAL, BTS_CTR_CHAN_ACT_SDCCH, BTS_CTR_CHAN_ACT_TCH, diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index c3dd70af4..766371aeb 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -1072,6 +1072,9 @@ const struct rate_ctr_desc bts_ctr_description[] = { [BTS_CTR_PAGING_MSC_FLUSH] = \ { "paging:msc_flush", "Paging flushed due to MSC Reset BSSMAP message" }, + [BTS_CTR_PAGING_OVERLOAD] = \ + { "paging:overload", + "Paging dropped due to BSC Paging queue overload" }, [BTS_CTR_CHAN_ACT_TOTAL] = \ { "chan_act:total", "Total number of Channel Activations" }, diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c index c38d5c582..abe4c234e 100644 --- a/src/osmo-bsc/paging.c +++ b/src/osmo-bsc/paging.c @@ -409,6 +409,12 @@ static int _paging_request(const struct bsc_paging_params *params, struct gsm_bt rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_ATTEMPTED)); + /* don't try to queie more requests than we can realistically handle within 60s */ + if (llist_count(&bts_entry->pending_requests) > paging_estimate_available_slots(bts, 60)) { + rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_OVERLOAD)); + return -ENOSPC; + } + /* Iterate list of pending requests to find if we already have one for * the given subscriber. While on it, find the last * not-yet-ever-once-transmitted request; the new request will be added |