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_demodulator_format2_test_data.tar.gz
#	tests/unittests/phy/upper/channel_processors/pucch_processor_format2_test_data.tar.gz
  • Loading branch information
codebot committed Sep 10, 2024
2 parents 10081bf + dd46594 commit 51e44a6
Show file tree
Hide file tree
Showing 129 changed files with 3,188 additions and 550 deletions.
12 changes: 12 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ helm:
- job: trigger docker
artifacts: false

enterprise:
stage: ci
rules:
- if: $CI_DESCRIPTION =~ /Nightly Build Unit Tests/
variables:
CI_DESCRIPTION: Nightly
SRSRAN_COMMIT: $CI_COMMIT_SHA
NOTIFY_SLACK: "true"
trigger:
project: softwareradiosystems/srsran_5g_enterprise
branch: main

################################################################################
## Static
################################################################################
Expand Down
1 change: 1 addition & 0 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,7 @@ basic avx512 dpdk:
extends: .build_and_unit
rules:
- if: $CI_DESCRIPTION =~ /Nightly E2E Tests/
- if: $CI_DESCRIPTION =~ /Weekly/
retry: 2
interruptible: false
variables:
Expand Down
43 changes: 29 additions & 14 deletions .gitlab/ci/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ metrics version check in retina:
tags:
- amd64-avx2
timeout: 2h
before_script:
before_script: &docker_setup
- dockerd-entrypoint.sh &
- |
while ! ( nc -zv localhost 2376 2>&1 >/dev/null )
do
sleep 1
done
gnb docker compose:
.gnb docker compose:
extends: .docker compose
variables: &build_in_compose_variables
KUBERNETES_CPU_REQUEST: 6
Expand All @@ -149,15 +149,26 @@ gnb docker compose:
- docker/docker-compose.yml
- if: $CI_DESCRIPTION =~ /Nightly Build Unit Tests/
interruptible: false
script:
before_script:
- *docker_setup
- docker compose -f docker/docker-compose.yml build --build-arg NUM_CORES=${KUBERNETES_CPU_LIMIT} --build-arg LIB=${LIB} --build-arg LIB_VERSION=${LIB_VERSION} gnb
- sh -c "docker compose -f docker/docker-compose.yml run --no-deps gnb ${TEST_CMD}"
parallel:
matrix:
- <<: *uhd_params
TEST_CMD: gnb amf --no_core=true ru_sdr --device_driver uhd | grep 'Failed to open device with address'
- <<: *dpdk_params
TEST_CMD: gnb amf --no_core=true hal --eal_args='--help'
- sh -c "docker compose -f docker/docker-compose.yml run --no-deps gnb which srscu"
- sh -c "docker compose -f docker/docker-compose.yml run --no-deps gnb which srsdu"

gnb docker compose uhd:
extends: .gnb docker compose
variables:
<<: *uhd_params
script:
- sh -c "docker compose -f docker/docker-compose.yml run --no-deps gnb gnb amf --no_core=true ru_sdr --device_driver uhd | grep 'Failed to open device with address'"

gnb docker compose dpdk:
extends: .gnb docker compose
variables:
<<: *dpdk_params
script:
- sh -c "docker compose -f docker/docker-compose.yml run --no-deps gnb which ru_emulator"
- sh -c "docker compose -f docker/docker-compose.yml run --no-deps gnb gnb amf --no_core=true hal --eal_args='--help'"

5gc docker compose:
extends: .docker compose
Expand Down Expand Up @@ -296,10 +307,6 @@ grafana server image latest:
export NAME="srsran-project"
export VERSION="${SPLIT}_${SUFFIX}"
export BUILD_ARGS="LIB=${LIB};LIB_VERSION=${LIB_VERSION};MARCH=${MARCH};NUM_CORES=${KUBERNETES_CPU_LIMIT};EXTRA_CMAKE_ARGS=\"${EXTRA_CMAKE_ARGS}\""
needs:
- job: gnb docker compose
optional: true
artifacts: false
srsran image split72:
extends: .srsran image
Expand Down Expand Up @@ -338,6 +345,10 @@ srsran image split72:
MARCH: armv8.2-a+crypto+fp16+dotprod
TAG: arm64
PLATFORM: arm64
needs:
- job: gnb docker compose dpdk
optional: true
artifacts: false

