Skip to content

Commit 24e4ed4

Browse files
FabianEckermanncodebot
authored andcommitted
cu_cp,ngap,du_processor,f1ap: Add rrc release container to f1ap ue context release command
1 parent 4f736ad commit 24e4ed4

File tree

15 files changed

+43
-33
lines changed

15 files changed

+43
-33
lines changed

include/srsran/cu_cp/cu_cp_types.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,17 @@ struct cu_cp_ue_capability_transfer_request {
656656
// Empty for now but should include ratType and capabilityRequestFilter, etc.
657657
};
658658

659-
struct cu_cp_ue_context_release_command {
659+
struct cu_cp_ngap_ue_context_release_command {
660660
ue_index_t ue_index = ue_index_t::invalid;
661661
cause_t cause = cause_t::nulltype;
662662
};
663663

664+
struct cu_cp_ue_context_release_command {
665+
ue_index_t ue_index = ue_index_t::invalid;
666+
cause_t cause = cause_t::nulltype;
667+
byte_buffer rrc_release_pdu;
668+
};
669+
664670
struct cu_cp_ue_context_release_request {
665671
ue_index_t ue_index = ue_index_t::invalid;
666672
std::vector<pdu_session_id_t> pdu_session_res_list_cxt_rel_req;

include/srsran/cu_cp/du_processor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class du_processor_ngap_interface
224224
/// \brief Handle a UE Context Release Command.
225225
/// \param[in] cmd The UE Context Release Command.
226226
virtual cu_cp_ue_context_release_complete
227-
handle_new_ue_context_release_command(const cu_cp_ue_context_release_command& cmd) = 0;
227+
handle_new_ue_context_release_command(const cu_cp_ngap_ue_context_release_command& cmd) = 0;
228228
};
229229

230230
/// Interface to notify the NGAP about control messages.

include/srsran/f1ap/cu_cp/f1ap_cu.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
#include "../common/f1ap_types.h"
1414
#include "srsran/adt/byte_buffer.h"
15-
#include "srsran/adt/expected.h"
16-
#include "srsran/asn1/f1ap/f1ap.h"
1715
#include "srsran/cu_cp/cu_cp_types.h"
1816
#include "srsran/f1ap/common/f1ap_common.h"
1917
#include "srsran/f1ap/cu_cp/f1ap_cu_ue_context_update.h"
@@ -62,8 +60,9 @@ class f1ap_connection_manager
6260
};
6361

6462
struct f1ap_ue_context_release_command {
65-
ue_index_t ue_index = ue_index_t::invalid;
66-
cause_t cause;
63+
ue_index_t ue_index = ue_index_t::invalid;
64+
cause_t cause;
65+
byte_buffer rrc_release_pdu;
6766
};
6867

6968
struct f1ap_ue_context_release_complete {

include/srsran/ngap/ngap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class ngap_du_processor_control_notifier
197197
/// \param[in] command the UE Context Release Command.
198198
/// \returns The UE Context Release Complete.
199199
virtual cu_cp_ue_context_release_complete
200-
on_new_ue_context_release_command(cu_cp_ue_context_release_command& command) = 0;
200+
on_new_ue_context_release_command(const cu_cp_ngap_ue_context_release_command& command) = 0;
201201
};
202202

203203
/// Interface to control the NGAP.

include/srsran/rrc/rrc_ue.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
#pragma once
1212

1313
#include "rrc_cell_context.h"
14-
#include "srsran/adt/bounded_bitset.h"
1514
#include "srsran/adt/byte_buffer.h"
16-
#include "srsran/asn1/rrc_nr/rrc_nr.h"
1715
#include "srsran/cu_cp/cu_cp_types.h"
1816
#include "srsran/cu_cp/up_resource_manager.h"
1917
#include "srsran/rrc/rrc.h"

lib/cu_cp/adapters/ngap_adapters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class ngap_du_processor_adapter : public ngap_du_processor_control_notifier
171171
}
172172

