Change in osmo-bsc[master]: ctrs: Correctly count load total for dynamic timeslots.

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.org
Wed May 6 23:53:57 UTC 2020


ipse has uploaded this change for review. ( 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.

Change-Id: Iabd70e8adbf15eb3b7a7be597281ea99b352317b
---
M src/osmo-bsc/chan_alloc.c
1 file changed, 14 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/90/18090/1

diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 669eb8e..0964b61 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -58,6 +58,20 @@
 			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 */
+			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: When GSM_PCHAN_TCH_F_TCH_H_PDCH is allocation
+			 * in TCH/H mode, this leads to changing the total
+			 * count vs the TCH/F allocation */
 			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: 1
Gerrit-Owner: ipse <Alexander.Chemeris at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200506/d0c07bfb/attachment.htm>


More information about the gerrit-log mailing list