SRSENB: MAC controller recover MAC bearer state after PDSCH KO burst (#3225)

* SRSENB: MAC controller recover MAC bearer state after PDSCH KO burst

* mac,lte: simplify scheduler phy config enable configuration

Co-authored-by: Francisco Paisana <francisco.paisana@softwareradiosystems.com>
This commit is contained in:
Xavier Arteaga 2021-10-25 10:56:12 +02:00 committed by GitHub
parent 322f57a952
commit 2f5a1ad2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 14 deletions

View File

@ -63,8 +63,7 @@ public:
void set_scell_activation(const std::bitset<SRSRAN_MAX_CARRIERS>& scell_mask);
void set_drb_activation(bool active);
enum proc_stage_t : int8_t { config_tx, config_complete, other };
void update_mac(proc_stage_t stage);
void update_mac();
private:
int apply_basic_conn_cfg(const asn1::rrc::rr_cfg_ded_s& rr_cfg);

View File

@ -212,7 +212,8 @@ void mac_controller::handle_con_reconf(const asn1::rrc::rrc_conn_recfg_r8_ies_s&
set_drb_activation(false);
// Apply changes to MAC scheduler
update_mac(proc_stage_t::config_tx);
update_mac();
mac->phy_config_enabled(rnti, false);
}
void mac_controller::handle_con_reconf_complete()
@ -223,7 +224,8 @@ void mac_controller::handle_con_reconf_complete()
apply_current_bearers_cfg();
// Apply SCell+Bearer changes to MAC
update_mac(proc_stage_t::config_complete);
update_mac();
mac->phy_config_enabled(rnti, true);
}
void mac_controller::apply_current_bearers_cfg()
@ -286,7 +288,8 @@ void mac_controller::handle_intraenb_ho_cmd(const asn1::rrc::rrc_conn_recfg_r8_i
current_sched_ue_cfg.ue_bearers[i].direction = mac_lc_ch_cfg_t::DL;
}
update_mac(mac_controller::config_tx);
update_mac();
mac->phy_config_enabled(rnti, false);
}
void mac_controller::handle_ho_prep(const asn1::rrc::ho_prep_info_r8_ies_s& ho_prep)
@ -305,7 +308,8 @@ void mac_controller::set_radio_bearer_state(mac_lc_ch_cfg_t::direction_t dir)
for (auto& drb : bearer_list.get_established_drbs()) {
current_sched_ue_cfg.ue_bearers[drb.lc_ch_id].direction = dir;
}
update_mac(config_tx);
update_mac();
}
void mac_controller::set_scell_activation(const std::bitset<SRSRAN_MAX_CARRIERS>& scell_mask)
@ -323,14 +327,10 @@ void mac_controller::set_drb_activation(bool active)
}
}
void mac_controller::update_mac(proc_stage_t stage)
void mac_controller::update_mac()
{
// Apply changes to MAC scheduler
mac->ue_cfg(rnti, &current_sched_ue_cfg);
if (stage != proc_stage_t::other) {
// Acknowledge Dedicated Configuration
mac->phy_config_enabled(rnti, stage == proc_stage_t::config_complete);
}
}
void ue_cfg_apply_phy_cfg_ded(ue_cfg_t& ue_cfg, const asn1::rrc::phys_cfg_ded_s& phy_cfg, const rrc_cfg_t& rrc_cfg)

View File

@ -661,7 +661,8 @@ void rrc::ue::rrc_mobility::s1_source_ho_st::enter(rrc_mobility* f, const ho_mea
/**
* TS 36.413, Section 8.4.2 - Handover Resource Allocation
* @brief: Send "eNBStatusTransfer" message from source eNB to MME, and setup Forwarding GTPU tunnel
* @brief: Called in SeNB when "Handover Command" is received
* Send "eNBStatusTransfer" message from source eNB to MME, and setup Forwarding GTPU tunnel
* - PDCP provides the bearers' DL/UL HFN and COUNT to be put inside a transparent container
* - The eNB sends eNBStatusTransfer to MME
* - A GTPU forwarding tunnel is opened to forward buffered PDCP PDUs and incoming GTPU PDUs
@ -698,14 +699,13 @@ void rrc::ue::rrc_mobility::s1_source_ho_st::handle_ho_cmd(wait_ho_cmd& s, const
}
/* Enter Handover Execution */
// TODO: Do anything with MeasCfg info within the Msg (e.g. update ue_var_meas)?
// Disable DRBs in the MAC and PDCP, while Reconfiguration is taking place.
for (const drb_to_add_mod_s& drb : rrc_ue->bearer_list.get_established_drbs()) {
rrc_ue->parent->pdcp->set_enabled(rrc_ue->rnti, drb_to_lcid((lte_drb)drb.drb_id), false);
}
rrc_ue->mac_ctrl.set_drb_activation(false);
rrc_ue->mac_ctrl.update_mac(mac_controller::proc_stage_t::other);
rrc_ue->mac_ctrl.update_mac();
// Send HO Command to UE
std::string octet_str;