pcu: TC_mo_ping_pong: Check DL block is sent and ACK it
Function f_rx_rlcmac_dl_block_exp_data() still misses proper verification of data. Apparently the received message has 2 blocks, first with expected 10 bytes, but next one contains 18 bytes with 4 actual bytes and other bits are padding. Last DL ACK/NACK sent is not yet working correctly. osmo-pcu seems to be unable to match it against sent DL block (I think due to non-matching FN), and instead drops it and schedules after timeout an IMM ASS to try to send DL block again. Change-Id: Icf66dd5c07690368722c586632c38fb7e770053c
This commit is contained in:
parent
4b61204e85
commit
a3f0a85eb2
|
@ -643,11 +643,11 @@ module RLCMAC_CSN1_Types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private const ILevel iNone := {
|
const ILevel iNone := {
|
||||||
presence := '0'B,
|
presence := '0'B,
|
||||||
i_level := omit
|
i_level := omit
|
||||||
}
|
}
|
||||||
private const ChannelQualityReport c_ChQualRep_default := {
|
const ChannelQualityReport c_ChQualRep_default := {
|
||||||
c_value := 0,
|
c_value := 0,
|
||||||
rxqual := 0,
|
rxqual := 0,
|
||||||
sign_var := 0,
|
sign_var := 0,
|
||||||
|
|
|
@ -256,7 +256,30 @@ module RLCMAC_Types {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Template fro uplink Data block */
|
/* Send Template for Downlink ACK/NACK */
|
||||||
|
template RlcmacUlBlock ts_RLCMAC_DL_ACK_NACK(template uint5_t tfi, AckNackDescription andesc, boolean retry := false) := {
|
||||||
|
ctrl := {
|
||||||
|
mac_hdr := {
|
||||||
|
payload_type := MAC_PT_RLCMAC_NO_OPT,
|
||||||
|
spare := '00000'B,
|
||||||
|
retry := retry
|
||||||
|
},
|
||||||
|
payload := {
|
||||||
|
msg_type := PACKET_DL_ACK_NACK,
|
||||||
|
u := {
|
||||||
|
dl_ack_nack := {
|
||||||
|
dl_tfi := tfi,
|
||||||
|
ack_nack_desc := andesc,
|
||||||
|
chreq_desc_presence := '0'B,
|
||||||
|
chreq_desc := omit,
|
||||||
|
ch_qual_rep := c_ChQualRep_default
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Template for uplink Data block */
|
||||||
template RlcmacUlBlock t_RLCMAC_UL_DATA(template uint5_t tfi, template uint4_t cv, template uint7_t bsn,
|
template RlcmacUlBlock t_RLCMAC_UL_DATA(template uint5_t tfi, template uint4_t cv, template uint7_t bsn,
|
||||||
template LlcBlocks blocks := {}, template boolean stall := false) := {
|
template LlcBlocks blocks := {}, template boolean stall := false) := {
|
||||||
data := {
|
data := {
|
||||||
|
|
|
@ -46,6 +46,8 @@ import from PCU_Tests all;
|
||||||
|
|
||||||
modulepar {
|
modulepar {
|
||||||
charstring mp_pcu_sock_path := PCU_SOCK_DEFAULT;
|
charstring mp_pcu_sock_path := PCU_SOCK_DEFAULT;
|
||||||
|
|
||||||
|
float X2002 := 0.2; /* Timer -2002, IMM ASSIGN confirm delay */
|
||||||
}
|
}
|
||||||
|
|
||||||
type component RAW_NS_CT {
|
type component RAW_NS_CT {
|
||||||
|
@ -753,6 +755,19 @@ runs on RAW_PCU_Test_CT {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function f_rx_rlcmac_dl_block_exp_data(out RlcmacDlBlock dl_block, octetstring data)
|
||||||
|
runs on RAW_PCU_Test_CT {
|
||||||
|
var template RlcmacDlBlock dl_template := tr_RLCMAC_DATA_RRBP;
|
||||||
|
dl_template.data.blocks := ?;
|
||||||
|
/* TODO: match data correctly: { valueof(t_RLCMAC_LLCBLOCK(data)) }; */
|
||||||
|
|
||||||
|
f_rx_rlcmac_dl_block(dl_block);
|
||||||
|
if (not match(dl_block, dl_template)) {
|
||||||
|
setverdict(fail, "Failed to match Packet data: ", dl_block, " vs ", dl_template);
|
||||||
|
mtc.stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
testcase TC_pcuif_suspend() runs on RAW_PCU_Test_CT {
|
testcase TC_pcuif_suspend() runs on RAW_PCU_Test_CT {
|
||||||
var octetstring ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.cell_id.ra_id);
|
var octetstring ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.cell_id.ra_id);
|
||||||
var GprsTlli tlli := 'FFFFFFFF'O;
|
var GprsTlli tlli := 'FFFFFFFF'O;
|
||||||
|
@ -1320,9 +1335,15 @@ testcase TC_mo_ping_pong() runs on RAW_PCU_Test_CT {
|
||||||
var PacketDlAssign dl_tbf_ass;
|
var PacketDlAssign dl_tbf_ass;
|
||||||
var RlcmacDlBlock dl_block;
|
var RlcmacDlBlock dl_block;
|
||||||
var PCUIF_Message pcu_msg;
|
var PCUIF_Message pcu_msg;
|
||||||
var octetstring data;
|
var octetstring data := f_rnd_octstring(10);
|
||||||
var boolean ok;
|
var boolean ok;
|
||||||
var OCT4 tlli := '00000001'O;
|
var OCT4 tlli := '00000001'O;
|
||||||
|
var AckNackDescription ack_nack_desc;
|
||||||
|
|
||||||
|
ack_nack_desc.final_ack := '0'B;
|
||||||
|
ack_nack_desc.starting_seq_nr := 0;
|
||||||
|
ack_nack_desc.receive_block_bitmap := '0000000000000000000000000000000000000000000000000000000000000000'B;
|
||||||
|
|
||||||
|
|
||||||
/* Initialize NS/BSSGP side */
|
/* Initialize NS/BSSGP side */
|
||||||
f_init_bssgp();
|
f_init_bssgp();
|
||||||
|
@ -1354,7 +1375,7 @@ testcase TC_mo_ping_pong() runs on RAW_PCU_Test_CT {
|
||||||
BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id));
|
BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id));
|
||||||
|
|
||||||
/* Now SGSN sends some DL data, PCU will page on CCCH (PCH) */
|
/* Now SGSN sends some DL data, PCU will page on CCCH (PCH) */
|
||||||
BSSGP[0].send(ts_BSSGP_DL_UD(tlli, f_rnd_octstring(10)));
|
BSSGP[0].send(ts_BSSGP_DL_UD(tlli, data));
|
||||||
f_pcuif_rx_pch_imm_tbf_ass(rr_imm_ass);
|
f_pcuif_rx_pch_imm_tbf_ass(rr_imm_ass);
|
||||||
|
|
||||||
ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass);
|
ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass);
|
||||||
|
@ -1363,7 +1384,12 @@ testcase TC_mo_ping_pong() runs on RAW_PCU_Test_CT {
|
||||||
mtc.stop;
|
mtc.stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: ACK the assignment and the DL block somehow? */
|
/* Wait timer X2002 and DL block is available after CCCH IMM ASS: */
|
||||||
|
f_sleep(X2002);
|
||||||
|
f_rx_rlcmac_dl_block_exp_data(dl_block, data);
|
||||||
|
|
||||||
|
/* ACK the DL block */
|
||||||
|
f_tx_rlcmac_ul_block(ts_RLCMAC_DL_ACK_NACK(dl_block.data.mac_hdr.hdr_ext.tfi, ack_nack_desc));
|
||||||
}
|
}
|
||||||
|
|
||||||
control {
|
control {
|
||||||
|
|
Loading…
Reference in New Issue