Skip to content

Commit eaf2cf1

Browse files
frankistcodebot
authored andcommitted
cu-cp: remove unused paging code from du_processor_impl
1 parent 375e2fc commit eaf2cf1

File tree

7 files changed

+5
-161
lines changed

7 files changed

+5
-161
lines changed

lib/cu_cp/adapters/du_processor_adapters.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -110,27 +110,6 @@ class du_processor_f1ap_ue_context_adapter : public du_processor_f1ap_ue_context
110110
f1ap_ue_context_manager* handler = nullptr;
111111
};
112112

113-
// Adapter between DU processor and F1AP for Paging
114-
class du_processor_f1ap_paging_adapter : public du_processor_f1ap_paging_notifier
115-
{
116-
public:
117-
du_processor_f1ap_paging_adapter() = default;
118-
119-
void connect_f1(f1ap_paging_manager& handler_) { handler = &handler_; }
120-
121-
void on_paging_message(const cu_cp_paging_message& msg) override
122-
{
123-
if (handler == nullptr) {
124-
srslog::fetch_basic_logger("CU-CP").info("DU not connected - dropping paging message");
125-
return;
126-
}
127-
handler->handle_paging(msg);
128-
}
129-
130-
private:
131-
f1ap_paging_manager* handler = nullptr;
132-
};
133-
134113
// Adapter between DU processor and RRC DU
135114
class du_processor_rrc_du_adapter : public du_processor_rrc_du_ue_notifier
136115
{

lib/cu_cp/du_processor/du_processor.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -222,27 +222,6 @@ class du_processor_cu_cp_notifier
222222
virtual async_task<void> on_transaction_info_loss(const f1_ue_transaction_info_loss_event& ev) = 0;
223223
};
224224

225-
/// DU processor Paging handler.
226-
class du_processor_paging_handler
227-
{
228-
public:
229-
virtual ~du_processor_paging_handler() = default;
230-
231-
/// \brief Handles a Paging message.
232-
virtual void handle_paging_message(cu_cp_paging_message& msg) = 0;
233-
};
234-
235-
/// Interface for the NGAP to interface with the DU repository
236-
/// Useful for paging and handover
237-
class du_repository_ngap_handler
238-
{
239-
public:
240-
virtual ~du_repository_ngap_handler() = default;
241-
242-
/// \brief Handles a Paging message notification.
243-
virtual void handle_paging_message(cu_cp_paging_message& msg) = 0;
244-
};
245-
246225
class du_processor : public du_processor_cell_info_interface
247226
{
248227
public:
@@ -251,7 +230,6 @@ class du_processor : public du_processor_cell_info_interface
251230
/// \brief Retrieve F1AP handler for the respective DU.
252231
virtual f1ap_cu& get_f1ap_handler() = 0;
253232

254-
virtual du_processor_paging_handler& get_paging_handler() = 0;
255233
virtual du_processor_mobility_handler& get_mobility_handler() = 0;
256234

257235
/// \brief Get the F1AP message handler interface of the DU processor object.

lib/cu_cp/du_processor/du_processor_impl.cpp

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,6 @@ du_setup_result du_processor_impl::handle_du_setup_request(const du_setup_reques
135135
return res;
136136
}
137137

138-
const du_configuration_context& du_config = cfg.du_cfg_hdlr->get_context();
139-
for (const du_cell_configuration& cell : du_config.served_cells) {
140-
// Add cell to lookup
141-
if (tac_to_nr_cgi.find(cell.tac) == tac_to_nr_cgi.end()) {
142-
tac_to_nr_cgi.emplace(cell.tac, std::vector<nr_cell_global_id_t>{cell.cgi});
143-
} else {
144-
tac_to_nr_cgi.at(cell.tac).push_back(cell.cgi);
145-
}
146-
}
147-
148-
// connect paging f1ap paging adapter
149-
f1ap_paging_notifier.connect_f1(f1ap->get_f1ap_paging_manager());
150-
151138
// Prepare DU response with accepted setup.
152139
auto& accepted = res.result.emplace<du_setup_result::accepted>();
153140
accepted.gnb_cu_name = cfg.cu_cp_cfg.node.ran_node_name;
@@ -287,88 +274,6 @@ void du_processor_impl::handle_du_initiated_ue_context_release_request(const f1a
287274
}));
288275
}
289276

