Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/phy/upper/equalization/equalize_mmse_1xn.h
#	tests/unittests/phy/support/resource_grid_mapper_test_doubles.h
#	tests/unittests/phy/upper/equalization/channel_equalizer_test_data.tar.gz
#	tests/unittests/phy/upper/signal_processors/dmrs_pusch_estimator_test_data.tar.gz
#	tests/unittests/phy/upper/signal_processors/port_channel_estimator_test_data.tar.gz
  • Loading branch information
codebot committed Jan 13, 2025
2 parents 61c1065 + 27b2e38 commit cc2869f
Show file tree
Hide file tree
Showing 4,280 changed files with 11,072 additions and 7,767 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .gdbinit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021-2024 Software Radio Systems Limited
# Copyright 2021-2025 Software Radio Systems Limited
#
# This file is part of srsRAN
#
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021-2024 Software Radio Systems Limited
# Copyright 2021-2025 Software Radio Systems Limited
#
# This file is part of srsRAN
#
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/e2e/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb
RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina
RETINA_VERSION=0.59.2
RETINA_VERSION=0.59.5
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/e2e/retina_request_viavi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
requests: 2Gi
limits: 2Gi
ephemeral-storage:
requests: "50G"
limits: "50G"
requests: "150G"
limits: "150G"
resources:
- type: emulator
model: viavi
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Change Log for Releases
=======================

## 24.10.1
- Fix PUSCH benchmark

## 24.10
- CU/DU split
- RAN slicing
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021-2024 Software Radio Systems Limited
# Copyright 2021-2025 Software Radio Systems Limited
#
# This file is part of srsRAN
#
Expand Down
2 changes: 1 addition & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021-2024 Software Radio Systems Limited
# Copyright 2021-2025 Software Radio Systems Limited
#
# This file is part of srsRAN
#
Expand Down
2 changes: 1 addition & 1 deletion apps/cu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021-2024 Software Radio Systems Limited
# Copyright 2021-2025 Software Radio Systems Limited
#
# This file is part of srsRAN
#
Expand Down
74 changes: 47 additions & 27 deletions apps/cu/cu.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
* Copyright 2021-2025 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
Expand Down Expand Up @@ -41,6 +41,7 @@
#include "srsran/e1ap/gateways/e1_local_connector_factory.h"
#include "srsran/e2/e2ap_config_translators.h"
#include "srsran/f1ap/gateways/f1c_network_server_factory.h"
#include "srsran/f1u/cu_up/f1u_session_manager_factory.h"
#include "srsran/f1u/cu_up/split_connector/f1u_split_connector_factory.h"
#include "srsran/gateways/udp_network_gateway.h"
#include "srsran/gtpu/gtpu_config.h"
Expand All @@ -54,6 +55,7 @@
#include "srsran/support/io/io_broker_factory.h"
#include "srsran/support/io/io_timer_source.h"
#include "srsran/support/signal_handling.h"
#include "srsran/support/signal_observer.h"
#include "srsran/support/sysinfo.h"
#include "srsran/support/timers.h"
#include "srsran/support/tracing/event_tracing.h"
Expand Down Expand Up @@ -89,14 +91,17 @@ static void populate_cli11_generic_args(CLI::App& app)
}

/// Function to call when the application is interrupted.
static void interrupt_signal_handler()
static void interrupt_signal_handler(int signal)
{
is_app_running = false;
}

static signal_dispatcher cleanup_signal_dispatcher;

/// Function to call when the application is going to be forcefully shutdown.
static void cleanup_signal_handler()
static void cleanup_signal_handler(int signal)
{
cleanup_signal_dispatcher.notify_signal(signal);
srslog::flush();
}

Expand Down Expand Up @@ -153,7 +158,8 @@ static void fill_cu_worker_manager_config(worker_manager_config& config, const c
config.low_prio_sched_config = unit_cfg.expert_execution_cfg.affinities.low_priority_cpu_cfg;
}

