<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/25810">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pdch: Simplify code path allocating UL TBF<br><br>There's no real need to pass a tlli per separate, the information is<br>already contained in the MS. Furthermore, when doing so, it becomes<br>clear the TLLI was only passed to set it again on the MS, so actually<br>that ms_update() can be totally dropped since it will act as a no-op.<br><br>Change-Id: Ie761c3c7c222458ab0514117ae637ad3267139a0<br>---<br>M src/pdch.cpp<br>M src/tbf_ul.cpp<br>M src/tbf_ul.h<br>3 files changed, 4 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/10/25810/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/pdch.cpp b/src/pdch.cpp</span><br><span>index 68bc69d..7d70958 100644</span><br><span>--- a/src/pdch.cpp</span><br><span>+++ b/src/pdch.cpp</span><br><span>@@ -119,7 +119,7 @@</span><br><span>      bts_do_rate_ctr_inc(bts, CTR_CHANNEL_REQUEST_DESCRIPTION);</span><br><span> </span><br><span>       /* This call will register the new TBF with the MS on success */</span><br><span style="color: hsl(0, 100%, 40%);">-        gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul_pacch(bts, tbf->ms(), tbf->trx->trx_no, tbf->tlli());</span><br><span style="color: hsl(120, 100%, 40%);">+   gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul_pacch(bts, tbf->ms(), tbf->trx->trx_no);</span><br><span> </span><br><span>      /* schedule uplink assignment or reject */</span><br><span>   if (ul_tbf) {</span><br><span>@@ -707,7 +707,7 @@</span><br><span>                          ms_set_egprs_ms_class(ms, egprs_ms_class);</span><br><span>           }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-           ul_tbf = tbf_alloc_ul_pacch(bts(), ms, trx_no(), tlli);</span><br><span style="color: hsl(120, 100%, 40%);">+               ul_tbf = tbf_alloc_ul_pacch(bts(), ms, trx_no());</span><br><span>            if (!ul_tbf) {</span><br><span>                       handle_tbf_reject(bts(), ms, trx_no(), ts_no);</span><br><span>                       goto return_unref;</span><br><span>diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp</span><br><span>index d4f2093..74b2636 100644</span><br><span>--- a/src/tbf_ul.cpp</span><br><span>+++ b/src/tbf_ul.cpp</span><br><span>@@ -152,8 +152,7 @@</span><br><span> }</span><br><span> </span><br><span> /* Alloc a UL TBF to be assigned over PACCH */</span><br><span style="color: hsl(0, 100%, 40%);">-gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx,</span><br><span style="color: hsl(0, 100%, 40%);">-                          uint32_t tlli)</span><br><span style="color: hsl(120, 100%, 40%);">+gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx)</span><br><span> {</span><br><span>        struct gprs_rlcmac_ul_tbf *tbf;</span><br><span> </span><br><span>@@ -165,8 +164,6 @@</span><br><span>    }</span><br><span>    tbf->m_contention_resolution_done = 1;</span><br><span>    osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">-    tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);</span><br><span style="color: hsl(0, 100%, 40%);">-    OSMO_ASSERT(tbf->ms());</span><br><span> </span><br><span>       return tbf;</span><br><span> }</span><br><span>diff --git a/src/tbf_ul.h b/src/tbf_ul.h</span><br><span>index defdfba..0dc2336 100644</span><br><span>--- a/src/tbf_ul.h</span><br><span>+++ b/src/tbf_ul.h</span><br><span>@@ -126,8 +126,7 @@</span><br><span> }</span><br><span> </span><br><span> struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot);</span><br><span style="color: hsl(0, 100%, 40%);">-struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms,</span><br><span style="color: hsl(0, 100%, 40%);">-                                         int8_t use_trx, uint32_t tlli);</span><br><span style="color: hsl(120, 100%, 40%);">+struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx);</span><br><span> struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_ccch(struct gprs_rlcmac_bts *bts, struct GprsMs *ms);</span><br><span> struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts,</span><br><span>         GprsMs *ms, uint8_t trx_no, uint8_t ts_no);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/25810">change 25810</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/+/25810"/><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: Ie761c3c7c222458ab0514117ae637ad3267139a0 </div>
<div style="display:none"> Gerrit-Change-Number: 25810 </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>