aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/bsc/bts.h1
-rw-r--r--src/osmo-bsc/bts.c3
-rw-r--r--src/osmo-bsc/paging.c6
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