<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20461">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pcu/GPRS_Components: work around a race condition in f_rx_rlcmac_dl_block()<br><br>Change-Id: I8d01e153913a5441113af1866ff2897ee4a987db<br>Related: OS#4779<br>---<br>M pcu/GPRS_Components.ttcn<br>1 file changed, 13 insertions(+), 2 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/61/20461/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn</span><br><span>index 2807b92..3603470 100644</span><br><span>--- a/pcu/GPRS_Components.ttcn</span><br><span>+++ b/pcu/GPRS_Components.ttcn</span><br><span>@@ -677,8 +677,19 @@</span><br><span>                            template (value) TsTrxBtsNum nr := ts_TsTrxBtsNum)</span><br><span> runs on MS_BTS_IFACE_CT {</span><br><span>        var PCUIF_Message pcu_msg;</span><br><span style="color: hsl(0, 100%, 40%);">-      f_pcuif_rx_data_req(pcu_msg, nr := nr);</span><br><span style="color: hsl(0, 100%, 40%);">- dl_block := dec_RlcmacDlBlock(pcu_msg.u.data_req.data);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     /* There can be a race condition between BSSGP and the PCUIF, e.g.</span><br><span style="color: hsl(120, 100%, 40%);">+     * RTS.req can be handled by the IUT faster than BSSGP DL DATA-REQ.</span><br><span style="color: hsl(120, 100%, 40%);">+    * This means that we may get unexpected PACKET_DL_DUMMY_CTRL.</span><br><span style="color: hsl(120, 100%, 40%);">+         * Let's re-try receiving DATA.req up to 3 times. */</span><br><span style="color: hsl(120, 100%, 40%);">+      for (var integer i := 0; i < 4; i := i + 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+              f_pcuif_rx_data_req(pcu_msg, nr := nr);</span><br><span style="color: hsl(120, 100%, 40%);">+               dl_block := dec_RlcmacDlBlock(pcu_msg.u.data_req.data);</span><br><span style="color: hsl(120, 100%, 40%);">+               if (not match(dl_block, tr_RLCMAC_DUMMY_CTRL)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      break;</span><br><span style="color: hsl(120, 100%, 40%);">+                }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  dl_fn := pcu_msg.u.data_req.fn;</span><br><span> </span><br><span>  var integer len := lengthof(pcu_msg.u.data_req.data);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20461">change 20461</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/+/20461"/><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: I8d01e153913a5441113af1866ff2897ee4a987db </div>
<div style="display:none"> Gerrit-Change-Number: 20461 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>