static void autoderive_cu_up_parameters_after_parsing(o_cu_up_unit_config& o_cu_up_cfg,
static void autoderive_cu_up_parameters_after_parsing(cu_appconfig& cu_config,
o_cu_up_unit_config& o_cu_up_cfg,
const cu_cp_unit_config& cu_cp_cfg)
{
// If no UPF is configured, we set the UPF configuration from the CU-CP AMF configuration.
Expand All @@ -162,6 +168,11 @@ static void autoderive_cu_up_parameters_after_parsing(o_cu_up_unit_config& o
sock_cfg.bind_addr = cu_cp_cfg.amf_config.amf.bind_addr;
o_cu_up_cfg.cu_up_cfg.ngu_cfg.ngu_socket_cfg.push_back(sock_cfg);
}
// If no F1-U socket configuration is derived, we set a default configuration.
if (cu_config.f1u_cfg.f1u_socket_cfg.empty()) {
srs_cu::cu_f1u_socket_appconfig sock_cfg;
cu_config.f1u_cfg.f1u_socket_cfg.push_back(sock_cfg);
}
}

int main(int argc, char** argv)
Expand Down Expand Up @@ -197,12 +208,12 @@ int main(int argc, char** argv)
o_cu_up_app_unit->on_parsing_configuration_registration(app);

// Set the callback for the app calling all the autoderivation functions.
app.callback([&app, &o_cu_cp_app_unit, &o_cu_up_app_unit]() {
app.callback([&app, &cu_cfg, &o_cu_cp_app_unit, &o_cu_up_app_unit]() {
o_cu_cp_app_unit->on_configuration_parameters_autoderivation(app);
o_cu_up_app_unit->on_configuration_parameters_autoderivation(app);

autoderive_cu_up_parameters_after_parsing(o_cu_up_app_unit->get_o_cu_up_unit_config(),
o_cu_cp_app_unit->get_o_cu_cp_unit_config().cucp_cfg);
autoderive_cu_up_parameters_after_parsing(
cu_cfg, o_cu_up_app_unit->get_o_cu_up_unit_config(), o_cu_cp_app_unit->get_o_cu_cp_unit_config().cucp_cfg);
});

// Parse arguments.
Expand Down Expand Up @@ -261,18 +272,23 @@ int main(int argc, char** argv)
check_cpu_governor(cu_logger);
check_drm_kms_polling(cu_logger);

// Create manager of timers for CU-CP and CU-UP, which will be driven by the system timer slot ticks.
timer_manager app_timers{256};
timer_manager* cu_timers = &app_timers;

// Create worker manager.
worker_manager_config worker_manager_cfg;
fill_cu_worker_manager_config(worker_manager_cfg, cu_cfg);
o_cu_cp_app_unit->fill_worker_manager_config(worker_manager_cfg);
o_cu_up_app_unit->fill_worker_manager_config(worker_manager_cfg);
worker_manager_cfg.app_timers = &app_timers;
worker_manager workers{worker_manager_cfg};

// Create layer specific PCAPs.
o_cu_cp_dlt_pcaps cu_cp_dlt_pcaps =
create_o_cu_cp_dlt_pcap(o_cu_cp_app_unit->get_o_cu_cp_unit_config(), *workers.get_executor_getter());
o_cu_up_dlt_pcaps cu_up_dlt_pcaps =
create_o_cu_up_dlt_pcaps(o_cu_up_app_unit->get_o_cu_up_unit_config(), *workers.get_executor_getter());
o_cu_cp_dlt_pcaps cu_cp_dlt_pcaps = create_o_cu_cp_dlt_pcap(
o_cu_cp_app_unit->get_o_cu_cp_unit_config(), *workers.get_executor_getter(), cleanup_signal_dispatcher);
o_cu_up_dlt_pcaps cu_up_dlt_pcaps = create_o_cu_up_dlt_pcaps(
o_cu_up_app_unit->get_o_cu_up_unit_config(), *workers.get_executor_getter(), cleanup_signal_dispatcher);

// Create IO broker.
const auto& low_prio_cpu_mask = cu_cfg.expert_execution_cfg.affinities.low_priority_cpu_cfg.mask;
Expand All @@ -289,29 +305,33 @@ int main(int argc, char** argv)
{f1c_sctp_cfg, *epoll_broker, *workers.non_rt_hi_prio_exec, *cu_cp_dlt_pcaps.f1ap});
std::unique_ptr<srs_cu_cp::f1c_connection_server> cu_f1c_gw = srsran::create_f1c_gateway_server(f1c_server_cfg);

// Create F1-U GW (TODO factory and cleanup).
// Create F1-U GW.
// > Create GTP-U Demux.
gtpu_demux_creation_request cu_f1u_gtpu_msg = {};
cu_f1u_gtpu_msg.cfg.warn_on_drop = true;
cu_f1u_gtpu_msg.gtpu_pcap = cu_up_dlt_pcaps.f1u.get();
std::unique_ptr<gtpu_demux> cu_f1u_gtpu_demux = create_gtpu_demux(cu_f1u_gtpu_msg);
udp_network_gateway_config cu_f1u_gw_config = {};
cu_f1u_gw_config.bind_address = cu_cfg.nru_cfg.bind_addr;
cu_f1u_gw_config.bind_port = GTPU_PORT;
cu_f1u_gw_config.reuse_addr = false;
cu_f1u_gw_config.pool_occupancy_threshold = cu_cfg.nru_cfg.pool_occupancy_threshold;
std::unique_ptr<gtpu_gateway> cu_f1u_gw = create_udp_gtpu_gateway(
cu_f1u_gw_config, *epoll_broker, workers.cu_up_exec_mapper->io_ul_executor(), *workers.non_rt_low_prio_exec);
std::unique_ptr<f1u_cu_up_udp_gateway> cu_f1u_conn = srs_cu_up::create_split_f1u_gw(
{*cu_f1u_gw, *cu_f1u_gtpu_demux, *cu_up_dlt_pcaps.f1u, GTPU_PORT, cu_cfg.nru_cfg.ext_addr});
// > Create UDP gateway(s).
std::vector<std::unique_ptr<gtpu_gateway>> cu_f1u_gws;
for (const srs_cu::cu_f1u_socket_appconfig& sock_cfg : cu_cfg.f1u_cfg.f1u_socket_cfg) {
udp_network_gateway_config cu_f1u_gw_config = {};
cu_f1u_gw_config.bind_address = sock_cfg.bind_addr;
cu_f1u_gw_config.ext_bind_addr = sock_cfg.udp_config.ext_addr;
cu_f1u_gw_config.bind_port = GTPU_PORT;
cu_f1u_gw_config.reuse_addr = false;
cu_f1u_gw_config.pool_occupancy_threshold = sock_cfg.udp_config.pool_threshold;
cu_f1u_gw_config.rx_max_mmsg = sock_cfg.udp_config.rx_max_msgs;
std::unique_ptr<gtpu_gateway> cu_f1u_gw = create_udp_gtpu_gateway(
cu_f1u_gw_config, *epoll_broker, workers.cu_up_exec_mapper->io_ul_executor(), *workers.non_rt_low_prio_exec);
cu_f1u_gws.push_back(std::move(cu_f1u_gw));
}
std::unique_ptr<f1u_cu_up_udp_gateway> cu_f1u_conn =
srs_cu_up::create_split_f1u_gw({cu_f1u_gws, *cu_f1u_gtpu_demux, *cu_up_dlt_pcaps.f1u, GTPU_PORT});

// Create E1AP local connector
std::unique_ptr<e1_local_connector> e1_gw =
create_e1_local_connector(e1_local_connector_config{*cu_up_dlt_pcaps.e1ap});

// Create manager of timers for CU-CP and CU-UP, which will be driven by the system timer slot ticks.
timer_manager app_timers{256};
timer_manager* cu_timers = &app_timers;

// Create time source that ticks the timers.
std::optional<io_timer_source> time_source(
std::in_place_t{}, app_timers, *epoll_broker, *workers.non_rt_hi_prio_exec, std::chrono::milliseconds{1});
Expand Down Expand Up @@ -409,8 +429,8 @@ int main(int argc, char** argv)

// Close PCAPs
cu_logger.info("Closing PCAP files...");
cu_cp_dlt_pcaps.close();
cu_up_dlt_pcaps.close();
cu_cp_dlt_pcaps.reset();
cu_up_dlt_pcaps.reset();
cu_logger.info("PCAP files successfully closed.");

// Stop workers
Expand Down
22 changes: 13 additions & 9 deletions apps/cu/cu_appconfig.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
* Copyright 2021-2025 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
Expand All @@ -24,18 +24,22 @@

#include "apps/services/buffer_pool/buffer_pool_appconfig.h"
#include "apps/services/logger/logger_appconfig.h"
#include "apps/services/network/udp_cli11_schema.h"
#include "apps/services/worker_manager/worker_manager_appconfig.h"
#include <string>

namespace srsran {
namespace srs_cu {

/// NR-U configuration
struct cu_nru_appconfig {
std::string bind_addr = "127.0.10.1"; // Bind address used by the F1-U interface
std::string ext_addr = "auto"; // External address advertised by the F1-U interface
int udp_rx_max_msgs = 256; // Max number of UDP packets received by a single syscall on the F1-U interface.
float pool_occupancy_threshold = 0.9; // Buffer pool occupancy threshold after which packets are dropped.
/// F1-U sockets configuration
struct cu_f1u_socket_appconfig {
std::string bind_addr = "127.0.10.1"; // Bind address used by the F1-U interface
udp_appconfig udp_config;
};

/// F1-U configuration
struct cu_f1u_appconfig {
std::vector<cu_f1u_socket_appconfig> f1u_socket_cfg;
};

/// F1AP configuration
Expand All @@ -54,8 +58,8 @@ struct cu_appconfig {
logger_appconfig log_cfg;
/// Expert configuration.
expert_execution_appconfig expert_execution_cfg;
/// NR-U
srs_cu::cu_nru_appconfig nru_cfg;
/// F1-U
srs_cu::cu_f1u_appconfig f1u_cfg;
/// F1AP
srs_cu::cu_f1ap_appconfig f1ap_cfg;
/// Buffer pool configuration.
Expand Down
42 changes: 28 additions & 14 deletions apps/cu/cu_appconfig_cli11_schema.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
* Copyright 2021-2025 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
Expand All @@ -26,6 +26,7 @@
#include "apps/services/worker_manager/worker_manager_cli11_schema.h"
#include "cu_appconfig.h"
#include "srsran/support/cli11_utils.h"
#include "srsran/support/config_parsers.h"

using namespace srsran;

Expand All @@ -34,22 +35,35 @@ static void configure_cli11_f1ap_args(CLI::App& app, srs_cu::cu_f1ap_appconfig&
add_option(app, "--bind_addr", f1ap_params.bind_addr, "F1-C bind address")->capture_default_str();
}

static void configure_cli11_nru_args(CLI::App& app, srs_cu::cu_nru_appconfig& nru_cfg)
static void configure_cli11_f1u_socket_args(CLI::App& app, srs_cu::cu_f1u_socket_appconfig& f1u_cfg)
{
add_option(app,
"--bind_addr",
nru_cfg.bind_addr,
f1u_cfg.bind_addr,
"Default local IP address interfaces bind to, unless a specific bind address is specified")
->check(CLI::ValidIPV4);
app.add_option(
"--ext_addr", nru_cfg.ext_addr, "External IP address that is advertised to receive F1-U packets from the DU");
add_option(app, "--udp_max_rx_msgs", nru_cfg.udp_rx_max_msgs, "Maximum amount of messages RX in a single syscall");
add_option(app,
"--pool_threshold",
nru_cfg.pool_occupancy_threshold,
"Pool occupancy threshold after which packets are dropped")
->check(CLI::Range(0.0, 1.0));
;

configure_cli11_with_udp_config_schema(app, f1u_cfg.udp_config);
}

static void configure_cli11_f1u_args(CLI::App& app, srs_cu::cu_f1u_appconfig& f1u_params)
{
// Add option for multiple sockets, for usage with different slices, 5QIs or parallization.
auto sock_lambda = [&f1u_params](const std::vector<std::string>& values) {
// Prepare the radio bearers
f1u_params.f1u_socket_cfg.resize(values.size());

// Format every F1-U socket configuration.
for (unsigned i = 0, e = values.size(); i != e; ++i) {
CLI::App subapp("NG-U socket parameters", "NG-U socket config, item #" + std::to_string(i));
subapp.config_formatter(create_yaml_config_parser());
subapp.allow_config_extras(CLI::config_extras_mode::capture);
configure_cli11_f1u_socket_args(subapp, f1u_params.f1u_socket_cfg[i]);
std::istringstream ss(values[i]);
subapp.parse_from_stream(ss);
}
};
add_option_cell(app, "--socket", sock_lambda, "Configures UDP/IP socket parameters of the F1-U interface");
}

void srsran::configure_cli11_with_cu_appconfig_schema(CLI::App& app, cu_appconfig& cu_cfg)
Expand All @@ -70,6 +84,6 @@ void srsran::configure_cli11_with_cu_appconfig_schema(CLI::App& app, cu_appconfi

// NR-U section.
CLI::App* cu_up_subcmd = add_subcommand(app, "cu_up", "CU-UP parameters")->configurable();
CLI::App* nru_subcmd = add_subcommand(*cu_up_subcmd, "nru", "NR-U parameters")->configurable();
configure_cli11_nru_args(*nru_subcmd, cu_cfg.nru_cfg);
CLI::App* f1u_subcmd = add_subcommand(*cu_up_subcmd, "f1u", "NR-U parameters")->configurable();
configure_cli11_f1u_args(*f1u_subcmd, cu_cfg.f1u_cfg);
}
2 changes: 1 addition & 1 deletion apps/cu/cu_appconfig_cli11_schema.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
* Copyright 2021-2025 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/cu/cu_appconfig_validator.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
* Copyright 2021-2025 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/cu/cu_appconfig_validator.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
* Copyright 2021-2025 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
Expand Down
Loading

0 comments on commit cc2869f

Please sign in to comment.