Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
  • Loading branch information
codebot committed Jul 16, 2024
2 parents b136a43 + 465eb00 commit 055a643
Show file tree
Hide file tree
Showing 200 changed files with 4,162 additions and 1,074 deletions.
4 changes: 1 addition & 3 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ e2e request and config validation:

.e2e-run:
resource_group: e2e-${GROUP}
timeout: 6h
timeout: 2h
image:
name: ${RETINA_REGISTRY_PREFIX}/launcher:${RETINA_VERSION}
entrypoint: ["/bin/sh", "-c"]
Expand Down Expand Up @@ -382,7 +382,6 @@ cudu amari 8UE:
MARKERS: "zmq and not smoke"
E2E_LOG_LEVEL: "info"
RETINA_PARAM_ARGS: "gnb.all.pcap=True gnb.all.rlc_enable=False gnb.all.enable_integrity_protection=True"
allow_failure: true
needs:
- job: "basic relwithdeb"
artifacts: true
Expand All @@ -399,7 +398,6 @@ cudu amari 32UE:
MARKERS: "zmq and not smoke"
E2E_LOG_LEVEL: "info"
RETINA_PARAM_ARGS: "gnb.all.pcap=True gnb.all.rlc_enable=False gnb.all.enable_integrity_protection=True"
allow_failure: true
needs:
- job: "basic relwithdeb"
artifacts: true
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.51.5
RETINA_VERSION=0.51.7
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/e2e/retina_request_android_b200.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
- name: open5gs
type: 5gc
image: ${RETINA_REGISTRY_PREFIX}/open5gs:${OPEN5GS_VERSION}_${RETINA_VERSION}
taints: ["retina"]
taints: ["purpose=retina"]
requirements:
arch: amd64
cpu:
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/e2e/retina_request_android_n300.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
ephemeral-storage:
requests: "6G"
limits: "6G"
taints: ["manual-testing"]
taints: ["purpose=manual-testing"]
resources:
- type: sdr
model: n3xx
Expand All @@ -52,7 +52,7 @@
- name: open5gs
type: 5gc
image: ${RETINA_REGISTRY_PREFIX}/open5gs:${OPEN5GS_VERSION}_${RETINA_VERSION}
taints: ["retina"]
taints: ["purpose=retina"]
requirements:
arch: amd64
cpu:
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/e2e/retina_request_android_x300.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
ephemeral-storage:
requests: "6G"
limits: "6G"
taints: ["manual-testing"]
taints: ["purpose=manual-testing"]
resources:
- type: sdr
model: x300
Expand All @@ -52,7 +52,7 @@
- name: open5gs
type: 5gc
image: ${RETINA_REGISTRY_PREFIX}/open5gs:${OPEN5GS_VERSION}_${RETINA_VERSION}
taints: ["retina"]
taints: ["purpose=retina"]
requirements:
arch: amd64
cpu:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/e2e/retina_request_rf_b200.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
- name: open5gs
type: 5gc
image: ${RETINA_REGISTRY_PREFIX}/open5gs:${OPEN5GS_VERSION}_${RETINA_VERSION}
taints: ["retina"]
taints: ["purpose=retina"]
requirements:
arch: amd64
cpu:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/e2e/retina_request_viavi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
ephemeral-storage:
requests: "20G"
limits: "20G"
taints: ["ci-amd64-avx512-onprem"]
taints: ["purpose=ci-amd64-avx512-onprem"]
resources:
- type: emulator
model: viavi
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/schedules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#

Rebaser:
cron: "*/10 6-22 * * 1-5"
cron: "*/10 6-21 * * 1-5"
cron_timezone: "Europe/Madrid"
ref: refs/heads/dev
variables:
Expand Down Expand Up @@ -39,7 +39,7 @@ Nightly Build Unit Tests:
raw: false

