fix resetting of harqs in the scheduler during intra-enb handover

master
Francisco 4 years ago committed by Francisco Paisana
parent 350e90a030
commit 26086252ba

@ -38,7 +38,6 @@ class sched_ue
public:
sched_ue();
void reset();
void init(uint16_t rnti, const std::vector<sched_cell_params_t>& cell_list_params_);
void new_subframe(tti_point tti_rx, uint32_t enb_cc_idx);

@ -33,7 +33,7 @@ struct sched_ue_cell {
sched_ue_cell(uint16_t rnti_, const sched_cell_params_t& cell_cfg_, tti_point current_tti);
void set_ue_cfg(const sched_interface::ue_cfg_t& ue_cfg_);
void new_tti(tti_point tti_rx);
void reset();
void clear_feedback();
void finish_tti(tti_point tti_rx);
void set_dl_cqi(tti_point tti_rx, uint32_t dl_cqi_);

@ -35,10 +35,7 @@ namespace srsenb {
*
*******************************************************/
sched_ue::sched_ue() : log_h(srslte::logmap::get("MAC"))
{
reset();
}
sched_ue::sched_ue() : log_h(srslte::logmap::get("MAC")) {}
void sched_ue::init(uint16_t rnti_, const std::vector<sched_cell_params_t>& cell_list_params_)
{
@ -91,22 +88,6 @@ void sched_ue::set_cfg(const ue_cfg_t& cfg_)
check_ue_cfg_correctness(cfg);
}
void sched_ue::reset()
{
cfg = {};
sr = false;
phy_config_dedicated_enabled = false;
cqi_request_tti = 0;
for (auto& cc : cells) {
cc.reset();
}
// erase all bearers
for (uint32_t i = 0; i < cfg.ue_bearers.size(); ++i) {
lch_handler.config_lcid(i, {});
}
}
void sched_ue::new_subframe(tti_point tti_rx, uint32_t enb_cc_idx)
{
if (current_tti != tti_rx) {

@ -31,6 +31,7 @@ sched_ue_cell::sched_ue_cell(uint16_t rnti_, const sched_cell_params_t& cell_cfg
current_tti(current_tti_)
{
max_aggr_level = cell_cfg->sched_cfg->max_aggr_level >= 0 ? cell_cfg->sched_cfg->max_aggr_level : 3;
clear_feedback();
}
void sched_ue_cell::set_ue_cfg(const sched_interface::ue_cfg_t& ue_cfg_)
@ -59,16 +60,16 @@ void sched_ue_cell::set_ue_cfg(const sched_interface::ue_cfg_t& ue_cfg_)
max_mcs_dl = std::min(max_mcs_dl, 27u);
}
// If new cell configuration, clear Cell HARQs
if (ue_cc_idx != prev_ue_cc_idx) {
clear_feedback();
harq_ent.reset();
}
// Update carrier state
if (ue_cc_idx == 0) {
if (cc_state() != cc_st::active) {
reset();
// PCell is always active
cc_state_ = cc_st::active;
// set initial DL CQI
dl_cqi = cell_cfg->cfg.initial_dl_cqi;
}
} else {
// SCell case
switch (cc_state()) {
@ -82,7 +83,6 @@ void sched_ue_cell::set_ue_cfg(const sched_interface::ue_cfg_t& ue_cfg_)
case cc_st::deactivating:
case cc_st::idle:
if (ue_cc_idx > 0 and ue_cfg->supported_cc_list[ue_cc_idx].active) {
reset();
cc_state_ = cc_st::activating;
dl_cqi = 0;
log_h->info("SCHED: Activating rnti=0x%x, SCellIndex=%d...\n", rnti, ue_cc_idx);
@ -102,18 +102,20 @@ void sched_ue_cell::new_tti(tti_point tti_rx)
if (ue_cc_idx > 0 and cc_state_ == cc_st::deactivating) {
// wait for all ACKs to be received before completely deactivating SCell
if (current_tti > to_tx_dl_ack(cfg_tti)) {
enter_idle_st();
cc_state_ = cc_st::idle;
clear_feedback();
harq_ent.reset();
}
}
}
void sched_ue_cell::reset()
void sched_ue_cell::clear_feedback()
{
dl_ri = 0;
dl_ri_tti_rx = tti_point{};
dl_pmi = 0;
dl_pmi_tti_rx = tti_point{};
dl_cqi = 1;
dl_cqi = ue_cc_idx == 0 ? cell_cfg->cfg.initial_dl_cqi : 1;
dl_cqi_tti_rx = tti_point{};
dl_cqi_rx = false;
ul_cqi = 1;
@ -122,7 +124,7 @@ void sched_ue_cell::reset()
void sched_ue_cell::finish_tti(tti_point tti_rx)
{
// reset PIDs with pending data or blocked
// clear_feedback PIDs with pending data or blocked
harq_ent.reset_pending_data(tti_rx);
}
@ -138,12 +140,6 @@ void sched_ue_cell::set_dl_cqi(tti_point tti_rx, uint32_t dl_cqi_)
}
}
void sched_ue_cell::enter_idle_st()
{
cc_state_ = cc_st::idle;
harq_ent.reset();
}
/*************************************************************
* TBS/MCS derivation
************************************************************/

Loading…
Cancel
Save