From de05e1e54938e77d49c24369867c15547a2fb39c Mon Sep 17 00:00:00 2001 From: Francisco Date: Thu, 24 Jun 2021 14:53:55 +0100 Subject: [PATCH] sched,nr: fix invalid memory write --- srsenb/hdr/stack/mac/nr/sched_nr_harq.h | 4 +--- srsenb/test/mac/nr/sched_nr_sim_ue.h | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/srsenb/hdr/stack/mac/nr/sched_nr_harq.h b/srsenb/hdr/stack/mac/nr/sched_nr_harq.h index ef7d5f930..3b7fa4280 100644 --- a/srsenb/hdr/stack/mac/nr/sched_nr_harq.h +++ b/srsenb/hdr/stack/mac/nr/sched_nr_harq.h @@ -23,7 +23,7 @@ namespace sched_nr_impl { class harq_proc { public: - explicit harq_proc(uint32_t id_, uint32_t max_nof_tb_ = 1) : pid(id_), max_nof_tb(max_nof_tb_) {} + explicit harq_proc(uint32_t id_) : pid(id_) {} bool empty() const { @@ -55,8 +55,6 @@ private: uint32_t tbs = 0; }; - const uint32_t max_nof_tb; - uint32_t max_retx = 1; tti_point tti_tx; tti_point tti_ack; diff --git a/srsenb/test/mac/nr/sched_nr_sim_ue.h b/srsenb/test/mac/nr/sched_nr_sim_ue.h index b6daa86be..b6c8e5755 100644 --- a/srsenb/test/mac/nr/sched_nr_sim_ue.h +++ b/srsenb/test/mac/nr/sched_nr_sim_ue.h @@ -26,12 +26,17 @@ struct sched_nr_cc_output_res_t { sched_nr_interface::ul_tti_request_t* ul_cc_result; }; +struct ue_nr_cc_ctxt_t { + std::array dl_harqs; + std::array ul_harqs; +}; + struct sim_nr_ue_ctxt_t { uint16_t rnti; uint32_t preamble_idx; srsran::tti_point prach_tti_rx; sched_nr_interface::ue_cfg_t ue_cfg; - std::vector cc_list; + std::vector cc_list; bool is_last_dl_retx(uint32_t ue_cc_idx, uint32_t pid) const { @@ -117,7 +122,6 @@ private: srsran::tti_point current_tti_rx; std::map ue_db; - int error_counter = 0; mutable std::mutex mutex; std::condition_variable cond_var;