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


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

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

Related: SYS#5365
Change-Id: Ibc3ac7ce6190b4e854fa42d5376a7038ddfbd6e5
---
M src/osmo-bsc/handover_decision_2.c
M tests/handover/test_amr_tch_h_to_f_rxlev_oscillation.ho_vty
2 files changed, 9 insertions(+), 11 deletions(-)



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

diff --git a/src/osmo-bsc/handover_decision_2.c 
b/src/osmo-bsc/handover_decision_2.c
index d4ebc41..4fa41fb 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -1169,6 +1169,7 @@
        bool assignment;
        bool handover;
        int neighbors_count = 0;
+       bool tch_f_with_low_rxlev;

        OSMO_ASSERT(candidates);

@@ -1186,8 +1187,14 @@

        assignment = ho_get_hodec2_as_active(bts->ho);
        handover = ho_get_ho_active(bts->ho);
+       tch_f_with_low_rxlev = (lchan->type == GSM_LCHAN_TCH_F
+                               && rxlev_current >= 0
+                               && rxlev2dbm(rxlev_current) < 
ho_get_hodec2_min_rxlev(bts->ho));

-       if (assignment)
+       /* 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)
                collect_assignment_candidate(lchan, clist, candidates, 
rxlev_current);

        if (handover) {
diff --git a/tests/handover/test_amr_tch_h_to_f_rxlev_oscillation.ho_vty 
b/tests/handover/test_amr_tch_h_to_f_rxlev_oscillation.ho_vty
index 076076b..2ef927d 100644
--- a/tests/handover/test_amr_tch_h_to_f_rxlev_oscillation.ho_vty
+++ b/tests/handover/test_amr_tch_h_to_f_rxlev_oscillation.ho_vty
@@ -17,13 +17,4 @@

 meas-rep lchan 0 0 1 0 rxlev 23 rxqual 1 ta 0
 congestion-check
-# FAIL: should stay on TCH/F because rxlev 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 23 rxqual 1 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 23 rxqual 1 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/+/24795
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ibc3ac7ce6190b4e854fa42d5376a7038ddfbd6e5
Gerrit-Change-Number: 24795
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-MessageType: newchange

Reply via email to