Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/du_high/mac_test_mode_adapter.cpp
#	lib/du_high/mac_test_mode_adapter.h
#	lib/phy/upper/logging_downlink_processor_decorator.h
#	lib/phy/upper/logging_uplink_processor_decorator.h
#	tests/unittests/phy/upper/channel_processors/prach_detector_test_data.tar.gz
#	tests/unittests/phy/upper/signal_processors/port_channel_estimator_test_data.tar.gz
  • Loading branch information
codebot committed Dec 4, 2023
2 parents 0fd7c93 + 61b56c9 commit 55c984b
Show file tree
Hide file tree
Showing 290 changed files with 6,717 additions and 2,554 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ unit coverage:
- job: intermediate commits
optional: true
artifacts: true
- job: smoke relwithdeb update cache
- job: smoke release update cache
optional: true
artifacts: true

Expand Down
7 changes: 5 additions & 2 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,6 @@ smoke dpdk:
start_in: 90 minutes
interruptible: false
variables:
COMPILER: clang
ENABLE_UHD: "False"
ENABLE_ZEROMQ: "False"
ENABLE_DPDK: "True"
Expand All @@ -969,12 +968,16 @@ smoke dpdk:
parallel:
matrix:
- OS: ubuntu-23.10
COMPILER: [gcc, clang]
DPDK_VERSION: ["22.11.2", "23.07"]
- OS: ubuntu-23.04
COMPILER: [gcc, clang]
DPDK_VERSION: ["22.11.2", "23.07"]
- OS: ubuntu-22.04
COMPILER: [gcc, clang]
DPDK_VERSION: ["22.11.2", "23.07"]
- OS: ubuntu-20.04
COMPILER: [gcc, clang]
DPDK_VERSION: ["22.11.2", "23.07"]

###################
Expand Down Expand Up @@ -1533,10 +1536,10 @@ rhel-8 arm neon:

.dpdk_combinations: &basic_combinations_dpdk
<<: *basic_combinations
COMPILER: clang
ENABLE_UHD: "False"
ENABLE_ZEROMQ: "False"
ENABLE_DPDK: "True"
COMPILER: [gcc, clang]
DPDK_VERSION: ["22.11.2", "23.07"]

ubuntu-20.04 amd64 avx2 dpdk:
Expand Down
59 changes: 56 additions & 3 deletions .gitlab/ci/builders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ stages:
- dependencies
- publish
- manifest
- alt registries

################################################################################
# UHD builder
Expand Down Expand Up @@ -63,9 +64,12 @@ stages:
curl -LJO "https://github.com/EttusResearch/uhd/archive/refs/tags/v${uhd_version}.tar.gz"
tar -xf "uhd-${uhd_version}.tar.gz"
cd "uhd-${uhd_version}/host" && mkdir -p build && cd build
cmake -DENABLE_LIBUHD=On -DCMAKE_INSTALL_PREFIX="${CI_PROJECT_DIR}/.gitlab/ci/builders/uhd/${uhd_version}" .. || cmake -DENABLE_LIBUHD=On -DCMAKE_INSTALL_PREFIX="${CI_PROJECT_DIR}/.gitlab/ci/builders/uhd/${uhd_version}" ..
cmake -DENABLE_LIBUHD=On -DCMAKE_INSTALL_PREFIX="/opt/uhd/${uhd_version}" .. || cmake -DENABLE_LIBUHD=On -DCMAKE_INSTALL_PREFIX="/opt/uhd/${uhd_version}" ..
make -j${KUBERNETES_CPU_REQUEST}
make install
mkdir -p ${CI_PROJECT_DIR}/.gitlab/ci/builders/uhd
cp -r /opt/uhd/${uhd_version} ${CI_PROJECT_DIR}/.gitlab/ci/builders/uhd/${uhd_version}
}
# Publish compiled version to the registry
Expand Down Expand Up @@ -164,8 +168,11 @@ ubuntu-20.04-uhd:
cd /tmp
curl -L "https://fast.dpdk.org/rel/dpdk-${dpdk_version}.tar.xz" | tar -xJ
cd dpdk*${dpdk_version}
meson build --prefix "${CI_PROJECT_DIR}/.gitlab/ci/builders/dpdk/${dpdk_version}"
meson build --prefix "/opt/dpdk/${dpdk_version}"
ninja -C build install
mkdir -p ${CI_PROJECT_DIR}/.gitlab/ci/builders/dpdk
cp -r /opt/dpdk/${dpdk_version} ${CI_PROJECT_DIR}/.gitlab/ci/builders/dpdk/${dpdk_version}
}
# Publish compiled version to the registry
Expand All @@ -190,7 +197,7 @@ ubuntu-20.04-uhd:
expire_in: 30 minutes
parallel:
matrix:
- dpdk_version: ["21.08.PC802", "22.11.2", "23.07"]
- dpdk_version: ["21.08", "22.11.2", "23.07"]

