Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	apps/gnb/adapters/e2_gateway_remote_connector.cpp
#	apps/gnb/adapters/e2_gateway_remote_connector.h
#	apps/gnb/adapters/e2ap_adapter.h
#	include/srsran/e2/e2_connection_client.h
#	lib/cu_up/cu_up_executor_pool.cpp
#	lib/scheduler/ue_scheduling/harq_process.cpp
#	lib/scheduler/ue_scheduling/harq_process.h
  • Loading branch information
codebot committed Oct 14, 2024
2 parents 45da8c1 + 5c329f6 commit 7e84c0c
Show file tree
Hide file tree
Showing 198 changed files with 4,103 additions and 3,599 deletions.
74 changes: 37 additions & 37 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ matlab weekly:
- if: $CI_DESCRIPTION =~ /Weekly/
variables:
ON_SCHEDULE: "true"
CI_DESCRIPTION: Nightly
CI_DESCRIPTION: Weekly
SRSRAN_COMMIT: $CI_COMMIT_SHA
NOTIFY_SLACK: "true"
when: delayed
Expand Down Expand Up @@ -327,43 +327,43 @@ clangsa:
ANALYZER_ARGS: --ctu
timeout: 8 hours

.coverity_base:
image: $CR_REGISTRY_URI/coverity_image/2022.6.0:1.0.0
stage: static
needs: []
variables:
KUBERNETES_CPU_REQUEST: 6
KUBERNETES_CPU_LIMIT: 6
KUBERNETES_MEMORY_REQUEST: 12Gi
KUBERNETES_MEMORY_LIMIT: 12Gi
tags:
- amd64
interruptible: false
timeout: 2 hours
script:
- |
mkdir -p build
cd build
cmake ..
cov-build --dir cov-int make -j${KUBERNETES_CPU_REQUEST}
tar czvf srsgnb.tgz cov-int
ver=$(git rev-parse HEAD)
- |
curl --form token=$COV_TOKEN \
--form email=${COVERITY_EMAIL} \
--form file=@srsgnb.tgz \
--form version=$ver \
--form description="${DESCRIPTION}" \
https://scan.coverity.com/builds?project=${PROJECT_NAME}
# .coverity_base:
# image: $CR_REGISTRY_URI/coverity_image/2022.6.0:1.0.0
# stage: static
# needs: []
# variables:
# KUBERNETES_CPU_REQUEST: 6
# KUBERNETES_CPU_LIMIT: 6
# KUBERNETES_MEMORY_REQUEST: 12Gi
# KUBERNETES_MEMORY_LIMIT: 12Gi
# tags:
# - amd64
# interruptible: false
# timeout: 2 hours
# script:
# - |
# mkdir -p build
# cd build
# cmake ..
# cov-build --dir cov-int make -j${KUBERNETES_CPU_REQUEST}
# tar czvf srsgnb.tgz cov-int
# ver=$(git rev-parse HEAD)
# - |
# curl --form token=$COV_TOKEN \
# --form email=${COVERITY_EMAIL} \
# --form file=@srsgnb.tgz \
# --form version=$ver \
# --form description="${DESCRIPTION}" \
# https://scan.coverity.com/builds?project=${PROJECT_NAME}

coverity-dev:
extends: .coverity_base
rules:
- if: $CI_DESCRIPTION =~ /Weekly/
before_script:
- export PROJECT_NAME="srsRAN_5G"
- export DESCRIPTION="srsRAN Project dev build"
- export COV_TOKEN="${COVERITY_TOKEN_DEV}"
# coverity-dev:
# extends: .coverity_base
# rules:
# - if: $CI_DESCRIPTION =~ /Weekly/
# before_script:
# - export PROJECT_NAME="srsRAN_5G"
# - export DESCRIPTION="srsRAN Project dev build"
# - export COV_TOKEN="${COVERITY_TOKEN_DEV}"

