Change in osmo-bsc[master]: abis_rsl.c: flush channel request queue on RSL bootstrap

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

laforge gerrit-no-reply at lists.osmocom.org
Fri Sep 11 13:01:51 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/20066 )

Change subject: abis_rsl.c: flush channel request queue on RSL bootstrap
......................................................................

abis_rsl.c: flush channel request queue on RSL bootstrap

When RSL link is bootstrapped the BSC should clear the channel request
queue.

Change-Id: Iefb333817033e8d376184b58d89b186d875b968f
Related: OS#4549
---
M include/osmocom/bsc/abis_rsl.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/osmo_bsc_main.c
3 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h
index 9879497..964e282 100644
--- a/include/osmocom/bsc/abis_rsl.h
+++ b/include/osmocom/bsc/abis_rsl.h
@@ -119,6 +119,7 @@
 int rsl_tx_rf_chan_release(struct gsm_lchan *lchan);
 
 void abis_rsl_chan_rqd_queue_poll(struct gsm_bts *bts);
+void abis_rsl_chan_rqd_queue_flush(struct gsm_bts *bts);
 
 #endif /* RSL_MT_H */
 
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 74cc760..c0907c0 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1398,6 +1398,18 @@
 	}
 }
 
+/* Flush all channel requests pending on this BTS */
+void abis_rsl_chan_rqd_queue_flush(struct gsm_bts *bts)
+{
+	struct chan_rqd *rqd;
+	struct chan_rqd *rqd_tmp;
+
+	llist_for_each_entry_safe(rqd, rqd_tmp, &bts->chan_rqd_queue, entry) {
+		llist_del(&rqd->entry);
+		talloc_free(rqd);
+	}
+}
+
 /* MS has requested a channel on the RACH */
 static int rsl_rx_chan_rqd(struct msgb *msg)
 {
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 560f8fd..6d835ba 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -329,6 +329,9 @@
 	/* Start CBCH transmit timer if CBCH is present */
 	if (trx->nr == 0 && gsm_bts_get_cbch(trx->bts))
 		bts_cbch_timer_schedule(trx->bts);
+
+	/* Drop all expired channel requests in the list */
+	abis_rsl_chan_rqd_queue_flush(trx->bts);
 }
 
 static void all_ts_dispatch_event(struct gsm_bts_trx *trx, uint32_t event)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20066
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iefb333817033e8d376184b58d89b186d875b968f
Gerrit-Change-Number: 20066
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200911/195387ef/attachment.htm>


More information about the gerrit-log mailing list