<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24797">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">hodec2: fix low rxqual tch/h<->tch/f oscillation<br><br>Related: SYS#5198<br>Change-Id: I96cd5a494e661ba3bb0b6d22d25a9968d2a6813c<br>---<br>M src/osmo-bsc/handover_decision_2.c<br>M tests/handover/handover_tests.ok<br>M tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty<br>3 files changed, 15 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/97/24797/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c</span><br><span>index 4fa41fb..1fa3c2a 100644</span><br><span>--- a/src/osmo-bsc/handover_decision_2.c</span><br><span>+++ b/src/osmo-bsc/handover_decision_2.c</span><br><span>@@ -1170,6 +1170,7 @@</span><br><span>   bool handover;</span><br><span>       int neighbors_count = 0;</span><br><span>     bool tch_f_with_low_rxlev;</span><br><span style="color: hsl(120, 100%, 40%);">+    bool tch_f_with_low_rxqual;</span><br><span> </span><br><span>      OSMO_ASSERT(candidates);</span><br><span> </span><br><span>@@ -1190,11 +1191,20 @@</span><br><span>       tch_f_with_low_rxlev = (lchan->type == GSM_LCHAN_TCH_F</span><br><span>                            && rxlev_current >= 0</span><br><span>                             && rxlev2dbm(rxlev_current) < ho_get_hodec2_min_rxlev(bts->ho));</span><br><span style="color: hsl(120, 100%, 40%);">+        tch_f_with_low_rxqual = false;</span><br><span style="color: hsl(120, 100%, 40%);">+        if (lchan->type == GSM_LCHAN_TCH_F) {</span><br><span style="color: hsl(120, 100%, 40%);">+              int av_rxqual = get_meas_rep_avg(lchan,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                ho_get_hodec2_full_tdma(bts->ho) ?</span><br><span style="color: hsl(120, 100%, 40%);">+                                                 MEAS_REP_DL_RXQUAL_FULL : MEAS_REP_DL_RXQUAL_SUB,</span><br><span style="color: hsl(120, 100%, 40%);">+                                             ho_get_hodec2_rxqual_avg_win(bts->ho));</span><br><span style="color: hsl(120, 100%, 40%);">+           if (av_rxqual >= 0 && av_rxqual > ho_get_hodec2_min_rxqual(bts->ho))</span><br><span style="color: hsl(120, 100%, 40%);">+                 tch_f_with_low_rxqual = true;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> </span><br><span>        /* See if re-assignment within the same cell can resolve congestion.</span><br><span style="color: hsl(0, 100%, 40%);">-     * 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</span><br><span style="color: hsl(0, 100%, 40%);">-     * subsequently oscillate back to TCH/F due to low rxlev. So skip TCH/F with low rxlev. */</span><br><span style="color: hsl(0, 100%, 40%);">-      if (assignment && !tch_f_with_low_rxlev)</span><br><span style="color: hsl(120, 100%, 40%);">+       * 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</span><br><span style="color: hsl(120, 100%, 40%);">+       * would subsequently oscillate back to TCH/F due to low rxlev/rxqual. So skip TCH/F with low ratings. */</span><br><span style="color: hsl(120, 100%, 40%);">+     if (assignment && !(tch_f_with_low_rxlev || tch_f_with_low_rxqual))</span><br><span>          collect_assignment_candidate(lchan, clist, candidates, rxlev_current);</span><br><span> </span><br><span>   if (handover) {</span><br><span>diff --git a/tests/handover/handover_tests.ok b/tests/handover/handover_tests.ok</span><br><span>index 7de70e1..b76c032 100644</span><br><span>--- a/tests/handover/handover_tests.ok</span><br><span>+++ b/tests/handover/handover_tests.ok</span><br><span>@@ -12,6 +12,7 @@</span><br><span> pass test_amr_tch_h_to_f_rxlev_oscillation.ho_vty</span><br><span> pass test_amr_tch_h_to_f_rxqual.ho_vty</span><br><span> pass test_amr_tch_h_to_f_rxqual_congested.ho_vty</span><br><span style="color: hsl(120, 100%, 40%);">+pass test_amr_tch_h_to_f_rxqual_oscillation.ho_vty</span><br><span> pass test_balance_congestion.ho_vty</span><br><span> pass test_balance_congestion_2.ho_vty</span><br><span> pass test_balance_congestion_by_percentage.ho_vty</span><br><span>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</span><br><span>index a98e917..e628f03 100644</span><br><span>--- a/tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty</span><br><span>+++ b/tests/handover/test_amr_tch_h_to_f_rxqual_oscillation.ho_vty</span><br><span>@@ -17,13 +17,4 @@</span><br><span> </span><br><span> meas-rep lchan 0 0 1 0 rxlev 30 rxqual 6 ta 0</span><br><span> congestion-check</span><br><span style="color: hsl(0, 100%, 40%);">-# FAIL: should stay on TCH/F because rxqual is low, do not oscillate between TCH/F and /H.</span><br><span style="color: hsl(0, 100%, 40%);">-expect-as from lchan 0 0 1 0 to lchan 0 0 4 0</span><br><span style="color: hsl(0, 100%, 40%);">-expect-ts-use trx 0 0 states * - - - TCH/H- - - *</span><br><span style="color: hsl(0, 100%, 40%);">-meas-rep lchan 0 0 4 0 rxlev 30 rxqual 6 ta 0</span><br><span style="color: hsl(0, 100%, 40%);">-expect-as from lchan 0 0 4 0 to lchan 0 0 1 0</span><br><span style="color: hsl(0, 100%, 40%);">-expect-ts-use trx 0 0 states * TCH/F - - - - - *</span><br><span style="color: hsl(0, 100%, 40%);">-meas-rep lchan 0 0 1 0 rxlev 30 rxqual 6 ta 0</span><br><span style="color: hsl(0, 100%, 40%);">-congestion-check</span><br><span style="color: hsl(0, 100%, 40%);">-expect-as from lchan 0 0 1 0 to lchan 0 0 4 0</span><br><span style="color: hsl(0, 100%, 40%);">-expect-ts-use trx 0 0 states * - - - TCH/H- - - *</span><br><span style="color: hsl(120, 100%, 40%);">+expect-no-chan</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24797">change 24797</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/24797"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I96cd5a494e661ba3bb0b6d22d25a9968d2a6813c </div>
<div style="display:none"> Gerrit-Change-Number: 24797 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>