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
This commit is contained in:
Neels Hofmeyr 2021-07-08 18:16:42 +02:00 committed by neels
parent 12d80e8945
commit be32e93513
4 changed files with 39 additions and 13 deletions

View File

@ -261,6 +261,13 @@ static inline int bool2i(bool arg)
" 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 \

View File

@ -1410,10 +1410,21 @@ static int find_alternative_lchan(struct gsm_lchan *lchan, bool include_weaker_r
/* 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

View File

@ -25,15 +25,12 @@ network
# 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

View File

@ -189,6 +189,7 @@ OsmoBSC(config-net)# list
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 @@ OsmoBSC(config-net)# handover2 max-handovers ?
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 @@ OsmoBSC(config-net)# handover2 penalty-time failed-assignment ?
<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 @@ OsmoBSC(config-net-bts)# handover2 max-handovers ?
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 @@ OsmoBSC(config-net-bts)# handover2 penalty-time failed-assignment ?
<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