Skip to content

Commit a159503

Browse files
author
codebot
committed
Update main
# Conflicts: # tests/unittests/phy/upper/channel_processors/pucch_detector_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/srs/srs_estimator_test_data.tar.gz
2 parents 1483bda + 2c979f5 commit a159503

File tree

193 files changed

+5998
-2233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+5998
-2233
lines changed

apps/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020

2121
add_subdirectory(examples)
2222
add_subdirectory(gnb)
23-
add_subdirectory(modules)
23+
add_subdirectory(units)
2424
add_subdirectory(services)

apps/gnb/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ target_link_libraries(gnb
4848
srsran_version
4949
srsran_build_info
5050
srsran_flexible_du_ru_dynamic
51+
srsran_cu_cp_app_unit
5152
)
5253

5354
if (DPDK_FOUND)

apps/gnb/gnb.cpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#include "apps/services/metrics_hub.h"
5757
#include "apps/services/rlc_metrics_plotter_json.h"
5858

59-
#include "apps/modules/flexible_du/split_ru_dynamic/dynamic_du_factory.h"
59+
#include "apps/units/flexible_du/split_ru_dynamic/dynamic_du_factory.h"
6060
#include "srsran/phy/upper/upper_phy_timing_notifier.h"
6161

6262
#include "srsran/ru/ru_adapters.h"
@@ -67,16 +67,18 @@
6767

6868
#include "apps/gnb/adapters/e2_gateway_remote_connector.h"
6969
#include "apps/services/e2_metric_connector_manager.h"
70+
#include "apps/units/cu_cp/cu_cp_logger_registrator.h"
71+
#include "apps/units/cu_cp/cu_cp_unit_config_cli11_schema.h"
72+
#include "apps/units/cu_cp/cu_cp_unit_config_validator.h"
7073
#include "srsran/support/sysinfo.h"
7174

7275
#include <atomic>
7376

74-
#include "../modules/cu_cp/logger_registrator.h"
75-
#include "../modules/cu_cp/pcap_factory.h"
76-
#include "../modules/cu_up/logger_registrator.h"
77-
#include "../modules/cu_up/pcap_factory.h"
78-
#include "../modules/flexible_du/du_high/pcap_factory.h"
79-
#include "../modules/flexible_du/split_ru_dynamic/logger_registrator.h"
77+
#include "../units/cu_cp/pcap_factory.h"
78+
#include "../units/cu_up/logger_registrator.h"
79+
#include "../units/cu_up/pcap_factory.h"
80+
#include "../units/flexible_du/du_high/pcap_factory.h"
81+
#include "../units/flexible_du/split_ru_dynamic/logger_registrator.h"
8082

8183
#ifdef DPDK_FOUND
8284
#include "srsran/hal/dpdk/dpdk_eal_factory.h"
@@ -202,7 +204,6 @@ static void register_app_logs(const log_appconfig& log_cfg)
202204
e2ap_logger.set_hex_dump_max_size(log_cfg.hex_max_size);
203205

204206
// Register the loggers of the modules.
205-
modules::cu_cp::register_logs(log_cfg);
206207
modules::cu_up::register_logs(log_cfg);
207208
modules::flexible_du::split_ru_dynamic::register_logs(log_cfg);
208209
}
@@ -226,6 +227,9 @@ int main(int argc, char** argv)
226227
// Configure CLI11 with the gNB application configuration schema.
227228
configure_cli11_with_gnb_appconfig_schema(app, gnb_parsed_cfg);
228229

230+
cu_cp_unit_config cu_cp_config;
231+
configure_cli11_with_cu_cp_unit_config_schema(app, cu_cp_config);
232+
229233
// Parse arguments.
230234
CLI11_PARSE(app, argc, argv);
231235

@@ -235,13 +239,14 @@ int main(int argc, char** argv)
235239
derive_auto_params(gnb_cfg);
236240

