Skip to content

Commit f048703

Browse files
herlesupreethcodebot
authored andcommitted
du_mgr: store the NR Cell Global Identity of the UE's serving cell in DU UE context
1 parent ae2461b commit f048703

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

lib/du_manager/converters/scheduler_configuration_helpers.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ srsran::srs_du::make_sched_cell_config_req(du_cell_index_t cell_index,
7575
return sched_req;
7676
}
7777

78-
sched_ue_config_request srsran::srs_du::create_scheduler_ue_config_request(const du_ue& ue_ctx,
79-
const plmn_identity& ue_plmn_id)
78+
sched_ue_config_request srsran::srs_du::create_scheduler_ue_config_request(const du_ue& ue_ctx)
8079
{
8180
sched_ue_config_request sched_cfg;
8281

@@ -104,7 +103,7 @@ sched_ue_config_request srsran::srs_du::create_scheduler_ue_config_request(const
104103
sched_lc_ch.lc_sr_delay_timer_applied = bearer.second->mac_cfg.lc_sr_delay_applied;
105104
sched_lc_ch.sr_id.emplace(bearer.second->mac_cfg.sr_id);
106105
sched_lc_ch.rrm_policy.s_nssai = bearer.second->s_nssai;
107-
sched_lc_ch.rrm_policy.plmn_id = ue_plmn_id.to_string();
106+
sched_lc_ch.rrm_policy.plmn_id = ue_ctx.nr_cgi.plmn_id.to_string();
108107

109108
sched_cfg.drb_info_list.emplace_back(sched_drb_info{.lcid = bearer.second->lcid,
110109
.s_nssai = bearer.second->s_nssai,

lib/du_manager/converters/scheduler_configuration_helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sched_cell_configuration_request_message make_sched_cell_config_req(du_cell_inde
2727
span<const units::bytes> si_payload_sizes);
2828

2929
// Create scheduler UE Configuration Request based on DU UE configuration context.
30-
sched_ue_config_request create_scheduler_ue_config_request(const du_ue& u, const plmn_identity& ue_plmn_id);
30+
sched_ue_config_request create_scheduler_ue_config_request(const du_ue& u);
3131

3232
} // namespace srs_du
33-
} // namespace srsran
33+
} // namespace srsran

lib/du_manager/du_ue/du_ue.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,21 @@ namespace srs_du {
2121

2222
/// \brief This class holds the context of an UE in the DU.
2323
struct du_ue_context {
24-
du_ue_context(du_ue_index_t ue_index_, du_cell_index_t pcell_index_, rnti_t rnti_) :
25-
ue_index(ue_index_), rnti(rnti_), f1ap_ue_id(int_to_gnb_du_ue_f1ap_id(ue_index_)), pcell_index(pcell_index_)
24+
du_ue_context(du_ue_index_t ue_index_, du_cell_index_t pcell_index_, rnti_t rnti_, nr_cell_global_id_t nr_cgi_) :
25+
ue_index(ue_index_),
26+
rnti(rnti_),
27+
f1ap_ue_id(int_to_gnb_du_ue_f1ap_id(ue_index_)),
28+
pcell_index(pcell_index_),
29+
nr_cgi(nr_cgi_)
2630
{
2731
}
2832

2933
const du_ue_index_t ue_index;
3034
rnti_t rnti = rnti_t::INVALID_RNTI;
3135
gnb_du_ue_f1ap_id_t f1ap_ue_id;
3236
du_cell_index_t pcell_index;
37+
/// \brief The NR Cell Global Identity of the UE's serving cell.
38+
nr_cell_global_id_t nr_cgi;
3339
};
3440

3541
/// The interface exposes the methods to interact with the state of a DU UE.

lib/du_manager/procedures/ue_configuration_procedure.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,8 @@ async_task<mac_ue_reconfiguration_response> ue_configuration_procedure::update_m
231231
lc_ch.dl_bearer = &bearer.connector.mac_tx_sdu_notifier;
232232
}
233233

234-
// Fetch the DU cell configuration of the primary cell UE is connected to.
235-
const auto& cell_cfg = du_params.ran.cells[ue->pcell_index];
236234
// Create Scheduler UE Reconfig Request that will be embedded in the mac configuration request.
237-
mac_ue_reconf_req.sched_cfg = create_scheduler_ue_config_request(*ue, cell_cfg.nr_cgi.plmn_id);
235+
mac_ue_reconf_req.sched_cfg = create_scheduler_ue_config_request(*ue);
238236

239237
return du_params.mac.ue_cfg.handle_ue_reconfiguration_request(mac_ue_reconf_req);
240238
}

lib/du_manager/procedures/ue_creation_procedure.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ expected<du_ue*, std::string> ue_creation_procedure::create_du_ue_context()
9898
return make_unexpected(ue_res.get_error());
9999
}
100100

101+
// Fetch the DU cell configuration of the primary cell UE is connected to.
102+
const auto& cell_cfg = du_params.ran.cells[req.pcell_index];
101103
// Create the DU UE context.
102-
return ue_mng.add_ue(du_ue_context(req.ue_index, req.pcell_index, req.tc_rnti), std::move(ue_res));
104+
return ue_mng.add_ue(du_ue_context(req.ue_index, req.pcell_index, req.tc_rnti, cell_cfg.nr_cgi), std::move(ue_res));
103105
}
104106

105107
async_task<void> ue_creation_procedure::clear_ue()
@@ -201,10 +203,8 @@ async_task<mac_ue_create_response> ue_creation_procedure::create_mac_ue()
201203
}
202204
mac_ue_create_msg.ul_ccch_msg = not req.ul_ccch_msg.empty() ? &req.ul_ccch_msg : nullptr;
203205

204-
// Fetch the DU cell configuration of the primary cell UE is connected to.
205-
const auto& cell_cfg = du_params.ran.cells[ue_ctx->pcell_index];
206206
// Create Scheduler UE Config Request that will be embedded in the mac UE creation request.
207-
mac_ue_create_msg.sched_cfg = create_scheduler_ue_config_request(*ue_ctx, cell_cfg.nr_cgi.plmn_id);
207+
mac_ue_create_msg.sched_cfg = create_scheduler_ue_config_request(*ue_ctx);
208208

209209
// Request MAC to create new UE.
210210
return du_params.mac.ue_cfg.handle_ue_create_request(mac_ue_create_msg);

0 commit comments

Comments
 (0)