summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-09-11 20:21:29 +0200
committerlaforge <laforge@osmocom.org>2020-09-14 12:01:42 +0000
commitad70991d514a083e4b52a4b12167ef93260d9cba (patch)
tree2b2d0ee14852b3942d38fd3d4c79da2ba21d26c1
parent2beaa20295ebf74eb4aaa150cf724b227686b77a (diff)
RAW_NS: remove usage of mp_gb_cfg
RAW_NS uses module parameter from SGSN_Components. To decouple RAW_NS from SGSN_Component pass the cell_id via a function argument. Change-Id: I91d9db85519675054aaab83c85fac43e67391f33
-rw-r--r--pcu/PCU_Tests_NS.ttcn4
-rw-r--r--pcu/PCU_Tests_SNS.ttcn24
-rw-r--r--pcu/RAW_NS.ttcn9
3 files changed, 18 insertions, 19 deletions
diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn
index 586b1b1..26b81a2 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -188,8 +188,8 @@ testcase TC_ns_full_bringup() runs on RAW_Test_CT {
f_outgoing_ns_alive();
/* Expect BVC-RESET for signaling (0) and ptp BVCI */
- as_rx_bvc_reset_tx_ack(0, oneshot := true);
- as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true);
+ as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true);
+ as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true);
as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true);
/* wait for one FLOW-CONTROL BVC and then ACK any further in the future */
diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn
index e819688..192890d 100644
--- a/pcu/PCU_Tests_SNS.ttcn
+++ b/pcu/PCU_Tests_SNS.ttcn
@@ -187,8 +187,8 @@ testcase TC_sns_so_config_success() runs on RAW_Test_CT {
f_outgoing_ns_alive();
/* Expect BVC-RESET for signaling (0) and ptp BVCI */
- as_rx_bvc_reset_tx_ack(0, oneshot := true);
- as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true);
+ as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true);
+ as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true);
as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true);
/* wait for one FLOW-CONTROL BVC and then ACK any further in the future */
@@ -220,12 +220,12 @@ private function f_sns_bringup_1c1u(boolean sgsn_originated_reset := false) runs
f_outgoing_ns_alive(1);
if (sgsn_originated_reset) {
- f_tx_bvc_reset_rx_ack(0);
- f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci);
+ f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.cell_id);
+ f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id);
} else {
/* Expect BVC-RESET for signaling (0) and ptp BVCI */
- as_rx_bvc_reset_tx_ack(0, oneshot := true);
- as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true);
+ as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true);
+ as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true);
}
/* Expect UNBLOCK for ptp BVCI on signaling NS-VC (idx==0) */
as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true);
@@ -270,12 +270,12 @@ private function f_sns_bringup_1c1u_separate(boolean sgsn_originated_reset := fa
f_outgoing_ns_alive_no_ack(idx := 0);
if (sgsn_originated_reset) {
- f_tx_bvc_reset_rx_ack(0, idx := 1);
- f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, idx := 1);
+ f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.cell_id, idx := 1);
+ f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, idx := 1);
} else {
/* Expect BVC-RESET for signaling BVCI=0 and ptp BVCI */
- as_rx_bvc_reset_tx_ack(0, oneshot := true, idx := 1);
- as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true, idx := 1);
+ as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true, idx := 1);
+ as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true, idx := 1);
}
/* Expect UNBLOCK for ptp BVCI on signaling NS-VC (idx==1) */
as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true, idx := 1);
@@ -322,8 +322,8 @@ testcase TC_sns_1c1u_so_bvc_reset_too_early() runs on RAW_Test_CT {
f_outgoing_ns_alive_no_ack(idx := 0);
/* Transmit BVC-RESET and expect no ACK*/
- f_tx_bvc_reset_rx_ack(0, idx := 1, exp_ack := false);
- f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, idx := 1, exp_ack := false);
+ f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.cell_id, idx := 1, exp_ack := false);
+ f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, idx := 1, exp_ack := false);
}
/* Test adding new IP endpoints at runtime */
diff --git a/pcu/RAW_NS.ttcn b/pcu/RAW_NS.ttcn
index 9c31820..d02f4ca 100644
--- a/pcu/RAW_NS.ttcn
+++ b/pcu/RAW_NS.ttcn
@@ -12,7 +12,6 @@ module RAW_NS {
import from General_Types all;
import from Osmocom_Types all;
-import from SGSN_Components all;
import from Osmocom_Gb_Types all;
import from NS_CodecPort all;
import from NS_Types all;
@@ -139,10 +138,10 @@ altstep as_rx_alive_tx_ack(boolean oneshot := false, integer idx := 0) runs on R
}
/* Transmit BSSGP RESET for given BVCI and expect ACK */
-function f_tx_bvc_reset_rx_ack(BssgpBvci bvci, integer idx := 0, boolean exp_ack := true)
+function f_tx_bvc_reset_rx_ack(BssgpBvci bvci, BssgpCellId cell_id, integer idx := 0, boolean exp_ack := true)
runs on RAW_NS_CT {
var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET(BSSGP_CAUSE_NET_SV_CAP_MOD_GT_ZERO_KBPS, bvci,
- mp_gb_cfg.cell_id));
+ cell_id));
timer T := 5.0;
NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx))));
T.start;
@@ -162,14 +161,14 @@ runs on RAW_NS_CT {
}
/* Receive a BSSGP RESET for given BVCI and ACK it */
-altstep as_rx_bvc_reset_tx_ack(BssgpBvci bvci, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
+altstep as_rx_bvc_reset_tx_ack(BssgpBvci bvci, BssgpCellId cell_id, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {
var NS_RecvFrom ns_rf;
/* FIXME: nail down received cell_id in match */
[] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, 0,
decmatch tr_BVC_RESET(?, bvci, ?))))
-> value ns_rf {
var PDU_BSSGP bssgp_rx := dec_PDU_BSSGP(ns_rf.msg.pDU_NS_Unitdata.nS_SDU);
- var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET_ACK(bvci, mp_gb_cfg.cell_id));
+ var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET_ACK(bvci, cell_id));
NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx))));
if (not oneshot) { repeat; }
}