<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/11221">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">abis_nm_get_ts: Return TS of correct TRX, not always TRX0<br><br>Seen while operating a setup with 2 TRX (2 nanobts):<br>DNM <0004> abis_nm.c:703 OC=CHANNEL(03) INST=(00,01,04): bts=0 trx=0 Opstart ACK<br>DTS <0011> bts_ipaccess_nanobts.c:308 timeslot(0-0-4-TCH_F)[0x612000008aa0]{UNUSED}: Received Event TS_EV_OML_READY<br>DTS <0011> bts_ipaccess_nanobts.c:308 timeslot(0-0-4-TCH_F)[0x612000008aa0]{UNUSED}: Event TS_EV_OML_READY not permitte<br><br>As it can be seen, OML log header state correctly it comes from TRX1,<br>but later content in line expresses TRX0, and that failure is forwarded<br>up the stack and channels for TRX different than TRX0 are never<br>initialized.<br><br>Related: OS#3560<br>Fixes: f0ff9a67117dc22d838769fe6eef67778abd43b9<br>Change-Id: I27e992e419422051247777b048175b724c05323e<br>---<br>M src/osmo-bsc/abis_nm.c<br>1 file changed, 6 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c</span><br><span>index 7f919a4..25b2c38 100644</span><br><span>--- a/src/osmo-bsc/abis_nm.c</span><br><span>+++ b/src/osmo-bsc/abis_nm.c</span><br><span>@@ -673,14 +673,15 @@</span><br><span> }</span><br><span> </span><br><span> /* From a received OML message, determine the matching struct gsm_bts_trx_ts instance.</span><br><span style="color: hsl(0, 100%, 40%);">- * Note that the BTS-TRX-TS numbers received in the FOM header do not correspond to the local bts->nr and</span><br><span style="color: hsl(0, 100%, 40%);">- * bts->trx->nr. Rather, the trx is identified by the e1inp_sign_link* found in msg->dst, and the TS is</span><br><span style="color: hsl(0, 100%, 40%);">- * then obtained by the FOM header's TS number. */</span><br><span style="color: hsl(120, 100%, 40%);">+ * Note that the BTS-TRX-TS numbers received in the FOM header do not correspond</span><br><span style="color: hsl(120, 100%, 40%);">+ * to the local bts->nr. Rather, the BTS is identified by the e1inp_sign_link*</span><br><span style="color: hsl(120, 100%, 40%);">+ * found in msg->dst which points to OML connection and thus to its 1st TRX, and the</span><br><span style="color: hsl(120, 100%, 40%);">+ * TRX and TS is then obtained by the FOM header's TS number. */</span><br><span> struct gsm_bts_trx_ts *abis_nm_get_ts(const struct msgb *oml_msg)</span><br><span> {</span><br><span>     struct abis_om_fom_hdr *foh = msgb_l3(oml_msg);</span><br><span>      struct e1inp_sign_link *sign_link = oml_msg->dst;</span><br><span style="color: hsl(0, 100%, 40%);">-    struct gsm_bts_trx *trx = sign_link->trx;</span><br><span style="color: hsl(120, 100%, 40%);">+  struct gsm_bts_trx *trx = gsm_bts_trx_by_nr(sign_link->trx->bts, foh->obj_inst.trx_nr);</span><br><span>     uint8_t ts_nr = foh->obj_inst.ts_nr;</span><br><span>      if (!trx) {</span><br><span>          LOGP(DNM, LOGL_ERROR, "%s Channel OPSTART ACK for sign_link without trx\n",</span><br><span>@@ -699,8 +700,7 @@</span><br><span> {</span><br><span>     struct abis_om_fom_hdr *foh = msgb_l3(mb);</span><br><span>   struct e1inp_sign_link *sign_link = mb->dst;</span><br><span style="color: hsl(0, 100%, 40%);">- struct gsm_bts_trx *trx = sign_link->trx;</span><br><span style="color: hsl(0, 100%, 40%);">-    DEBUGPFOH(DNM, foh, "bts=%u trx=%u Opstart ACK\n", trx->bts->nr, trx->nr);</span><br><span style="color: hsl(120, 100%, 40%);">+ DEBUGPFOH(DNM, foh, "bts=%u Opstart ACK\n", sign_link->trx->bts->nr);</span><br><span>     osmo_signal_dispatch(SS_NM, S_NM_OPSTART_ACK, mb);</span><br><span>   return 0;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11221">change 11221</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/11221"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I27e992e419422051247777b048175b724c05323e </div>
<div style="display:none"> Gerrit-Change-Number: 11221 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>