Change in osmo-bsc[master]: abis_nm_get_ts: Return TS of correct TRX, not always TRX0

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Oct 3 17:47:34 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/11221


Change subject: abis_nm_get_ts: Return TS of correct TRX, not always TRX0
......................................................................

abis_nm_get_ts: Return TS of correct TRX, not always TRX0

Seen while operating a setup with 2 TRX (2 nanobts):
DNM <0004> abis_nm.c:703 OC=CHANNEL(03) INST=(00,01,04): bts=0 trx=0 Opstart ACK
DTS <0011> bts_ipaccess_nanobts.c:308 timeslot(0-0-4-TCH_F)[0x612000008aa0]{UNUSED}: Received Event TS_EV_OML_READY
DTS <0011> bts_ipaccess_nanobts.c:308 timeslot(0-0-4-TCH_F)[0x612000008aa0]{UNUSED}: Event TS_EV_OML_READY not permitte

As it can be seen, OML log header state correctly it comes from TRX1,
but later content in line expresses TRX0, and that failure is forwarded
up the stack and channels for TRX different than TRX0 are never
initialized.

Related: OS#3560
Fixes: f0ff9a67117dc22d838769fe6eef67778abd43b9
Change-Id: I27e992e419422051247777b048175b724c05323e
---
M src/osmo-bsc/abis_nm.c
1 file changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/11221/1

diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 7f919a4..25b2c38 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -673,14 +673,15 @@
 }
 
 /* From a received OML message, determine the matching struct gsm_bts_trx_ts instance.
- * Note that the BTS-TRX-TS numbers received in the FOM header do not correspond to the local bts->nr and
- * bts->trx->nr. Rather, the trx is identified by the e1inp_sign_link* found in msg->dst, and the TS is
- * then obtained by the FOM header's TS number. */
+ * Note that the BTS-TRX-TS numbers received in the FOM header do not correspond
+ * to the local bts->nr. Rather, the BTS is identified by the e1inp_sign_link*
+ * found in msg->dst which points to OML connection and thus to its 1st TRX, and the
+ * TRX and TS is then obtained by the FOM header's TS number. */
 struct gsm_bts_trx_ts *abis_nm_get_ts(const struct msgb *oml_msg)
 {
 	struct abis_om_fom_hdr *foh = msgb_l3(oml_msg);
 	struct e1inp_sign_link *sign_link = oml_msg->dst;
-	struct gsm_bts_trx *trx = sign_link->trx;
+	struct gsm_bts_trx *trx = gsm_bts_trx_by_nr(sign_link->trx->bts, foh->obj_inst.trx_nr);
 	uint8_t ts_nr = foh->obj_inst.ts_nr;
 	if (!trx) {
 		LOGP(DNM, LOGL_ERROR, "%s Channel OPSTART ACK for sign_link without trx\n",
@@ -699,8 +700,7 @@
 {
 	struct abis_om_fom_hdr *foh = msgb_l3(mb);
 	struct e1inp_sign_link *sign_link = mb->dst;
-	struct gsm_bts_trx *trx = sign_link->trx;
-	DEBUGPFOH(DNM, foh, "bts=%u trx=%u Opstart ACK\n", trx->bts->nr, trx->nr);
+	DEBUGPFOH(DNM, foh, "bts=%u Opstart ACK\n", sign_link->trx->bts->nr);
 	osmo_signal_dispatch(SS_NM, S_NM_OPSTART_ACK, mb);
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/11221
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27e992e419422051247777b048175b724c05323e
Gerrit-Change-Number: 11221
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181003/82125093/attachment.htm>


More information about the gerrit-log mailing list