srsran image split8:
extends: .srsran image
Expand Down Expand Up @@ -366,3 +377,7 @@ srsran image split8:
MARCH: armv8.2-a+crypto+fp16+dotprod
TAG: arm64
PLATFORM: arm64
needs:
- job: gnb docker compose uhd
optional: true
artifacts: false
33 changes: 21 additions & 12 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,7 @@ android x300:
################################################################################
# VIAVI
###############################################################################

viavi:
.viavi:
stage: rf
extends: .e2e-run
timeout: 8h
Expand All @@ -594,6 +593,9 @@ viavi:
KUBECONFIG_VAR_NAME_EXTRA: "RETINA_NAMESPACE_KUBECONFIG_EXTRA"
RETINA_PARAM_ARGS: "gnb.all.pcap=True gnb.all.rlc_enable=True gnb.all.rlc_rb_type=srb"
RETINA_LAUNCHER_ARGS: "--retina-pod-timeout 900"

viavi:
extends: .viavi
needs:
- job: "basic avx512 dpdk"
artifacts: true
Expand All @@ -608,21 +610,28 @@ viavi:
# "fading and 32UE",
"birth-death and 1UE",
# "birth-death and 32UE",
"32UE and experimental",
"32UE and experimental and not extended",
]

viavi-extended:
extends: .viavi
rules:
- if: $CI_DESCRIPTION =~ /Weekly/
allow_failure: true
needs:
- job: "basic avx512 dpdk"
artifacts: true
- *retina-needs
parallel:
matrix:
- KEYWORDS: [
"extended",
]

viavi-debug:
stage: rf
extends: .e2e-run
extends: .viavi
variables:
GROUP: "viavi"
TESTBED: "viavi"
MARKERS: "viavi_debug"
E2E_LOG_LEVEL: "warning"
KUBECONFIG_VAR_NAME: "RETINA_NAMESPACE_KUBECONFIG"
KUBECONFIG_VAR_NAME_EXTRA: "RETINA_NAMESPACE_KUBECONFIG_EXTRA"
RETINA_PARAM_ARGS: "gnb.all.pcap=True gnb.all.rlc_enable=True gnb.all.rlc_rb_type=srb"
RETINA_LAUNCHER_ARGS: "--retina-pod-timeout 900"
allow_failure: true
needs:
- job: "basic avx512 dpdk withassert"
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.52.9
RETINA_VERSION=0.52.13
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
15 changes: 15 additions & 0 deletions .gitlab/ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,21 @@ notify branch published:
SLACK_CHANNEL: $SLACK_CHANNEL_OK
LEVEL: "ok"

publish maltab:
stage: public
interruptible: false
variables:
CI_DESCRIPTION: Release
NOTIFY_SLACK: "false"
rules:
- if: *on_public_push
- if: *on_public_release
needs:
- job: publish main
trigger:
project: softwareradiosystems/srsgnb_matlab
branch: master

################################################################################
# Release
################################################################################
Expand Down
23 changes: 18 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,24 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
include(version) # sets version information

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
message(STATUS "Build type not specified: defaulting to Release.")
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
# Configure supported build types and default build type
set(supported_build_types "Release" "RelWithDebInfo" "Debug")
set(default_build_type "Release")

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Build type not specified, using default: ${default_build_type}")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Select build type" FORCE)
else()
# Check if build type is supported
if(NOT "${CMAKE_BUILD_TYPE}" IN_LIST supported_build_types)
message(SEND_ERROR "Unsupported build type '${CMAKE_BUILD_TYPE}'. Supported build types: ${supported_build_types}")
else()
message(STATUS "The build type is ${CMAKE_BUILD_TYPE}")
endif()
endif()

# Add possible values for build type in cmake-gui (drop-down widget, for convenience only)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${supported_build_types})

