[MERGED] osmo-bsc[master]: HO: Add function to count currently ongoing handovers to a g...

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jan 19 22:09:21 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: HO: Add function to count currently ongoing handovers to a given BTS
......................................................................


HO: Add function to count currently ongoing handovers to a given BTS

In order to keep processing power at BTS at a defined level, the handover
decision might want to limit maximum number of slots that require RACH
detection.

Change-Id: I8908e37fe0d8d2eda906cc6301ba0969b25a5575
---
M include/osmocom/bsc/handover.h
M src/libbsc/handover_logic.c
2 files changed, 20 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/handover.h b/include/osmocom/bsc/handover.h
index 9e2ba1a..a9349ee 100644
--- a/include/osmocom/bsc/handover.h
+++ b/include/osmocom/bsc/handover.h
@@ -7,3 +7,5 @@
 int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts);
 void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan);
 struct gsm_lchan *bsc_handover_pending(struct gsm_lchan *new_lchan);
+
+int bsc_ho_count(struct gsm_bts *bts, bool inter_cell);
diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index f525b21..ee7b683 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -389,3 +389,21 @@
 {
 	osmo_signal_register_handler(SS_LCHAN, ho_logic_sig_cb, NULL);
 }
+
+/* Count number of currently ongoing handovers
+ * inter_cell: if true, count only handovers between two cells. If false, count only handovers within one
+ * cell. */
+int bsc_ho_count(struct gsm_bts *bts, bool inter_cell)
+{
+	struct bsc_handover *ho;
+	int count = 0;
+
+	llist_for_each_entry(ho, &bsc_handovers, list) {
+		if (ho->inter_cell != inter_cell)
+			continue;
+		if (ho->new_lchan->ts->trx->bts == bts)
+			count++;
+	}
+
+	return count;
+}

-- 
To view, visit https://gerrit.osmocom.org/5895
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8908e37fe0d8d2eda906cc6301ba0969b25a5575
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list