This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16409 ) Change subject: pcu: TC_mo_ping_pong: Check DL block is sent and ACK it ...................................................................... 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 --- M library/RLCMAC_CSN1_Types.ttcn M library/RLCMAC_Types.ttcn M pcu/PCU_Tests_RAW.ttcn 3 files changed, 55 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn index 29ec07b..a2f9a92 100644 --- a/library/RLCMAC_CSN1_Types.ttcn +++ b/library/RLCMAC_CSN1_Types.ttcn @@ -643,11 +643,11 @@ } } - private const ILevel iNone := { + const ILevel iNone := { presence := '0'B, i_level := omit } - private const ChannelQualityReport c_ChQualRep_default := { + const ChannelQualityReport c_ChQualRep_default := { c_value := 0, rxqual := 0, sign_var := 0, diff --git a/library/RLCMAC_Types.ttcn b/library/RLCMAC_Types.ttcn index b0dac35..8e6942e 100644 --- a/library/RLCMAC_Types.ttcn +++ b/library/RLCMAC_Types.ttcn @@ -256,7 +256,30 @@ } } - /* 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 LlcBlocks blocks := {}, template boolean stall := false) := { data := { diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 4a6f54a..410dc31 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -46,6 +46,8 @@ modulepar { charstring mp_pcu_sock_path := PCU_SOCK_DEFAULT; + + float X2002 := 0.2; /* Timer -2002, IMM ASSIGN confirm delay */ } type component RAW_NS_CT { @@ -753,6 +755,19 @@ } } +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 { var octetstring ra_id := enc_RoutingAreaIdentification(mp_gb_cfg.cell_id.ra_id); var GprsTlli tlli := 'FFFFFFFF'O; @@ -1320,9 +1335,15 @@ var PacketDlAssign dl_tbf_ass; var RlcmacDlBlock dl_block; var PCUIF_Message pcu_msg; - var octetstring data; + var octetstring data := f_rnd_octstring(10); var boolean ok; 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 */ f_init_bssgp(); @@ -1354,7 +1375,7 @@ 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) */ - 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); ok := f_imm_ass_verify_dl_tbf_ass(rr_imm_ass, dl_tbf_ass); @@ -1363,7 +1384,12 @@ 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 { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16409 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Icf66dd5c07690368722c586632c38fb7e770053c Gerrit-Change-Number: 16409 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator at gmail.com> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191204/69593333/attachment.htm>