enb,rrc: fix bearer re-activation after max KO

this patch makes sure that if RBs have been deactivated after
max KO on either the DL or the UL, they are reactivated if either
of them is working again.

UL/DL are always activated together, even if just one of them
recovers. The KO counter (or timer), however, is not stopped implicitly.
master
Andre Puschmann 4 years ago committed by Ismael Gomez
parent 59db527481
commit fbb151af2d

@ -55,7 +55,7 @@ public:
const srsran::rrc_ue_capabilities_t& uecaps); const srsran::rrc_ue_capabilities_t& uecaps);
void handle_ho_prep(const asn1::rrc::ho_prep_info_r8_ies_s& ho_prep); void handle_ho_prep(const asn1::rrc::ho_prep_info_r8_ies_s& ho_prep);
void handle_max_retx(); void set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::direction_t dir);
const ue_cfg_t& get_ue_sched_cfg() const { return current_sched_ue_cfg; } const ue_cfg_t& get_ue_sched_cfg() const { return current_sched_ue_cfg; }
bool is_crnti_set() const { return crnti_set; } bool is_crnti_set() const { return crnti_set; }

@ -297,10 +297,10 @@ void mac_controller::handle_ho_prep(const asn1::rrc::ho_prep_info_r8_ies_s& ho_p
} }
} }
void mac_controller::handle_max_retx() void mac_controller::set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::direction_t dir)
{ {
for (auto& ue_bearer : current_sched_ue_cfg.ue_bearers) { for (auto& ue_bearer : current_sched_ue_cfg.ue_bearers) {
ue_bearer.direction = sched_interface::ue_bearer_cfg_t::IDLE; ue_bearer.direction = dir;
} }
update_mac(config_tx); update_mac(config_tx);
} }

@ -122,6 +122,7 @@ void rrc::ue::set_radiolink_dl_state(bool crc_res)
parent->logger.info( parent->logger.info(
"DL RLF timer stopped for rnti=0x%x (time elapsed=%dms)", rnti, phy_dl_rlf_timer.time_elapsed()); "DL RLF timer stopped for rnti=0x%x (time elapsed=%dms)", rnti, phy_dl_rlf_timer.time_elapsed());
phy_dl_rlf_timer.stop(); phy_dl_rlf_timer.stop();
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::BOTH);
} }
return; return;
} }
@ -136,7 +137,7 @@ void rrc::ue::set_radiolink_dl_state(bool crc_res)
consecutive_kos_dl++; consecutive_kos_dl++;
if (consecutive_kos_dl > parent->cfg.max_mac_dl_kos) { if (consecutive_kos_dl > parent->cfg.max_mac_dl_kos) {
parent->logger.info("Max KOs in DL reached, starting RLF timer rnti=0x%x", rnti); parent->logger.info("Max KOs in DL reached, starting RLF timer rnti=0x%x", rnti);
mac_ctrl.handle_max_retx(); mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::IDLE);
phy_dl_rlf_timer.run(); phy_dl_rlf_timer.run();
} }
} }
@ -153,6 +154,7 @@ void rrc::ue::set_radiolink_ul_state(bool crc_res)
parent->logger.info( parent->logger.info(
"UL RLF timer stopped for rnti=0x%x (time elapsed=%dms)", rnti, phy_ul_rlf_timer.time_elapsed()); "UL RLF timer stopped for rnti=0x%x (time elapsed=%dms)", rnti, phy_ul_rlf_timer.time_elapsed());
phy_ul_rlf_timer.stop(); phy_ul_rlf_timer.stop();
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::BOTH);
} }
return; return;
} }
@ -167,7 +169,7 @@ void rrc::ue::set_radiolink_ul_state(bool crc_res)
consecutive_kos_ul++; consecutive_kos_ul++;
if (consecutive_kos_ul > parent->cfg.max_mac_ul_kos) { if (consecutive_kos_ul > parent->cfg.max_mac_ul_kos) {
parent->logger.info("Max KOs in UL reached, starting RLF timer rnti=0x%x", rnti); parent->logger.info("Max KOs in UL reached, starting RLF timer rnti=0x%x", rnti);
mac_ctrl.handle_max_retx(); mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::IDLE);
phy_ul_rlf_timer.run(); phy_ul_rlf_timer.run();
} }
} }
@ -222,9 +224,9 @@ void rrc::ue::max_rlc_retx_reached()
{ {
parent->logger.info("Max RLC retx reached for rnti=0x%x", rnti); parent->logger.info("Max RLC retx reached for rnti=0x%x", rnti);
// Turn off DRB scheduling but give UE chance to start re-establishment // Turn off scheduling but give UE chance to start re-establishment
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::IDLE);
rlc_rlf_timer.run(); rlc_rlf_timer.run();
mac_ctrl.handle_max_retx();
} }
void rrc::ue::set_activity_timeout(const activity_timeout_type_t type) void rrc::ue::set_activity_timeout(const activity_timeout_type_t type)

Loading…
Cancel
Save