Change in osmo-bsc[master]: fixup: pass tsc = -1 for previous default training sequence code

neels gerrit-no-reply at lists.osmocom.org
Fri Jun 4 21:12:21 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24565 )


Change subject: fixup: pass tsc = -1 for previous default training sequence code
......................................................................

fixup: pass tsc = -1 for previous default training sequence code

An unintended change in default behavior was introduced in patch:
"allow explixit TSC Set and TSC on chan activ / modif / assignment"
Ic665125255d7354f5499d10dda1dd866ab243d24
c33eb8d56943b8981523754b081967e6ff5f245d

Set tsc_set and tsc = -1 for all lchan_activate_info and
assignment_request requests to actually yield the default behavior of
selecting the TSC based on the timeslot cfg or the BSIC value.

By setting tsc = 0 implicitly, the patch caused all requests to ask for
tsc 0 instead of calling gsm_ts_tsc().

For a Channel Mode Modify in assignment_fsm, pass the lchan's current
TSC to keep it unchanged.

osmo-ttcn3-hacks Id67a949e0f61ec8123976eb8d336f04510c55c01 adds a test
to verify the expected TSC in all of the activation, assignment and
modify messages. Current osmo-bsc master fails, this patch fixes.

Related: SYS#5315 OS#4940 Ic665125255d7354f5499d10dda1dd866ab243d24
Change-Id: If12df11511fe22ea167782f776736a1a9c484b1f
---
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/osmo_bsc_bssap.c
4 files changed, 13 insertions(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 00bb5dc..469b7b3 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1782,6 +1782,8 @@
 		},
 		.ta = rqd->ta,
 		.ta_known = true,
+		.tsc_set = -1,
+		.tsc = -1,
 	};
 
 	lchan_activate(lchan, &info);
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 6a9eb81..a15807a 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -808,14 +808,18 @@
 static void assignment_fsm_wait_lchan_modified_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
 {
 	struct gsm_subscriber_connection *conn = assignment_fi_conn(fi);
+	struct gsm_lchan *lchan = conn->lchan;
 	struct assignment_request *req = &conn->assignment.req;
 	struct lchan_modify_info modif_info = {
 		.modify_for = MODIFY_FOR_ASSIGNMENT,
 		.ch_mode_rate = conn->assignment.selected_ch_mode_rate,
 		.requires_voice_stream = conn->assignment.requires_voice_stream,
 		.msc_assigned_cic = req->msc_assigned_cic,
+		/* keep previous training sequence code */
+		.tsc_set = lchan->tsc_set,
+		.tsc = lchan->tsc,
 	};
-	lchan_mode_modify(conn->lchan, &modif_info);
+	lchan_mode_modify(lchan, &modif_info);
 }
 
 static void assignment_fsm_wait_lchan_modified(struct osmo_fsm_inst *fi, uint32_t event, void *data)
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 48cfbdf..c6a03f1 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -984,6 +984,8 @@
 				.ch_mode_rate = lchan->modify.ch_mode_rate,
 				.requires_voice_stream = true,
 				.msc_assigned_cic = lchan->modify.info.msc_assigned_cic,
+				.tsc_set = -1,
+				.tsc = -1,
 			};
 			lchan->activate.concluded = false;
 			lchan_fsm_state_chg(LCHAN_ST_WAIT_RLL_RTP_ESTABLISH);
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index d6048bf..da0429b 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -928,6 +928,8 @@
 			.msc_assigned_cic = cic,
 			.use_osmux = use_osmux,
 			.osmux_cid = osmux_cid,
+			.tsc_set = -1,
+			.tsc = -1,
 		};
 
 		/* Match codec information from the assignment command against the
@@ -954,6 +956,8 @@
 		req = (struct assignment_request){
 			.assign_for = ASSIGN_FOR_BSSMAP_REQ,
 			.aoip = aoip,
+			.tsc_set = -1,
+			.tsc = -1,
 		};
 
 		rc = select_sign_chan(&req, &ct);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If12df11511fe22ea167782f776736a1a9c484b1f
Gerrit-Change-Number: 24565
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210604/95a9b3d0/attachment.htm>


More information about the gerrit-log mailing list