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
Fri Jan 15 19:04:38 UTC 2021


laforge has uploaded this change for review. ( 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(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 6daad53..0f35c9d 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 ace1881..f16e60f 100644
--- a/gbproxy/osmo-gbproxy.cfg
+++ b/gbproxy/osmo-gbproxy.cfg
@@ -6,8 +6,11 @@
  no login
 !
 gbproxy
+ nri bitlen 5
 sgsn nsei 101
+ nri add 3
 sgsn nsei 102
+ 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 66dd897..f2fea54 100644
--- a/gbproxy/osmo-gbproxy.fr.cfg
+++ b/gbproxy/osmo-gbproxy.fr.cfg
@@ -49,5 +49,8 @@
   nsvc fr hdlcnet7 dlci 22 nsvci 7
   nsvc fr hdlcnet8 dlci 23 nsvci 8
 gbproxy
+ nri bitlen 5
 sgsn nsei 101
+ nri add 3
 sgsn nsei 102
+ 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: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210115/8b11483e/attachment.htm>


More information about the gerrit-log mailing list