e2e tests tox:
stage: static
Expand Down
37 changes: 37 additions & 0 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,26 @@ smoke relwithdeb cached:
cache:
- *cache_build_get

smoke split 7.2 cached:
extends: smoke relwithdeb cached
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /no-cache/
when: never
- if: $ON_MR
changes: &split_changes
paths:
- apps/units/flexible_du/split_*/**/*
variables:
BUILD_ARGS: -DDU_SPLIT_TYPE=SPLIT_7_2
ENABLE_ZEROMQ:
after_script: []
artifacts:

smoke split 8 cached:
extends: smoke split 7.2 cached
variables:
BUILD_ARGS: -DDU_SPLIT_TYPE=SPLIT_8

smoke tsan cached:
extends: .smoke tsan
stage: manual
Expand Down Expand Up @@ -530,6 +550,23 @@ smoke relwithdeb clean:
artifacts:
<<: *build_artifacts

smoke split 7.2 clean:
extends: smoke relwithdeb clean
rules:
- if: $CI_MERGE_REQUEST_LABELS =~ /no-cache/
changes:
<<: *split_changes
variables:
BUILD_ARGS: -DDU_SPLIT_TYPE=SPLIT_7_2
ENABLE_ZEROMQ:
after_script: []
artifacts:

smoke split 8 clean:
extends: smoke split 7.2 clean
variables:
BUILD_ARGS: -DDU_SPLIT_TYPE=SPLIT_8

smoke tsan clean:
extends: .smoke tsan
rules:
Expand Down
22 changes: 16 additions & 6 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,11 @@ android IMS:
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.mac_enable=True"
needs:
- job: "basic relwithdeb"
artifacts: true
- *retina-needs
allow_failure: true

android x300:
stage: rf
Expand Down Expand Up @@ -481,11 +481,10 @@ viavi:
matrix:
- KEYWORDS: [
"ideal and 1UE",
"ideal and 32UE and not experimental",
"ideal and 32UE and not experimental and not dddsu",
"fading and 1UE",
# "fading and 32UE",
"fading and 32UE",
"birth-death and 1UE",
# "birth-death and 32UE",
"32UE and experimental and not extended",
]

Expand All @@ -495,17 +494,28 @@ viavi-extended:
- if: $CI_DESCRIPTION =~ /Weekly/
variables:
KEYWORDS: "extended"
allow_failure: true
needs:
- job: "basic avx512 dpdk"
artifacts: true
- *retina-needs

viavi-dddsu:
extends: .viavi
needs:
- job: "basic avx512 dpdk"
artifacts: true
- *retina-needs
allow_failure: true
parallel:
matrix:
- KEYWORDS: [
"dddsu",
]

viavi-debug:
extends: .viavi
variables:
MARKERS: "viavi_debug"
allow_failure: true
needs:
- job: "basic avx512 dpdk withassert"
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.53.5
RETINA_VERSION=0.53.8
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
46 changes: 23 additions & 23 deletions .gitlab/ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,29 @@ generate testvector tar gz:
- phy_testvectors.tar
expire_in: "30 days"

