Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	tests/unittests/cu_cp/mobility/inter_du_handover_routine_test_helpers.cpp
  • Loading branch information
codebot committed Mar 25, 2024
2 parents 4d9f223 + 9bb19c3 commit 2f90c8b
Show file tree
Hide file tree
Showing 212 changed files with 3,509 additions and 1,567 deletions.
16 changes: 4 additions & 12 deletions .gitlab/ci/e2e.yml
Expand Up @@ -386,14 +386,12 @@ test mode ue memcheck:
test mode ru:
stage: zmq
extends: .e2e-run
when: manual
allow_failure: true
variables:
GROUP: "viavi"
TESTBED: "viavi"
MARKERS: "test_mode"
KEYWORDS: "test_ru"
E2E_LOG_LEVEL: "info"
E2E_LOG_LEVEL: "warning"
needs:
- job: "basic avx512 dpdk"
artifacts: true
Expand All @@ -403,9 +401,7 @@ test mode ru:
test mode ru tsan:
extends: test mode ru
variables:
E2E_LOG_LEVEL: "warning"
when: manual
allow_failure: true
MARKERS: "test_mode_not_crash"
needs:
- job: "basic tsan"
artifacts: true
Expand All @@ -415,9 +411,7 @@ test mode ru tsan:
test mode ru asan:
extends: test mode ru
variables:
E2E_LOG_LEVEL: "warning"
when: manual
allow_failure: true
MARKERS: "test_mode_not_crash"
needs:
- job: "basic asan"
artifacts: true
Expand All @@ -427,9 +421,7 @@ test mode ru asan:
test mode ru memcheck:
extends: test mode ru
variables:
E2E_LOG_LEVEL: "warning"
when: manual
allow_failure: true
MARKERS: "test_mode_not_crash"
needs:
- job: "basic memcheck"
artifacts: true
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/e2e/.env
@@ -1,10 +1,10 @@
SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb
RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina
RETINA_VERSION=0.45.0
RETINA_VERSION=0.46.4
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
OPEN5GS_VERSION=2.6.6
OPEN5GS_VERSION=2.7.0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
METRICS_SERVER_VERSION=1.7.0
DPDK_VERSION=23.11
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/ci/e2e/retina_request_android_n300.yml
Expand Up @@ -30,11 +30,11 @@
requirements:
arch: amd64
cpu:
requests: 10
limits: 10
requests: 14
limits: 14
memory:
requests: "14G"
limits: "14G"
requests: "20G"
limits: "20G"
ephemeral-storage:
requests: "6G"
limits: "6G"
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/ci/e2e/retina_request_android_x300.yml
Expand Up @@ -30,11 +30,11 @@
requirements:
arch: amd64
cpu:
requests: 10
limits: 10
requests: 14
limits: 14
memory:
requests: "14G"
limits: "14G"
requests: "20G"
limits: "20G"
ephemeral-storage:
requests: "6G"
limits: "6G"
Expand Down
14 changes: 8 additions & 6 deletions .gitlab/ci/e2e/retina_request_rf_b200.yml
Expand Up @@ -9,15 +9,16 @@
- name: amarisoft-ue
type: ue
image: ${RETINA_REGISTRY_PREFIX}/amarisoftue:${AMARISOFT_VERSION}_${RETINA_VERSION}
labels: ["kubernetes.io/hostname=sdr4"]
nof_ports: 4
requirements:
arch: amd64
cpu:
requests: 10
limits: 10
memory:
requests: "12G"
limits: "12G"
requests: "16G"
limits: "16G"
ephemeral-storage:
requests: "6G"
limits: "6G"
Expand All @@ -30,14 +31,15 @@
- name: srs-gnb
type: gnb
image: ${RETINA_REGISTRY_PREFIX}/srsgnb:${RETINA_VERSION}
labels: ["kubernetes.io/hostname=sdr6"]
requirements:
arch: amd64
cpu:
requests: 10
limits: 10
requests: 14
limits: 14
memory:
requests: "12G"
limits: "12G"
requests: "20G"
limits: "20G"
ephemeral-storage:
requests: "9G"
limits: "9G"
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/phy/radio_ssb.cpp
Expand Up @@ -586,7 +586,7 @@ int main(int argc, char** argv)
rx_symbol_handler_example rx_symbol_handler(log_level);

// Create lower PHY error adapter logger.
srslog::basic_logger& logger = srslog::fetch_basic_logger("Low-PHY");
srslog::basic_logger& logger = srslog::fetch_basic_logger("PHY");
logger.set_level(srslog::str_to_basic_level(log_level));

// Create adapters.
Expand Down
18 changes: 16 additions & 2 deletions apps/gnb/gnb.cpp
Expand Up @@ -41,6 +41,7 @@

