Change in osmo-bsc[master]: clarify bts_chan_load

neels gerrit-no-reply at
Thu Jun 10 15:22:08 UTC 2021

neels has submitted this change. ( )

Change subject: clarify bts_chan_load

clarify bts_chan_load

Change-Id: I9bd80a08472018e69360ac5739979c7056d4f063
M src/osmo-bsc/chan_alloc.c
1 file changed, 6 insertions(+), 7 deletions(-)

  Jenkins Builder: Verified
  dexter: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve

diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 5915a93..f2a41b7 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -59,18 +59,17 @@
 			if (!nm_is_running(&ts->mo.nm_state))
-			/* 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)) {
+				/* 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) {

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9bd80a08472018e69360ac5739979c7056d4f063
Gerrit-Change-Number: 24384
Gerrit-PatchSet: 29
Gerrit-Owner: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list