laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/27985 )
Change subject: paging: Document 'ccch_load_ind_period * 2' value
......................................................................
paging: Document 'ccch_load_ind_period * 2' value
Change-Id: Ie88bb0f9859bcf4b3b4a07ccf3b1791cb50163f1
---
M src/osmo-bsc/paging.c
1 file changed, 13 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 1430c22..2ba0fcb 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -73,6 +73,11 @@
.tv_nsec = 500 * 1000 * 1000,
};
+/* If no CCCH Lod Ind is received before this time period, the BTS is considered
+ * to have stopped sending CCCH Load Indication, probaby due to being under Load
+ * Threshold: */
+#define bts_no_ccch_load_ind_timeout_sec(bts) ((bts)->ccch_load_ind_period * 2)
+
/*
* Kill one paging request update the internal list...
*/
@@ -132,13 +137,14 @@
{
struct gsm_bts_paging_state *paging_bts_st = data;
struct gsm_bts *bts = paging_bts_st->bts;
- uint16_t estimated_slots = paging_estimate_available_slots(bts,
bts->ccch_load_ind_period * 2);
+ unsigned int load_ind_timeout = bts_no_ccch_load_ind_timeout_sec(bts);
+ uint16_t estimated_slots = paging_estimate_available_slots(bts, load_ind_timeout);
LOG_BTS(bts, DPAG, LOGL_INFO,
"Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold
(available_slots %u -> %u)\n",
paging_bts_st->available_slots, estimated_slots);
paging_bts_st->available_slots = estimated_slots;
paging_schedule_if_needed(paging_bts_st);
- osmo_timer_schedule(&bts->paging.credit_timer, bts->ccch_load_ind_period * 2,
0);
+ osmo_timer_schedule(&bts->paging.credit_timer, load_ind_timeout, 0);
}
/*! count the number of free channels for given RSL channel type required
@@ -294,11 +300,12 @@
{
bts->paging.bts = bts;
bts->paging.free_chans_need = -1;
- bts->paging.available_slots = paging_estimate_available_slots(bts,
bts->ccch_load_ind_period * 2);
+ unsigned int load_ind_timeout = bts_no_ccch_load_ind_timeout_sec(bts);
+ bts->paging.available_slots = paging_estimate_available_slots(bts,
load_ind_timeout);
INIT_LLIST_HEAD(&bts->paging.pending_requests);
osmo_timer_setup(&bts->paging.work_timer, paging_worker, &bts->paging);
osmo_timer_setup(&bts->paging.credit_timer, paging_give_credit,
&bts->paging);
- osmo_timer_schedule(&bts->paging.credit_timer, bts->ccch_load_ind_period * 2,
0);
+ osmo_timer_schedule(&bts->paging.credit_timer, load_ind_timeout, 0);
}
/* Called upon the bts struct being freed */
@@ -583,7 +590,8 @@
bts->paging.available_slots = free_slots;
paging_schedule_if_needed(&bts->paging);
/* Re-arm credit_timer */
- osmo_timer_schedule(&bts->paging.credit_timer, bts->ccch_load_ind_period * 2,
0);
+ osmo_timer_schedule(&bts->paging.credit_timer,
+ bts_no_ccch_load_ind_timeout_sec(bts), 0);
}
/*! Count the number of pending paging requests on given BTS */
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27985
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie88bb0f9859bcf4b3b4a07ccf3b1791cb50163f1
Gerrit-Change-Number: 27985
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged