<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/21122">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">decoding: Fix implicit ACK due to BeginOfWindow=1 on rx EGPRS PKT DL ACK/NACK<br><br>According to sepcs, if BeginOfWindow=1, then SSN=V(Q)+1 mod 2048.<br>As a result, all unacked BSN before SSN can be marked as ACKED since<br>they are implicitly ACKED (because the window advanced).<br>The calculation, however was wrong. In specs V(A) points to last acked<br>BSN, but in our implementation, V(A) actually refers to the first<br>unacked BSN (see how Window object is initialized to v_s=0 and v_a=0).<br>Hence, spec "V(A) = v_a - 1" in our implementation.<br>Therefore, the calculation on the amount of blocks to ACK would be:<br>V(Q) - (v_a - 1) = (SSN - 1) - (v_a - 1)<br>Which can be simplified to:<br>SSN - v_a<br><br>Example:<br>PCU sends DL block for BSN=0..20 included, with BSN=20 containing RRBP<br>to ACK them.<br>EGPRS MS would send EGPRS PKT DL ACK/NACK with BEginofWindow=1 and<br>SSN=21 to ACK all of them.<br>Before this patch, PCU would only mark BSN0..19 as ACKED and BSN20 as<br>UNACKED, retransmitting BSN20.<br><br>Reference: 3GPP TS 44.060 12.3.1 EGPRS Ack/Nack Description<br>Change-Id: Ic71326fc956491bb7e5e50896a6ba8f5354c20ec<br>---<br>M src/decoding.cpp<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/22/21122/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/decoding.cpp b/src/decoding.cpp</span><br><span>index 0437994..71e61ea 100644</span><br><span>--- a/src/decoding.cpp</span><br><span>+++ b/src/decoding.cpp</span><br><span>@@ -684,7 +684,7 @@</span><br><span>        */</span><br><span> </span><br><span>      if (desc->BEGINNING_OF_WINDOW) {</span><br><span style="color: hsl(0, 100%, 40%);">-             implicitly_acked_blocks = window->mod_sns(ssn - 1 - window->v_a());</span><br><span style="color: hsl(120, 100%, 40%);">+             implicitly_acked_blocks = window->mod_sns(ssn - window->v_a());</span><br><span> </span><br><span>            for (i = 0; i < implicitly_acked_blocks; i++)</span><br><span>                     bitvec_set_bit(bits, ONE);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/21122">change 21122</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-pcu/+/21122"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic71326fc956491bb7e5e50896a6ba8f5354c20ec </div>
<div style="display:none"> Gerrit-Change-Number: 21122 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>