Skip to content

Commit 15e2180

Browse files
andrepuschmanncodebot
authored andcommitted
cu_cp,inter_du_ho: add UE creation in target DU
1 parent 4f9c8d1 commit 15e2180

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/cu_cp/routines/mobility/inter_du_handover_routine.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ void inter_du_handover_routine::operator()(coro_context<async_task<cu_cp_inter_d
4040

4141
logger.debug("ue={}: \"{}\" initialized.", command.source_ue_index, name());
4242

43+
{
44+
// Create UE context for target DU w/o providing RNTI yet.
45+
target_ue = ue_manager.add_ue(command.target_du_index, command.neighbor_pci, {});
46+
if (target_ue == nullptr) {
47+
logger.error("ue={}: \"{}\" failed to generate UE context at target DU.", command.source_ue_index, name());
48+
CORO_EARLY_RETURN(response_msg);
49+
}
50+
}
51+
4352
{
4453
// prepare F1AP UE Context Setup Command and call F1AP notifier of target DU
4554
if (!generate_ue_context_setup_request(
@@ -79,7 +88,7 @@ bool inter_du_handover_routine::generate_ue_context_setup_request(f1ap_ue_contex
7988
const std::map<srb_id_t, cu_srb_context>& srbs,
8089
const std::vector<drb_id_t>& drbs)
8190
{
82-
target_ue_context_setup_request.ue_index = command.source_ue_index;
91+
target_ue_context_setup_request.ue_index = target_ue->get_ue_index();
8392

8493
// TODO: fill SRBs and DRBs to be setup
8594

lib/cu_cp/routines/mobility/inter_du_handover_routine.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class inter_du_handover_routine
4343
const cu_cp_inter_du_handover_request command;
4444

4545
du_ue* source_ue = nullptr; // Pointer to UE in the source DU
46+
du_ue* target_ue = nullptr; // Pointer to UE in target DU
4647

4748
du_processor_f1ap_ue_context_notifier& source_du_f1ap_ue_ctxt_notifier; // to trigger UE context creation at target DU
4849
du_processor_f1ap_ue_context_notifier& target_du_f1ap_ue_ctxt_notifier; // to trigger UE context creation at target DU

0 commit comments

Comments
 (0)