<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21629">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bssgp: Introduce "GLOBAL" port for PTP BVC<br><br>There are some messages/procedures on a PTP BVC which are not related<br>to one specific TLLI, but affect the whole PTP BVC.  First and foremost<br>that is the FLOW-CONTROL-BVC. Let's check if the user is interested in<br>handling those internally (by connecting to the GLOBAL port).  If not,<br>fall back to acknowledging all incoing FC-BVC and ignoring all ACKs.<br><br>Related: OS#4891<br>Change-Id: Ib80a6a522dbcb33fd0e7bd31a73ef28fdc636f57<br>---<br>M library/BSSGP_Emulation.ttcnpp<br>1 file changed, 24 insertions(+), 8 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/29/21629/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp</span><br><span>index ebe9f45..633eee2 100644</span><br><span>--- a/library/BSSGP_Emulation.ttcnpp</span><br><span>+++ b/library/BSSGP_Emulation.ttcnpp</span><br><span>@@ -698,7 +698,10 @@</span><br><span>   /* port to a management instance */</span><br><span>  port BSSGP_BVC_MGMT_SP_PT MGMT;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-     /* BSSGP-User SAP towards the user (Client) */</span><br><span style="color: hsl(120, 100%, 40%);">+        /* per-BVC global port for e.g. BVC Flow Control */</span><br><span style="color: hsl(120, 100%, 40%);">+   port BSSGP_SP_PT GLOBAL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* BSSGP-User SAP towards the user (per-TLLI, Client) */</span><br><span>     port BSSGP_SP_PT BSSGP_SP;</span><br><span>   port BSSGP_SP_PT BSSGP_SP_SIG;</span><br><span>       port BSSGP_PROC_PT BSSGP_PROC;</span><br><span>@@ -1119,16 +1122,24 @@</span><br><span> </span><br><span>         [] as_ptp_handle_inbound_reset();</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   /* simply acknowledge all per-BVC Flow Control Messages */</span><br><span>   [g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(tr_BVC_FC_BVC, g_cfg.bvci)) -> value udi {</span><br><span style="color: hsl(0, 100%, 40%);">-         var OCT1 tag := udi.bssgp.pDU_BSSGP_FLOW_CONTROL_BVC.tag.unstructured_Value;</span><br><span style="color: hsl(0, 100%, 40%);">-            BVC.send(ts_ptp_BnsUdReq(t_BVC_FC_BVC_ACK(tag), g_cfg.bvci, g_bvc_lsp));</span><br><span style="color: hsl(120, 100%, 40%);">+              if (GLOBAL.checkstate("Connected")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       GLOBAL.send(udi.bssgp);</span><br><span style="color: hsl(120, 100%, 40%);">+               } else {</span><br><span style="color: hsl(120, 100%, 40%);">+                      /* simply acknowledge all per-BVC Flow Control Messages */</span><br><span style="color: hsl(120, 100%, 40%);">+                    var OCT1 tag := udi.bssgp.pDU_BSSGP_FLOW_CONTROL_BVC.tag.unstructured_Value;</span><br><span style="color: hsl(120, 100%, 40%);">+                  BVC.send(ts_ptp_BnsUdReq(t_BVC_FC_BVC_ACK(tag), g_cfg.bvci, g_bvc_lsp));</span><br><span style="color: hsl(120, 100%, 40%);">+              }</span><br><span>    }</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">-     [g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(t_BVC_FC_MS, g_cfg.bvci)) {</span><br><span style="color: hsl(0, 100%, 40%);">-           BVC.send(ts_ptp_BnsUdReq(t_BVC_FC_MS_ACK, g_cfg.bvci));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     [not g_sgsn_role] BVC.receive(tr_ptp_BnsUdInd(t_BVC_FC_BVC_ACK(?), g_cfg.bvci)) -> value udi {</span><br><span style="color: hsl(120, 100%, 40%);">+             if (GLOBAL.checkstate("Connected")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       GLOBAL.send(udi.bssgp);</span><br><span style="color: hsl(120, 100%, 40%);">+               } else {</span><br><span style="color: hsl(120, 100%, 40%);">+                      /* ignore any incoming flow control ACK */</span><br><span style="color: hsl(120, 100%, 40%);">+            }</span><br><span>    }</span><br><span style="color: hsl(0, 100%, 40%);">-*/</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>        /* Any other PTP BSSGP message: If it has TLLI, route to component; otherwise broadcast */</span><br><span>   [] BVC.receive(tr_ptp_BnsUdInd(?, g_cfg.bvci)) -> value udi {</span><br><span>             var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);</span><br><span>@@ -1221,6 +1232,11 @@</span><br><span>             BVC.send(ts_ptp_BnsUdReq(ts_BSSGP_DL_UD(tlli, llc_enc), g_cfg.bvci, oct2int(tlli)));</span><br><span>         }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Testcase sends us BSSGP on global port */</span><br><span style="color: hsl(120, 100%, 40%);">+  [] GLOBAL.receive(PDU_BSSGP:?)-> value bs_pdu sender vc_conn {</span><br><span style="color: hsl(120, 100%, 40%);">+             BVC.send(ts_ptp_BnsUdReq(bs_pdu, g_cfg.bvci, g_bvc_lsp));</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  [] MGMT.receive(BssgpBlockRequest:?) -> value bbr {</span><br><span>               f_ptp_sendBlock(bbr.cause);</span><br><span>          }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21629">change 21629</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/+/21629"/><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: Ib80a6a522dbcb33fd0e7bd31a73ef28fdc636f57 </div>
<div style="display:none"> Gerrit-Change-Number: 21629 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>