Nightly E2E Tests:
cron: "00 23 * * 0-5"
cron: "30 22 * * 0-5"
cron_timezone: "Europe/Madrid"
ref: refs/heads/dev
variables:
Expand Down
2 changes: 1 addition & 1 deletion apps/cu/cu_appconfig_validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ using namespace srsran;
bool srsran::validate_cu_appconfig(const cu_appconfig& config)
{
return validate_logger_appconfig(config.log_cfg);
}
}
8 changes: 4 additions & 4 deletions apps/units/cu_cp/cu_cp_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ cu_cp_unit srsran::build_cu_cp(const cu_cp_unit_config& cu_cp_unit_cfg, cu_cp_bu
srsran_assert(dependencies.cu_cp_e2_exec, "Invalid E2 executor");

srs_cu_cp::cu_cp_configuration cu_cp_cfg = generate_cu_cp_config(cu_cp_unit_cfg);
cu_cp_cfg.cu_cp_executor = dependencies.cu_cp_executor;
cu_cp_cfg.cu_cp_e2_exec = dependencies.cu_cp_e2_exec;
cu_cp_cfg.n2_gw = dependencies.n2_client;
cu_cp_cfg.timers = dependencies.timers;
cu_cp_cfg.services.cu_cp_executor = dependencies.cu_cp_executor;
cu_cp_cfg.services.cu_cp_e2_exec = dependencies.cu_cp_e2_exec;
cu_cp_cfg.services.n2_gw = dependencies.n2_client;
cu_cp_cfg.services.timers = dependencies.timers;

cu_cp_unit cu_cmd_wrapper;
cu_cmd_wrapper.unit = create_cu_cp(cu_cp_cfg);
Expand Down
60 changes: 28 additions & 32 deletions apps/units/cu_cp/cu_cp_config_translators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,47 +190,45 @@ static srs_cu_cp::rrc_ssb_mtc generate_rrc_ssb_mtc(unsigned period, unsigned off
srs_cu_cp::cu_cp_configuration srsran::generate_cu_cp_config(const cu_cp_unit_config& cu_cfg)
{
srs_cu_cp::cu_cp_configuration out_cfg = config_helpers::make_default_cu_cp_config();
out_cfg.max_nof_dus = cu_cfg.max_nof_dus;
out_cfg.max_nof_cu_ups = cu_cfg.max_nof_cu_ups;
out_cfg.max_nof_ues = cu_cfg.max_nof_ues;

out_cfg.ngap_config.gnb_id = cu_cfg.gnb_id;
out_cfg.ngap_config.ran_node_name = cu_cfg.ran_node_name;
out_cfg.ngap_config.slice_configurations = cu_cfg.slice_cfg;
out_cfg.admission.max_nof_dus = cu_cfg.max_nof_dus;
out_cfg.admission.max_nof_cu_ups = cu_cfg.max_nof_cu_ups;
out_cfg.admission.max_nof_ues = cu_cfg.max_nof_ues;

srsran_assert(!cu_cfg.plmns.empty(), "PLMN list is empty");
srsran_assert(!cu_cfg.tacs.empty(), "PLMN list is empty");
out_cfg.ngap_config.plmn = plmn_identity::parse(cu_cfg.plmns.front()).value();
out_cfg.ngap_config.tac = cu_cfg.tacs.front();
out_cfg.node.gnb_id = cu_cfg.gnb_id;
out_cfg.node.ran_node_name = cu_cfg.ran_node_name;
out_cfg.node.plmn = plmn_identity::parse(cu_cfg.plmns.front()).value();
out_cfg.node.tac = cu_cfg.tacs.front();
out_cfg.node.supported_slices = cu_cfg.slice_cfg;

out_cfg.rrc.force_reestablishment_fallback = cu_cfg.rrc_config.force_reestablishment_fallback;
out_cfg.rrc.rrc_procedure_timeout_ms = std::chrono::milliseconds{cu_cfg.rrc_config.rrc_procedure_timeout_ms};

out_cfg.rrc_config.gnb_id = cu_cfg.gnb_id;
out_cfg.rrc_config.force_reestablishment_fallback = cu_cfg.rrc_config.force_reestablishment_fallback;
out_cfg.rrc_config.rrc_procedure_timeout_ms = cu_cfg.rrc_config.rrc_procedure_timeout_ms;
out_cfg.rrc_config.int_algo_pref_list = generate_preferred_integrity_algorithms_list(cu_cfg);
out_cfg.rrc_config.enc_algo_pref_list = generate_preferred_ciphering_algorithms_list(cu_cfg);
out_cfg.rrc_config.drb_config = generate_cu_cp_qos_config(cu_cfg);
out_cfg.bearers.drb_config = generate_cu_cp_qos_config(cu_cfg);

if (!from_string(out_cfg.default_security_indication.integrity_protection_ind,
out_cfg.security.int_algo_pref_list = generate_preferred_integrity_algorithms_list(cu_cfg);
out_cfg.security.enc_algo_pref_list = generate_preferred_ciphering_algorithms_list(cu_cfg);
if (!from_string(out_cfg.security.default_security_indication.integrity_protection_ind,
cu_cfg.security_config.integrity_protection)) {
report_error("Invalid value for integrity_protection={}\n", cu_cfg.security_config.integrity_protection);
}
if (!from_string(out_cfg.default_security_indication.confidentiality_protection_ind,
if (!from_string(out_cfg.security.default_security_indication.confidentiality_protection_ind,
cu_cfg.security_config.confidentiality_protection)) {
report_error("Invalid value for confidentiality_protection={}\n",
cu_cfg.security_config.confidentiality_protection);
}

out_cfg.ue_config.inactivity_timer = std::chrono::seconds{cu_cfg.inactivity_timer};
out_cfg.ue_config.max_nof_supported_ues = cu_cfg.max_nof_ues;
out_cfg.ngap_config.pdu_session_setup_timeout = std::chrono::seconds{cu_cfg.pdu_session_setup_timeout};
out_cfg.statistics_report_period = std::chrono::seconds{cu_cfg.metrics.cu_cp_statistics_report_period};
out_cfg.ue.inactivity_timer = std::chrono::seconds{cu_cfg.inactivity_timer};
out_cfg.ue.pdu_session_setup_timeout = std::chrono::seconds{cu_cfg.pdu_session_setup_timeout};
out_cfg.metrics.statistics_report_period = std::chrono::seconds{cu_cfg.metrics.cu_cp_statistics_report_period};

out_cfg.mobility_config.mobility_manager_config.trigger_handover_from_measurements =
out_cfg.mobility.mobility_manager_config.trigger_handover_from_measurements =
cu_cfg.mobility_config.trigger_handover_from_measurements;

// F1AP-CU config.
out_cfg.f1ap_config.ue_context_setup_timeout = std::chrono::milliseconds{cu_cfg.f1ap_config.ue_context_setup_timeout};
out_cfg.f1ap_config.json_log_enabled = cu_cfg.loggers.f1ap_json_enabled;
out_cfg.f1ap.ue_context_setup_timeout = std::chrono::milliseconds{cu_cfg.f1ap_config.ue_context_setup_timeout};
out_cfg.f1ap.json_log_enabled = cu_cfg.loggers.f1ap_json_enabled;

// Convert appconfig's cell list into cell manager type.
for (const auto& app_cfg_item : cu_cfg.mobility_config.cells) {
Expand All @@ -242,12 +240,10 @@ srs_cu_cp::cu_cp_configuration srsran::generate_cu_cp_config(const cu_cp_unit_co
srs_cu_cp::uint_to_report_cfg_id(app_cfg_item.periodic_report_cfg_id.value());
}

if (app_cfg_item.gnb_id_bit_length.has_value()) {
meas_cfg_item.serving_cell_cfg.gnb_id = nci.gnb_id(app_cfg_item.gnb_id_bit_length.value());
}
meas_cfg_item.serving_cell_cfg.pci = app_cfg_item.pci;
meas_cfg_item.serving_cell_cfg.band = app_cfg_item.band;
meas_cfg_item.serving_cell_cfg.ssb_arfcn = app_cfg_item.ssb_arfcn;
meas_cfg_item.serving_cell_cfg.gnb_id_bit_length = app_cfg_item.gnb_id_bit_length.value();
meas_cfg_item.serving_cell_cfg.pci = app_cfg_item.pci;
meas_cfg_item.serving_cell_cfg.band = app_cfg_item.band;
meas_cfg_item.serving_cell_cfg.ssb_arfcn = app_cfg_item.ssb_arfcn;
if (app_cfg_item.ssb_scs.has_value()) {
meas_cfg_item.serving_cell_cfg.ssb_scs.emplace() =
to_subcarrier_spacing(std::to_string(app_cfg_item.ssb_scs.value()));
Expand All @@ -270,7 +266,7 @@ srs_cu_cp::cu_cp_configuration srsran::generate_cu_cp_config(const cu_cp_unit_co
}

// Store config.
out_cfg.mobility_config.meas_manager_config.cells[meas_cfg_item.serving_cell_cfg.nci] = meas_cfg_item;
out_cfg.mobility.meas_manager_config.cells[meas_cfg_item.serving_cell_cfg.nci] = meas_cfg_item;
}

// Convert report config.
Expand Down Expand Up @@ -352,7 +348,7 @@ srs_cu_cp::cu_cp_configuration srsran::generate_cu_cp_config(const cu_cp_unit_co
}

// Store config.
out_cfg.mobility_config.meas_manager_config
out_cfg.mobility.meas_manager_config
.report_config_ids[srs_cu_cp::uint_to_report_cfg_id(report_cfg_item.report_cfg_id)] = report_cfg;
}

Expand Down
14 changes: 13 additions & 1 deletion apps/units/cu_cp/cu_cp_unit_config_cli11_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ static void configure_cli11_cells_args(CLI::App& app, cu_cp_unit_cell_config_ite

add_auto_enum_option(app, "--band", config.band, "NR frequency band");

add_option(app, "--gnb_id_bit_length", config.gnb_id_bit_length, "gNodeB identifier bit length")
add_option(app,
"--gnb_id_bit_length",
config.gnb_id_bit_length,
"gNodeB identifier bit length. If not set, it will be automatically set to be equal to the gNodeB Id of "
"the CU-CP")
->check(CLI::Range(22, 32));
add_option(app, "--pci", config.pci, "Physical Cell Id")->check(CLI::Range(0, 1007));
add_option(app, "--ssb_arfcn", config.ssb_arfcn, "SSB ARFCN");
Expand Down Expand Up @@ -522,4 +526,12 @@ void srsran::autoderive_cu_cp_parameters_after_parsing(CLI::App&

unit_cfg.tacs = tacs.empty() ? auto_generate_tacs() : std::move(tacs);
}

for (auto& cell : unit_cfg.mobility_config.cells) {
// Set gNB ID bit length of the neighbor cell to be equal to the current unit gNB ID bit length, if not explicitly
// set.
if (not cell.gnb_id_bit_length.has_value()) {
cell.gnb_id_bit_length = unit_cfg.gnb_id.bit_length;
}
}
}
4 changes: 1 addition & 3 deletions apps/units/cu_cp/cu_cp_unit_config_yaml_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ static YAML::Node build_cu_cp_mobility_cells_section(const cu_cp_unit_cell_confi
if (config.band) {
node["band"] = static_cast<unsigned>(config.band.value());
}
if (config.gnb_id_bit_length) {
node["gnb_id_bit_length"] = config.gnb_id_bit_length.value();
}
node["gnb_id_bit_length"] = config.gnb_id_bit_length.value();
if (config.pci) {
node["pci"] = config.pci.value();
}
Expand Down
10 changes: 10 additions & 0 deletions apps/units/cu_up/cu_up_unit_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ struct cu_up_unit_qos_config {
cu_cp_unit_f1u_config f1u_cu_up;
};

struct cu_up_unit_test_mode_config {
bool enabled = false;
bool integrity_enabled = true;
bool ciphering_enabled = true;
uint16_t nea_algo = 2;
uint16_t nia_algo = 2;
};

/// CU-UP application unit configuration.
struct cu_up_unit_config {
unsigned gtpu_queue_size = 2048;
Expand All @@ -74,6 +82,8 @@ struct cu_up_unit_config {
cu_up_unit_pcap_config pcap_cfg;
/// QoS configuration.
std::vector<cu_up_unit_qos_config> qos_cfg;
/// Test mode.
cu_up_unit_test_mode_config test_mode_cfg;
};

} // namespace srsran
17 changes: 17 additions & 0 deletions apps/units/cu_up/cu_up_unit_config_cli11_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,19 @@ static void configure_cli11_qos_args(CLI::App& app, cu_up_unit_qos_config& qos_p
configure_cli11_f1u_cu_up_args(*f1u_cu_up_subcmd, qos_params.f1u_cu_up);
}

static void configure_cli11_test_mode_args(CLI::App& app, cu_up_unit_test_mode_config& test_mode_params)
{
add_option(app, "--enable", test_mode_params.enabled, "Enable or disable CU-UP test mode");
add_option(app, "--integrity_enable", test_mode_params.integrity_enabled, "Enable or disable PDCP integrity testing");
add_option(app, "--ciphering_enable", test_mode_params.ciphering_enabled, "Enable or disable PDCP ciphering testing");
add_option(app, "--nea_algo", test_mode_params.nea_algo, "NEA algo to use for testing. Valid values {0, 1, 2, 3}.")
->capture_default_str()
->check(CLI::Range(0, 3));
add_option(app, "--nia_algo", test_mode_params.nea_algo, "NIA algo to use for testing. Valid values {1, 2, 3}.")
->capture_default_str()
->check(CLI::Range(1, 3));
}

void srsran::configure_cli11_with_cu_up_unit_config_schema(CLI::App& app, cu_up_unit_config& unit_cfg)
{
// CU-UP section.
Expand Down Expand Up @@ -182,4 +195,8 @@ void srsran::configure_cli11_with_cu_up_unit_config_schema(CLI::App& app, cu_up_
}
};
add_option_cell(app, "--qos", qos_lambda, "Configures RLC and PDCP radio bearers on a per 5QI basis.");

// Test mode section.
CLI::App* test_mode_subcmd = add_subcommand(app, "test_mode", "CU-UP test mode parameters")->configurable();
configure_cli11_test_mode_args(*test_mode_subcmd, unit_cfg.test_mode_cfg);
}
10 changes: 8 additions & 2 deletions apps/units/cu_up/cu_up_unit_config_translators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ srs_cu_up::cu_up_configuration srsran::generate_cu_up_config(const cu_up_unit_co
out_cfg.net_cfg.n3_ext_addr = config.upf_cfg.n3_ext_addr;
out_cfg.net_cfg.n3_bind_interface = config.upf_cfg.n3_bind_interface;
out_cfg.net_cfg.n3_rx_max_mmsg = config.upf_cfg.udp_rx_max_msgs;

out_cfg.test_mode_cfg.enabled = config.test_mode_cfg.enabled;
out_cfg.test_mode_cfg.integrity_enabled = config.test_mode_cfg.integrity_enabled;
return out_cfg;
}

Expand All @@ -50,8 +53,10 @@ srsran::generate_cu_up_qos_config(const cu_up_unit_config& cu_up_config)
{
std::map<five_qi_t, srs_cu_up::cu_up_qos_config> out_cfg = {};
if (cu_up_config.qos_cfg.empty()) {
out_cfg = config_helpers::make_default_cu_up_qos_config_list(
cu_up_config.warn_on_drop, timer_duration(cu_up_config.metrics.pdcp.report_period));
out_cfg =
config_helpers::make_default_cu_up_qos_config_list(cu_up_config.warn_on_drop,
timer_duration(cu_up_config.metrics.pdcp.report_period),
cu_up_config.test_mode_cfg.enabled);
return out_cfg;
}

Expand All @@ -64,6 +69,7 @@ srsran::generate_cu_up_qos_config(const cu_up_unit_config& cu_up_config)
pdcp_custom_config& out_pdcp_custom = out_cfg[qos.five_qi].pdcp_custom_cfg;
out_pdcp_custom.tx.warn_on_drop = cu_up_config.warn_on_drop;
out_pdcp_custom.tx.rlc_sdu_queue = qos.rlc_sdu_queue;
out_pdcp_custom.tx.test_mode = cu_up_config.test_mode_cfg.enabled;
out_pdcp_custom.metrics_period = timer_duration(cu_up_config.metrics.pdcp.report_period);

// Convert F1-U config
Expand Down
5 changes: 4 additions & 1 deletion include/srsran/adt/bounded_bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,10 @@ class bounded_bitset
void from_uint64(uint64_t v)
{
srsran_assert(nof_words_() == 1, "ERROR: cannot convert bitset of size='{}' to uint64_t", size());
srsran_assert(v < (1U << size()), "ERROR: Provided mask='{}' does not fit in bitset of size='{}'", v, size());
srsran_assert(v < (static_cast<uint64_t>(1U) << size()),
"ERROR: Provided mask='{}' does not fit in bitset of size='{}'",
v,
size());
buffer[0] = v;
}

Expand Down
Loading

0 comments on commit 055a643

Please sign in to comment.