Skip to content

Commit

Permalink
cu_cp: add console output for failed du/cu-up connections and failed …
Browse files Browse the repository at this point in the history
…ue creations
  • Loading branch information
FabianEckermann authored and codebot committed Sep 6, 2024
1 parent ac29087 commit dd46594
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lib/cu_cp/cu_up_processor/cu_up_processor_repository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ cu_up_index_t cu_up_processor_repository::add_cu_up(std::unique_ptr<e1ap_message
{
cu_up_index_t cu_up_index = allocate_cu_up_index();
if (cu_up_index == cu_up_index_t::invalid) {
logger.warning("CU-UP connection failed - maximum number of CU-UPs connected ({})",
logger.warning("CU-UP connection failed. Cause: Maximum number of CU-UPs connected ({})",
cfg.cu_cp.admission.max_nof_cu_ups);
fmt::print(
"CU-UP connection failed. Cause: Maximum number of CU-UPs connected ({}). To increase the number of allowed "
"CU-UPs change the \"--max_nof_cu_ups\" in the CU-CP configuration\n",
cfg.cu_cp.admission.max_nof_cu_ups);
return cu_up_index_t::invalid;
}

Expand Down
6 changes: 5 additions & 1 deletion lib/cu_cp/du_processor/du_processor_repository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ du_index_t du_processor_repository::add_du(std::unique_ptr<f1ap_message_notifier
{
du_index_t du_index = get_next_du_index();
if (du_index == du_index_t::invalid) {
logger.warning("DU connection failed - maximum number of DUs connected ({})", cfg.cu_cp.admission.max_nof_dus);
logger.warning("DU connection failed. Cause: Maximum number of DUs connected ({})",
cfg.cu_cp.admission.max_nof_dus);
fmt::print("DU connection failed. Cause: Maximum number of DUs connected ({}). To increase the number of allowed "
"DUs change the \"--max_nof_dus\" in the CU-CP configuration\n",
cfg.cu_cp.admission.max_nof_dus);
return du_index_t::invalid;
}

Expand Down
9 changes: 7 additions & 2 deletions lib/cu_cp/ue_manager/ue_manager_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ ue_index_t ue_manager::add_ue(du_index_t du_index,
}

if (ues.size() == max_nof_ues) {
logger.warning("CU-CP UE creation Failed. Cause: Maximum number of UEs {} supported by the CU-CP has been reached",
max_nof_ues);
logger.warning(
"CU-CP UE creation Failed. Cause: Maximum number of UEs supported by the CU-CP ({}) has been reached",
max_nof_ues);
fmt::print("CU-CP UE creation failed. Cause: Maximum number of UEs supported by the CU-CP ({}) has been reached. "
"To increase the number of supported "
"UEs change the \"--max_nof_ues\" in the CU-CP configuration\n",
max_nof_ues);
return ue_index_t::invalid;
}

Expand Down

0 comments on commit dd46594

Please sign in to comment.