Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
# Conflicts:
#	include/srsran/cu_cp/ue_manager.h
#	include/srsran/cu_cp/up_resource_manager.h
#	lib/cu_cp/up_resource_manager/up_resource_manager_factory.cpp
  • Loading branch information
codebot committed Jun 25, 2024
2 parents d68f5cd + ce02893 commit a804c5b
Show file tree
Hide file tree
Showing 274 changed files with 4,285 additions and 3,154 deletions.
31 changes: 23 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@

include:
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/setup/all.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/features/all.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/tools/python.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/tools/test_reporter.yml
- local: .gitlab/ci/builders/version.yml
- local: .gitlab/ci/build.yml
Expand Down Expand Up @@ -65,6 +65,7 @@ variables:
################################################################################
job cleaner:
extends: .job cleaner
timeout: 4h
rules:
- if: $CI_DESCRIPTION =~ /Nightly Build Unit Tests/

Expand Down Expand Up @@ -111,6 +112,20 @@ trigger docker:
variables:
PY_DIR: docker/metrics_server

helm:
stage: ci
rules:
- if: $CI_DESCRIPTION =~ /Weekly/
variables:
CI_DESCRIPTION: Synchronization with srsGNB
NOTIFY_SLACK: "true"
trigger:
project: softwareradiosystems/ci/srsgnb_k8s
branch: main
needs:
- job: trigger docker
artifacts: false

################################################################################
## Static
################################################################################
Expand Down Expand Up @@ -259,10 +274,10 @@ clangsa:
stage: static
needs: []
variables:
KUBERNETES_CPU_REQUEST: 7
KUBERNETES_CPU_LIMIT: 7
KUBERNETES_MEMORY_REQUEST: 13Gi
KUBERNETES_MEMORY_LIMIT: 13Gi
KUBERNETES_CPU_REQUEST: 6
KUBERNETES_CPU_LIMIT: 6
KUBERNETES_MEMORY_REQUEST: 12Gi
KUBERNETES_MEMORY_LIMIT: 12Gi
tags:
- ${AMD64_TAG}
interruptible: false
Expand Down
8 changes: 4 additions & 4 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:
AMD64_AVX2_TAG: amd64-avx2
AMD64_AVX512_TAG: amd64-avx2-avx512
ARM64_TAG: arm64

INFRASTRUCTURE_TAG:
description: Computer architecture and supported instruction sets
options:
Expand Down Expand Up @@ -280,7 +280,7 @@ variables:
bash -c "${CTEST_CMD} && echo 0 > ${status_file} || echo 1 > ${status_file}" \
&& ret=$(cat ${status_file}) || ret=124
if [[ $TEST_MODE = "coverage" ]]; then
if [[ $TEST_MODE = "coverage" ]]; then
common_options="-j${KUBERNETES_CPU_REQUEST} \
--exclude-unreachable-branches \
--gcov-ignore-parse-errors=negative_hits.warn_once_per_file \
Expand Down Expand Up @@ -677,7 +677,7 @@ intermediate commits cached:
- if: $CI_MERGE_REQUEST_LABELS =~ /no-cache/
when: never
- if: $ON_MR
timeout: 1 hour
timeout: 2 hour
variables:
SAVE_ARTIFACTS: "True"
script:
Expand Down Expand Up @@ -1889,7 +1889,7 @@ check-affinity-manager-nocpu:
echo $output
echo "**********************************************************************************"
echo "Error for number of CPU = $((i-2))"
echo -e "\n\n\n\n\n"
echo -e "\n\n\n\n\n"
fi
done
Expand Down
26 changes: 13 additions & 13 deletions .gitlab/ci/builders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

include:
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/setup/all.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/tools/docker.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/tools/python.yml
- local: .gitlab/ci/builders/version.yml
- local: .gitlab/ci/src_cache.yml
Expand Down Expand Up @@ -468,7 +468,7 @@ manifest [ubuntu, 20.04]:
optional: false
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]

################################################################################
# Ubuntu 22.04
Expand Down Expand Up @@ -555,7 +555,7 @@ manifest [ubuntu, 22.04]:
optional: false
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]

################################################################################
# Ubuntu 23.10
Expand Down Expand Up @@ -642,7 +642,7 @@ manifest [ubuntu, 23.10]:
optional: false
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]

################################################################################
# Ubuntu 24.04
Expand Down Expand Up @@ -719,7 +719,7 @@ manifest [ubuntu, 24.04]:
optional: false
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]

################################################################################
# Debian
Expand Down Expand Up @@ -781,7 +781,7 @@ manifest [debian, 11]:
optional: false
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]

alternative-tag [debian, 12, amd64]:
extends:
Expand Down Expand Up @@ -826,7 +826,7 @@ manifest [debian, 12]:
optional: false
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]

################################################################################
# Rhel 8
Expand Down Expand Up @@ -890,7 +890,7 @@ manifest [rhel, 8]:
optional: false
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]

################################################################################
# Archlinux
Expand Down Expand Up @@ -926,11 +926,11 @@ manifest [archlinux, latest]:
script:
- |
skopeo copy \
docker://${REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${DOCKER_BUILDER_VERSION}-amd64 \
docker://${REGISTRY}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${DOCKER_BUILDER_VERSION}
docker://${REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${DOCKER_BUILDER_VERSION}-amd64 \
docker://${REGISTRY_URI}${CI_PROJECT_NAMESPACE#'softwareradiosystems'}/${CI_PROJECT_NAME}/builder-$OS_NAME-$OS_VERSION:${DOCKER_BUILDER_VERSION}
parallel:
matrix:
- REGISTRY: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
- REGISTRY_URI: ["${CR_REGISTRY_URI}", "${GITLAB_REGISTRY_URI}"]
needs:
- builder version
- job: alternative-tag [archlinux, latest, amd64]
Expand Down
33 changes: 17 additions & 16 deletions .gitlab/ci/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

