Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	tests/unittests/phy/upper/channel_processors/prach_detector_test_data.tar.gz
#	tests/unittests/phy/upper/channel_processors/pucch_processor_format0_test_data.tar.gz
#	tests/unittests/phy/upper/signal_processors/port_channel_estimator_test_data.tar.gz
  • Loading branch information
codebot committed Jul 31, 2024
2 parents e5a3ba2 + c7e75d4 commit 4ac5300
Show file tree
Hide file tree
Showing 118 changed files with 2,747 additions and 1,096 deletions.
1 change: 1 addition & 0 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,7 @@ custom build:
- *build_after_script
artifacts:
<<: *build_artifacts
expire_in: 4 hours
cache:
- !reference [.fetch_src_cache, cache]
- *cache_build_get
18 changes: 18 additions & 0 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ variables:
- "zmq"
- "zmq_deb"
- "zmq_single_ue"
- "zmq_2x2_mimo"
- "zmq_4x4_mimo"
- "zmq_srsue"
- "zmq_cudu"
- "rf_b200"
- "rf_hp"
- "android_b200"
Expand Down Expand Up @@ -286,6 +288,20 @@ amari 1UE:
- *txrx-lib
- *retina-needs

amari 1UE 2x2 mimo:
extends: .zmq
variables:
TESTBED: "zmq_2x2_mimo"
MARKERS: "zmq_2x2_mimo"
E2E_LOG_LEVEL: "info"
RETINA_PARAM_ARGS: "gnb.all.pcap=True gnb.all.rlc_enable=False gnb.all.enable_integrity_protection=True"
needs:
- job: "basic relwithdeb"
artifacts: true
- *txrx-lib
- *retina-needs
allow_failure: true

amari 1UE 4x4 mimo:
extends: .zmq
variables:
Expand Down Expand Up @@ -549,6 +565,7 @@ validate n300 config:
variables:
MARKERS: "rf_n300"
TESTBED: "android_n300"
allow_failure: true

################################################################################
# Android
Expand Down Expand Up @@ -586,6 +603,7 @@ android n300:
extends: android x300
variables:
TESTBED: "android_n300"
allow_failure: true

################################################################################
# VIAVI
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.10
RETINA_VERSION=0.51.15
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
79 changes: 79 additions & 0 deletions .gitlab/ci/e2e/retina_request_zmq_2x2_mimo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#
# Copyright 2013-2024 Software Radio Systems Limited
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the distribution.
#

- name: amarisoft-ue
type: ue
image: ${RETINA_REGISTRY_PREFIX}/amarisoftue:${AMARISOFT_VERSION}_${RETINA_VERSION}
labels:
- ${ZMQ_HOSTLABEL_1}
nof_ports: 32
requirements:
arch: amd64
cpu:
requests: 5
limits: 5
memory:
requests: "26G"
limits: "26G"
ephemeral-storage:
requests: "6G"
limits: "6G"
resources:
- type: zmq
nof_antennas_dl: 2
nof_antennas_ul: 2
- type: license
model: amarisoft-5g
shared_files:
- local_path: ${AMARISOFT_TXRX_BINARY_PATH}
remote_path: /opt/lteue/trx_srsran.so
is_executable: true

- name: srs-gnb
type: gnb
image: ${RETINA_REGISTRY_PREFIX}/srsgnb:${RETINA_VERSION}
labels:
- ${ZMQ_HOSTLABEL_1}
requirements:
arch: amd64
cpu:
requests: 5
limits: 5
memory:
requests: "26G"
limits: "26G"
ephemeral-storage:
requests: "6G"
limits: "6G"
resources:
- type: zmq
nof_antennas_dl: 2
nof_antennas_ul: 2
environment:
- PATH: ${PATH}:/builds/softwareradiosystems/srsgnb/build/apps/gnb
shared_files:
- local_path: ${GNB_BINARY_PATH}
remote_path: /usr/local/bin/gnb
is_executable: true

- name: open5gs
type: 5gc
requirements:
arch: amd64
cpu:
requests: 1
limits: 1
memory:
requests: "8G"
limits: "8G"
ephemeral-storage:
requests: "6G"
limits: "6G"
image: ${RETINA_REGISTRY_PREFIX}/open5gs:${OPEN5GS_VERSION}_${RETINA_VERSION}
labels:
- ${ZMQ_HOSTLABEL_1}
2 changes: 1 addition & 1 deletion .gitlab/ci/trx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ build trx driver:
artifacts: &trx_artifacts
paths:
- build_trx_srsran/libtrx_srsran.so
expire_in: 10 minutes
expire_in: 4 hours

