Change in osmo-bsc[master]: ts, lchan_fsm: do not attempt to allocate CBCH subslots

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Sep 12 13:49:41 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10871 )

Change subject: ts,lchan_fsm: do not attempt to allocate CBCH subslots
......................................................................

ts,lchan_fsm: do not attempt to allocate CBCH subslots

In case a given channel combination contains a CBCH, it replaces sub-slot 2
with a CBCH, i.e. we must not attempt to allocate the same for SDCCH.

On timeslot initialization, immediately place such an lchan FSM into new state
LCHAN_ST_CBCH, so that it never appears unused and never is picked during
lchan_select(). Also set lchan->type = GSM_LCHAN_CBCH.

Verified by configuring CBCH timeslots and watching 'show lchan summary'.

Immediately after RSL and OML are up, these pchan types show lchan 2 in state
CBCH:

  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm

With a 'phys_chan_config ccch+sdcch4+cbch' and three phones simultaneously
requesting USSD, I see:

  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 0, Type SDCCH, State ESTABLISHED - L1 MS Power: 14 dBm RXL-FULL-dl:  -53 dBm RXL-FULL-ul:  -47 dBm
  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 1, Type SDCCH, State ESTABLISHED - L1 MS Power: 30 dBm RXL-FULL-dl:  -47 dBm RXL-FULL-ul:  -47 dBm
  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 0 CCCH+SDCCH4+CBCH, Lchan 3, Type SDCCH, State ESTABLISHED - L1 MS Power: 16 dBm RXL-FULL-dl:  -47 dBm RXL-FULL-ul:  -47 dBm

With 'phys_chan_config SDCCH8+CBCH' and three phones simultaneously attaching,
I see:

  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 0, Type SDCCH, State WAIT_RLL_RTP_ESTABLISH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 1, Type SDCCH, State WAIT_RLL_RTP_ESTABLISH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 2, Type CBCH, State CBCH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm
  BTS 0, TRX 0, Timeslot 1 SDCCH8+CBCH, Lchan 3, Type SDCCH, State WAIT_RLL_RTP_ESTABLISH - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm

i.e. in all cases the CBCH lchan remains occupied and is not allocated as
SDCCH.

Detaching and re-attaching the BTS reliably brings back the CBCH state. Also
verified that changing the osmo-bsc config from telnet vty and dropping oml
followed by the BTS re-attaching brings back the CBCH state.

Change-Id: I2bafc5f696e818e38f8907ad0c8f38494df0623d
---
M include/osmocom/bsc/lchan_fsm.h
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/timeslot_fsm.c
3 files changed, 17 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/include/osmocom/bsc/lchan_fsm.h b/include/osmocom/bsc/lchan_fsm.h
index 35b8847..9fbf9b3 100644
--- a/include/osmocom/bsc/lchan_fsm.h
+++ b/include/osmocom/bsc/lchan_fsm.h
@@ -14,6 +14,7 @@
 
 enum lchan_fsm_state {
 	LCHAN_ST_UNUSED,
+	LCHAN_ST_CBCH, /*< Blocked by CBCH channel combination, not usable as SDCCH. */
 	LCHAN_ST_WAIT_TS_READY,
 	LCHAN_ST_WAIT_ACTIV_ACK, /*< After RSL Chan Act Ack, lchan is active but RTP not configured. */
 	LCHAN_ST_WAIT_RLL_RTP_ESTABLISH,
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 1ef7869..c80d8a1 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -1035,6 +1035,13 @@
 			,
 		.out_state_mask = 0
 			| S(LCHAN_ST_WAIT_TS_READY)
+			| S(LCHAN_ST_CBCH)
+			,
+	},
+	[LCHAN_ST_CBCH] = {
+		.name = "CBCH",
+		.out_state_mask = 0
+			| S(LCHAN_ST_UNUSED)
 			,
 	},
 	[LCHAN_ST_WAIT_TS_READY] = {
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index 56b3357..fc25460 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -295,6 +295,15 @@
 					T_CHAN_ACT_DEACT);
 		break;
 
+	case GSM_PCHAN_CCCH_SDCCH4_CBCH:
+	case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
+		/* For any pchans containing a CBCH, lchan[2] is reserved for CBCH and cannot be
+		 * allocated for SDCCH. */
+		OSMO_ASSERT(ts->lchan[2].fi);
+		ts->lchan[2].type = GSM_LCHAN_CBCH;
+		osmo_fsm_inst_state_chg(ts->lchan[2].fi, LCHAN_ST_CBCH, 0, 0);
+		break;
+
 	default:
 		/* nothing to do */
 		break;

-- 
To view, visit https://gerrit.osmocom.org/10871
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2bafc5f696e818e38f8907ad0c8f38494df0623d
Gerrit-Change-Number: 10871
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180912/2bc5b6dd/attachment.htm>


More information about the gerrit-log mailing list