Change in osmo-bsc[master]: hodec2: add low-rxqual-assignment penalty timer (2/2)

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
Thu Jul 15 09:28:22 UTC 2021


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

Change subject: hodec2: add low-rxqual-assignment penalty timer (2/2)
......................................................................

hodec2: add low-rxqual-assignment penalty timer (2/2)

Hold off re-assignment after an intra-cell re-assignment due to low
rxqual.

Adjust test_amr_tch_h_to_f_rxqual.ho_vty to show the changed behaviour.

Related: SYS#5198
Change-Id: Id00a07313fe04eec509b336c0637b59c707760e0
---
M include/osmocom/bsc/handover_cfg.h
M src/osmo-bsc/handover_decision_2.c
M tests/handover/test_amr_tch_h_to_f_rxqual.ho_vty
M tests/handover_cfg.vty
4 files changed, 39 insertions(+), 13 deletions(-)

Approvals:
  neels: Looks good to me, approved
  daniel: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h
index 551ce8d..2bd2681 100644
--- a/include/osmocom/bsc/handover_cfg.h
+++ b/include/osmocom/bsc/handover_cfg.h
@@ -261,6 +261,13 @@
 		" see also 'handover2 retries'\n" \
 		"Seconds\n") \
 	\
+	HO_CFG_ONE_MEMBER(int, hodec2_penalty_low_rxqual_as, 60, \
+		"handover2 ", "penalty-time low-rxqual-assignment", "<0-99999>", atoi, "%d", as_is, \
+		HO_CFG_STR_HANDOVER2 \
+		HO_CFG_STR_PENALTY_TIME \
+		"Time to suspend re-assignment after an lchan was re-assigned because of low RxQual\n" \
+		"Seconds\n") \
+	\
 	HO_CFG_ONE_MEMBER(int, hodec2_retries, 0, \
 		"handover2 ", "retries", "<0-9>", atoi, "%d", as_is, \
 		HO_CFG_STR_HANDOVER2 \
diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index af36c31..d08173c 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -1410,10 +1410,21 @@
 
 	/* perform handover, if there is a candidate */
 	if (best_cand) {
+		int rc;
 		LOGPHOCAND(best_cand, LOGL_INFO, "Best candidate: RX level %d%s\n",
 			   rxlev2dbm(best_cand->target.rxlev),
 			   best_applied_afs_bias ? " (applied AHS -> AFS rxlev bias)" : "");
-		return trigger_ho(best_cand, best_cand->requirements & REQUIREMENT_A_MASK);
+		rc = trigger_ho(best_cand, best_cand->requirements & REQUIREMENT_A_MASK);
+
+		/* After upgrading TCH/H to TCH/F due to bad RxQual, start penalty timer to avoid re-assignment within
+		 * the same cell again, to avoid oscillation from RxQual noise combined with congestion resolution. */
+		if (!rc && is_upgrade_to_tchf(best_cand, REQUIREMENT_A_MASK)) {
+			struct gsm0808_cell_id bts_id;
+			gsm_bts_cell_id(&bts_id, best_cand->target.bts);
+			penalty_timers_add(lchan->conn, &lchan->conn->hodec2.penalty_timers, &bts_id,
+					   ho_get_hodec2_penalty_low_rxqual_as(bts->ho));
+		}
+		return rc;
 	}
 
 	/* Damn, all is congested, has too low RXLEV or cannot service the voice call due to codec
diff --git a/tests/handover/test_amr_tch_h_to_f_rxqual.ho_vty b/tests/handover/test_amr_tch_h_to_f_rxqual.ho_vty
index 32a95e1..f3a2a90 100644
--- a/tests/handover/test_amr_tch_h_to_f_rxqual.ho_vty
+++ b/tests/handover/test_amr_tch_h_to_f_rxqual.ho_vty
@@ -25,15 +25,12 @@
 
 # The penalty timer is still active, no re-assignment from congestion of TCH/H
 congestion-check
-# "FAIL": the penalty timer is not yet implemented
-#expect-no-chan
-#expect-ts-use trx 0 0 states * TCH/F - - - - - *
-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
+expect-ts-use trx 0 0 states * TCH/F - - - - - *
 
 # But handover to another cell is not held off
 create-bts trx-count 1 timeslots c+s4 TCH/F TCH/F TCH/F TCH/H  TCH/H TCH/H PDCH
-set-ts-use trx 0 0 states * TCH/F - - - - - *
+expect-ts-use trx 0 0 states * TCH/F - - - - - *
 expect-ts-use trx 1 0 states * - - - - - - *
 
 meas-rep lchan 0 0 1 0 rxlev 30 rxqual 5 ta 0 neighbors 35
diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty
index ccb1a6b..eb3ec3e 100644
--- a/tests/handover_cfg.vty
+++ b/tests/handover_cfg.vty
@@ -189,6 +189,7 @@
   handover2 penalty-time max-distance (<0-99999>|default)
   handover2 penalty-time failed-ho (<0-99999>|default)
   handover2 penalty-time failed-assignment (<0-99999>|default)
+  handover2 penalty-time low-rxqual-assignment (<0-99999>|default)
   handover2 retries (<0-9>|default)
   handover2 congestion-check (disabled|<1-999>|now)
 ...
@@ -384,9 +385,10 @@
   default   Use default (9999), remove explicit setting on this node
 
 OsmoBSC(config-net)# handover2 penalty-time ?
-  max-distance       Time to suspend handover for a subscriber after leaving this cell due to exceeding max distance; see also 'handover2 retries'
-  failed-ho          Time to suspend handover for a subscriber after a failed handover into this cell; see also 'handover2 retries'
-  failed-assignment  Time to suspend handover for a subscriber after a failed re-assignment within this cell; see also 'handover2 retries'
+  max-distance           Time to suspend handover for a subscriber after leaving this cell due to exceeding max distance; see also 'handover2 retries'
+  failed-ho              Time to suspend handover for a subscriber after a failed handover into this cell; see also 'handover2 retries'
+  failed-assignment      Time to suspend handover for a subscriber after a failed re-assignment within this cell; see also 'handover2 retries'
+  low-rxqual-assignment  Time to suspend re-assignment after an lchan was re-assigned because of low RxQual
 
 OsmoBSC(config-net)# handover2 penalty-time max-distance ?
   <0-99999>  Seconds
@@ -400,6 +402,10 @@
   <0-99999>  Seconds
   default    Use default (60), remove explicit setting on this node
 
+OsmoBSC(config-net)# handover2 penalty-time low-rxqual-assignment ?
+  <0-99999>  Seconds
+  default    Use default (60), remove explicit setting on this node
+
 OsmoBSC(config-net)# handover2 retries ?
   <0-9>    Number of retries
   default  Use default (0), remove explicit setting on this node
@@ -603,9 +609,10 @@
   default   Use default (9999), remove explicit setting on this node
 
 OsmoBSC(config-net-bts)# handover2 penalty-time ?
-  max-distance       Time to suspend handover for a subscriber after leaving this cell due to exceeding max distance; see also 'handover2 retries'
-  failed-ho          Time to suspend handover for a subscriber after a failed handover into this cell; see also 'handover2 retries'
-  failed-assignment  Time to suspend handover for a subscriber after a failed re-assignment within this cell; see also 'handover2 retries'
+  max-distance           Time to suspend handover for a subscriber after leaving this cell due to exceeding max distance; see also 'handover2 retries'
+  failed-ho              Time to suspend handover for a subscriber after a failed handover into this cell; see also 'handover2 retries'
+  failed-assignment      Time to suspend handover for a subscriber after a failed re-assignment within this cell; see also 'handover2 retries'
+  low-rxqual-assignment  Time to suspend re-assignment after an lchan was re-assigned because of low RxQual
 
 OsmoBSC(config-net-bts)# handover2 penalty-time max-distance ?
   <0-99999>  Seconds
@@ -619,6 +626,10 @@
   <0-99999>  Seconds
   default    Use default (60), remove explicit setting on this node
 
+OsmoBSC(config-net-bts)# handover2 penalty-time low-rxqual-assignment ?
+  <0-99999>  Seconds
+  default    Use default (60), remove explicit setting on this node
+
 OsmoBSC(config-net-bts)# handover2 retries ?
   <0-9>    Number of retries
   default  Use default (0), remove explicit setting on this node

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id00a07313fe04eec509b336c0637b59c707760e0
Gerrit-Change-Number: 24937
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210715/06448e02/attachment.htm>


More information about the gerrit-log mailing list