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
This commit is contained in:
parent
2beaa20295
commit
ad70991d51
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue