From a6687b60402d1c5a8d44e0aa77bed385d08d6ed7 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 9 Mar 2026 21:58:27 +0100 Subject: [PATCH] CI: Add FHI72 2x2 phytest on cacofonix --- ...alog_rt_stats.100.2x2.fhi72.cacofonix.yaml | 28 ++++++ .../gnb_phytest_fhi7.2_docker_cacofonix.xml | 97 +++++++++++++++++++ .../docker-compose.yaml | 47 +++++++++ .../phytest_fhi72_cacofonix/setup_cleanup.sh | 5 + .../phytest_fhi72_cacofonix/setup_config.sh | 4 + .../setup_sriov_dummy.sh | 38 ++++++++ 6 files changed, 219 insertions(+) create mode 100644 ci-scripts/datalog_rt_stats.100.2x2.fhi72.cacofonix.yaml create mode 100644 ci-scripts/xml_files/gnb_phytest_fhi7.2_docker_cacofonix.xml create mode 100644 ci-scripts/yaml_files/phytest_fhi72_cacofonix/docker-compose.yaml create mode 100755 ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_cleanup.sh create mode 100755 ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_config.sh create mode 100755 ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_sriov_dummy.sh diff --git a/ci-scripts/datalog_rt_stats.100.2x2.fhi72.cacofonix.yaml b/ci-scripts/datalog_rt_stats.100.2x2.fhi72.cacofonix.yaml new file mode 100644 index 0000000000..de50c38a8e --- /dev/null +++ b/ci-scripts/datalog_rt_stats.100.2x2.fhi72.cacofonix.yaml @@ -0,0 +1,28 @@ +#this is a configuration file +#used to build real time processing statistics +#for 5G NR phy test (gNB terminate) +Title : Processing Time (us) from datalog_rt_stats.4x4.fhi72.yaml +ColNames : + - Metric + - Average; Max; Count + - Average vs Reference Deviation (Reference Value; Acceptability Deviation Threshold) +Ref : + tx_fhaul : 73.0 + feptx_prec (per port, half_slot) : 46.0 + L1 Tx processing : 371.7 + DLSCH encoding : 196.9 + L1 Rx processing : 578.0 + UL segments decoding : 81.2 + UL Indication : 0.4 + Slot Indication : 14.3 + PUSCH inner-receiver : 739.4 +DeviationThreshold : + tx_fhaul : 0.25 + feptx_prec (per port, half_slot) : 0.25 + L1 Tx processing : 0.25 + DLSCH encoding : 0.25 + L1 Rx processing : 0.25 + UL segments decoding : 0.25 + UL Indication : 1.00 + Slot Indication : 0.50 + PUSCH inner-receiver : 0.25 diff --git a/ci-scripts/xml_files/gnb_phytest_fhi7.2_docker_cacofonix.xml b/ci-scripts/xml_files/gnb_phytest_fhi7.2_docker_cacofonix.xml new file mode 100644 index 0000000000..092239ff6f --- /dev/null +++ b/ci-scripts/xml_files/gnb_phytest_fhi7.2_docker_cacofonix.xml @@ -0,0 +1,97 @@ + + + gNB-PHY-Test-100-4x4-FHI72 + Timing phytest 100 MHz 4x4 FHI7.2 + tasks + + + Custom_Script + Configure system for low-latency RT performance + cacofonix + + + + + Pull_Local_Registry + Pull Images from Local Registry + cacofonix + oai-gnb-fhi72 + + + + Create_Workspace + Create new Workspace + cacofonix + + + + Deploy_Object + Initialize gNB FHI7.2 + cacofonix + ci-scripts/yaml_files/phytest_fhi72_cacofonix + oai-gnb + + + + IdleSleep + Sleep + 60 + + + + AnalyzeRTStats_Object + Analyze Real-Time Stats + datalog_rt_stats.100.2x2.fhi72.cacofonix.yaml + oai-gnb + cacofonix + + + + Undeploy_Object + cacofonix + true + Terminate gNB + ci-scripts/yaml_files/phytest_fhi72_cacofonix + + oai-gnb=EndsWithBye + + + + + Clean_Test_Server_Images + true + Clean Test Images on Test Server + cacofonix + oai-gnb-fhi72 + + + + Custom_Script + true + Set CPU to idle state, set kernel parameters to default values + cacofonix + + + + diff --git a/ci-scripts/yaml_files/phytest_fhi72_cacofonix/docker-compose.yaml b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/docker-compose.yaml new file mode 100644 index 0000000000..87330524a0 --- /dev/null +++ b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/docker-compose.yaml @@ -0,0 +1,47 @@ +services: + dpdk-init: + image: docker.io/library/oai-dpdk-init:latest + network_mode: host + container_name: dpdk-init + entrypoint: "/tmp/setup_sriov.sh" + privileged: true + devices: + - /dev/vfio:/dev/vfio/ + volumes: + - ./setup_sriov_dummy.sh:/tmp/setup_sriov.sh + - /lib/modules:/lib/modules + - /usr/lib/modules:/usr/lib/modules + oai-gnb: + image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb-fhi72}:${TAG:-develop} + container_name: oai-gnb-phytest + cap_add: + - IPC_LOCK + - SYS_NICE + cap_drop: + - ALL + environment: + USE_ADDITIONAL_OPTIONS: --phy-test -q -M 273 -m 27 -l 2 -D 231 -T 273 -t 16 -L 2 -U 528 --log_config.global_log_options level,nocolor,time --thread-pool 7,8,9,10,11,12 + devices: + - /dev/vfio:/dev/vfio/ + volumes: + - ../../conf_files/gnb.sa.band77.273prb.fhi72.4x4-vvdn.conf:/opt/oai-gnb/etc/gnb.conf + - /dev/hugepages:/dev/hugepages + cpuset: "0-12" + networks: ["public_net"] + depends_on: + dpdk-init: + condition: service_completed_successfully + healthcheck: + test: /bin/bash -c "pgrep nr-softmodem" + interval: 10s + timeout: 5s + retries: 5 +networks: + public_net: + driver: bridge + name: ci-physim + ipam: + config: + - subnet: 192.168.71.128/26 + driver_opts: + com.docker.network.bridge.name: "ci-physim" diff --git a/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_cleanup.sh b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_cleanup.sh new file mode 100755 index 0000000000..9a06336acc --- /dev/null +++ b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_cleanup.sh @@ -0,0 +1,5 @@ +set -e +sudo cpupower idle-set -E > /dev/null +sudo sysctl kernel.sched_rt_runtime_us=950000 +sudo sysctl kernel.timer_migration=1 +exit 0 diff --git a/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_config.sh b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_config.sh new file mode 100755 index 0000000000..8850720d5c --- /dev/null +++ b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_config.sh @@ -0,0 +1,4 @@ +set -e +sudo cpupower idle-set -D 0 > /dev/null +sudo sysctl kernel.sched_rt_runtime_us=-1 +sudo sysctl kernel.timer_migration=0 diff --git a/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_sriov_dummy.sh b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_sriov_dummy.sh new file mode 100755 index 0000000000..9704fc4a42 --- /dev/null +++ b/ci-scripts/yaml_files/phytest_fhi72_cacofonix/setup_sriov_dummy.sh @@ -0,0 +1,38 @@ +#!/bin/sh +set -eu + +pci_addr() +{ + PF_IF=$1 + VF_INDEX=$2 + SYSFS_PATH="/sys/class/net/${PF_IF}/device/virtfn${VF_INDEX}" + + if [ ! -e "$SYSFS_PATH" ]; then + echo "VF $VF_INDEX not found for interface $PF_IF" + exit 1 + fi + PCI_ADDR=$(basename "$(readlink "$SYSFS_PATH")") + echo "$PCI_ADDR" +} +IF_NAME=ens7f1 +## O-DU C Plane MAC ADDR and VLAN +C_U_PLANE_MAC_ADD=22:11:55:33:99:55 +C_U_PLANE_VLAN=123 +MTU=9000 +DPDK_DEVBIND_PREFIX=/usr/local/bin +NUM_VFs=1 +ethtool -G $IF_NAME rx 8160 tx 8160 +sh -c "echo 0 > /sys/class/net/$IF_NAME/device/sriov_numvfs" +sh -c "echo $NUM_VFs > /sys/class/net/$IF_NAME/device/sriov_numvfs" +C_U_PLANE_PCI=$(pci_addr $IF_NAME 0) +# this next 2 lines is for C/U planes +ip link set $IF_NAME vf 0 mac $C_U_PLANE_MAC_ADD vlan $C_U_PLANE_VLAN spoofchk off mtu $MTU +sleep 1 +modprobe iavf +${DPDK_DEVBIND_PREFIX}/dpdk-devbind.py --unbind $C_U_PLANE_PCI +modprobe vfio-pci +${DPDK_DEVBIND_PREFIX}/dpdk-devbind.py --bind vfio-pci $C_U_PLANE_PCI +echo "Successfully configured C-PLANE and U-PLANE: + - C-PLANE MAC: $C_U_PLANE_MAC_ADD, VLAN: $C_U_PLANE_VLAN, PCI: $C_U_PLANE_PCI" +exit 0 +