Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	CMakeLists.txt
#	apps/units/cu_cp/logger_registrator.h
#	include/srsran/f1u/f1u_cu_up_entity.h
#	include/srsran/f1u/f1u_cu_up_rx.h
#	include/srsran/f1u/f1u_cu_up_transport.h
#	include/srsran/f1u/f1u_cu_up_tx.h
#	include/srsran/gtpu/gtpu_tunnel_tx.h
#	lib/cu_cp/routine_managers/du_processor_routine_manager.cpp
#	lib/cu_cp/routine_managers/du_processor_routine_manager.h
#	lib/cu_cp/routines/mobility/inter_ngran_node_n2_handover_routine.cpp
#	lib/cu_cp/routines/mobility/inter_ngran_node_n2_handover_routine.h
#	lib/phy/upper/equalization/equalize_zf_2x2.cpp
#	lib/phy/upper/equalization/equalize_zf_2x2.h
#	lib/support/network/epoll_helper.h
#	tests/unittests/cu_cp/du_processor/inter_ngran_node_n2_handover_routine_test.cpp
#	tests/unittests/cu_cp/du_processor/inter_ngran_node_n2_handover_routine_test_helpers.h
#	tests/unittests/phy/upper/channel_processors/pusch/pusch_demodulator_test_data.tar.gz
#	tests/unittests/phy/upper/equalization/channel_equalizer_test_data.tar.gz
#	tests/unittests/phy/upper/signal_processors/dmrs_pusch_estimator_test_data.tar.gz
#	tests/unittests/phy/upper/signal_processors/port_channel_estimator_test_data.tar.gz
  • Loading branch information
codebot authored and asaezper committed May 13, 2024
2 parents a159503 + 7172eed commit 78238fd
Show file tree
Hide file tree
Showing 471 changed files with 10,271 additions and 5,999 deletions.
18 changes: 13 additions & 5 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

include:
- project: softwareradiosystems/ci/srsran_project_packaging
ref: "4"
ref: "5"
file: .gitlab/ci-shared/package.yml
- local: .gitlab/ci/src_cache.yml

Expand All @@ -27,10 +27,12 @@ variables:
- amd64
- amd64-avx2
- amd64-avx2-avx512
- "on-prem-amd64"
- "on-prem-arm64"
- "aws-spot-amd64"
- "aws-spot-arm64"
- arm64
- on-prem-amd64
- on-prem-amd64-avx2-avx512
- on-prem-arm64
- aws-spot-amd64
- aws-spot-arm64
value: "amd64-avx2"
OS:
description: Operating system
Expand Down Expand Up @@ -112,6 +114,7 @@ variables:
ENABLE_TSAN: "" # Empty for cmake default
ENABLE_GCOV: "" # Empty for cmake default
ENABLE_WERROR: "" # Empty for cmake default
FORCE_DEBUG_INFO: "" # Empty for cmake default
AUTO_DETECT_ISA: ""
# CI
SAVE_ARTIFACTS: "" # Empty by default
Expand Down Expand Up @@ -182,6 +185,9 @@ variables:
if [ -n "${ENABLE_WERROR}" ]; then
BUILD_CMD="${BUILD_CMD} -DENABLE_WERROR=${ENABLE_WERROR}"
fi
if [ -n "${FORCE_DEBUG_INFO}" ]; then
BUILD_CMD="${BUILD_CMD} -DFORCE_DEBUG_INFO=${FORCE_DEBUG_INFO}"
fi
if [[ $TEST_MODE = "none" ]]; then
BUILD_CMD="${BUILD_CMD} -DBUILD_TESTS=False"
fi
Expand Down Expand Up @@ -1793,6 +1799,7 @@ basic avx512 dpdk:
DPDK_VERSION: "23.11"
AUTO_DETECT_ISA: "True"
ENABLE_AVX512: "True"
FORCE_DEBUG_INFO: "True"
ASSERT_LEVEL: MINIMAL
SAVE_ARTIFACTS: "True"
KUBERNETES_CPU_REQUEST: 14
Expand Down Expand Up @@ -1823,6 +1830,7 @@ basic avx512 dpdk withassert:
DPDK_VERSION: "23.11"
AUTO_DETECT_ISA: "True"
ENABLE_AVX512: "True"
FORCE_DEBUG_INFO: "True"
ASSERT_LEVEL: NORMAL
SAVE_ARTIFACTS: "True"
KUBERNETES_CPU_REQUEST: 14
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/builders/archlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ADD builder.sh /usr/local/bin
RUN chmod +x /usr/local/bin/builder.sh