173173
cu_cp_ue_context_release_complete
174-
on_new_ue_context_release_command(cu_cp_ue_context_release_command& command) override
174+
on_new_ue_context_release_command(const cu_cp_ngap_ue_context_release_command& command) override
175175
{
176176
srsran_assert(du_processor_ngap_handler != nullptr, "DU Processor handler must not be nullptr");
177177

lib/cu_cp/du_processor_impl.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ du_processor_impl::handle_new_pdu_session_resource_release_command(
446446
}
447447

448448
cu_cp_ue_context_release_complete
449-
du_processor_impl::handle_new_ue_context_release_command(const cu_cp_ue_context_release_command& cmd)
449+
du_processor_impl::handle_new_ue_context_release_command(const cu_cp_ngap_ue_context_release_command& cmd)
450450
{
451451
du_ue* ue = ue_manager.find_du_ue(cmd.ue_index);
452452
srsran_assert(ue != nullptr, "Could not find DU UE");
@@ -460,7 +460,13 @@ du_processor_impl::handle_new_ue_context_release_command(const cu_cp_ue_context_
460460
rrc_ue_release_context release_context = ue->get_rrc_ue_notifier().get_rrc_ue_release_context();
461461
release_complete.user_location_info = release_context.user_location_info;
462462

463-
handle_ue_context_release_command(cmd);
463+
// Create release command from NGAP UE context release command
464+
cu_cp_ue_context_release_command release_command;
465+
release_command.ue_index = cmd.ue_index;
466+
release_command.cause = cmd.cause;
467+
release_command.rrc_release_pdu = release_context.rrc_release_pdu.copy();
468+
469+
handle_ue_context_release_command(release_command);
464470

465471
return release_complete;
466472
}

lib/cu_cp/du_processor_impl.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include "adapters/f1ap_adapters.h"
1515
#include "adapters/rrc_ue_adapters.h"
1616
#include "routine_managers/du_processor_routine_manager.h"
17-
#include "ue_manager_impl.h"
18-
#include "srsran/asn1/rrc_nr/rrc_nr.h"
1917
#include "srsran/cu_cp/cu_cp_types.h"
2018
#include "srsran/cu_cp/du_processor_config.h"
2119
#include "srsran/f1ap/cu_cp/f1ap_cu.h"
@@ -78,7 +76,7 @@ class du_processor_impl : public du_processor_interface
7876
async_task<cu_cp_pdu_session_resource_release_response>
7977
handle_new_pdu_session_resource_release_command(const cu_cp_pdu_session_resource_release_command& msg) override;
8078
cu_cp_ue_context_release_complete
81-
handle_new_ue_context_release_command(const cu_cp_ue_context_release_command& cmd) override;
79+
handle_new_ue_context_release_command(const cu_cp_ngap_ue_context_release_command& cmd) override;
8280

8381
// du_processor paging handler
8482
void handle_paging_message(cu_cp_paging_message& msg) override;

lib/cu_cp/routines/ue_context_release_routine.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ void ue_context_release_routine::operator()(coro_context<async_task<void>>& ctx)
4949

5050
{
5151
// prepare F1AP UE Context Release Command and call F1AP notifier
52-
f1ap_ue_context_release_cmd.ue_index = command.ue_index;
53-
f1ap_ue_context_release_cmd.cause = command.cause;
52+
f1ap_ue_context_release_cmd.ue_index = command.ue_index;
53+
f1ap_ue_context_release_cmd.cause = command.cause;
54+
f1ap_ue_context_release_cmd.rrc_release_pdu = command.rrc_release_pdu.copy();
5455

5556
CORO_AWAIT_VALUE(f1ap_ue_context_release_result,
5657
f1ap_ue_ctxt_notifier.on_ue_context_release_command(f1ap_ue_context_release_cmd));

lib/f1ap/cu_cp/procedures/ue_context_release_procedure.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ ue_context_release_procedure::ue_context_release_procedure(f1ap_ue_context_list&
2424
command->gnb_cu_ue_f1ap_id.value = gnb_cu_ue_f1ap_id_to_uint(ue_ctxt.cu_ue_f1ap_id);
2525
command->gnb_du_ue_f1ap_id.value = gnb_du_ue_f1ap_id_to_uint(ue_ctxt.du_ue_f1ap_id);
2626
command->cause.value = cause_to_f1ap_cause(cmd_.cause);
27+
if (!cmd_.rrc_release_pdu.empty()) {
28+
command->rrc_container_present = true;
29+
command->rrc_container.value = cmd_.rrc_release_pdu.copy();
30+
}
2731
}
2832

2933
void ue_context_release_procedure::operator()(coro_context<async_task<ue_index_t>>& ctx)

0 commit comments

Comments
 (0)