aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-05-19 02:54:59 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-06-10 16:15:35 +0200
commit9de771724366fe776a89f420d360054aa5b6153c (patch)
treeda9b41bf1608064f040a1c7a547aa193c1f51632
parentb3695df6ab14973d492853a5bf4da558ad66629a (diff)
clarify bts_chan_load
-rw-r--r--src/osmo-bsc/chan_alloc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 5915a9309..f2a41b77f 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -59,18 +59,17 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts)
if (!nm_is_running(&ts->mo.nm_state))
continue;
- /* Dynamic timeslots have to be counted separately
- * when not in TCH/F or TCH/H mode because they don't
- * have an lchan's allocated to them. At the same time,
- * dynamic timeslots in NONE and PDCH modes are same
- * as in UNUSED mode from the CS channel load perspective
- * beause they can be switched to TCH mode at any moment.
- * I.e. they are "available" for TCH. */
+ /* A dynamic timeslot currently in PDCH mode are available as TCH, beause they can be switched
+ * to TCH mode at any moment. Count TCH/F_TCH/H_PDCH as one total timeslot, even though it may
+ * be switched to TCH/H and would then count as two -- hence opt for pessimistic load. */
if ((ts->pchan_on_init == GSM_PCHAN_TCH_F_TCH_H_PDCH ||
ts->pchan_on_init == GSM_PCHAN_TCH_F_PDCH) &&
(ts->pchan_is == GSM_PCHAN_NONE ||
ts->pchan_is == GSM_PCHAN_PDCH)) {
pl->total++;
+ /* Below loop would not count this timeslot, since in PDCH mode it has no usable
+ * timeslots. But let's make it clear that the timeslot must not be counted again: */
+ continue;
}
ts_for_n_lchans(lchan, ts, ts->max_primary_lchans) {