290-
void du_processor_impl::handle_paging_message(cu_cp_paging_message& msg)
291-
{
292-
// Add assist data for paging
293-
// This will go through all tai items in the paging message and add the related NR CGI to the assist data for paging
294-
// if it doesn't exist yet.
295-
// This way the F1AP will always receive messages with the assist data for paging set.
296-
297-
bool nr_cgi_for_tac_found = false;
298-
299-
for (const auto& tai_list_item : msg.tai_list_for_paging) {
300-
if (tac_to_nr_cgi.find(tai_list_item.tai.tac) == tac_to_nr_cgi.end()) {
301-
logger.debug("Could not find nr cgi for tac={}", tai_list_item.tai.tac);
302-
continue;
303-
}
304-
305-
nr_cgi_for_tac_found = true;
306-
307-
for (const auto& cgi : tac_to_nr_cgi.at(tai_list_item.tai.tac)) {
308-
// Setup recommended cell item to add in case it doesn't exist
309-
cu_cp_recommended_cell_item cell_item;
310-
cell_item.ngran_cgi = cgi;
311-
312-
// Check if assist data for paging is already present
313-
if (msg.assist_data_for_paging.has_value()) {
314-
// Check if assist data for recommended cells is already present
315-
if (msg.assist_data_for_paging.value().assist_data_for_recommended_cells.has_value()) {
316-
// Check if recommended cell list already contains values
317-
if (!msg.assist_data_for_paging.value()
318-
.assist_data_for_recommended_cells.value()
319-
.recommended_cells_for_paging.recommended_cell_list.empty()) {
320-
// Check if NR CGI already present
321-
bool is_present = false;
322-
for (const auto& present_cell_item : msg.assist_data_for_paging.value()
323-
.assist_data_for_recommended_cells.value()
324-
.recommended_cells_for_paging.recommended_cell_list) {
325-
if (present_cell_item.ngran_cgi.nci == cgi.nci) {
326-
is_present = true;
327-
continue;
328-
}
329-
}
330-
if (is_present) {
331-
// NR CGI for TAC is already present
332-
continue;
333-
}
334-
}
335-
336-
// NR CGI for TAC is not present so we add it
337-
msg.assist_data_for_paging.value()
338-
.assist_data_for_recommended_cells.value()
339-
.recommended_cells_for_paging.recommended_cell_list.push_back(cell_item);
340-
} else {
341-
// Assist data for recommended cells is not present, we need to add it
342-
cu_cp_assist_data_for_recommended_cells assist_data_for_recommended_cells;
343-
assist_data_for_recommended_cells.recommended_cells_for_paging.recommended_cell_list.push_back(cell_item);
344-
345-
msg.assist_data_for_paging.value().assist_data_for_recommended_cells = assist_data_for_recommended_cells;
346-
}
347-
} else {
348-
// Assist data for paging is not present, we need to add it
349-
cu_cp_assist_data_for_paging assist_data_for_paging;
350-
351-
// Add assist data for recommended cells
352-
cu_cp_assist_data_for_recommended_cells assist_data_for_recommended_cells;
353-
// Add cell item
354-
assist_data_for_recommended_cells.recommended_cells_for_paging.recommended_cell_list.push_back(cell_item);
355-
356-
assist_data_for_paging.assist_data_for_recommended_cells = assist_data_for_recommended_cells;
357-
358-
msg.assist_data_for_paging = assist_data_for_paging;
359-
}
360-
}
361-
}
362-
363-
// If not nr cgi for a tac from the paging message is found paging message is not forwarded to DU
364-
if (!nr_cgi_for_tac_found) {
365-
logger.info("du_index={}: No NR CGI for paging TACs available at this DU", cfg.du_index);
366-
return;
367-
}
368-
369-
f1ap_paging_notifier.on_paging_message(msg);
370-
}
371-
372277
bool du_processor_impl::has_cell(pci_t pci)
373278
{
374279
return cfg.du_cfg_hdlr->get_context().find_cell(pci) != nullptr;

lib/cu_cp/du_processor/du_processor_impl.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727
namespace srsran {
2828
namespace srs_cu_cp {
2929

30-
class du_processor_impl : public du_processor,
31-
public du_metrics_handler,
32-
public du_processor_paging_handler,
33-
public du_processor_mobility_handler
30+
class du_processor_impl : public du_processor, public du_metrics_handler, public du_processor_mobility_handler
3431
{
3532
public:
3633
du_processor_impl(du_processor_config_t du_processor_config_,
@@ -53,17 +50,13 @@ class du_processor_impl : public du_processor,
5350
std::optional<nr_cell_global_id_t> get_cgi(pci_t pci) override;
5451
byte_buffer get_packed_sib1(nr_cell_global_id_t cgi) override;
5552

56-
// du_processor paging handler
57-
void handle_paging_message(cu_cp_paging_message& msg) override;
58-
5953
// du_processor_cell_info_interface
6054
bool has_cell(pci_t pci) override;
6155
bool has_cell(nr_cell_global_id_t cgi) override;
6256
const du_configuration_context& get_context() const override { return cfg.du_cfg_hdlr->get_context(); }
6357

6458
metrics_report::du_info handle_du_metrics_report_request() const override;
6559

66-
du_processor_paging_handler& get_paging_handler() override { return *this; }
6760
du_processor_mobility_handler& get_mobility_handler() override { return *this; }
6861
du_processor_f1ap_ue_context_notifier& get_f1ap_ue_context_notifier() override { return f1ap_ue_context_notifier; }
6962
du_metrics_handler& get_metrics_handler() override { return *this; }
@@ -100,13 +93,10 @@ class du_processor_impl : public du_processor,
10093
rrc_ue_nas_notifier& rrc_ue_nas_pdu_notifier;
10194
ue_manager& ue_mng;
10295
du_processor_f1ap_ue_context_adapter f1ap_ue_context_notifier;
103-
du_processor_f1ap_paging_adapter f1ap_paging_notifier;
10496

10597
// F1AP to DU processor adapter
10698
std::unique_ptr<f1ap_du_processor_notifier> f1ap_ev_notifier;
10799

108-
std::map<uint32_t, std::vector<nr_cell_global_id_t>> tac_to_nr_cgi;
109-
110100
// F1AP to RRC UE adapters
111101
std::unordered_map<ue_index_t, f1ap_rrc_ue_adapter> f1ap_rrc_ue_adapters;
112102

lib/cu_cp/du_processor/du_processor_repository.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,6 @@ du_processor& du_processor_repository::get_du_processor(du_index_t du_index)
133133
return *du_db.at(du_index).processor;
134134
}
135135

136-
void du_processor_repository::handle_paging_message(cu_cp_paging_message& msg)
137-
{
138-
// Forward paging message to all DU processors
139-
for (auto& du : du_db) {
140-
du.second.processor->get_paging_handler().handle_paging_message(msg);
141-
}
142-
}
143-
144136
std::vector<metrics_report::du_info> du_processor_repository::handle_du_metrics_report_request() const
145137
{
146138
std::vector<metrics_report::du_info> du_reports;

lib/cu_cp/du_processor/du_processor_repository.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct du_repository_config {
4242
srslog::basic_logger& logger;
4343
};
4444

45-
class du_processor_repository : public du_repository_ngap_handler, public du_repository_metrics_handler
45+
class du_processor_repository : public du_repository_metrics_handler
4646
{
4747
public:
4848
explicit du_processor_repository(du_repository_config cfg_);
@@ -59,8 +59,6 @@ class du_processor_repository : public du_repository_ngap_handler, public du_rep
5959

6060
du_processor& get_du_processor(du_index_t du_index);
6161

62-
void handle_paging_message(cu_cp_paging_message& msg) override;
63-
6462
std::vector<metrics_report::du_info> handle_du_metrics_report_request() const override;
6563

6664
size_t get_nof_f1ap_ues();

lib/cu_cp/paging/paging_message_handler.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#pragma once
1212

1313
#include "srsran/cu_cp/cu_cp_types.h"
14+
#include "srsran/srslog/logger.h"
1415

1516
namespace srsran {
1617
namespace srs_cu_cp {
@@ -24,6 +25,7 @@ class paging_message_handler
2425
public:
2526
paging_message_handler(du_processor_repository& dus_);
2627

28+
/// Handle Paging message sent by the core network and distribute across the served DU cells.
2729
void handle_paging_message(const cu_cp_paging_message& msg);
2830

2931
private:
@@ -34,4 +36,4 @@ class paging_message_handler
3436
};
3537

3638
} // namespace srs_cu_cp
37-
} // namespace srsran
39+
} // namespace srsran

0 commit comments

Comments
 (0)