Change in osmo-bsc[master]: clarify bts_chan_load

neels gerrit-no-reply at lists.osmocom.org
Thu Jun 10 15:22:08 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24384 )

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(-)

Approvals:
  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))
 				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) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24384
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9bd80a08472018e69360ac5739979c7056d4f063
Gerrit-Change-Number: 24384
Gerrit-PatchSet: 29
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210610/af2f3f1f/attachment.htm>


More information about the gerrit-log mailing list