coverity-agpl:
extends: .coverity_base
stage: private
rules:
- if: *on_public_push
- if: *on_public_release
variables:
GIT_STRATEGY: none
PRIVATE_BRANCH: ""
before_script:
- export PROJECT_NAME="srsRAN_5G_agpl"
- export DESCRIPTION="srsRAN Project AGPL build"
- export COV_TOKEN="${COVERITY_TOKEN_AGPL}"
# Download agpl branch
- git config --global user.name "${CODEBOT_USERNAME}"
- git config --global user.email "${CODEBOT_LONG_USERNAME}@noreply.gitlab.com"
- git clone --depth 1 --branch $PRIVATE_BRANCH https://${CODEBOT_USERNAME}:${CODEBOT_TOKEN}@gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git /${CI_PROJECT_NAME}
- cd /${CI_PROJECT_NAME}
needs:
- *release-var-needs
- job: update private branch
optional: false
artifacts: false
# coverity-agpl:
# extends: .coverity_base
# stage: private
# rules:
# - if: *on_public_push
# - if: *on_public_release
# variables:
# GIT_STRATEGY: none
# PRIVATE_BRANCH: ""
# before_script:
# - export PROJECT_NAME="srsRAN_5G_agpl"
# - export DESCRIPTION="srsRAN Project AGPL build"
# - export COV_TOKEN="${COVERITY_TOKEN_AGPL}"
# # Download agpl branch
# - git config --global user.name "${CODEBOT_USERNAME}"
# - git config --global user.email "${CODEBOT_LONG_USERNAME}@noreply.gitlab.com"
# - git clone --depth 1 --branch $PRIVATE_BRANCH https://${CODEBOT_USERNAME}:${CODEBOT_TOKEN}@gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git /${CI_PROJECT_NAME}
# - cd /${CI_PROJECT_NAME}
# needs:
# - *release-var-needs
# - job: update private branch
# optional: false
# artifacts: false

################################################################################
# Publish
Expand Down
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ option(ENABLE_DPDK "Enable DPDK" OFF)
option(ENABLE_LIBNUMA "Enable LibNUMA" OFF)
option(ENABLE_EXPORT "Enable PIC and export libraries" OFF)
option(ENABLE_TRX_DRIVER "Enable Amarisoft TRX driver library" OFF)
option(ENABLE_PLUGINS "Compile plugins in the plugin folder" ON)
option(BUILD_TESTS "Compile tests" ON)
option(ENABLE_GPROF "Enable gprof" OFF)
option(USE_PHY_TESTVECTORS "Enable testvector PHY tests" OFF)
Expand Down Expand Up @@ -445,6 +446,22 @@ if (BUILD_TESTS)
add_subdirectory(tests/benchmarks)
endif (BUILD_TESTS)