RUN python -m venv /usr/local/builder_tools
RUN /usr/local/builder_tools/bin/pip install "pandas<3" "psutil < 6"
RUN /usr/local/builder_tools/bin/pip install "pandas <3" "psutil < 6"
ADD changed_tests.py /usr/local/bin
RUN chmod +x /usr/local/bin/changed_tests.py
ADD ram_reporter.py /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ metrics version check in retina:
stage: compose
image: docker:24.0.7
tags:
- docker
- saas-linux-small-amd64
timeout: 2h
variables:
DOCKER_HOST: tcp://docker:2375/
Expand Down
23 changes: 12 additions & 11 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ e2e request validation:
echo "${E2E_CMD}"
eval $E2E_CMD
after_script:
# Push test metrics
- |
find . -iname "test_metrics.csv" -exec \
influx write --host $INFLUXDB_URL --token $INFLUXDB_TOKEN --org $INFLUXDB_ORG \
--bucket ci --file {} \;
- |
echo "*******************************************************************************************************************************"
echo "Test report ---> https://softwareradiosystems.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/tests/e2e/log//report.html"
Expand Down Expand Up @@ -289,9 +294,15 @@ amari 32UE:
"iperf and udp and not band:3",
"iperf and tcp and band:3",
"iperf and tcp and not band:3",
"reestablishment",
]

amari 32UE beta:
extends: amari 32UE
allow_failure: true
parallel:
matrix:
- KEYWORDS: ["reestablishment", "handover"]

amari 32UE asan:
extends: .zmq
variables:
Expand Down Expand Up @@ -344,16 +355,6 @@ test mode ue:
- *txrx-lib
- *retina-needs

test mode ue tsan:
extends: test mode ue
when: manual
allow_failure: true
needs:
- job: "basic tsan"
artifacts: true
- *txrx-lib
- *retina-needs

test mode ue asan:
extends: test mode ue
needs:
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/e2e/.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
SRSGNB_REGISTRY_URI=registry.gitlab.com/softwareradiosystems/srsgnb
RETINA_REGISTRY_PREFIX=registry.gitlab.com/softwareradiosystems/ci/retina
RETINA_VERSION=0.47.1
RETINA_VERSION=0.48.11
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
OPEN5GS_VERSION=2.7.0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
METRICS_SERVER_VERSION=1.7.0
METRICS_SERVER_VERSION=1.7.1
DPDK_VERSION=23.11
ZMQ_HOSTLABEL_0=kubernetes.io/hostname=k8s-worker-vm2
ZMQ_HOSTLABEL_1=kubernetes.io/hostname=k8s-worker-vm2
10 changes: 5 additions & 5 deletions .gitlab/ci/e2e/retina_request_rf_b200.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
- name: amarisoft-ue
type: ue
image: ${RETINA_REGISTRY_PREFIX}/amarisoftue:${AMARISOFT_VERSION}_${RETINA_VERSION}
labels: ["kubernetes.io/hostname=sdr4"]
labels: ["kubernetes.io/hostname=hp-oran"]
nof_ports: 4
requirements:
arch: amd64
cpu:
requests: 10
limits: 10
requests: 14
limits: 14
memory:
requests: "16G"
limits: "16G"
requests: "48G"
limits: "48G"
ephemeral-storage:
requests: "6G"
limits: "6G"
Expand Down
1 change: 1 addition & 0 deletions .gitlab/ci/e2e/retina_request_viavi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
arch: amd64
cpu:
requests: 20
limits: 20
memory:
requests: "64G"
limits: "64G"
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ release public:
# Public tag name: release_X_Y. Ex: release_23_4
- export PUBLIC_TAG=release_${CI_COMMIT_TAG//./_}
# Public release name: $PUBLIC_NAME X_Y. Ex: srsRAN Project 23.4
- export PUBLIC_RELEASE_NAME=${PUBLIC_NAME} ${CI_COMMIT_TAG}
- export PUBLIC_RELEASE_NAME="${PUBLIC_NAME} ${CI_COMMIT_TAG}"
# Public release notes: tag message
- export PUBLIC_RELEASE_NOTES=${CI_COMMIT_TAG_MESSAGE}

Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/trx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ build amariue zmq driver:
- if: $CI_DESCRIPTION =~ /Nightly E2E Tests/
artifacts:
<<: *trx_artifacts
expire_in: 1 day
expire_in: 3 days
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ option(AUTO_DETECT_ISA "Enable automatic ISA detection" ON)
option(BUILD_TESTS "Compile tests" ON)
option(ENABLE_GPROF "Enable gprof" OFF)
option(USE_PHY_TESTVECTORS "Enable testvector PHY tests" OFF)
option(FORCE_DEBUG_INFO "Add debug information to Release build" OFF)

# Set assertion level options and default value.
set(ASSERT_LEVEL "AUTO" CACHE STRING "Assertion paranoia level")
Expand Down Expand Up @@ -167,6 +168,10 @@ if (ENABLE_TSAN)
add_definitions(-DENABLE_TSAN)
endif (ENABLE_TSAN)

if (FORCE_DEBUG_INFO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif (FORCE_DEBUG_INFO)

if (ENABLE_GCOV)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/du/du_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ 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.tx_mode = radio_configuration::transmission_mode::continuous;
out_cfg.power_ramping_us = 0.0F;
out_cfg.otw_format = otw_format;
out_cfg.clock = clock_src;
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/phy/radio_ssb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ 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.tx_mode = radio_configuration::transmission_mode::continuous;
radio_config.power_ramping_us = 0.0F;
radio_config.args = device_arguments;
radio_config.log_level = log_level;
Expand Down
10 changes: 0 additions & 10 deletions apps/examples/phy/rx_symbol_handler_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,6 @@ class rx_symbol_handler_example : public upper_phy_rx_symbol_handler
context.start_symbol,
context.sector);
}