ubuntu-23.10-dpdk:
extends: .ubuntu-dpdk-builder
Expand Down Expand Up @@ -473,3 +480,49 @@ docker manifest rhel 8:
--amend ${CR_REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-rhel-8:${VERSION}-amd64 \
--amend ${CR_REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-rhel-8:${VERSION}-arm64
docker manifest push ${CR_REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-rhel-8:${VERSION}
tag alt registries:
extends: .docker manifest
stage: alt registries
variables:
VERSION: $DOCKER_BUILDER_VERSION
needs:
- builder version
- job: docker-builder-publish [archlinux, latest]
artifacts: false
- job: "docker-builder-publish [debian]: [11]"
artifacts: false
- job: "docker-builder-publish [debian]: [12]"
artifacts: false
- job: docker manifest ubuntu 20.04
artifacts: false
- job: docker manifest ubuntu 22.04
artifacts: false
- job: docker manifest ubuntu 23.04
artifacts: false
- job: docker manifest ubuntu 23.10
artifacts: false
- job: docker manifest rhel 8
artifacts: false
script:
- |
DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y --no-install-recommends skopeo
- |
skopeo copy \
docker://${CR_REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${VERSION} \
docker://${ALT_REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${VERSION}
parallel:
matrix:
- OS_NAME: ubuntu
OS_VERSION: ["20.04", "22.04", "23.04", "23.10"]
ALT_REGISTRY: ${GITLAB_REGISTRY_URI}
- OS_NAME: debian
OS_VERSION: ["11", "12"]
ALT_REGISTRY: ${GITLAB_REGISTRY_URI}
- OS_NAME: archlinux
OS_VERSION: latest
ALT_REGISTRY: ${GITLAB_REGISTRY_URI}
- OS_NAME: rhel
OS_VERSION: "8"
ALT_REGISTRY: ${GITLAB_REGISTRY_URI}
2 changes: 1 addition & 1 deletion .gitlab/ci/builders/archlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN pacman-key --init \
RUN install_dependencies.sh && pacman -Syu --noconfirm \
git git-lfs \
clang \
ccache valgrind libelf libdwarf \
ccache valgrind \
python-pip
RUN git lfs install && pip install --break-system-packages gcovr==5.0

Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/builders/codechecker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ ADD install_dependencies.sh /usr/local/bin
RUN chmod +x /usr/local/bin/install_dependencies.sh

RUN DEBIAN_FRONTEND=noninteractive apt-get update && install_dependencies.sh \
&& apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/*
&& apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion .gitlab/ci/builders/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN TZ=Europe/Madrid && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $
RUN install_dependencies.sh && apt-get install -y --no-install-recommends \
git git-lfs \
clang llvm \
ccache gcovr valgrind libelf-dev libdwarf-dev \
ccache gcovr valgrind \
python3-dev python3-venv \
&& apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* && git lfs install

Expand Down
9 changes: 5 additions & 4 deletions .gitlab/ci/builders/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

#
# This script will install srsran dependencies
#
Expand All @@ -10,6 +9,8 @@
# E.g.: ./install_dependencies extra
#

set -e

main() {

# Check number of args
Expand Down Expand Up @@ -37,7 +38,7 @@ main() {
fi
if [[ "$mode" == "all" || "$mode" == "extra" ]]; then
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
libzmq3-dev libuhd-dev uhd-host libboost-program-options-dev libdpdk-dev
libzmq3-dev libuhd-dev uhd-host libboost-program-options-dev libdpdk-dev libelf-dev libdwarf-dev
fi

elif [[ "$ID" == "arch" ]]; then
Expand All @@ -48,7 +49,7 @@ main() {
pacman -Syu --noconfirm fftw mbedtls yaml-cpp lksctp-tools gtest
fi
if [[ "$mode" == "all" || "$mode" == "extra" ]]; then
pacman -Syu --noconfirm zeromq libuhd boost dpdk
pacman -Syu --noconfirm zeromq libuhd boost dpdk libelf libdwarf
fi

elif [[ "$ID" == "rhel" ]]; then
Expand All @@ -59,7 +60,7 @@ main() {
dnf -y install fftw-devel lksctp-tools-devel yaml-cpp-devel mbedtls-devel
fi
if [[ "$mode" == "all" || "$mode" == "extra" ]]; then
dnf -y install cppzmq-devel libusb1-devel boost-devel numactl-devel # dpdk
dnf -y install cppzmq-devel libusb1-devel boost-devel numactl-devel # dpdk libelf libdwarf
fi

fi
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/builders/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builder version:
temp_archive=$(mktemp)
tar -cf "$temp_archive" -C "$@" --mtime='1970-01-01' --sort=name .
# Compute the hash of the archive using sha256sum
# Generate the hash of the archive using sha256sum
hash=$(sha256sum "$temp_archive" | cut -c 1-32)
echo "$hash"
Expand Down
33 changes: 1 addition & 32 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ load retina variables:
sed -i "s|- local_path: ../../build/apps/gnb/gnb|- local_path: ../../|; s|remote_path: /usr/local/bin|remote_path: $CI_PROJECT_DIR|; s|is_executable: true|is_executable: false|" ${CI_PROJECT_DIR}/.gitlab/ci/e2e/retina_request_${TESTBED}.yml
# Run Retina
- |
E2E_CMD="retina-launcher --retina-request=${CI_PROJECT_DIR}/.gitlab/ci/e2e/retina_request_${TESTBED}.yml --log-folder=./log --html=./log/report.html --self-contained-html --junitxml=out.xml ${PYTEST_ARGS} --reruns 3 --only-rerun ErrorReportedByAgent --only-rerun ValidationError -k '${KEYWORDS}' -m '${MARKERS}' --register-parameter ue.all.log_level=$E2E_LOG_LEVEL gnb.all.log_level=$E2E_LOG_LEVEL ${RETINA_ARGS}"
E2E_CMD="retina-launcher --retina-request=${CI_PROJECT_DIR}/.gitlab/ci/e2e/retina_request_${TESTBED}.yml --log-folder=./log --html=./log/report.html --self-contained-html --junitxml=out.xml ${PYTEST_ARGS} -k '${KEYWORDS}' -m '${MARKERS}' --register-parameter ue.all.log_level=$E2E_LOG_LEVEL gnb.all.log_level=$E2E_LOG_LEVEL ${RETINA_ARGS}"
echo "${E2E_CMD}"
eval $E2E_CMD
after_script:
Expand Down Expand Up @@ -304,37 +304,6 @@ zmq-valgrind:
artifacts: true
- *retina-needs

rf:
extends: .rf
variables:
KEYWORDS: "not iperf"
E2E_LOG_LEVEL: "info"
allow_failure: true

rf-iperf-udp:
extends: .rf
variables:
KEYWORDS: "iperf and udp"
E2E_LOG_LEVEL: "info"
allow_failure: true

rf-iperf-tcp:
extends: .rf
variables:
KEYWORDS: "iperf and tcp"
E2E_LOG_LEVEL: "info"
allow_failure: true

rf-tsan:
extends: .rf
variables:
MARKERS: "rf_not_crash"
needs:
- job: "smoke tsan update cache"
artifacts: true
- *retina-needs
allow_failure: true

rf-asan:
extends: .rf
variables:
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/e2e/.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb
RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina
RETINA_VERSION=0.36.15
RETINA_VERSION=0.37.8
AMARISOFT_VERSION=2023-03-17
SRSUE_VERSION=23.04.01
OPEN5GS_VERSION=2.5.6
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
METRICS_SERVER_VERSION=1.1.0
METRICS_SERVER_VERSION=1.3.0
8 changes: 4 additions & 4 deletions .gitlab/ci/e2e/retina_request_rf_b200.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
requirements:
arch: amd64
cpu:
requests: 11
limits: 11
requests: 10
limits: 10
memory:
requests: "12G"
limits: "12G"
Expand All @@ -45,8 +45,8 @@
requirements:
arch: amd64
cpu:
requests: 11
limits: 11
requests: 10
limits: 10
memory:
requests: "12G"
limits: "12G"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ if (ENABLE_DPDK)
set(DPDK_MIN_VERSION "22.11")
find_package(DPDK ${DPDK_MIN_VERSION})
if (DPDK_FOUND)
include_directories(${DPDK_INCLUDE_DIRS})
include_directories(SYSTEM ${DPDK_INCLUDE_DIRS})
endif (DPDK_FOUND)
else (ENABLE_DPDK)
unset(DPDK_FOUND CACHE)
Expand Down
22 changes: 15 additions & 7 deletions apps/examples/du/du_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ static lower_phy_configuration create_lower_phy_configuration()
{
lower_phy_configuration phy_config;

phy_config.logger = &du_logger;
phy_config.scs = scs;
phy_config.cp = cp;
phy_config.dft_window_offset = 0.5F;
Expand Down Expand Up @@ -557,6 +558,8 @@ static radio_configuration::radio generate_radio_config()
out_cfg.args = "tx_port=" + tx_address + ",rx_port=" + rx_address;
out_cfg.log_level = log_level;
out_cfg.sampling_rate_hz = srate.to_Hz();
out_cfg.discontinuous_tx = false;
out_cfg.power_ramping_us = 0.0F;
out_cfg.otw_format = otw_format;
out_cfg.clock = clock_src;

Expand Down Expand Up @@ -731,11 +734,12 @@ int main(int argc, char** argv)
upper->set_rx_results_notifier(phy_adaptor->get_rx_results_notifier());
upper->set_timing_notifier(phy_adaptor->get_timing_notifier());

fapi_slot_last_message_dummy last_msg_notifier;
std::unique_ptr<fapi::slot_message_gateway> logging_slot_gateway;
std::unique_ptr<fapi::slot_data_message_notifier> logging_slot_data_notifier;
std::unique_ptr<fapi::slot_time_message_notifier> logging_slot_time_notifier;
std::unique_ptr<fapi_adaptor::mac_fapi_adaptor> mac_adaptor;
fapi_slot_last_message_dummy last_msg_notifier;
std::unique_ptr<fapi::slot_message_gateway> logging_slot_gateway;
std::unique_ptr<fapi::slot_time_message_notifier> logging_slot_time_notifier;
std::unique_ptr<fapi::slot_error_message_notifier> logging_slot_error_notifier;
std::unique_ptr<fapi::slot_data_message_notifier> logging_slot_data_notifier;
std::unique_ptr<fapi_adaptor::mac_fapi_adaptor> mac_adaptor;
if (enable_fapi_logs) {
// Create gateway loggers and intercept MAC adaptor calls.
logging_slot_gateway = fapi::create_logging_slot_gateway(phy_adaptor->get_slot_message_gateway());
Expand All @@ -749,13 +753,16 @@ int main(int argc, char** argv)
get_max_Nprb(bs_channel_bandwidth_to_MHz(channel_bw_mhz), scs, srsran::frequency_range::FR1));

// Create notification loggers.
logging_slot_data_notifier = fapi::create_logging_slot_data_notifier(mac_adaptor->get_slot_data_notifier());
report_error_if_not(logging_slot_data_notifier, "Unable to create logger for slot data notifications.");
logging_slot_time_notifier = fapi::create_logging_slot_time_notifier(mac_adaptor->get_slot_time_notifier());
report_error_if_not(logging_slot_time_notifier, "Unable to create logger for slot time notifications.");
logging_slot_error_notifier = fapi::create_logging_slot_error_notifier(mac_adaptor->get_slot_error_notifier());
report_error_if_not(logging_slot_error_notifier, "Unable to create logger for slot error notifications.");
logging_slot_data_notifier = fapi::create_logging_slot_data_notifier(mac_adaptor->get_slot_data_notifier());
report_error_if_not(logging_slot_data_notifier, "Unable to create logger for slot data notifications.");

// Connect the PHY adaptor with the loggers to intercept PHY notifications.
phy_adaptor->set_slot_time_message_notifier(*logging_slot_time_notifier);
phy_adaptor->set_slot_error_message_notifier(*logging_slot_error_notifier);
phy_adaptor->set_slot_data_message_notifier(*logging_slot_data_notifier);
} else {
mac_adaptor = build_mac_fapi_adaptor(
Expand All @@ -767,6 +774,7 @@ int main(int argc, char** argv)
get_max_Nprb(bs_channel_bandwidth_to_MHz(channel_bw_mhz), scs, srsran::frequency_range::FR1));
report_error_if_not(mac_adaptor, "Unable to create MAC adaptor.");
phy_adaptor->set_slot_time_message_notifier(mac_adaptor->get_slot_time_notifier());
phy_adaptor->set_slot_error_message_notifier(mac_adaptor->get_slot_error_notifier());
phy_adaptor->set_slot_data_message_notifier(mac_adaptor->get_slot_data_notifier());
}

Expand Down
2 changes: 2 additions & 0 deletions apps/examples/phy/radio_ssb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ static radio_configuration::radio create_radio_configuration()
radio_config.clock.sync = radio_configuration::to_clock_source(sync_source);
radio_config.sampling_rate_hz = srate.to_Hz<double>();
radio_config.otw_format = otw_format;
radio_config.discontinuous_tx = false;
radio_config.power_ramping_us = 0.0F;
radio_config.args = device_arguments;
radio_config.log_level = log_level;
for (unsigned sector_id = 0; sector_id != nof_sectors; ++sector_id) {
Expand Down
Loading

0 comments on commit 55c984b

Please sign in to comment.