if (ENABLE_PLUGINS)
# Discover all subdirectories in the plugin directory (but not recursively)
file(GLOB SUBDIRS RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/plugins/*)

# Loop through each plugin subdirectory
foreach(subdir ${SUBDIRS})
# Check if it's a directory and contains a CMakeLists.txt file
if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/${subdir} AND EXISTS ${CMAKE_SOURCE_DIR}/${subdir}/CMakeLists.txt)
message(STATUS "Adding plugin: ${subdir}")
add_subdirectory(${subdir})
endif()
endforeach()
endif ()



########################################################################
# Export (selected) libraries
########################################################################
Expand Down
1 change: 0 additions & 1 deletion apps/cu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ add_executable(srscu
cu_appconfig_validator.cpp
cu_appconfig_yaml_writer.cpp
../gnb/gnb_appconfig_translators.cpp
../gnb/adapters/e2_gateway_remote_connector.cpp # TODO: Delete
)

install(TARGETS srscu
Expand Down
44 changes: 44 additions & 0 deletions apps/cu/adapters/e2_gateways.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
*
* Copyright 2021-2024 Software Radio Systems Limited
*
* This file is part of srsRAN.
*
* srsRAN is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* srsRAN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* A copy of the GNU Affero General Public License can be found in
* the LICENSE file in the top-level directory of this distribution
* and at http://www.gnu.org/licenses/.
*
*/

#pragma once

#include "apps/services/e2/e2_appconfig.h"
#include "srsran/e2/gateways/e2_network_client_factory.h"

namespace srsran {

/// Instantiates an E2AP client.
std::unique_ptr<e2_connection_client>
create_cu_e2_client_gateway(const e2_appconfig& e2_cfg, io_broker& broker, dlt_pcap& f1ap_pcap)
{
sctp_network_connector_config e2ap_sctp{};
e2ap_sctp.if_name = "E2AP";
e2ap_sctp.dest_name = "Near-RT-RIC";
e2ap_sctp.connect_address = e2_cfg.ip_addr;
e2ap_sctp.connect_port = e2_cfg.port;
e2ap_sctp.ppid = E2_CP_PPID;
e2ap_sctp.bind_address = e2_cfg.bind_addr;
return create_e2_gateway_client(e2_sctp_gateway_config{e2ap_sctp, broker, f1ap_pcap});
}

} // namespace srsran
14 changes: 7 additions & 7 deletions apps/cu/cu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "srsran/cu_up/cu_up.h"

// TODO remove apps/gnb/*.h
#include "apps/gnb/adapters/e2_gateway_remote_connector.h"
#include "apps/cu/adapters/e2_gateways.h"
#include "apps/gnb/gnb_appconfig_translators.h"

#include "apps/services/application_message_banners.h"
Expand Down Expand Up @@ -304,7 +304,7 @@ int main(int argc, char** argv)
cu_f1u_gw_config.reuse_addr = false;
cu_f1u_gw_config.pool_occupancy_threshold = cu_cfg.nru_cfg.pool_occupancy_threshold;
std::unique_ptr<srs_cu_up::ngu_gateway> cu_f1u_gw =
srs_cu_up::create_udp_ngu_gateway(cu_f1u_gw_config, *epoll_broker, *workers.cu_up_io_ul_exec);
srs_cu_up::create_udp_ngu_gateway(cu_f1u_gw_config, *epoll_broker, workers.cu_up_exec_mapper->io_ul_executor());
std::unique_ptr<f1u_cu_up_udp_gateway> cu_f1u_conn =
srs_cu_up::create_split_f1u_gw({*cu_f1u_gw, *cu_f1u_gtpu_demux, *cu_up_dlt_pcaps.f1u, GTPU_PORT});

Expand All @@ -320,18 +320,18 @@ int main(int argc, char** argv)
// Create time source that ticks the timers
io_timer_source time_source{app_timers, *epoll_broker, std::chrono::milliseconds{1}};

// Instantiate E2AP client gateway.
std::unique_ptr<e2_connection_client> e2_gw_cu =
create_cu_e2_client_gateway(cu_cfg.e2_cfg, *epoll_broker, *cu_cp_dlt_pcaps.e2ap);

// Create CU-CP config.
cu_cp_build_dependencies cu_cp_dependencies;
cu_cp_dependencies.cu_cp_executor = workers.cu_cp_exec;
cu_cp_dependencies.cu_cp_e2_exec = workers.cu_cp_e2_exec;
cu_cp_dependencies.timers = cu_timers;
cu_cp_dependencies.ngap_pcap = cu_cp_dlt_pcaps.ngap.get();
cu_cp_dependencies.broker = epoll_broker.get();
// E2AP configuration.
srsran::sctp_network_connector_config e2_cu_nw_config = generate_e2ap_nw_config(cu_cfg.e2_cfg, E2_CP_PPID);
// Create E2AP GW remote connector.
e2_gateway_remote_connector e2_gw_cu{*epoll_broker, e2_cu_nw_config, *cu_cp_dlt_pcaps.e2ap};
cu_cp_dependencies.e2_gw = &e2_gw_cu;
cu_cp_dependencies.e2_gw = e2_gw_cu.get();
// create CU-CP.
auto cu_cp_obj_and_cmds = cu_cp_app_unit->create_cu_cp(cu_cp_dependencies);
srs_cu_cp::cu_cp& cu_cp_obj = *cu_cp_obj_and_cmds.unit;
Expand Down
1 change: 0 additions & 1 deletion apps/du/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ add_executable(srsdu
du_appconfig_validators.cpp
du_appconfig_translators.cpp
du_appconfig_yaml_writer.cpp
../gnb/adapters/e2_gateway_remote_connector.cpp # TODO: Delete
)

install(TARGETS srsdu
Expand Down
Loading

0 comments on commit 7e84c0c

Please sign in to comment.