void handle_rx_srs_symbol(const upper_phy_rx_symbol_context& context) override
{
std::unique_lock<std::mutex> lock(mutex);
logger.debug(context.slot.sfn(),
context.slot.slot_index(),
"SRS symbol {} received for sector {}",
context.symbol,
context.sector);
}
};

} // namespace srsran
10 changes: 4 additions & 6 deletions apps/examples/radio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
# and at http://www.gnu.org/licenses/.
#

if (UHD_FOUND)
add_executable(radio_util_sample radio_util_sample.cpp)
target_link_libraries(radio_util_sample srsran_radio srslog srsran_support)
add_executable(radio_util_sample radio_util_sample.cpp)
target_link_libraries(radio_util_sample srsran_radio srslog srsran_support)

add_executable(rx_power_analyzer rx_power_analyzer.cpp)
target_link_libraries(rx_power_analyzer srsran_radio srslog srsran_support srsvec)
endif (UHD_FOUND)
add_executable(rx_power_analyzer rx_power_analyzer.cpp)
target_link_libraries(rx_power_analyzer srsran_radio srslog srsran_support srsvec)
3 changes: 2 additions & 1 deletion apps/examples/radio/radio_util_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ int main(int argc, char** argv)
config.clock.clock = radio_configuration::clock_sources::source::DEFAULT;
config.sampling_rate_hz = sampling_rate_hz;
config.otw_format = otw_format;
config.discontinuous_tx = enable_discontinuous_tx;
config.tx_mode = enable_discontinuous_tx ? radio_configuration::transmission_mode::discontinuous
: radio_configuration::transmission_mode::continuous;
config.power_ramping_us = power_ramping_us;
config.args = device_arguments;
config.log_level = log_level;
Expand Down
36 changes: 30 additions & 6 deletions apps/examples/radio/rx_power_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ using result_type = std::tuple<float, unsigned, float>;
static std::vector<result_type> measurement_results;

/// Set to true to stop.
static std::atomic<bool> stop = {false};
std::unique_ptr<radio_session> radio = nullptr;
static std::atomic<bool> stop = {true};
static std::unique_ptr<radio_session> radio = nullptr;

static void signal_handler(int sig)
{
Expand Down Expand Up @@ -244,7 +244,7 @@ int main(int argc, char** argv)
config.clock.clock = radio_configuration::clock_sources::source::DEFAULT;
config.sampling_rate_hz = sampling_rate_hz;
config.otw_format = otw_format;
config.discontinuous_tx = false;
config.tx_mode = radio_configuration::transmission_mode::continuous;
config.power_ramping_us = 0;
config.args = device_arguments;
config.log_level = log_level;
Expand Down Expand Up @@ -326,6 +326,10 @@ int main(int argc, char** argv)
baseband_gateway_timestamp start_time = current_time + static_cast<uint64_t>(delay_s * sampling_rate_hz);

// Start processing.
{
bool is_stopped = stop.exchange(false);
srsran_assert(is_stopped, "Radio must be stopped before starting to receive samples");
}
radio->start(start_time);

// Receive and transmit per block basis.
Expand Down Expand Up @@ -358,9 +362,29 @@ int main(int argc, char** argv)
sample_count += block_size;
}

if (!stop) {
// Stop radio operation prior destruction.
radio->stop();
if (!stop.load()) {
// Request stop streaming asynchronously. As TX and RX operations run in the main thread, it avoids deadlock.
std::thread stop_thread([]() {
radio->stop();
bool is_stopped = stop.exchange(true);
srsran_assert(!is_stopped, "Radio must be running before attempting to stop.");
});

// Keep transmitting and receiving until the radio stops.
while (!stop.load()) {
baseband_gateway_transmitter& transmitter = radio->get_baseband_gateway(0).get_transmitter();
baseband_gateway_receiver& receiver = radio->get_baseband_gateway(0).get_receiver();
baseband_gateway_receiver::metadata rx_metadata = receiver.receive(rx_baseband_buffer.get_writer());

if (tx_active) {
baseband_gateway_transmitter_metadata tx_metadata;
tx_metadata.ts = rx_metadata.ts + tx_rx_delay_samples;

transmitter.transmit(tx_baseband_buffer.get_reader(), tx_metadata);
}
}

stop_thread.join();
}

for (unsigned i_channel = 0; i_channel != nof_channels; ++i_channel) {
Expand Down
1 change: 1 addition & 0 deletions apps/gnb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ target_link_libraries(gnb
srsran_build_info
srsran_flexible_du_ru_dynamic
srsran_cu_cp_app_unit
srsran_cu_up_app_unit
)

if (DPDK_FOUND)
Expand Down
Loading

0 comments on commit 78238fd

Please sign in to comment.