# Generate CMake to include build information
configure_file(
Expand Down
1 change: 1 addition & 0 deletions apps/cu/cu_appconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ 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.
};
Expand Down
2 changes: 2 additions & 0 deletions apps/cu/cu_appconfig_cli11_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ static void configure_cli11_nru_args(CLI::App& app, srs_cu::cu_nru_appconfig& nr
nru_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",
Expand Down
1 change: 1 addition & 0 deletions apps/cu/cu_appconfig_yaml_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static void fill_cu_appconfig_nru_section(YAML::Node node, const srs_cu::cu_nru_
YAML::Node nru_node = cu_up_node["nru"];
nru_node["udp_max_rx_msgs"] = config.udp_rx_max_msgs;
nru_node["bind_addr"] = config.bind_addr;
nru_node["ext_addr"] = config.ext_addr;
}

void srsran::fill_cu_appconfig_in_yaml_schema(YAML::Node& node, const cu_appconfig& config)
Expand Down
4 changes: 2 additions & 2 deletions apps/du/du.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ int main(int argc, char** argv)
du_f1u_gw_config,
*epoll_broker,
workers.get_du_high_executor_mapper(0).ue_mapper().mac_ul_pdu_executor(to_du_ue_index(0)));
std::unique_ptr<srs_du::f1u_du_udp_gateway> du_f1u_conn =
srs_du::create_split_f1u_gw({du_f1u_gw.get(), du_f1u_gtpu_demux.get(), *du_pcaps.f1u, GTPU_PORT});
std::unique_ptr<srs_du::f1u_du_udp_gateway> du_f1u_conn = srs_du::create_split_f1u_gw(
{du_f1u_gw.get(), du_f1u_gtpu_demux.get(), *du_pcaps.f1u, GTPU_PORT, du_cfg.nru_cfg.ext_addr});

