Change in osmo-bsc[master]: fix: dispatch TS_EV_RSL_DOWN when losing RSL

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Jul 27 14:27:29 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/10190


Change subject: fix: dispatch TS_EV_RSL_DOWN when losing RSL
......................................................................

fix: dispatch TS_EV_RSL_DOWN when losing RSL

Noticed by ttcn3-bsc-test: after TC_ms_rel_ind_does_not_cause_bssmap_reset the
test TC_dyn_pdch_ipa_act_deact would fail because RSL was still indicated as
available, and only OML was properly signalled as down.

Before recent commit I4843d03b3237cdcca0ad2041ef6895ff253d8419 to fix nanobts
and use only flags for RSL and OML presence, the timeslot FSM actually checked
RSL link presence and the lacking RSL DOWN event was not noticed.

Change-Id: I66c7fc5fcc676f4960f3d089b8c2ae5bce37ed99
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 14 insertions(+), 14 deletions(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 218ea15..8dc9098 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -309,13 +309,22 @@
 	}
 }
 
+static void all_ts_dispatch_event(struct gsm_bts_trx *trx, uint32_t event)
+{
+	int ts_i;
+	for (ts_i = 0; ts_i < ARRAY_SIZE(trx->ts); ts_i++) {
+		struct gsm_bts_trx_ts *ts = &trx->ts[ts_i];
+		if (ts->fi)
+			osmo_fsm_inst_dispatch(ts->fi, event, 0);
+	}
+}
+
 /* Callback function to be called every time we receive a signal from INPUT */
 static int inp_sig_cb(unsigned int subsys, unsigned int signal,
 		      void *handler_data, void *signal_data)
 {
 	struct input_signal_data *isd = signal_data;
 	struct gsm_bts_trx *trx = isd->trx;
-	int ts_no;
 	/* N. B: we rely on attribute order when parsing response in abis_nm_rx_get_attr_resp() */
 	const uint8_t bts_attr[] = { NM_ATT_MANUF_ID, NM_ATT_SW_CONFIG, };
 	const uint8_t trx_attr[] = { NM_ATT_MANUF_STATE, NM_ATT_SW_CONFIG, };
@@ -360,22 +369,13 @@
 	case S_L_INP_TEI_DN:
 		LOGP(DLMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", isd->link_type, trx);
 
-		if (isd->link_type == E1INP_SIGN_OML)
+		if (isd->link_type == E1INP_SIGN_OML) {
 			rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_OML_FAIL]);
-		else if (isd->link_type == E1INP_SIGN_RSL) {
+			all_ts_dispatch_event(trx, TS_EV_OML_DOWN);
+		} else if (isd->link_type == E1INP_SIGN_RSL) {
 			rate_ctr_inc(&trx->bts->bts_ctrs->ctr[BTS_CTR_BTS_RSL_FAIL]);
 			acc_ramp_abort(&trx->bts->acc_ramp);
-		}
-
-		/*
-		 * free all allocated channels. change the nm_state so the
-		 * trx and trx_ts becomes unusable and chan_alloc.c can not
-		 * allocate from it.
-		 */
-		for (ts_no = 0; ts_no < ARRAY_SIZE(trx->ts); ++ts_no) {
-			struct gsm_bts_trx_ts *ts = &trx->ts[ts_no];
-			if (ts->fi)
-				osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_DOWN, 0);
+			all_ts_dispatch_event(trx, TS_EV_RSL_DOWN);
 		}
 
 		gsm_bts_mo_reset(trx->bts);

-- 
To view, visit https://gerrit.osmocom.org/10190
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: I66c7fc5fcc676f4960f3d089b8c2ae5bce37ed99
Gerrit-Change-Number: 10190
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180727/df6fe5ee/attachment.htm>


More information about the gerrit-log mailing list