include:
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/setup/all.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/tools/python.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/tools/docker.yml

################################################################################
Expand Down Expand Up @@ -120,23 +120,21 @@ metrics version check in retina:
################################################################################
.docker compose:
stage: compose
image: docker:24.0.7
image: docker:24.0.7-dind
tags:
- saas-linux-medium-amd64
- amd64-avx2
timeout: 2h
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
services:
- name: docker:24.0.7-dind
alias: docker
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
before_script:
- dockerd-entrypoint.sh &
- |
while ! ( nc -zv localhost 2376 2>&1 >/dev/null )
do
sleep 1
done
gnb docker compose:
extends: .docker compose
variables:
variables: &build_in_compose_variables
KUBERNETES_CPU_REQUEST: 6
KUBERNETES_CPU_LIMIT: 6
KUBERNETES_MEMORY_REQUEST: 12Gi
Expand All @@ -151,7 +149,7 @@ gnb docker compose:
- docker/docker-compose.yml
- if: $CI_DESCRIPTION =~ /Nightly Build Unit Tests/
script:
- docker compose -f docker/docker-compose.yml build --build-arg LIB=${LIB} --build-arg LIB_VERSION=${LIB_VERSION} gnb
- 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:
Expand All @@ -162,6 +160,8 @@ gnb docker compose:

5gc docker compose:
extends: .docker compose
variables:
<<: *build_in_compose_variables
rules:
- if: $ON_MR
changes:
Expand All @@ -170,6 +170,7 @@ gnb docker compose:
- docker/docker-compose.yml
- if: $CI_DESCRIPTION =~ /Weekly/
script:
- docker compose -f docker/docker-compose.yml build --build-arg NUM_CORES=${KUBERNETES_CPU_LIMIT} 5gc
- docker compose -f docker/docker-compose.yml run 5gc 5gc -v

grafana docker compose:
Expand Down
18 changes: 9 additions & 9 deletions .gitlab/ci/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

include:
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/setup/all.yml

variables:
Expand Down Expand Up @@ -305,11 +305,12 @@ amari 32UE:
"iperf and tcp and not band:3",
]

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

amari 32UE asan:
extends: .zmq
Expand Down Expand Up @@ -521,14 +522,13 @@ viavi:
- *retina-needs
parallel:
matrix:
- KEYWORDS:
[
"fading and 32UE",
"fading and 1UE",
"ideal and 32UE",
- KEYWORDS: [
"ideal and 1UE",
"birth-death and 32UE",
"ideal and 32UE",
"fading and 1UE",
# "fading and 32UE",
"birth-death and 1UE",
# "birth-death and 32UE",
]

viavi-debug:
Expand Down Expand Up @@ -576,5 +576,5 @@ retina setup:
retina post:
stage: .post
extends: .demolition
dependencies:
dependencies:
- load retina variables
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.49.16
RETINA_VERSION=0.49.18
UBUNTU_VERSION=24.04
AMARISOFT_VERSION=2023-09-08
SRSUE_VERSION=23.11
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

include:
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/setup/all.yml
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/features/all.yml

stages:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/trx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

include:
- project: softwareradiosystems/ci/tools
ref: "19"
ref: "20"
file: .gitlab/ci-shared/setup/all.yml
- local: .gitlab/ci/build.yml

Expand Down
26 changes: 19 additions & 7 deletions apps/services/metrics_hub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,33 @@ rlc_metrics_source* metrics_hub::get_rlc_metrics_source(std::string source_name_
return nullptr;
}

void scheduler_ue_metrics_source::report_metrics(span<const scheduler_ue_metrics> ue_metrics)
scheduler_ue_metrics_source::scheduler_ue_metrics_source(std::string source_name_) :
metrics_hub_source(source_name_),
logger(srslog::fetch_basic_logger("ALL")),
metrics_pool(metric_pool_initial_capacity)
{
}

void scheduler_ue_metrics_source::report_metrics(const scheduler_cell_metrics& metrics)
{
srsran_assert(executor != nullptr, "Task executor must not be nullptr");
std::vector<scheduler_ue_metrics> ue_metrics_copy(ue_metrics.begin(), ue_metrics.end());
if (not executor->execute([this, ue_metrics_copy]() {

// Fetch a metrics report object from the pool.
auto cached_metrics = metrics_pool.get();
// Try to reuse the pre-existing memory in the cached_metrics object.
cached_metrics->ue_metrics.assign(metrics.ue_metrics.begin(), metrics.ue_metrics.end());
cached_metrics->nof_error_indications = metrics.nof_error_indications;

if (not executor->execute([this, cached_metrics = std::move(cached_metrics)]() {
for (auto& subscriber : subscribers) {
span<const scheduler_ue_metrics> ue_metrics_span(ue_metrics_copy);
subscriber->report_metrics(ue_metrics_span);
subscriber->report_metrics(*cached_metrics);
}
})) {
srslog::fetch_basic_logger("ALL").warning("Failed to dispatch scheduler UE metrics");
logger.warning("Failed to dispatch scheduler UE metrics");
}
}

void scheduler_ue_metrics_source::add_subscriber(scheduler_ue_metrics_notifier& subscriber)
void scheduler_ue_metrics_source::add_subscriber(scheduler_metrics_notifier& subscriber)
{
subscribers.push_back(&subscriber);
}
Expand Down
Loading

0 comments on commit a804c5b

Please sign in to comment.