Change in osmo-ttcn3-hacks[master]: pcu: Verify LLC UI dummy frames are not appended at end of rlcmac DL ...

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

pespin gerrit-no-reply at lists.osmocom.org
Mon Dec 7 13:29:13 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21419 )

Change subject: pcu: Verify LLC UI dummy frames are not appended at end of rlcmac DL block
......................................................................

pcu: Verify LLC UI dummy frames are not appended at end of rlcmac DL block

LLC UI dummy frames are only to be sent alone in order to delay TBF
termination. Until recently (osmo-pcu.git
Ifae1a7b2b3dfad8df19585063088ba0df2749c8f), osmo-pcu was sending LLC UI
dummy frames instead of padding at RLCMAC layer, which made no sense.

Related: OS#4849
Change-Id: I7e0d9ed2475dbf989fbf932c8b83117ff5fb28fc
---
M pcu/GPRS_Components.ttcn
M pcu/PCU_Tests.ttcn
2 files changed, 77 insertions(+), 14 deletions(-)

Approvals:
  daniel: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index 0850a3d..16036ad 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -1001,13 +1001,6 @@
 		f_shutdown(__BFILE__, __LINE__);
 	}
 
-	/* Check next data blocks contain dummy frames */
-	if (lengthof(data_block.blocks) > 1 and substr(data_block.blocks[1].payload, 0, 3) != '43C001'O) {
-		setverdict(fail, "Second data payload is not a dummy frame: ",
-			   data_block.blocks[1].payload);
-		f_shutdown(__BFILE__, __LINE__);
-	}
-
 	if (not match(data_block.cs, exp_cs)) {
 		setverdict(fail, "Failed to match ", data_block.cs, " vs exp ", exp_cs);
 		f_shutdown(__BFILE__, __LINE__);
@@ -1036,13 +1029,6 @@
 		f_shutdown(__BFILE__, __LINE__);
 	}
 
-	/* Check next data blocks contain dummy frames */
-	if (lengthof(data_block.blocks) > 1 and substr(data_block.blocks[1].payload, 0, 3) != '43C001'O) {
-		setverdict(fail, "Second data payload is not a dummy frame: ",
-			   data_block.blocks[1].payload);
-		f_shutdown(__BFILE__, __LINE__);
-	}
-
 	if (not match(data_block.mcs, exp_cs)) {
 		setverdict(fail, "Failed to match ", data_block.mcs, " vs exp ", exp_cs);
 		f_shutdown(__BFILE__, __LINE__);
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 67a811d..dad0873 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -2546,6 +2546,81 @@
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
 
+private function f_tc_dl_data_no_llc_ui_dummy(template (omit) MSRadioAccessCapabilityV_BSSGP ms_racap := omit) runs on RAW_PCU_Test_CT {
+	var AckNackDescription ack_nack_desc := valueof(t_AckNackDescription_init);
+	var octetstring data := f_rnd_octstring(6);
+	var RlcmacDlBlock dl_block;
+	var GprsMS ms;
+	var uint32_t fn;
+
+	/* Initialize NS/BSSGP side */
+	f_init_bssgp();
+	/* Initialize GPRS MS side */
+	f_init_gprs_ms();
+	ms := g_ms[0]; /* We only use first MS in this test */
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename());
+
+	/* Establish BSSGP connection to the PCU */
+	f_bssgp_establish();
+	f_bssgp_client_llgmm_assign(TLLI_UNUSED, ms.tlli);
+
+	/* SGSN sends some DL data, PCU will page on CCCH (PCH) */
+	BSSGP[0].send(ts_BSSGP_DL_UD(ms.tlli, data, ms_racap));
+	f_ms_exp_dl_tbf_ass_ccch(ms, PCU_IF_SAPI_PCH);
+
+	/* Wait timer X2002 and DL block is available after CCCH IMM ASS */
+	f_sleep(X2002);
+
+	/* Expect the first (GPRS DL) block with bsn=0 and rrbp_valid=1 */
+	f_rx_rlcmac_dl_block_exp_data(dl_block, fn, data, 0);
+
+	if (ischosen(dl_block.data_egprs)) {
+		if (lengthof(dl_block.data_egprs.blocks) != 2) {
+			setverdict(fail, "DL EGPRS block has unexpected number of LLC frames: ", dl_block.data_egprs);
+			f_shutdown(__BFILE__, __LINE__);
+		}
+		if (dl_block.data_egprs.blocks[1].hdr.length_ind != 127) {
+			setverdict(fail, "DL EGPRS block 2nd llc frame is not padding!: ", dl_block.data_egprs);
+			f_shutdown(__BFILE__, __LINE__);
+		}
+		if (not match(dl_block.data_egprs.blocks[1].payload,
+			      f_pad_oct(''O, lengthof(dl_block.data_egprs.blocks[1].payload), '2B'O))) {
+			setverdict(fail, "DL EGPRS block 2nd llc frame is not padding!: ", dl_block.data_egprs);
+			f_shutdown(__BFILE__, __LINE__);
+		}
+	} else if (lengthof(dl_block.data.blocks) > 1) {
+				setverdict(fail, "DL GPRS block has extra unexpected LLC frames: ", dl_block.data);
+				f_shutdown(__BFILE__, __LINE__);
+	}
+
+	f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
+/* Verify osmo-pcu Doesn't append LLC UI dummy frames to rlcmac blocks
+ * containing llc data. See OS#4849 */
+testcase TC_dl_gprs_data_no_llc_ui_dummy() runs on RAW_PCU_Test_CT {
+	f_tc_dl_data_no_llc_ui_dummy(omit);
+}
+
+/* Verify osmo-pcu Doesn't append LLC UI dummy frames to rlcmac blocks
+ * containing llc data. See OS#4849 */
+testcase TC_dl_egprs_data_no_llc_ui_dummy() runs on RAW_PCU_Test_CT {
+
+	var MultislotCap_GPRS_BSSGP mscap_gprs := {
+		gprsmultislotclass := '00011'B,
+		gprsextendeddynalloccap := '0'B
+	};
+	var MultislotCap_EGPRS_BSSGP mscap_egprs := {
+		egprsmultislotclass := '00011'B,
+		egprsextendeddynalloccap := '0'B
+	};
+	var MSRadioAccessCapabilityV_BSSGP ms_racap := { valueof(ts_RaCapRec_BSSGP('0001'B /* E-GSM */, mscap_gprs, mscap_egprs)) };
+
+	f_tc_dl_data_no_llc_ui_dummy(ms_racap);
+}
+
 private function f_TC_egprs_pkt_chan_req(in EGPRSPktChRequest req,
 					 template GsmRrMessage t_imm_ass := ?,
 					 PCUIF_BurstType bt := BURST_TYPE_1)
@@ -3459,6 +3534,8 @@
 	execute( TC_paging_cs_multi_ms_tmsi() );
 	execute( TC_bssgp_dl_unitdata_with_valid_imsi() );
 	execute( TC_bssgp_dl_unitdata_with_invalid_imsi() );
+	execute( TC_dl_gprs_data_no_llc_ui_dummy() );
+	execute( TC_dl_egprs_data_no_llc_ui_dummy() );
 
 	/* EGPRS specific test cases */
 	execute( TC_egprs_pkt_chan_req_signalling() );

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7e0d9ed2475dbf989fbf932c8b83117ff5fb28fc
Gerrit-Change-Number: 21419
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
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/20201207/56b641db/attachment.htm>


More information about the gerrit-log mailing list