pcu: Avoid early TBF release due to N3101 in TC_multiplex_dl_gprs_egprs

Also change a bit expectations, since it can actually happen that DL
blocks for GPRS-only MS never signal USF for itself, which is
still fine.

Change-Id: Iedff87cedf55ab18b32bd0f159d1145901878203
This commit is contained in:
Pau Espin 2021-03-24 18:03:42 +01:00
parent 216021a35e
commit 4ceb61c063
1 changed files with 35 additions and 8 deletions

View File

@ -3717,7 +3717,7 @@ testcase TC_multiplex_dl_gprs_egprs() runs on RAW_PCU_Test_CT {
var octetstring data := f_rnd_octstring(10);
var RlcmacDlBlock dl_block;
var integer tx_data_remain := 5;
var integer tgt_ms;
var integer tgt_ms, usf_ms;
var integer ms_gprs_usf_count[num_ms] := { 0, 0 };
var integer ms_egprs_usf_count[num_ms] := { 0, 0 };
@ -3799,6 +3799,8 @@ testcase TC_multiplex_dl_gprs_egprs() runs on RAW_PCU_Test_CT {
break;
}
usf_ms := -1;
if (ischosen(dl_block.ctrl)) {
setverdict(fail, "Unexpected DL CTRL block ", dl_block);
f_shutdown(__BFILE__, __LINE__);
@ -3813,14 +3815,16 @@ testcase TC_multiplex_dl_gprs_egprs() runs on RAW_PCU_Test_CT {
setverdict(fail, "Signalling USF ", dl_block.data_egprs.mac_hdr.usf, " for GPRS-only MS using MCS > 4: ", dl_block);
f_shutdown(__BFILE__, __LINE__);
}
ms_egprs_usf_count[0] := ms_egprs_usf_count[0] + 1;
usf_ms := 0;
ms_egprs_usf_count[usf_ms] := ms_egprs_usf_count[usf_ms] + 1;
} else {
if (dl_block.data_egprs.mcs <= MCS_4) {
setverdict(fail, "Using too-low MCS for EGPRS MS: ", dl_block.data_egprs.mcs);
f_shutdown(__BFILE__, __LINE__);
}
if (match(dl_block.data_egprs.mac_hdr.usf, g_ms[1].ul_tbf.usf[7])) {
ms_egprs_usf_count[1] := ms_egprs_usf_count[1] + 1;
usf_ms := 1;
ms_egprs_usf_count[usf_ms] := ms_egprs_usf_count[usf_ms] + 1;
}
}
} else {
@ -3830,9 +3834,11 @@ testcase TC_multiplex_dl_gprs_egprs() runs on RAW_PCU_Test_CT {
}
tgt_ms := 0;
if (match(dl_block.data.mac_hdr.mac_hdr.usf, g_ms[0].ul_tbf.usf[7])) {
ms_gprs_usf_count[0] := ms_gprs_usf_count[0] + 1;
usf_ms := 0;
ms_gprs_usf_count[usf_ms] := ms_gprs_usf_count[usf_ms] + 1;
} else if (match(dl_block.data.mac_hdr.mac_hdr.usf, g_ms[1].ul_tbf.usf[7])) {
ms_gprs_usf_count[1] := ms_gprs_usf_count[1] + 1;
usf_ms := 1;
ms_gprs_usf_count[usf_ms] := ms_gprs_usf_count[usf_ms] + 1;
}
}
@ -3849,15 +3855,36 @@ testcase TC_multiplex_dl_gprs_egprs() runs on RAW_PCU_Test_CT {
BSSGP[0].send(ts_BSSGP_DL_UD(g_ms[1].tlli, data));
tx_data_remain := tx_data_remain - 1;
}
} else if (tx_data_remain != 0) {
/* keep sending UL blocks when requested by USF to avoid
* UL TBF timeout and hence stop receival of USFs */
if (usf_ms != -1) {
f_ms_tx_ul_data_block(g_ms[usf_ms], f_rnd_octstring(10), cv := 15);
}
}
}
log("results: ms_gprs_usf_count=", ms_gprs_usf_count, " / ms_egprs_usf_count=", ms_egprs_usf_count);
if (ms_gprs_usf_count[0] == 0 or ms_gprs_usf_count[1] == 0 or
ms_egprs_usf_count[0] == 0 or ms_egprs_usf_count[1] == 0) {
setverdict(fail, "USF thresholds not met!");
/* He we check that DL blocks scheduled at GPRS can still request UL
* blocks for EGPRS MS, and the other way around. Furthermore, the 2nd
* condition also ensures the downgrade to <=MCS4 condition is tested
* above */
if (ms_gprs_usf_count[1] == 0 or ms_egprs_usf_count[0] == 0) {
setverdict(fail, "USF exchange thresholds not met!");
f_shutdown(__BFILE__, __LINE__);
}
/* Here check for some level of fairness between them (at least ~40%): */
var integer gprs_usf_cnt := ms_gprs_usf_count[0] + ms_egprs_usf_count[0];
var integer egprs_usf_cnt := ms_gprs_usf_count[1] + ms_egprs_usf_count[1];
var integer total_usf_cnt := gprs_usf_cnt + egprs_usf_cnt;
if (gprs_usf_cnt < total_usf_cnt * 4 / 10) {
setverdict(fail, "USF GPRS-only MS ", gprs_usf_cnt, " < ", total_usf_cnt * 4 / 10);
f_shutdown(__BFILE__, __LINE__);
}
if (egprs_usf_cnt < total_usf_cnt * 4 / 10) {
setverdict(fail, "USF EGPRS MS ", egprs_usf_cnt, " < ", total_usf_cnt * 4 / 10);
f_shutdown(__BFILE__, __LINE__);
}
f_shutdown(__BFILE__, __LINE__, final := true);
}