// Set up the JSON log channel used by metrics.
srslog::sink& json_sink =
Expand Down
1 change: 1 addition & 0 deletions apps/du/du_appconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct f1ap_appconfig {
struct nru_appconfig {
unsigned pdu_queue_size = 2048;
std::string bind_address = "127.0.10.2";
std::string ext_addr = "auto"; // External address advertised by the F1-U interface
float pool_threshold = 0.9;
};

Expand Down
3 changes: 3 additions & 0 deletions apps/du/du_appconfig_cli11_schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ static void configure_cli11_f1u_args(CLI::App& app, srs_du::nru_appconfig& f1u_p
app.add_option(
"--bind_addr", f1u_params.bind_address, "DU F1-U bind address. If left empty, implicit bind is performed")
->capture_default_str();
app.add_option("--ext_addr",
f1u_params.ext_addr,
"External IP address that is advertised to receive F1-U packets from the CU-UP");
app.add_option(
"--pool_threshold", f1u_params.pool_threshold, "Pool occupancy threshold after which packets are dropped")
->capture_default_str();
Expand Down
1 change: 1 addition & 0 deletions apps/du/du_appconfig_yaml_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ static void fill_du_appconfig_nru_section(YAML::Node node, const srs_du::nru_app
{
node["queue_size"] = config.pdu_queue_size;
node["bind_addr"] = config.bind_address;
node["ext_addr"] = config.ext_addr;
}

static void fill_du_appconfig_f1ap_section(YAML::Node node, const srs_du::f1ap_appconfig& config)
Expand Down
5 changes: 3 additions & 2 deletions apps/units/flexible_du/du_low/du_low_config_validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ static bool validate_upper_phy_threads_appconfig(const du_low_unit_expert_thread
valid = false;
}

// To run the concurrent PDSCH processor with a single thread isn't optimal, although possible.
if ((config.pdsch_processor_type == "concurrent") && !nof_pdsch_threads_range.contains(config.nof_dl_threads)) {
fmt::print("For concurrent PDSCH processor. Number of PHY DL threads (i.e., {}) must be in range {}.\n",
fmt::print("For concurrent PDSCH processor. Number of PHY DL threads (i.e., {}) must be in range {} for better "
"performance.\n",
config.nof_dl_threads,
nof_pdsch_threads_range);
valid = false;
}

if (!nof_ul_dl_threads_range.contains(config.nof_dl_threads)) {
Expand Down
2 changes: 1 addition & 1 deletion apps/units/flexible_du/split_7_2/ru_ofh_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct ru_ofh_unit_base_cell_config {
/// T1a minimum parameter for downlink User-Plane in microseconds.
std::chrono::microseconds T1a_min_up{85};
/// Ta4 maximum parameter for uplink User-Plane in microseconds.
std::chrono::microseconds Ta4_max{300};
std::chrono::microseconds Ta4_max{500};
/// Ta4 minimum parameter for uplink User-Plane in microseconds.
std::chrono::microseconds Ta4_min{85};
/// Enables the Control-Plane PRACH message signalling.
Expand Down
2 changes: 1 addition & 1 deletion configs/gnb_ru_picocom_scb_tdd_n78_20mhz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ru_ofh:
t1a_min_cp_ul: 150
t1a_max_up: 200
t1a_min_up: 80
ta4_max: 300
ta4_max: 500
ta4_min: 10
is_prach_cp_enabled: false
compr_method_ul: bfp
Expand Down
4 changes: 0 additions & 4 deletions configs/low_latency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ cell_cfg:
mac_cell_group:
bsr_cfg:
periodic_bsr_timer: 1

expert_phy:
max_request_headroom_slots: 0
max_proc_delay: 1
17 changes: 9 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,18 @@ RUN /src/docker/scripts/build_${LIB}.sh ${LIB_VERSION} ${MARCH} ${NUM_CORES}
ARG EXTRA_CMAKE_ARGS=""
RUN if [ -z "$NUM_CORES" ]; then NUM_CORES=$(nproc); fi && \
LIB_UPPER=$(echo $LIB | tr '[:lower:]' '[:upper:]') && \
export ${LIB_UPPER}_DIR="/opt/${LIB}/${LIB_VERSION}" && \
/src/docker/scripts/builder.sh \
-m "-j${NUM_CORES} install" \
-DBUILD_TESTS=True \
-DENABLE_${LIB_UPPER}=On \
-DMARCH=${MARCH} \
-DCMAKE_INSTALL_PREFIX=/opt/srs \
export ${LIB_UPPER}_DIR="/opt/${LIB}/${LIB_VERSION}" \
&& \
/src/docker/scripts/builder.sh -m "-j${NUM_CORES} install" \
-DBUILD_TESTS=False -DENABLE_${LIB_UPPER}=On -DMARCH=${MARCH} -DCMAKE_INSTALL_PREFIX=/opt/srs \
${EXTRA_CMAKE_ARGS} /src \
&& \
/src/docker/scripts/builder.sh -m "-j${NUM_CORES} ru_emulator" \
-DBUILD_TESTS=True -DENABLE_${LIB_UPPER}=On -DMARCH=${MARCH} \
${EXTRA_CMAKE_ARGS} /src

# Copy extra binaries
RUN cp /src/build/tests/integrationtests/ofh/ru_emulator /usr/local/bin/ru_emulator
RUN cp /src/build/tests/integrationtests/ofh/ru_emulator /opt/srs/bin/ru_emulator

################
# Stage 2: Run #
Expand Down
2 changes: 1 addition & 1 deletion include/srsran/adt/bounded_bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ class bounded_bitset
/// \return The result of the bitset product.
/// \remark The current implementation supports only a bitset containing one word. An assertion is triggered if \c
/// other contains more than one word.
template <unsigned Factor>
template <unsigned long Factor>
bounded_bitset<Factor * N> kronecker_product(const bounded_bitset<Factor>& other) const
{
static_assert(Factor <= bits_per_word,
Expand Down
4 changes: 4 additions & 0 deletions include/srsran/cu_up/cu_up_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ struct network_interface_config {
/// Local IP address to bind for connection from DU to receive uplink user-plane traffic.
std::string f1u_bind_addr = "127.0.2.1";

/// External IP address that is advertised to receive NR-U packets from the DU.
/// It defaults to \c f1u_bind_addr but may differ in case the CU-UP is behind a NAT.
std::string f1u_ext_addr = "auto";

/// Local port to bind for connection from DU to receive uplink user-plane traffic.
int f1u_bind_port = GTPU_PORT;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct f1u_du_split_gateway_creation_msg {
gtpu_demux* demux;
dlt_pcap& gtpu_pcap;
uint16_t peer_port;
std::string f1u_ext_addr = "auto";
};

std::unique_ptr<f1u_du_udp_gateway> create_split_f1u_gw(f1u_du_split_gateway_creation_msg msg);
Expand Down
4 changes: 1 addition & 3 deletions include/srsran/f1u/local_connector/f1u_local_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ class f1u_gateway_cu_bearer : public f1u_cu_up_gateway_bearer
notifier = nullptr;
dl_tnl_info.reset();
} else {
logger.log_info("Cannot dettach DU bearer, DL-FTEID does not match. F-TEID={}, requested F-TEID={}",
dl_tnl_info,
dl_tnl_info_);
logger.log_info("Skipped detach of DU bearer from old F-TEID={}. Current F-TEID={}", dl_tnl_info_, dl_tnl_info);
}
}

Expand Down
Loading

0 comments on commit 51e44a6

Please sign in to comment.