Skip to content

Commit 8e13f69

Browse files
FabianEckermannFabian Eckermann
authored andcommitted
cu_cp: Release drbs at cu-up first
1 parent 662e699 commit 8e13f69

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

lib/cu_cp/routines/pdu_session_resource_release_routine.cpp

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,8 @@ void pdu_session_resource_release_routine::operator()(
5050
next_config = rrc_ue_up_resource_manager.calculate_update(release_cmd);
5151
}
5252

53-
// Release DRB resources at DU
54-
{
55-
// prepare UeContextModificationRequest and call F1 notifier
56-
ue_context_mod_request.ue_index = release_cmd.ue_index;
57-
for (const auto& drb_id : next_config.drb_to_remove_list) {
58-
ue_context_mod_request.drbs_to_be_released_list.push_back(drb_id);
59-
}
60-
61-
CORO_AWAIT_VALUE(ue_context_modification_response,
62-
f1ap_ue_ctxt_notifier.on_ue_context_modification_request(ue_context_mod_request));
63-
64-
// Handle UE Context Modification Response
65-
if (not ue_context_modification_response.success) {
66-
logger.error("ue={}: \"{}\" failed to modify UE context at DU.", release_cmd.ue_index, name());
67-
}
68-
}
69-
7053
// Inform CU-UP about the release of a bearer
54+
// Note: The Bearers must be released at CU-UP before the DRBs are released at DU.
7155
if (next_config.context_removal_required) {
7256
// Remove bearer context.
7357
bearer_context_release_command.ue_index = release_cmd.ue_index;
@@ -98,6 +82,23 @@ void pdu_session_resource_release_routine::operator()(
9882
}
9983
}
10084

85+
// Release DRB resources at DU
86+
{
87+
// prepare UeContextModificationRequest and call F1 notifier
88+
ue_context_mod_request.ue_index = release_cmd.ue_index;
89+
for (const auto& drb_id : next_config.drb_to_remove_list) {
90+
ue_context_mod_request.drbs_to_be_released_list.push_back(drb_id);
91+
}
92+
93+
CORO_AWAIT_VALUE(ue_context_modification_response,
94+
f1ap_ue_ctxt_notifier.on_ue_context_modification_request(ue_context_mod_request));
95+
96+
// Handle UE Context Modification Response
97+
if (not ue_context_modification_response.success) {
98+
logger.error("ue={}: \"{}\" failed to modify UE context at DU.", release_cmd.ue_index, name());
99+
}
100+
}
101+
101102
CORO_RETURN(generate_pdu_session_resource_release_response(true));
102103
}
103104

0 commit comments

Comments
 (0)