From 8cbbebdea21fe0acf5d4f8862a8b9f835208d271 Mon Sep 17 00:00:00 2001 From: Francisco Date: Tue, 8 Jun 2021 18:45:51 +0100 Subject: [PATCH] bugfix,scheduler: make sure UL harq pending data is cleared up when the last retx falls in a measurement gap --- srsenb/src/main.cc | 2 +- srsenb/src/stack/mac/sched_grid.cc | 2 +- srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index e5a534518..888bcd985 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -154,7 +154,7 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("scheduler.target_bler", bpo::value(&args->stack.mac.sched.target_bler)->default_value(0.05), "Target BLER (in decimal) to achieve via adaptive link") ("scheduler.max_delta_dl_cqi", bpo::value(&args->stack.mac.sched.max_delta_dl_cqi)->default_value(5.0), "Maximum shift in CQI for adaptive DL link") ("scheduler.max_delta_ul_snr", bpo::value(&args->stack.mac.sched.max_delta_ul_snr)->default_value(5.0), "Maximum shift in UL SNR for adaptive UL link") - ("scheduler.adaptive_link_step_size", bpo::value(&args->stack.mac.sched.max_delta_ul_snr)->default_value(0.001), "Step size or learning rate used in adaptive link") + ("scheduler.adaptive_link_step_size", bpo::value(&args->stack.mac.sched.adaptive_link_step_size)->default_value(0.001), "Step size or learning rate used in adaptive link") ("scheduler.min_tpc_tti_interval", bpo::value(&args->stack.mac.sched.min_tpc_tti_interval)->default_value(1), "Minimum TTI interval between positive or negative TPCs") ("scheduler.ul_snr_avg_alpha", bpo::value(&args->stack.mac.sched.ul_snr_avg_alpha)->default_value(0.05), "Exponential Average alpha coefficient used in estimation of UL SNR") ("scheduler.init_ul_snr_value", bpo::value(&args->stack.mac.sched.init_ul_snr_value)->default_value(5), "Initial UL SNR value used for computing MCS in the first UL grant") diff --git a/srsenb/src/stack/mac/sched_grid.cc b/srsenb/src/stack/mac/sched_grid.cc index 9e6d24b91..3a79b462d 100644 --- a/srsenb/src/stack/mac/sched_grid.cc +++ b/srsenb/src/stack/mac/sched_grid.cc @@ -579,7 +579,7 @@ sf_sched::alloc_ul(sched_ue* user, prb_interval alloc, ul_alloc_t::type_t alloc_ // Check if there is no collision with measGap bool needs_pdcch = alloc_type == ul_alloc_t::ADAPT_RETX or (alloc_type == ul_alloc_t::NEWTX and not is_msg3); if (not user->pusch_enabled(get_tti_rx(), cc_cfg->enb_cc_idx, needs_pdcch)) { - logger.debug("SCHED: PDCCH would collide with rnti=0x%x Measurement Gap", user->get_rnti()); + logger.debug("SCHED: PDCCH/PUSCH would collide with rnti=0x%x Measurement Gap", user->get_rnti()); return alloc_result::no_rnti_opportunity; } 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 23826d26c..016436a0b 100644 --- a/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc +++ b/srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc @@ -230,6 +230,9 @@ void ul_harq_proc::new_tti() logger->info( "SCHED: discarding UL pid=%d, tti=%d, maximum number of retx exceeded (%d)", get_id(), tti.to_uint(), max_retx); active[0] = false; + if (not pending_phich) { + reset_pending_data(); + } } } @@ -275,6 +278,9 @@ bool ul_harq_proc::set_ack(uint32_t tb_idx, bool ack_) return false; } set_ack_common(tb_idx, ack_); + if (is_empty(0) and not pending_phich) { + reset_pending_data(); + } return true; }