Skip to content

Commit

Permalink
du: Small log fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianEckermann authored and asaezper committed Dec 22, 2023
1 parent defc575 commit 5efe741
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
13 changes: 5 additions & 8 deletions lib/du_manager/procedures/ue_configuration_procedure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void ue_configuration_procedure::update_ue_context()
// Note: This DRB pointer will remain valid and accessible from other layers until we update the latter.
for (const drb_id_t& drb_to_rem : request.drbs_to_rem) {
if (ue->bearers.drbs().count(drb_to_rem) == 0) {
proc_logger.log_proc_warning("Failed to release DRB-Id={}. Cause: DRB does not exist", drb_to_rem);
proc_logger.log_proc_warning("Failed to release {}. Cause: DRB does not exist", drb_to_rem);
continue;
}
srsran_assert(std::any_of(prev_cell_group.rlc_bearers.begin(),
Expand All @@ -128,13 +128,11 @@ void ue_configuration_procedure::update_ue_context()
// > Create DU UE DRB objects.
for (const f1ap_drb_to_setup& drbtoadd : request.drbs_to_setup) {
if (drbtoadd.uluptnl_info_list.empty()) {
proc_logger.log_proc_warning("Failed to create DRB-Id={}. Cause: No UL UP TNL Info List provided.",
drbtoadd.drb_id);
proc_logger.log_proc_warning("Failed to create {}. Cause: No UL UP TNL Info List provided.", drbtoadd.drb_id);
continue;
}
if (ue->bearers.drbs().count(drbtoadd.drb_id) > 0) {
proc_logger.log_proc_warning("Failed to modify DRB-Id={}. Cause: DRB modifications not supported.",
drbtoadd.drb_id);
proc_logger.log_proc_warning("Failed to modify {}. Cause: DRB modifications not supported.", drbtoadd.drb_id);
continue;
}

Expand All @@ -146,7 +144,7 @@ void ue_configuration_procedure::update_ue_context()

// Find the F1-U configuration for this DRB.
auto f1u_cfg_it = du_params.ran.qos.find(drbtoadd.five_qi);
srsran_assert(f1u_cfg_it != du_params.ran.qos.end(), "Undefined F1-U bearer config for 5QI={}", drbtoadd.five_qi);
srsran_assert(f1u_cfg_it != du_params.ran.qos.end(), "Undefined F1-U bearer config for {}", drbtoadd.five_qi);

// Create DU DRB instance.
std::unique_ptr<du_ue_drb> drb = create_drb(ue->ue_index,
Expand All @@ -161,8 +159,7 @@ void ue_configuration_procedure::update_ue_context()
du_params,
ue->get_rlc_rlf_notifier());
if (drb == nullptr) {
proc_logger.log_proc_warning("Failed to create DRB-Id={}. Cause: Failed to allocate DU UE resources.",
drbtoadd.drb_id);
proc_logger.log_proc_warning("Failed to create {}. Cause: Failed to allocate DU UE resources.", drbtoadd.drb_id);
continue;
}
ue->bearers.add_drb(std::move(drb));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,27 +153,27 @@ du_ran_resource_manager_impl::update_context(du_ue_index_t
if (std::any_of(ue_mcg.rlc_bearers.begin(), ue_mcg.rlc_bearers.end(), [&drb](const auto& item) {
return *drb.lcid == item.lcid;
})) {
logger.warning("Failed to allocate DRB-Id={}. Cause: Specified lcid={} already exists", drb.drb_id, lcid);
logger.warning("Failed to allocate {}. Cause: Specified lcid={} already exists", drb.drb_id, lcid);
resp.failed_drbs.push_back(drb.drb_id);
continue;
}
} else {
// >> Allocate LCID if not specified by F1AP.
lcid = find_empty_lcid(ue_mcg.rlc_bearers);
if (lcid > LCID_MAX_DRB) {
logger.warning("Failed to allocate DRB-Id={}. Cause: No available LCIDs", drb.drb_id);
logger.warning("Failed to allocate {}. Cause: No available LCIDs", drb.drb_id);
resp.failed_drbs.push_back(drb.drb_id);
continue;
}
}

// >> Get RLC config from 5QI
if (qos_config.find(drb.five_qi) == qos_config.end()) {
logger.warning("Failed to allocate DRB-Id={}. Cause: No 5QI={} configured", drb.drb_id, drb.five_qi);
logger.warning("Failed to allocate {}. Cause: No {} configured", drb.drb_id, drb.five_qi);
resp.failed_drbs.push_back(drb.drb_id);
continue;
}
logger.debug("Getting RLC and MAC config for DRB-Id={} from 5QI={}", drb.drb_id, drb.five_qi);
logger.debug("Getting RLC and MAC config for {} from {}", drb.drb_id, drb.five_qi);
const du_qos_config& qos = qos_config.at(drb.five_qi);

ue_mcg.rlc_bearers.emplace_back();
Expand Down

0 comments on commit 5efe741

Please sign in to comment.