This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
ipse gerrit-no-reply at lists.osmocom.orgipse has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18090 )
Change subject: ctrs: Correctly count load total for dynamic timeslots.
......................................................................
ctrs: Correctly count load total for dynamic timeslots.
>From the CS perspective, there is no difference whether this is
a dynamic TS in NONE/PDCH mode or a static TCH in UNUSED mode since
BSC can switch into USED mode at any moment. So we should count
dynamic timeslots in the "total" count.
A bit of a challenge here is that GSM_PCHAN_TCH_F_TCH_H_PDCH
timeslots could be either switched to a single TCH/F or to
two TCH/H, so the total can't be calculated reliably beforehand.
In this code we assume TCH/F since this gives a lower total
count.
Change-Id: Iabd70e8adbf15eb3b7a7be597281ea99b352317b
---
M src/osmo-bsc/chan_alloc.c
1 file changed, 22 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 669eb8e..ac246e0 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -58,6 +58,28 @@
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. */
+ 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++;
+ }
+
+ /* Count allocated logical channels.
+ * Note: A GSM_PCHAN_TCH_F_TCH_H_PDCH can be switched
+ * to a single TCH/F or to two TCH/H. So when it's in
+ * the TCH/H mode, total number of available channels
+ * is 1 more than when it's in the TCH/F mode.
+ * I.e. "total" count will fluctuate depending on
+ * whether GSM_PCHAN_TCH_F_TCH_H_PDCH timeslot is
+ * in TCH/F or TCH/H (or in NONE/PDCH) mode. */
ts_for_each_lchan(lchan, ts) {
/* don't even count CBCH slots in total */
if (lchan->type == GSM_LCHAN_CBCH)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18090
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iabd70e8adbf15eb3b7a7be597281ea99b352317b
Gerrit-Change-Number: 18090
Gerrit-PatchSet: 5
Gerrit-Owner: ipse <Alexander.Chemeris at gmail.com>
Gerrit-Assignee: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: ipse <Alexander.Chemeris at gmail.com>
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/20200508/d5174089/attachment.htm>