[PATCH] osmo-ttcn3-hacks[master]: make PCU tests send PS paging requests on BVCI zero

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

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Thu May 3 17:21:04 UTC 2018


Review at  https://gerrit.osmocom.org/8020

make PCU tests send PS paging requests on BVCI zero

osmo-pcu discards PAGING-PS messages unless received on the
signalling BVCI 0. The BVCI value must be set to zero both
in the NS header and the BSSGP header. Create new ports between
the PCU_Test components which the TC_paging test case can use
to ensure that both layers send frames with BVCI value of zero.

This does not make PCU_Tests.tc_paging work yet, however the PS
paging request is now processed by osmo-pcu rather than discarded.

Change-Id: I0437123b04b7320a4f690f0646578c57abf6bc87
Related: OS#2404
---
M library/BSSGP_Emulation.ttcn
M library/NS_Emulation.ttcn
M pcu/PCU_Tests.ttcn
3 files changed, 14 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/8020/1

diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index c7766dc..fcebf04 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -99,8 +99,9 @@
 }
 
 type component BSSGP_CT {
-	/* UDP port towards the bottom (IUT) */
+	/* UDP ports towards the bottom (IUT) */
 	port NS_PT BSCP;
+	port NS_PT BSCP_SIG;
 	/* NS-User SAP towards the user */
 	port BSSGP_SP_PT BSSGP_SP;
 	port BSSGP_PROC_PT BSSGP_PROC;
@@ -534,6 +535,10 @@
 		}
 	}
 
+	[] BSSGP_SP.receive(tr_BSSGP_PS_PAGING(0)) -> value bs_pdu sender vc_conn {
+		BSCP_SIG.send(f_BnsUdReq(bs_pdu, g_cfg.bvci));
+	}
+
 	/* pass virtually any PDU from user to NS-UNITDATA PDU on network */
 	[] BSSGP_SP.receive(PDU_BSSGP:?) -> value bs_pdu sender vc_conn {
 		BSCP.send(f_BnsUdReq(bs_pdu, g_cfg.bvci));
diff --git a/library/NS_Emulation.ttcn b/library/NS_Emulation.ttcn
index 27acae2..47dc526 100644
--- a/library/NS_Emulation.ttcn
+++ b/library/NS_Emulation.ttcn
@@ -92,6 +92,7 @@
 		port NS_CODEC_PT NSCP;
 		/* NS-User SAP towards the user */
 		port NS_SP_PT NS_SP;
+		port NS_SP_PT NS_SP_SIG;
 
 		var NseState		g_state := NSE_S_DEAD_BLOCKED;
 		var ConnectionId	g_conn_id := -1;
@@ -264,6 +265,9 @@
 					var octetstring enc := enc_PDU_BSSGP(ud_req.bssgp);
 					NSCP.send(t_NS_Send(g_conn_id, t_NS_UNITDATA(t_SduCtrlB, ud_req.bvci, enc)));
 				}
+				[] NS_SP_SIG.receive(t_NsUdReq(mp_nsei, ?, ?, omit)) -> value ud_req {
+					NSCP.send(t_NS_Send(g_conn_id, t_NS_UNITDATA(t_SduCtrlB, 0, ud_req.sdu)));
+				}
 			}
 		}
 
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 12b63d6..54cb9da 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -63,6 +63,7 @@
 		connect(self:BSSGP_PROC, bssgp_component:BSSGP_PROC);
 		/* connect lower-end of BSSGP with BSSGP_CODEC_PORT (maps to NS_PT*/
 		connect(bssgp_component:BSCP, ns_component:NS_SP);
+		connect(bssgp_component:BSCP_SIG, ns_component:NS_SP_SIG);
 		/* connect lower-end of NS emulation to NS_CODEC_PORT (on top of IPl4) */
 		map(ns_component:NSCP, system:NS_CODEC_PORT);
 		ns_component.start(NSStart());
@@ -200,8 +201,9 @@
 		g_mmctx.tlli := f_random_tlli();
 		f_init();
 
-		BSSGP.send(ts_BSSGP_PS_PAGING_IMSI(mp_gb_cfg.bvci, g_mmctx.imsi));
-		BSSGP.send(ts_BSSGP_PS_PAGING_PTMSI(mp_gb_cfg.bvci, g_mmctx.imsi, tmsi));
+		/* Send paging on signalling BVCI 0 since osmo-pcu does not support paging on PTP yet. */
+		BSSGP.send(ts_BSSGP_PS_PAGING_IMSI(0, g_mmctx.imsi));
+		BSSGP.send(ts_BSSGP_PS_PAGING_PTMSI(0, g_mmctx.imsi, tmsi));
 
 		while (true) {
 			var BssgpDecoded bd;

-- 
To view, visit https://gerrit.osmocom.org/8020
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0437123b04b7320a4f690f0646578c57abf6bc87
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>



More information about the gerrit-log mailing list