<p>pespin <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/25769">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  dexter: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tbf_fsm: Handle MAX_N3105 in state ASSIGN<br><br>Seen on a runnig osmo-pcu against real MS:<br>"""<br>pdch_ul_controller.c:329 PDCH(bts=0,trx=1,ts=7) Timeout for registered POLL (FN=751140): TBF(TFI=0 TLLI=0xe8c12143 DIR=UL STATE=ASSIGN EGPRS)<br>tbf.cpp:542 TBF(TFI=0 TLLI=0xe8c12143 DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=751140, TS=7 (curr FN 751140)<br>tbf.cpp:384 TBF(TFI=0 TLLI=0xe8c12143 DIR=UL STATE=ASSIGN EGPRS) N3105 exceeded MAX (8)<br>tbf.cpp:594 TBF(UL-TFI_0)[9bc050]{ASSIGN}: Received Event MAX_N3105<br>tbf.cpp:594 TBF(UL-TFI_0)[9bc050]{ASSIGN}: Event MAX_N3105 not permitted<br>"""<br><br>It was first though when FSMs where introduced that an FSM in ASSIGN<br>state could not receive this kind of event because it was believed to be<br>sending no CTRL blocks at all until flow state. That's because the<br>believe was that Assignment over PACCH was done by another existing TBF.<br>It turns out this is usually the case, but not in all cases. In at least<br>one case, the tbf object (and tbf_fsm/tbf_{ul,dl}_ass_fsm) itself is<br>handling its own assignment (hence eg. sending the UL assignment and waiting<br>response through tbf_ul_ass_fsm. This happens if a UL TBF sends a Pkt<br>Resource Req as a response to RRBP of final UL ACK/NACK in order to<br>request a new TBF, where it temporarily uses the control_ts of the<br>previous TBF to get a new Pkt UL Assignment over PACCH.<br><br>If Pkt Ul Assignment doesn't receive a CTRL ACK, tbf_ul_ass_fsm will<br>retrnamist it, until MAX_N3015 is reached (the event we failed to<br>handle until now). At this point, we really want to transition to<br>RELEASING in order to avoid keeping the TBF allocating resources (until<br>X2001 times out).<br><br>Related: SYS#5647<br>Change-Id: I86d5c1bbccd06673d08451b812d149e727404733<br>---<br>M src/tbf_fsm.c<br>1 file changed, 6 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c</span><br><span>index d1d4668..84d5bcc 100644</span><br><span>--- a/src/tbf_fsm.c</span><br><span>+++ b/src/tbf_fsm.c</span><br><span>@@ -188,6 +188,10 @@</span><br><span>                /* change state to FLOW, so scheduler will start transmission */</span><br><span>             tbf_fsm_state_chg(fi, TBF_ST_FLOW);</span><br><span>          break;</span><br><span style="color: hsl(120, 100%, 40%);">+        case TBF_EV_MAX_N3105:</span><br><span style="color: hsl(120, 100%, 40%);">+                ctx->T_release = 3195;</span><br><span style="color: hsl(120, 100%, 40%);">+             tbf_fsm_state_chg(fi, TBF_ST_RELEASING);</span><br><span style="color: hsl(120, 100%, 40%);">+              break;</span><br><span>       default:</span><br><span>             OSMO_ASSERT(0);</span><br><span>      }</span><br><span>@@ -409,7 +413,8 @@</span><br><span>                      X(TBF_EV_ASSIGN_ADD_PACCH) |</span><br><span>                         X(TBF_EV_ASSIGN_ACK_PACCH) |</span><br><span>                         X(TBF_EV_ASSIGN_PCUIF_CNF) |</span><br><span style="color: hsl(0, 100%, 40%);">-                    X(TBF_EV_ASSIGN_READY_CCCH),</span><br><span style="color: hsl(120, 100%, 40%);">+                  X(TBF_EV_ASSIGN_READY_CCCH) |</span><br><span style="color: hsl(120, 100%, 40%);">+                 X(TBF_EV_MAX_N3105),</span><br><span>                 .out_state_mask =</span><br><span>                    X(TBF_ST_FLOW) |</span><br><span>                     X(TBF_ST_FINISHED) |</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/25769">change 25769</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/+/25769"/><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: I86d5c1bbccd06673d08451b812d149e727404733 </div>
<div style="display:none"> Gerrit-Change-Number: 25769 </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-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>