Change in osmo-ttcn3-hacks[master]: gbproxy: Start to allocate NRIs to SGSNs

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

laforge gerrit-no-reply at lists.osmocom.org
Sat Jan 16 22:00:56 UTC 2021


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

Change subject: gbproxy: Start to allocate NRIs to SGSNs
......................................................................

gbproxy: Start to allocate NRIs to SGSNs

We change the osmo-gbproxy.cfg to use NRI 3 for SGSN-0 (NSEI 101) and
NRI 4 for SGSN-1 (NSEI 102).

We also add the capability to GBProxy_Tests to allocate P-TMSI with
a specific NRI and default to the first NRI of SGSN-0 so all tests
written still for a single-SGSN-non-pool scenario pass without any
modification.

Related: OS#4472, SYS#5002
Change-Id: I15f78dca5ac31a1c71f086d3e92a70e900eae250
---
M gbproxy/GBProxy_Tests.ttcn
M gbproxy/osmo-gbproxy.cfg
M gbproxy/osmo-gbproxy.fr.cfg
3 files changed, 16 insertions(+), 4 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 4857515..9168fa3 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -45,6 +45,12 @@
 const integer max_fr_info_size := 1600;
 
 modulepar {
+	/* NRI bit-length. 0 for no pooling */
+	integer mp_nri_bitlength := 5;
+	roro_integer mp_sgsn_nri := {
+		{ 3 },		/* list of NRIs of first SGSN */
+		{ 4 }		/* list of NRIs of second SGSN */
+	};
 	boolean mp_enable_bss_load_sharing := false;
 	/* SGSN NS configuration */
 	NSConfigurations mp_nsconfig_sgsn := {
@@ -594,10 +600,10 @@
 
 /* helper function to create, connect and start a BSSGP_ConnHdlr component */
 function f_start_handler(void_fn fn, charstring id, GbInstances pcu, GbInstances sgsn, integer imsi_suffix,
-			 float t_guard := 30.0)
+			 float t_guard := 30.0, integer nri := mp_sgsn_nri[0][0])
 runs on test_CT return BSSGP_ConnHdlr {
 	var BSSGP_ConnHdlr vc_conn;
-	var OCT4 p_tmsi := f_gen_tmsi(imsi_suffix);
+	var OCT4 p_tmsi := f_gen_tmsi(imsi_suffix, nri_v := nri, nri_bitlen := mp_nri_bitlength);
 
 	var BSSGP_ConnHdlrPars pars := {
 		imei := f_gen_imei(imsi_suffix),
@@ -608,8 +614,8 @@
 		tlli := f_gprs_tlli_from_tmsi(p_tmsi, TLLI_LOCAL),
 		tlli_old := omit,
 		ra := omit,
-		pcu := g_pcu,
-		sgsn := g_sgsn,
+		pcu := pcu,
+		sgsn := sgsn,
 		t_guard := t_guard
 	};
 
diff --git a/gbproxy/osmo-gbproxy.cfg b/gbproxy/osmo-gbproxy.cfg
index 1c6caa9..5789e3a 100644
--- a/gbproxy/osmo-gbproxy.cfg
+++ b/gbproxy/osmo-gbproxy.cfg
@@ -6,10 +6,13 @@
  no login
 !
 gbproxy
+ nri bitlen 5
 sgsn nsei 101
  name first
+ nri add 3
 sgsn nsei 102
  name second
+ nri add 4
 ns
  bind udp local
   listen 127.0.0.1 23000
diff --git a/gbproxy/osmo-gbproxy.fr.cfg b/gbproxy/osmo-gbproxy.fr.cfg
index e350526..11ab84b 100644
--- a/gbproxy/osmo-gbproxy.fr.cfg
+++ b/gbproxy/osmo-gbproxy.fr.cfg
@@ -49,7 +49,10 @@
   nsvc fr hdlcnet7 dlci 22 nsvci 7
   nsvc fr hdlcnet8 dlci 23 nsvci 8
 gbproxy
+ nri bitlen 5
 sgsn nsei 101
  name first
+ nri add 3
 sgsn nsei 102
  name second
+ nri add 4

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22227
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: I15f78dca5ac31a1c71f086d3e92a70e900eae250
Gerrit-Change-Number: 22227
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann 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/20210116/e04b7123/attachment.htm>


More information about the gerrit-log mailing list