<p>lynxis lazus has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20090">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">RAW_NS: remove usage of mp_gb_cfg<br><br>RAW_NS uses module parameter from SGSN_Components. To decouple<br>RAW_NS from SGSN_Component pass the cell_id via a function argument.<br><br>Change-Id: I91d9db85519675054aaab83c85fac43e67391f33<br>---<br>M pcu/PCU_Tests_NS.ttcn<br>M pcu/PCU_Tests_SNS.ttcn<br>M pcu/RAW_NS.ttcn<br>3 files changed, 18 insertions(+), 19 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/20090/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn</span><br><span>index 586b1b1..26b81a2 100644</span><br><span>--- a/pcu/PCU_Tests_NS.ttcn</span><br><span>+++ b/pcu/PCU_Tests_NS.ttcn</span><br><span>@@ -188,8 +188,8 @@</span><br><span>      f_outgoing_ns_alive();</span><br><span> </span><br><span>   /* Expect BVC-RESET for signaling (0) and ptp BVCI */</span><br><span style="color: hsl(0, 100%, 40%);">-   as_rx_bvc_reset_tx_ack(0, oneshot := true);</span><br><span style="color: hsl(0, 100%, 40%);">-     as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true);</span><br><span style="color: hsl(120, 100%, 40%);">+      as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true);</span><br><span style="color: hsl(120, 100%, 40%);">+        as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true);</span><br><span>  as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true);</span><br><span> </span><br><span>       /* wait for one FLOW-CONTROL BVC and then ACK any further in the future */</span><br><span>diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn</span><br><span>index e819688..192890d 100644</span><br><span>--- a/pcu/PCU_Tests_SNS.ttcn</span><br><span>+++ b/pcu/PCU_Tests_SNS.ttcn</span><br><span>@@ -187,8 +187,8 @@</span><br><span>        f_outgoing_ns_alive();</span><br><span> </span><br><span>   /* Expect BVC-RESET for signaling (0) and ptp BVCI */</span><br><span style="color: hsl(0, 100%, 40%);">-   as_rx_bvc_reset_tx_ack(0, oneshot := true);</span><br><span style="color: hsl(0, 100%, 40%);">-     as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true);</span><br><span style="color: hsl(120, 100%, 40%);">+      as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true);</span><br><span style="color: hsl(120, 100%, 40%);">+        as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true);</span><br><span>  as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true);</span><br><span> </span><br><span>       /* wait for one FLOW-CONTROL BVC and then ACK any further in the future */</span><br><span>@@ -220,12 +220,12 @@</span><br><span>   f_outgoing_ns_alive(1);</span><br><span> </span><br><span>  if (sgsn_originated_reset) {</span><br><span style="color: hsl(0, 100%, 40%);">-            f_tx_bvc_reset_rx_ack(0);</span><br><span style="color: hsl(0, 100%, 40%);">-               f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci);</span><br><span style="color: hsl(120, 100%, 40%);">+                f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.cell_id);</span><br><span style="color: hsl(120, 100%, 40%);">+          f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id);</span><br><span>    } else {</span><br><span>             /* Expect BVC-RESET for signaling (0) and ptp BVCI */</span><br><span style="color: hsl(0, 100%, 40%);">-           as_rx_bvc_reset_tx_ack(0, oneshot := true);</span><br><span style="color: hsl(0, 100%, 40%);">-             as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true);</span><br><span style="color: hsl(120, 100%, 40%);">+              as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true);</span><br><span style="color: hsl(120, 100%, 40%);">+                as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true);</span><br><span>  }</span><br><span>    /* Expect UNBLOCK for ptp BVCI on signaling NS-VC (idx==0) */</span><br><span>        as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true);</span><br><span>@@ -270,12 +270,12 @@</span><br><span>   f_outgoing_ns_alive_no_ack(idx := 0);</span><br><span> </span><br><span>    if (sgsn_originated_reset) {</span><br><span style="color: hsl(0, 100%, 40%);">-            f_tx_bvc_reset_rx_ack(0, idx := 1);</span><br><span style="color: hsl(0, 100%, 40%);">-             f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, idx := 1);</span><br><span style="color: hsl(120, 100%, 40%);">+              f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.cell_id, idx := 1);</span><br><span style="color: hsl(120, 100%, 40%);">+                f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, idx := 1);</span><br><span>  } else {</span><br><span>             /* Expect BVC-RESET for signaling BVCI=0 and ptp BVCI */</span><br><span style="color: hsl(0, 100%, 40%);">-                as_rx_bvc_reset_tx_ack(0, oneshot := true, idx := 1);</span><br><span style="color: hsl(0, 100%, 40%);">-           as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, oneshot := true, idx := 1);</span><br><span style="color: hsl(120, 100%, 40%);">+            as_rx_bvc_reset_tx_ack(0, mp_gb_cfg.cell_id, oneshot := true, idx := 1);</span><br><span style="color: hsl(120, 100%, 40%);">+              as_rx_bvc_reset_tx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, oneshot := true, idx := 1);</span><br><span>        }</span><br><span>    /* Expect UNBLOCK for ptp BVCI on signaling NS-VC (idx==1) */</span><br><span>        as_rx_bvc_unblock_tx_ack(mp_gb_cfg.bvci, oneshot := true, idx := 1);</span><br><span>@@ -322,8 +322,8 @@</span><br><span>   f_outgoing_ns_alive_no_ack(idx := 0);</span><br><span> </span><br><span>    /* Transmit BVC-RESET and expect no ACK*/</span><br><span style="color: hsl(0, 100%, 40%);">-       f_tx_bvc_reset_rx_ack(0, idx := 1, exp_ack := false);</span><br><span style="color: hsl(0, 100%, 40%);">-   f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, idx := 1, exp_ack := false);</span><br><span style="color: hsl(120, 100%, 40%);">+    f_tx_bvc_reset_rx_ack(0, mp_gb_cfg.cell_id, idx := 1, exp_ack := false);</span><br><span style="color: hsl(120, 100%, 40%);">+      f_tx_bvc_reset_rx_ack(mp_gb_cfg.bvci, mp_gb_cfg.cell_id, idx := 1, exp_ack := false);</span><br><span> }</span><br><span> </span><br><span> /* Test adding new IP endpoints at runtime */</span><br><span>diff --git a/pcu/RAW_NS.ttcn b/pcu/RAW_NS.ttcn</span><br><span>index 9c31820..d02f4ca 100644</span><br><span>--- a/pcu/RAW_NS.ttcn</span><br><span>+++ b/pcu/RAW_NS.ttcn</span><br><span>@@ -12,7 +12,6 @@</span><br><span> </span><br><span> import from General_Types all;</span><br><span> import from Osmocom_Types all;</span><br><span style="color: hsl(0, 100%, 40%);">-import from SGSN_Components all;</span><br><span> import from Osmocom_Gb_Types all;</span><br><span> import from NS_CodecPort all;</span><br><span> import from NS_Types all;</span><br><span>@@ -139,10 +138,10 @@</span><br><span> }</span><br><span> </span><br><span> /* Transmit BSSGP RESET for given BVCI and expect ACK */</span><br><span style="color: hsl(0, 100%, 40%);">-function f_tx_bvc_reset_rx_ack(BssgpBvci bvci, integer idx := 0, boolean exp_ack := true)</span><br><span style="color: hsl(120, 100%, 40%);">+function f_tx_bvc_reset_rx_ack(BssgpBvci bvci, BssgpCellId cell_id, integer idx := 0, boolean exp_ack := true)</span><br><span> runs on RAW_NS_CT {</span><br><span>         var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET(BSSGP_CAUSE_NET_SV_CAP_MOD_GT_ZERO_KBPS, bvci,</span><br><span style="color: hsl(0, 100%, 40%);">-                                                   mp_gb_cfg.cell_id));</span><br><span style="color: hsl(120, 100%, 40%);">+                                                 cell_id));</span><br><span>    timer T := 5.0;</span><br><span>      NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx))));</span><br><span>        T.start;</span><br><span>@@ -162,14 +161,14 @@</span><br><span> }</span><br><span> </span><br><span> /* Receive a BSSGP RESET for given BVCI and ACK it */</span><br><span style="color: hsl(0, 100%, 40%);">-altstep as_rx_bvc_reset_tx_ack(BssgpBvci bvci, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+altstep as_rx_bvc_reset_tx_ack(BssgpBvci bvci, BssgpCellId cell_id, boolean oneshot := false, integer idx := 0) runs on RAW_NS_CT {</span><br><span>        var NS_RecvFrom ns_rf;</span><br><span>       /* FIXME: nail down received cell_id in match */</span><br><span>     [] NSCP[idx].receive(t_NS_RecvFrom(tr_NS_UNITDATA(t_SduCtrlB, 0,</span><br><span>                                               decmatch tr_BVC_RESET(?, bvci, ?))))</span><br><span>                                                               -> value ns_rf {</span><br><span>          var PDU_BSSGP bssgp_rx := dec_PDU_BSSGP(ns_rf.msg.pDU_NS_Unitdata.nS_SDU);</span><br><span style="color: hsl(0, 100%, 40%);">-              var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET_ACK(bvci, mp_gb_cfg.cell_id));</span><br><span style="color: hsl(120, 100%, 40%);">+         var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET_ACK(bvci, cell_id));</span><br><span>          NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx))));</span><br><span>                if (not oneshot) { repeat; }</span><br><span>                 }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20090">change 20090</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20090"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I91d9db85519675054aaab83c85fac43e67391f33 </div>
<div style="display:none"> Gerrit-Change-Number: 20090 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>