sched,nr: expose sched nr UE bearer configuration in sched interface

This commit is contained in:
Francisco Paisana 2021-09-23 19:08:49 +02:00 committed by Andre Puschmann
parent d1b1ef181a
commit a952f0f62d
6 changed files with 40 additions and 25 deletions

View File

@ -30,6 +30,7 @@ const static size_t SCHED_NR_MAX_NOF_RBGS = 18;
const static size_t SCHED_NR_MAX_TB = 1;
const static size_t SCHED_NR_MAX_HARQ = 16;
const static size_t SCHED_NR_MAX_BWP_PER_CELL = 2;
const static size_t SCHED_NR_MAX_LCID = 32;
class sched_nr_interface
{
@ -82,6 +83,7 @@ public:
int fixed_dl_mcs = -1;
int fixed_ul_mcs = -1;
srsran::bounded_vector<ue_cc_cfg_t, SCHED_NR_MAX_CARRIERS> carriers;
std::array<mac_lc_ch_cfg_t, SCHED_NR_MAX_LCID> ue_bearers = {};
srsran::phy_cfg_nr_t phy_cfg = {};
};

View File

@ -137,6 +137,9 @@ public:
asn1::rrc_nr::cell_group_cfg_s cell_group_cfg;
asn1::rrc_nr::radio_bearer_cfg_s radio_bearer_cfg;
// MAC controller
sched_nr_interface::ue_cfg_t uecfg{};
const uint32_t drb1_lcid = 4;
// NSA specific variables

View File

@ -100,6 +100,10 @@ void ue::set_cfg(const ue_cfg_t& cfg)
carriers[ue_cc_cfg.cc].reset(new ue_carrier(rnti, cfg, sched_cfg.cells[ue_cc_cfg.cc]));
}
}
for (uint32_t lcid = 0; lcid < cfg.ue_bearers.size(); ++lcid) {
buffers.config_lcid(lcid, cfg.ue_bearers[lcid]);
}
}
void ue::new_slot(slot_point pdcch_slot)

View File

@ -470,7 +470,10 @@ int rrc_nr::sgnb_reconfiguration_complete(uint16_t eutra_rnti, asn1::dyn_octstri
Every function in UE class is called from a mutex environment thus does not
need extra protection.
*******************************************************************************/
rrc_nr::ue::ue(rrc_nr* parent_, uint16_t rnti_) : parent(parent_), rnti(rnti_) {}
rrc_nr::ue::ue(rrc_nr* parent_, uint16_t rnti_) : parent(parent_), rnti(rnti_)
{
uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH;
}
void rrc_nr::ue::send_connection_setup()
{
@ -1033,7 +1036,6 @@ int rrc_nr::ue::pack_secondary_cell_group_config_common(asn1::rrc_nr::cell_group
// Helper for the RRC Reconfiguration sender to pack hard-coded config
int rrc_nr::ue::pack_secondary_cell_group_config_fdd(asn1::dyn_octstring& packed_secondary_cell_config)
{
auto& cell_group_cfg_pack = cell_group_cfg;
pack_secondary_cell_group_config_common(cell_group_cfg);
@ -1115,7 +1117,6 @@ int rrc_nr::ue::pack_secondary_cell_group_config_fdd(asn1::dyn_octstring& packed
// Helper for the RRC Reconfiguration sender to pack hard-coded config
int rrc_nr::ue::pack_secondary_cell_group_config_tdd(asn1::dyn_octstring& packed_secondary_cell_config)
{
auto& cell_group_cfg_pack = cell_group_cfg;
pack_secondary_cell_group_config_common(cell_group_cfg);
@ -1182,7 +1183,6 @@ int rrc_nr::ue::pack_secondary_cell_group_config_tdd(asn1::dyn_octstring& packed
pdcch_cfg_common.set_setup();
pdcch_cfg_common.setup().ext = false;
// RACH config
cell_group_cfg_pack.sp_cell_cfg.recfg_with_sync.sp_cell_cfg_common.ul_cfg_common.init_ul_bwp.rach_cfg_common_present =
true;
@ -1392,6 +1392,10 @@ int rrc_nr::ue::add_drb()
srsran::pdcp_config_t pdcp_cnfg = srsran::make_drb_pdcp_config_t(drb_item.drb_id, false, drb_item.pdcp_cfg);
parent->pdcp->add_bearer(rnti, rlc.lc_ch_id, pdcp_cnfg);
// Add DRB1 to MAC
uecfg.ue_bearers[rlc.lc_ch_id].direction = mac_lc_ch_cfg_t::BOTH;
parent->mac->ue_cfg(rnti, uecfg);
return SRSRAN_SUCCESS;
}

View File

@ -88,6 +88,7 @@ inline sched_nr_interface::ue_cfg_t get_default_ue_cfg(
uecfg.carriers[cc].active = true;
}
uecfg.phy_cfg = phy_cfg;
uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH;
return uecfg;
}

View File

@ -356,6 +356,7 @@ public:
srsenb::sched_nr_interface::ue_cfg_t ue_cfg = srsenb::get_default_ue_cfg(1, phy_cfg);
ue_cfg.fixed_dl_mcs = args.pdsch.mcs;
ue_cfg.fixed_ul_mcs = args.pusch.mcs;
ue_cfg.ue_bearers[4].direction = srsenb::mac_lc_ch_cfg_t::BOTH;
mac->ue_cfg(args.rnti, ue_cfg);
}