Change in osmo-bsc[master]: hodec2: fix low rxqual tch/h<->tch/f oscillation

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 gerrit-no-reply at lists.osmocom.org
Tue Jun 29 13:53:13 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24797 )


Change subject: hodec2: fix low rxqual tch/h<->tch/f oscillation
......................................................................

hodec2: fix low rxqual tch/h<->tch/f oscillation

Related: SYS#5198
Change-Id: I96cd5a494e661ba3bb0b6d22d25a9968d2a6813c
---
M src/osmo-bsc/handover_decision_2.c
M tests/handover/handover_tests.ok
M tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty
3 files changed, 15 insertions(+), 13 deletions(-)



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

diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index 4fa41fb..1fa3c2a 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -1170,6 +1170,7 @@
 	bool handover;
 	int neighbors_count = 0;
 	bool tch_f_with_low_rxlev;
+	bool tch_f_with_low_rxqual;
 
 	OSMO_ASSERT(candidates);
 
@@ -1190,11 +1191,20 @@
 	tch_f_with_low_rxlev = (lchan->type == GSM_LCHAN_TCH_F
 				&& rxlev_current >= 0
 				&& rxlev2dbm(rxlev_current) < ho_get_hodec2_min_rxlev(bts->ho));
+	tch_f_with_low_rxqual = false;
+	if (lchan->type == GSM_LCHAN_TCH_F) {
+		int av_rxqual = get_meas_rep_avg(lchan,
+						 ho_get_hodec2_full_tdma(bts->ho) ?
+						 MEAS_REP_DL_RXQUAL_FULL : MEAS_REP_DL_RXQUAL_SUB,
+						 ho_get_hodec2_rxqual_avg_win(bts->ho));
+		if (av_rxqual >= 0 && av_rxqual > ho_get_hodec2_min_rxqual(bts->ho))
+			tch_f_with_low_rxqual = true;
+	}
 
 	/* See if re-assignment within the same cell can resolve congestion.
-	 * But: when TCH/F has low rxlev, do not re-assign. If a low rxlev TCH/F were re-assigned to TCH/H, we would
-	 * subsequently oscillate back to TCH/F due to low rxlev. So skip TCH/F with low rxlev. */
-	if (assignment && !tch_f_with_low_rxlev)
+	 * But: when TCH/F has low rxlev or rxqual, do not re-assign. If a low rxlev TCH/F were re-assigned to TCH/H, we
+	 * would subsequently oscillate back to TCH/F due to low rxlev/rxqual. So skip TCH/F with low ratings. */
+	if (assignment && !(tch_f_with_low_rxlev || tch_f_with_low_rxqual))
 		collect_assignment_candidate(lchan, clist, candidates, rxlev_current);
 
 	if (handover) {
diff --git a/tests/handover/handover_tests.ok b/tests/handover/handover_tests.ok
index 7de70e1..b76c032 100644
--- a/tests/handover/handover_tests.ok
+++ b/tests/handover/handover_tests.ok
@@ -12,6 +12,7 @@
 pass test_amr_tch_h_to_f_rxlev_oscillation.ho_vty
 pass test_amr_tch_h_to_f_rxqual.ho_vty
 pass test_amr_tch_h_to_f_rxqual_congested.ho_vty
+pass test_amr_tch_h_to_f_rxqual_oscillation.ho_vty
 pass test_balance_congestion.ho_vty
 pass test_balance_congestion_2.ho_vty
 pass test_balance_congestion_by_percentage.ho_vty
diff --git a/tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty b/tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty
index a98e917..e628f03 100644
--- a/tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty
+++ b/tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty
@@ -17,13 +17,4 @@
 
 meas-rep lchan 0 0 1 0 rxlev 30 rxqual 6 ta 0
 congestion-check
-# FAIL: should stay on TCH/F because rxqual is low, do not oscillate between TCH/F and /H.
-expect-as from lchan 0 0 1 0 to lchan 0 0 4 0
-expect-ts-use trx 0 0 states * - - - TCH/H- - - *
-meas-rep lchan 0 0 4 0 rxlev 30 rxqual 6 ta 0
-expect-as from lchan 0 0 4 0 to lchan 0 0 1 0
-expect-ts-use trx 0 0 states * TCH/F - - - - - *
-meas-rep lchan 0 0 1 0 rxlev 30 rxqual 6 ta 0
-congestion-check
-expect-as from lchan 0 0 1 0 to lchan 0 0 4 0
-expect-ts-use trx 0 0 states * - - - TCH/H- - - *
+expect-no-chan

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I96cd5a494e661ba3bb0b6d22d25a9968d2a6813c
Gerrit-Change-Number: 24797
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210629/a14fb367/attachment.htm>


More information about the gerrit-log mailing list