HACK: queue limit

Change-Id: I6523c6816a4d16b71084d004e979be40cf0aeeb0
This commit is contained in:
Harald Welte 2022-05-06 15:41:51 +02:00
parent 6b073296f9
commit e9d654757a
3 changed files with 10 additions and 0 deletions

View File

@ -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,

View File

@ -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" },

View File

@ -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