#include "adapters/e1ap_gateway_local_connector.h"
#include "adapters/f1c_gateway_local_connector.h"
#include "srsran/gtpu/ngu_gateway.h"
#include "srsran/support/backtrace.h"
#include "srsran/support/config_parsers.h"

Expand Down Expand Up @@ -122,7 +123,7 @@ static void configure_ru_generic_executors_and_notifiers(ru_generic_configuratio

for (unsigned i = 0, e = config.lower_phy_config.size(); i != e; ++i) {
lower_phy_configuration& low_phy_cfg = config.lower_phy_config[i];
low_phy_cfg.logger = &srslog::fetch_basic_logger("Low-PHY#" + std::to_string(i));
low_phy_cfg.logger = &srslog::fetch_basic_logger("PHY");
low_phy_cfg.tx_task_executor = workers.lower_phy_tx_exec[i];
low_phy_cfg.rx_task_executor = workers.lower_phy_rx_exec[i];
low_phy_cfg.dl_task_executor = workers.lower_phy_dl_exec[i];
Expand Down Expand Up @@ -486,11 +487,24 @@ int main(int argc, char** argv)
cu_up_cfg.io_ul_executor = workers.cu_up_io_ul_exec; // Optionally select separate exec for UL IO
cu_up_cfg.e1ap.e1ap_conn_client = &e1ap_gw;
cu_up_cfg.f1u_gateway = f1u_conn->get_f1u_cu_up_gateway();
cu_up_cfg.epoll_broker = epoll_broker.get();
cu_up_cfg.gtpu_pcap = gtpu_p.get();
cu_up_cfg.timers = cu_timers;
cu_up_cfg.qos = generate_cu_up_qos_config(gnb_cfg);

// Create NG-U gateway.
std::unique_ptr<srs_cu_up::ngu_gateway> ngu_gw;
if (not gnb_cfg.amf_cfg.no_core) {
udp_network_gateway_config ngu_gw_config = {};
ngu_gw_config.bind_address = cu_up_cfg.net_cfg.n3_bind_addr;
ngu_gw_config.bind_port = cu_up_cfg.net_cfg.n3_bind_port;
ngu_gw_config.bind_interface = cu_up_cfg.net_cfg.n3_bind_interface;
ngu_gw_config.rx_max_mmsg = cu_up_cfg.net_cfg.n3_rx_max_mmsg;
ngu_gw = srs_cu_up::create_udp_ngu_gateway(ngu_gw_config, *epoll_broker, *workers.cu_up_io_ul_exec);
} else {
ngu_gw = srs_cu_up::create_no_core_ngu_gateway();
}
cu_up_cfg.ngu_gw = ngu_gw.get();

// create and start CU-UP
std::unique_ptr<srsran::srs_cu_up::cu_up_interface> cu_up_obj = create_cu_up(cu_up_cfg);
cu_up_obj->start();
Expand Down
39 changes: 25 additions & 14 deletions apps/gnb/gnb_appconfig.h
Expand Up @@ -31,6 +31,7 @@
#include "srsran/ran/direct_current_offset.h"
#include "srsran/ran/dmrs.h"
#include "srsran/ran/five_qi.h"
#include "srsran/ran/gnb_id.h"
#include "srsran/ran/lcid.h"
#include "srsran/ran/ntn.h"
#include "srsran/ran/pcch/pcch_configuration.h"
Expand All @@ -45,7 +46,7 @@
#include "srsran/ran/slot_pdu_capacity_constants.h"
#include "srsran/ran/subcarrier_spacing.h"
#include "srsran/support/cpu_architecture_info.h"
#include "srsran/support/unique_thread.h"
#include "srsran/support/executors/unique_thread.h"
#include "srsran/support/units.h"
#include <map>
#include <string>
Expand Down Expand Up @@ -679,18 +680,19 @@ struct cu_cp_neighbor_cell_appconfig_item {

/// \brief Each item describes the relationship between one cell to all other cells.
struct cu_cp_cell_appconfig_item {
uint64_t nr_cell_id; ///< Cell id.
std::string rat = "nr"; ///< RAT of this neighbor cell.
uint64_t nr_cell_id; ///< Cell id.
optional<unsigned> periodic_report_cfg_id;

// These parameters must only be set for external cells
// TODO: Add optional SSB parameters.
optional<unsigned> periodic_report_cfg_id;
optional<unsigned> gnb_id; ///< gNodeB identifier
optional<nr_band> band;
optional<unsigned> ssb_arfcn;
optional<unsigned> ssb_scs;
optional<unsigned> ssb_period;
optional<unsigned> ssb_offset;
optional<unsigned> ssb_duration;
optional<unsigned> gnb_id_bit_length; ///< gNodeB identifier bit length.
optional<pci_t> pci; ///< PCI.
optional<nr_band> band; ///< NR band.
optional<unsigned> ssb_arfcn; ///< SSB ARFCN.
optional<unsigned> ssb_scs; ///< SSB subcarrier spacing.
optional<unsigned> ssb_period; ///< SSB period.
optional<unsigned> ssb_offset; ///< SSB offset.
optional<unsigned> ssb_duration; ///< SSB duration.

std::vector<cu_cp_neighbor_cell_appconfig_item> ncells; ///< Vector of cells that are a neighbor of this cell.
};
Expand Down Expand Up @@ -729,6 +731,12 @@ struct security_appconfig {
std::string nia_preference_list = "nia2,nia1,nia3";
};

/// \brief F1AP-CU configuration parameters.
struct f1ap_cu_appconfig {
/// Timeout for the UE context setup procedure in milliseconds.
unsigned ue_context_setup_timeout = 1000;
};

struct cu_cp_appconfig {
uint16_t max_nof_dus = 6;
uint16_t max_nof_cu_ups = 6;
Expand All @@ -737,6 +745,7 @@ struct cu_cp_appconfig {
mobility_appconfig mobility_config;
rrc_appconfig rrc_config;
security_appconfig security_config;
f1ap_cu_appconfig f1ap_config;
};

struct cu_up_appconfig {
Expand Down Expand Up @@ -780,6 +789,8 @@ struct log_appconfig {
optional<unsigned> phy_rx_symbols_port = 0;
/// If true, prints the PRACH frequency-domain symbols.
bool phy_rx_symbols_prach = false;
/// Enable JSON generation for the F1AP Tx and Rx PDUs.
bool f1ap_json_enabled = false;
/// Set to a valid file path to enable tracing and write the trace to the file.
std::string tracing_filename;
};
Expand Down Expand Up @@ -1242,9 +1253,7 @@ struct gnb_appconfig {
/// Metrics configuration.
metrics_appconfig metrics_cfg;
/// gNodeB identifier.
uint32_t gnb_id = 411;
/// Length of gNB identity in bits. Values {22,...,32}.
uint8_t gnb_id_bit_length = 32;
gnb_id_t gnb_id = {411, 22};
/// Node name.
std::string ran_node_name = "srsgnb01";
/// AMF configuration.
Expand All @@ -1253,6 +1262,8 @@ struct gnb_appconfig {
cu_cp_appconfig cu_cp_cfg;
/// CU-CP configuration.
cu_up_appconfig cu_up_cfg;
/// F1AP configuration.
f1ap_cu_appconfig f1ap_cfg;
/// \brief E2 configuration.
e2_appconfig e2_cfg;
/// Radio Unit configuration.
Expand Down
47 changes: 34 additions & 13 deletions apps/gnb/gnb_appconfig_cli11_schema.cpp
Expand Up @@ -109,6 +109,8 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
"Set to true to dump the IQ symbols from all the PRACH ports. Only works if "
"\"phy_rx_symbols_filename\" is set.")
->capture_default_str();
app.add_option("--f1ap_json_enabled", log_params.f1ap_json_enabled, "Enable JSON logging of F1AP PDUs")
->always_capture_default();
app.add_option("--tracing_filename", log_params.tracing_filename, "Set to a valid file path to enable tracing")
->always_capture_default();

Expand Down Expand Up @@ -292,20 +294,19 @@ static void configure_cli11_ncell_args(CLI::App& app, cu_cp_neighbor_cell_appcon
static void configure_cli11_cells_args(CLI::App& app, cu_cp_cell_appconfig_item& config)
{
app.add_option("--nr_cell_id", config.nr_cell_id, "Cell id to be configured");
app.add_option("--rat", config.rat, "RAT of this neighbor cell")->capture_default_str();
app.add_option("--periodic_report_cfg_id",
config.periodic_report_cfg_id,
"Periodical report configuration for the serving cell")
->check(CLI::Range(1, 64));
;
add_auto_enum_option(app, "--band", config.band, "NR frequency band");

app.add_option("--gnb_id", config.gnb_id, "gNodeB identifier");
app.add_option("--gnb_id_bit_length", config.gnb_id_bit_length, "gNodeB identifier bit length")
->check(CLI::Range(22, 32));
app.add_option("--pci", config.pci, "Physical Cell Id")->check(CLI::Range(0, 1007));
app.add_option("--ssb_arfcn", config.ssb_arfcn, "SSB ARFCN");
app.add_option("--ssb_scs", config.ssb_scs, "SSB subcarrier spacing")->check(CLI::IsMember({15, 30, 60, 120, 240}));
app.add_option("--ssb_period", config.ssb_period, "SSB period in ms");
app.add_option("--ssb_period", config.ssb_period, "SSB period in ms")->check(CLI::IsMember({5, 10, 20, 40, 80, 160}));
app.add_option("--ssb_offset", config.ssb_offset, "SSB offset");
app.add_option("--ssb_duration", config.ssb_duration, "SSB duration");
app.add_option("--ssb_duration", config.ssb_duration, "SSB duration")->check(CLI::IsMember({1, 2, 3, 4, 5}));

// report configuration parameters.
app.add_option_function<std::vector<std::string>>(
Expand All @@ -331,14 +332,24 @@ static void configure_cli11_report_args(CLI::App& app, cu_cp_report_appconfig& r
->check(CLI::Range(1, 64));
app.add_option("--report_type", report_params.report_type, "Type of the report configuration")
->check(CLI::IsMember({"periodical", "event_triggered"}));
app.add_option("--report_interval_ms", report_params.report_interval_ms, "Report interval in ms");
app.add_option("--a3_report_type", report_params.a3_report_type, "A3 report type");
app.add_option("--a3_offset_db", report_params.a3_offset_db, "A3 offset in dB used for measurement report trigger");
app.add_option("--report_interval_ms", report_params.report_interval_ms, "Report interval in ms")
->check(
CLI::IsMember({120, 240, 480, 640, 1024, 2048, 5120, 10240, 20480, 40960, 60000, 360000, 720000, 1800000}));
app.add_option("--a3_report_type", report_params.a3_report_type, "A3 report type")
->check(CLI::IsMember({"rsrp", "rsrq", "sinr"}));
app.add_option("--a3_offset_db",
report_params.a3_offset_db,
"A3 offset in dB used for measurement report trigger. Note the actual value is field value * 0.5 dB")
->check(CLI::Range(-30, 30));
app.add_option(
"--a3_hysteresis_db", report_params.a3_hysteresis_db, "A3 hysteresis in dB used for measurement report trigger");
"--a3_hysteresis_db",
report_params.a3_hysteresis_db,
"A3 hysteresis in dB used for measurement report trigger. Note the actual value is field value * 0.5 dB")
->check(CLI::Range(0, 30));
app.add_option("--a3_time_to_trigger_ms",
report_params.a3_time_to_trigger_ms,
"Time in ms during which A3 condition must be met before measurement report trigger");
"Time in ms during which A3 condition must be met before measurement report trigger")
->check(CLI::IsMember({0, 40, 64, 80, 100, 128, 160, 256, 320, 480, 512, 640, 1024, 1280, 2560, 5120}));
}

static void configure_cli11_mobility_args(CLI::App& app, mobility_appconfig& config)
Expand Down Expand Up @@ -427,6 +438,13 @@ static void configure_cli11_security_args(CLI::App& app, security_appconfig& con
->capture_default_str();
}

static void configure_cli11_f1ap_args(CLI::App& app, f1ap_cu_appconfig& f1ap_params)
{
app.add_option(
"--ue_context_setup_timeout", f1ap_params.ue_context_setup_timeout, "UE context setup timeout in milliseconds")
->capture_default_str();
}

static void configure_cli11_cu_cp_args(CLI::App& app, cu_cp_appconfig& cu_cp_params)
{
app.add_option(
Expand All @@ -453,6 +471,9 @@ static void configure_cli11_cu_cp_args(CLI::App& app, cu_cp_appconfig& cu_cp_par

CLI::App* security_subcmd = app.add_subcommand("security", "Security configuration");
configure_cli11_security_args(*security_subcmd, cu_cp_params.security_config);

CLI::App* f1ap_subcmd = app.add_subcommand("f1ap", "F1AP configuration");
configure_cli11_f1ap_args(*f1ap_subcmd, cu_cp_params.f1ap_config);
}

static void configure_cli11_cu_up_args(CLI::App& app, cu_up_appconfig& cu_up_params)
Expand Down Expand Up @@ -2433,8 +2454,8 @@ static void configure_cli11_fapi_args(CLI::App& app, fapi_appconfig& config)
void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_parsed_appconfig& gnb_parsed_cfg)
{
gnb_appconfig& gnb_cfg = gnb_parsed_cfg.config;
app.add_option("--gnb_id", gnb_cfg.gnb_id, "gNodeB identifier")->capture_default_str();
app.add_option("--gnb_id_bit_length", gnb_cfg.gnb_id_bit_length, "gNodeB identifier length in bits")
app.add_option("--gnb_id", gnb_cfg.gnb_id.id, "gNodeB identifier")->capture_default_str();
app.add_option("--gnb_id_bit_length", gnb_cfg.gnb_id.bit_length, "gNodeB identifier length in bits")
->capture_default_str()
->check(CLI::Range(22, 32));
app.add_option("--ran_node_name", gnb_cfg.ran_node_name, "RAN node name")->capture_default_str();
Expand Down

0 comments on commit 2f90c8b

Please sign in to comment.