hodec2 congestion: consider only congested pchan types

If no TCH/H need to be moved, then don't collect TCH/H candidates.
Same for TCH/F.

Examining a specific congestion scenario, I realized that ho decision 2
collects candidates of pchan types that are not actually considered congested:

- handover decision 2 wants to move 2 TCH/F only; TCH/H is fine.
- still it collects active TCH/H lchans as candidates.

  (BTS 0) Congestion check: (free/want-free) TCH/F=0/2 TCH/H=12/0
  (BTS 0) Attempting to resolve congestion...
  (BTS 0) congested: 2 TCH/F and 0 TCH/H should be moved
  [...]
  (BTS 0) Considering 8 candidates to solve congestion:
  (lchan 0.020 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #0: req=0x0 avg-rxlev=42
  (lchan 0.030 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #1: req=0x0 avg-rxlev=42
  (lchan 0.040 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #2: req=0x0 avg-rxlev=42
  (lchan 0.050 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #3: req=0x0 avg-rxlev=42
  (lchan 0.160 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #4: req=0x0 avg-rxlev=42
  (lchan 0.161 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #5: req=0x0 avg-rxlev=42
  (lchan 0.170 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #6: req=0x0 avg-rxlev=42
  (lchan 0.171 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #7: req=0x0 avg-rxlev=42

Change-Id: I5077a62c6d77838513eecf3f0e4810c3d3d3a247
This commit is contained in:
Neels Hofmeyr 2020-08-10 17:11:19 +02:00
parent dfc2d84005
commit f5dab9a2c8
1 changed files with 8 additions and 0 deletions

View File

@ -1445,6 +1445,10 @@ static int bts_resolve_congestion(struct gsm_bts *bts, int tchf_congestion, int
/* (Do not consider dynamic TS that are in PDCH mode) */
switch (ts->pchan_is) {
case GSM_PCHAN_TCH_F:
/* No need to collect TCH/F candidates if no TCH/F needs to be moved. */
if (tchf_congestion == 0)
continue;
lc = &ts->lchan[0];
/* omit if channel not active */
if (lc->type != GSM_LCHAN_TCH_F
@ -1459,6 +1463,10 @@ static int bts_resolve_congestion(struct gsm_bts *bts, int tchf_congestion, int
collect_candidates_for_lchan(lc, clist, &candidates, NULL, true);
break;
case GSM_PCHAN_TCH_H:
/* No need to collect TCH/H candidates if no TCH/H needs to be moved. */
if (tchh_congestion == 0)
continue;
for (j = 0; j < 2; j++) {
lc = &ts->lchan[j];
/* omit if channel not active */