build amariue zmq driver:
extends: build trx driver
Expand Down
2 changes: 1 addition & 1 deletion apps/cu/cu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ int main(int argc, char** argv)
sctp_network_gateway_config f1c_sctp_cfg = {};
f1c_sctp_cfg.if_name = "F1-C";
f1c_sctp_cfg.bind_address = cu_cfg.f1ap_cfg.bind_addr;
f1c_sctp_cfg.bind_port = 38471;
f1c_sctp_cfg.bind_port = F1AP_PORT;
f1c_sctp_cfg.ppid = F1AP_PPID;
f1c_cu_sctp_gateway_config f1c_server_cfg({f1c_sctp_cfg, *epoll_broker, *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);
Expand Down
2 changes: 1 addition & 1 deletion apps/du/adapters/f1_gateways.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ std::unique_ptr<srs_du::f1c_connection_client> create_f1c_client_gateway(const s
f1c_sctp.if_name = "F1-C";
f1c_sctp.dest_name = "CU-CP";
f1c_sctp.connect_address = cu_cp_addr;
f1c_sctp.connect_port = 38471;
f1c_sctp.connect_port = F1AP_PORT;
f1c_sctp.ppid = F1AP_PPID;
f1c_sctp.bind_address = bind_addr;
return create_f1c_gateway_client(f1c_du_sctp_gateway_config{f1c_sctp, broker, f1ap_pcap});
Expand Down
21 changes: 21 additions & 0 deletions apps/gnb/gnb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,26 @@ static void register_app_logs(const logger_appconfig& log_cfg,
register_dynamic_du_loggers(du_loggers);
}

static void autoderive_slicing_args(dynamic_du_unit_config& du_unit_cfg, cu_cp_unit_config& cu_cp_config)
{
std::vector<s_nssai_t> du_slices;
for (const auto& cell_cfg : du_unit_cfg.du_high_cfg.config.cells_cfg) {
for (const auto& slice : cell_cfg.cell.slice_cfg) {
if (du_slices.end() == std::find(du_slices.begin(), du_slices.end(), slice.s_nssai)) {
du_slices.push_back(slice.s_nssai);
}
}
}
// NOTE: A CU-CP can serve more slices than slices configured in the DU cells.
// [Implementation-defined] Ensure that all slices served by DU cells are part of CU-CP served slices.
for (const auto& slice : du_slices) {
if (cu_cp_config.slice_cfg.end() ==
std::find(cu_cp_config.slice_cfg.begin(), cu_cp_config.slice_cfg.end(), slice)) {
cu_cp_config.slice_cfg.push_back(slice);
}
}
}

int main(int argc, char** argv)
{
// Set the application error handler.
Expand Down Expand Up @@ -225,6 +245,7 @@ int main(int argc, char** argv)
// Set the callback for the app calling all the autoderivation functions.
app.callback([&app, &gnb_cfg, &du_unit_cfg, &cu_cp_config]() {
autoderive_gnb_parameters_after_parsing(app, gnb_cfg);
autoderive_slicing_args(du_unit_cfg, cu_cp_config);
autoderive_dynamic_du_parameters_after_parsing(app, du_unit_cfg);

// Create the PLMN and TAC list from the cells.
Expand Down
1 change: 1 addition & 0 deletions apps/services/metrics_log_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ void metrics_log_helper::report_metrics(const rlc_metrics& metrics)
fmt::format_to(buffer, " du={}", metrics.du_index);
fmt::format_to(buffer, " ue={}", metrics.ue_index);
fmt::format_to(buffer, " rb={}", metrics.rb_id);
fmt::format_to(buffer, " mode={}", metrics.rx.mode);
fmt::format_to(buffer, " TX=[{}]", format_rlc_tx_metrics(metrics.metrics_period, metrics.tx));
fmt::format_to(buffer, " RX=[{}] ", format_rlc_rx_metrics(metrics.metrics_period, metrics.rx));
logger.debug("{}", to_c_str(buffer));
Expand Down
12 changes: 6 additions & 6 deletions apps/services/rlc_metrics_plotter_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ void rlc_metrics_plotter_json::report_metrics(const rlc_metrics& drb)
ctx.get<mlist_drbs>().emplace_back();
auto& output = ctx.get<mlist_drbs>().back();

output.write<metric_du_id>(drb.du_index);
output.write<metric_du_id>(static_cast<uint32_t>(drb.du_index));
output.write<metric_ue_id>(drb.ue_index);
output.write<metric_drb_id>(static_cast<uint8_t>(drb.rb_id.get_drb_id()));

// TX metrics
auto& tx_output = output.get<mset_drb_tx_container>();
tx_output.write<metric_tx_num_sdus>(drb.tx.num_sdus);
tx_output.write<metric_tx_num_sdu_bytes>(drb.tx.num_sdu_bytes);
tx_output.write<metric_tx_num_dropped_sdus>(drb.tx.num_dropped_sdus);
tx_output.write<metric_tx_num_discarded_sdus>(drb.tx.num_discarded_sdus);
tx_output.write<metric_tx_num_discard_failures>(drb.tx.num_discarded_sdus);
tx_output.write<metric_tx_num_sdus>(drb.tx.tx_high.num_sdus);
tx_output.write<metric_tx_num_sdu_bytes>(drb.tx.tx_high.num_sdu_bytes);
tx_output.write<metric_tx_num_dropped_sdus>(drb.tx.tx_high.num_dropped_sdus);
tx_output.write<metric_tx_num_discarded_sdus>(drb.tx.tx_high.num_discarded_sdus);
tx_output.write<metric_tx_num_discard_failures>(drb.tx.tx_high.num_discarded_sdus);

// RX metrics
auto& rx_output = output.get<mset_drb_rx_container>();
Expand Down
4 changes: 2 additions & 2 deletions apps/units/cu_cp/cu_cp_config_translators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ srs_cu_cp::cu_cp_configuration srsran::generate_cu_cp_config(const cu_cp_unit_co
cu_cfg.mobility_config.trigger_handover_from_measurements;

// F1AP-CU config.
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;
out_cfg.f1ap.proc_timeout = std::chrono::milliseconds{cu_cfg.f1ap_config.procedure_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 Down
4 changes: 2 additions & 2 deletions apps/units/cu_cp/cu_cp_unit_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ struct cu_cp_unit_security_config {

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

/// RLC UM TX configuration
Expand Down
10 changes: 5 additions & 5 deletions apps/units/cu_cp/cu_cp_unit_config_cli11_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ static void configure_cli11_security_args(CLI::App& app, cu_cp_unit_security_con
static void configure_cli11_f1ap_args(CLI::App& app, cu_cp_unit_f1ap_config& f1ap_params)
{
add_option(app,
"--ue_context_setup_timeout",
f1ap_params.ue_context_setup_timeout,
"UE context setup timeout in milliseconds")
"--procedure_timeout",
f1ap_params.procedure_timeout,
"Time that the F1AP waits for a DU response in milliseconds")
->capture_default_str();
}

Expand Down Expand Up @@ -479,10 +479,10 @@ void srsran::configure_cli11_with_cu_cp_unit_config_schema(CLI::App& app, cu_cp_

// Slicing section.
auto slicing_lambda = [&unit_cfg](const std::vector<std::string>& values) {
// Prepare the radio bearers
// Prepare the slices.
unit_cfg.slice_cfg.resize(values.size());

// Format every QoS setting.
// Format every slicing setting.
for (unsigned i = 0, e = values.size(); i != e; ++i) {
CLI::App subapp("Slicing parameters", "Slicing config, item #" + std::to_string(i));
subapp.config_formatter(create_yaml_config_parser());
Expand Down
2 changes: 1 addition & 1 deletion apps/units/cu_cp/cu_cp_unit_config_yaml_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static YAML::Node build_cu_cp_f1ap_section(const cu_cp_unit_f1ap_config& config)
{
YAML::Node node;

node["ue_context_setup_timeout"] = config.ue_context_setup_timeout;
node["procedure_timeout"] = config.procedure_timeout;

return node;
}
Expand Down
19 changes: 19 additions & 0 deletions apps/units/flexible_du/du_high/du_high_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "srsran/ran/pucch/pucch_configuration.h"
#include "srsran/ran/pusch/pusch_mcs.h"
#include "srsran/ran/rnti.h"
#include "srsran/ran/s_nssai.h"
#include "srsran/ran/sib/system_info_config.h"
#include "srsran/ran/slot_pdu_capacity_constants.h"
#include "srsran/ran/subcarrier_spacing.h"
Expand Down Expand Up @@ -498,6 +499,22 @@ struct du_high_unit_prach_config {
uint8_t nof_cb_preambles_per_ssb = 64;
};

/// Slice scheduling configuration for a cell.
struct du_high_unit_cell_slice_sched_config {
/// Sets the minimum percentage of PRBs to be allocated to this group.
unsigned min_prb_policy_ratio = 0;
/// Sets the maximum percentage of PRBs to be allocated to this group.
unsigned max_prb_policy_ratio = 100;
};

/// Slice configuration for a cell.
struct du_high_unit_cell_slice_config {
/// Slice identifier.
s_nssai_t s_nssai = s_nssai_t{1};
/// Slice scheduling configuration.
du_high_unit_cell_slice_sched_config sched_cfg;
};

/// Base cell configuration.
struct du_high_unit_base_cell_config {
/// Physical cell identifier.
Expand Down Expand Up @@ -552,6 +569,8 @@ struct du_high_unit_base_cell_config {
du_high_unit_csi_config csi_cfg;
/// Scheduler expert configuration.
du_high_unit_scheduler_expert_config sched_expert_cfg;
/// Network slice configuration.
std::vector<du_high_unit_cell_slice_config> slice_cfg;
};

struct du_high_unit_test_mode_ue_config {
Expand Down
48 changes: 48 additions & 0 deletions apps/units/flexible_du/du_high/du_high_config_cli11_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,37 @@ static void configure_cli11_sib_args(CLI::App& app, du_high_unit_sib_config& sib
->check(CLI::IsMember({100, 200, 300, 400, 600, 1000, 1500, 2000}));
}

static void configure_cli11_slicing_scheduling_args(CLI::App& app,
du_high_unit_cell_slice_sched_config& slice_sched_params)
{
add_option(app,
"--min_prb_policy_ratio",
slice_sched_params.min_prb_policy_ratio,
"Minimum percentage of PRBs to be allocated to the slice")
->capture_default_str()
->check(CLI::Range(0U, 100U));
add_option(app,
"--max_prb_policy_ratio",
slice_sched_params.max_prb_policy_ratio,
"Maximum percentage of PRBs to be allocated to the slice")
->capture_default_str()
->check(CLI::Range(1U, 100U));
}

static void configure_cli11_slicing_args(CLI::App& app, du_high_unit_cell_slice_config& slice_params)
{
add_option(app, "--sst", slice_params.s_nssai.sst, "Slice Service Type")
->capture_default_str()
->check(CLI::Range(0, 255));
add_option(app, "--sd", slice_params.s_nssai.sd, "Service Differentiator")
->capture_default_str()
->check(CLI::Range(0, 0xffffff));

// Scheduling configuration.
CLI::App* sched_cfg_subcmd = add_subcommand(app, "sched_cfg", "Slice scheduling configuration")->configurable();
configure_cli11_slicing_scheduling_args(*sched_cfg_subcmd, slice_params.sched_cfg);
}

static void configure_cli11_common_cell_args(CLI::App& app, du_high_unit_base_cell_config& cell_params)
{
add_option(app, "--pci", cell_params.pci, "PCI")->capture_default_str()->check(CLI::Range(0, 1007));
Expand Down Expand Up @@ -1192,6 +1223,23 @@ static void configure_cli11_common_cell_args(CLI::App& app, du_high_unit_base_ce
// Scheduler expert configuration.
CLI::App* sched_expert_subcmd = add_subcommand(app, "sched_expert_cfg", "Scheduler expert parameters");
configure_cli11_scheduler_expert_args(*sched_expert_subcmd, cell_params.sched_expert_cfg);

// Slicing configuration.
auto slicing_lambda = [&cell_params](const std::vector<std::string>& values) {
// Prepare the slices and its configuration.
cell_params.slice_cfg.resize(values.size());

// Format every slicing setting.
for (unsigned i = 0, e = values.size(); i != e; ++i) {
CLI::App subapp("Slicing parameters", "Slicing config, item #" + std::to_string(i));
subapp.config_formatter(create_yaml_config_parser());
subapp.allow_config_extras(CLI::config_extras_mode::capture);
configure_cli11_slicing_args(subapp, cell_params.slice_cfg[i]);
std::istringstream ss(values[i]);
subapp.parse_from_stream(ss);
}
};
add_option_cell(app, "--slicing", slicing_lambda, "Network slicing configuration");
}

static void configure_cli11_cells_args(CLI::App& app, du_high_unit_cell_config& cell_params)
Expand Down
Loading

0 comments on commit 4ac5300

Please sign in to comment.