From fbbbf7886c05369966ce2b4194e664c5bdf1ca75 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 10 Mar 2021 21:36:04 +0000 Subject: [PATCH] sched,bugfix - reset harq used for msg3 correctly --- srsenb/hdr/stack/mac/sched_grid.h | 2 +- srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc | 1 + srsenb/test/mac/sched_ue_ded_test_suite.cc | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/srsenb/hdr/stack/mac/sched_grid.h b/srsenb/hdr/stack/mac/sched_grid.h index c9e61cfa9..6376494e9 100644 --- a/srsenb/hdr/stack/mac/sched_grid.h +++ b/srsenb/hdr/stack/mac/sched_grid.h @@ -175,7 +175,7 @@ public: }; struct ul_alloc_t { enum type_t { NEWTX, NOADAPT_RETX, ADAPT_RETX }; - bool is_msg3; + bool is_msg3 = false; size_t dci_idx; type_t type; uint16_t rnti; diff --git a/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc b/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc index cde622989..96eb86a9d 100644 --- a/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc +++ b/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc @@ -283,6 +283,7 @@ void ul_harq_proc::reset_pending_data() reset_pending_data_common(); if (is_empty(0)) { pending_data = 0; + is_msg3_ = false; } } diff --git a/srsenb/test/mac/sched_ue_ded_test_suite.cc b/srsenb/test/mac/sched_ue_ded_test_suite.cc index 899154036..e8c223f52 100644 --- a/srsenb/test/mac/sched_ue_ded_test_suite.cc +++ b/srsenb/test/mac/sched_ue_ded_test_suite.cc @@ -191,6 +191,8 @@ int test_ul_sched_result(const sim_enb_ctxt_t& enb_ctxt, const sf_output_res_t& CONDERROR(nof_retx != 0, "Invalid rv index for new tx"); CONDERROR(pusch_ptr->current_tx_nb != 0, "UL HARQ retxs need to have been previously transmitted"); CONDERROR(not h_inactive, "New tx for already active UL HARQ"); + CONDERROR(not pusch_ptr->needs_pdcch and ue.msg3_tti_rx.is_valid() and sf_out.tti_rx > ue.msg3_tti_rx, + "In case of newtx, PDCCH allocation is required, unless it is Msg3"); } else { CONDERROR(pusch_ptr->current_tx_nb == 0, "UL retx has to have nof tx > 0"); if (not h.active) {