237241
// Check the modified configuration.
238-
if (!validate_appconfig(gnb_cfg)) {
242+
if (!validate_appconfig(gnb_cfg) || !validate_cu_cp_unit_config(cu_cp_config)) {
239243
report_error("Invalid configuration detected.\n");
240244
}
241245

242246
// Set up logging.
243247
initialize_log(gnb_cfg.log_cfg.filename);
244248
register_app_logs(gnb_cfg.log_cfg);
249+
register_loggers(cu_cp_config.loggers);
245250

246251
srslog::basic_logger& gnb_logger = srslog::fetch_basic_logger("GNB");
247252
if (not gnb_cfg.log_cfg.tracing_filename.empty()) {
@@ -357,7 +362,7 @@ int main(int argc, char** argv)
357362
e2_gateway_remote_connector e2_gw{*epoll_broker, e2_du_nw_config, *e2ap_p};
358363

359364
// Create CU-CP config.
360-
srs_cu_cp::cu_cp_configuration cu_cp_cfg = generate_cu_cp_config(gnb_cfg);
365+
srs_cu_cp::cu_cp_configuration cu_cp_cfg = generate_cu_cp_config(gnb_cfg, cu_cp_config);
361366
cu_cp_cfg.cu_cp_executor = workers.cu_cp_exec;
362367
cu_cp_cfg.cu_cp_e2_exec = workers.cu_cp_e2_exec;
363368
cu_cp_cfg.ngap_notifier = ngap_adapter.get();

apps/gnb/gnb_appconfig.h

Lines changed: 15 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "srsran/ran/pucch/pucch_configuration.h"
4242
#include "srsran/ran/pusch/pusch_mcs.h"
4343
#include "srsran/ran/rnti.h"
44-
#include "srsran/ran/s_nssai.h"
4544
#include "srsran/ran/sib/system_info_config.h"
4645
#include "srsran/ran/slot_pdu_capacity_constants.h"
4746
#include "srsran/ran/subcarrier_spacing.h"
@@ -185,10 +184,14 @@ struct pdsch_appconfig {
185184
std::vector<unsigned> rv_sequence = {0, 2, 3, 1};
186185
/// MCS table to use for PDSCH
187186
pdsch_mcs_table mcs_table = pdsch_mcs_table::qam64;
188-
/// Minimum number of RBs for Resource Allocation of UE PDSCHs.
187+
/// Minimum number of RBs for resource allocation of UE PDSCHs.
189188
unsigned min_rb_size = 1;
190-
/// Maximum number of RBs for Resource Allocation of UE PDSCHs.
189+
/// Maximum number of RBs for resource allocation of UE PDSCHs.
191190
unsigned max_rb_size = MAX_NOF_PRBS;
191+
/// Start RB for resource allocation of UE PDSCHs.
192+
unsigned start_rb = 0;
193+
/// End RB for resource allocation of UE PDSCHs.
194+
unsigned end_rb = MAX_NOF_PRBS;
192195
/// Maximum number of PDSCH grants per slot.
193196
unsigned max_pdschs_per_slot = MAX_PDSCH_PDUS_PER_SLOT;
194197
/// Maximum number of DL or UL PDCCH allocation attempts per slot.
@@ -271,6 +274,14 @@ struct pusch_appconfig {
271274
float olla_max_snr_offset{5.0};
272275
/// Position for additional DM-RS in UL (see TS 38.211, clause 6.4.1.1.3).
273276
unsigned dmrs_add_pos{2};
277+
/// Minimum number of RBs for resource allocation of UE PUSCHs.
278+
unsigned min_rb_size = 1;
279+
/// Maximum number of RBs for resource allocation of UE PUSCHs.
280+
unsigned max_rb_size = MAX_NOF_PRBS;
281+
/// Start RB for resource allocation of UE PUSCHs.
282+
unsigned start_rb = 0;
283+
/// End RB for resource allocation of UE PUSCHs.
284+
unsigned end_rb = MAX_NOF_PRBS;
274285
};
275286

276287
struct pucch_appconfig {
@@ -650,6 +661,7 @@ struct amf_appconfig {
650661
std::string n2_bind_interface = "auto";
651662
std::string n3_bind_addr = "auto";
652663
std::string n3_bind_interface = "auto";
664+
std::string n3_ext_addr = "auto";
653665
int sctp_rto_initial = 120;
654666
int sctp_rto_min = 120;
655667
int sctp_rto_max = 500;
@@ -675,81 +687,6 @@ struct e2_appconfig {
675687
bool e2sm_rc_enabled = false; ///< Whether to enable RC service module
676688
};
677689

678-
struct cu_cp_neighbor_cell_appconfig_item {
679-
uint64_t nr_cell_id; ///< Cell id.
680-
std::vector<uint64_t> report_cfg_ids; ///< Report config ids
681-
};
682-
683-
/// \brief Each item describes the relationship between one cell to all other cells.
684-
struct cu_cp_cell_appconfig_item {
685-
uint64_t nr_cell_id; ///< Cell id.
686-
optional<unsigned> periodic_report_cfg_id;
687-
688-
// These parameters must only be set for external cells
689-
// TODO: Add optional SSB parameters.
690-
optional<unsigned> gnb_id_bit_length; ///< gNodeB identifier bit length.
691-
optional<pci_t> pci; ///< PCI.
692-
optional<nr_band> band; ///< NR band.
693-
optional<unsigned> ssb_arfcn; ///< SSB ARFCN.
694-
optional<unsigned> ssb_scs; ///< SSB subcarrier spacing.
695-
optional<unsigned> ssb_period; ///< SSB period.
696-
optional<unsigned> ssb_offset; ///< SSB offset.
697-
optional<unsigned> ssb_duration; ///< SSB duration.
698-
699-
std::vector<cu_cp_neighbor_cell_appconfig_item> ncells; ///< Vector of cells that are a neighbor of this cell.
700-
};
701-
702-
/// \brief Report configuration, for now only supporting the A3 event.
703-
struct cu_cp_report_appconfig {
704-
unsigned report_cfg_id;
705-
std::string report_type;
706-
optional<unsigned> report_interval_ms;
707-
std::string a3_report_type;
708-
optional<int> a3_offset_db; ///< [-30..30] Note the actual value is field value * 0.5 dB. E.g. putting a value of -6
709-
///< here results in -3dB offset.
710-
optional<unsigned> a3_hysteresis_db;
711-
optional<unsigned> a3_time_to_trigger_ms;
712-
};
713-
714-
/// \brief All mobility related configuration parameters.
715-
struct mobility_appconfig {
716-
std::vector<cu_cp_cell_appconfig_item> cells; ///< List of all cells known to the CU-CP.
717-
std::vector<cu_cp_report_appconfig> report_configs; ///< Report config.
718-
bool trigger_handover_from_measurements = false; ///< Whether to start HO if neighbor cell measurements arrive.
719-
};
720-
721-
/// \brief RRC specific configuration parameters.
722-
struct rrc_appconfig {
723-
bool force_reestablishment_fallback = false;
724-
unsigned rrc_procedure_timeout_ms = 720; ///< Timeout for RRC procedures (2 * default SRB maxRetxThreshold *
725-
///< t-PollRetransmit = 2 * 8 * 45ms = 720ms, see TS 38.331 Sec 9.2.1).
726-
};
727-
728-
/// \brief Security configuration parameters.
729-
struct security_appconfig {
730-
std::string integrity_protection = "not_needed";
731-
std::string confidentiality_protection = "required";
732-
std::string nea_preference_list = "nea0,nea2,nea1,nea3";
733-
std::string nia_preference_list = "nia2,nia1,nia3";
734-
};
735-
736-
/// \brief F1AP-CU configuration parameters.
737-
struct f1ap_cu_appconfig {
738-
/// Timeout for the UE context setup procedure in milliseconds.
739-
unsigned ue_context_setup_timeout = 1000;
740-
};
741-
742-
struct cu_cp_appconfig {
743-
uint16_t max_nof_dus = 6;
744-
uint16_t max_nof_cu_ups = 6;
745-
int inactivity_timer = 120; // in seconds
746-
unsigned pdu_session_setup_timeout = 3; // in seconds (must be larger than T310)
747-
mobility_appconfig mobility_config;
748-
rrc_appconfig rrc_config;
749-
security_appconfig security_config;
750-
f1ap_cu_appconfig f1ap_config;
751-
};
752-
753690
struct cu_up_appconfig {
754691
unsigned gtpu_queue_size = 2048;
755692
unsigned gtpu_reordering_timer_ms = 0;
@@ -777,11 +714,9 @@ struct log_appconfig {
777714
std::string f1ap_level = "warning";
778715
std::string f1u_level = "warning";
779716
std::string pdcp_level = "warning";
780-
std::string rrc_level = "warning";
781717
std::string ngap_level = "warning";
782718
std::string sdap_level = "warning";
783719
std::string gtpu_level = "warning";
784-
std::string sec_level = "warning";
785720
std::string fapi_level = "warning";
786721
std::string ofh_level = "warning";
787722
std::string e2ap_level = "warning";
@@ -843,7 +778,6 @@ struct metrics_appconfig {
843778
struct pdcp_metrics {
844779
unsigned report_period = 0; // PDCP report period in ms
845780
} pdcp;
846-
unsigned cu_cp_statistics_report_period = 1; // Statistics report period in seconds
847781
unsigned cu_up_statistics_report_period = 1; // Statistics report period in seconds
848782
/// JSON metrics reporting.
849783
bool enable_json_metrics = false;
@@ -1258,14 +1192,10 @@ struct gnb_appconfig {
12581192
std::string ran_node_name = "srsgnb01";
12591193
/// AMF configuration.
12601194
amf_appconfig amf_cfg;
1261-
/// CU-CP configuration.
1262-
cu_cp_appconfig cu_cp_cfg;
12631195
/// CU-UP configuration.
12641196
cu_up_appconfig cu_up_cfg;
12651197
/// DU configuration.
12661198
du_appconfig du_cfg;
1267-
/// F1AP configuration.
1268-
f1ap_cu_appconfig f1ap_cfg;
12691199
/// \brief E2 configuration.
12701200
e2_appconfig e2_cfg;
12711201
/// Radio Unit configuration.
@@ -1283,9 +1213,6 @@ struct gnb_appconfig {
12831213
/// SRB configuration.
12841214
std::map<srb_id_t, srb_appconfig> srb_cfg;
12851215

1286-
/// Network slice configuration.
1287-
std::vector<s_nssai_t> slice_cfg = {s_nssai_t{1}};
1288-
12891216
/// Expert physical layer configuration.
12901217
expert_upper_phy_appconfig expert_phy_cfg;
12911218

0 commit comments

Comments
 (0)