pespin has uploaded this change for review.

View Change

testsuites: trex: Use different cfg file depending on host

Different hosts have different hw topology (NICs, cores, etc.) which
need to be adapted. Simply store those in a per-host file.

Change-Id: Iedb9104f1e407fb03866d0cc02e7ed48b0756a96
---
M testsuites/gtplab-sysmo2025/tunend/trex/configure.sh
R testsuites/gtplab-sysmo2025/tunend/trex/trex_cfg_gtplab2.yaml
M testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh
R testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg_gtplab2.yaml
4 files changed, 6 insertions(+), 5 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/upf-benchmark refs/changes/26/39926/1
diff --git a/testsuites/gtplab-sysmo2025/tunend/trex/configure.sh b/testsuites/gtplab-sysmo2025/tunend/trex/configure.sh
index 2667cb1..e7f1287 100755
--- a/testsuites/gtplab-sysmo2025/tunend/trex/configure.sh
+++ b/testsuites/gtplab-sysmo2025/tunend/trex/configure.sh
@@ -1,9 +1,10 @@
#!/bin/bash -xe

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+HOSTNAME="$(hostname)"

-case $(hostname) in
-gtplab0)
+case $HOSTNAME in
+gtplab2)
TREX_BIN="/opt/trex/t-rex-64"
;;
c240-1)
@@ -23,4 +24,4 @@
sudo sysctl -w vm.nr_hugepages=4096

cd /opt/trex
-sudo $TREX_BIN -i --astf --software --tso-disable --no-scapy-server --cfg "${SCRIPT_DIR}/trex_cfg.yaml" --no-ofed-check
+sudo $TREX_BIN -i --astf --software --tso-disable --no-scapy-server --cfg "${SCRIPT_DIR}/trex_cfg_$HOSTNAME.yaml" --no-ofed-check
diff --git a/testsuites/gtplab-sysmo2025/tunend/trex/trex_cfg.yaml b/testsuites/gtplab-sysmo2025/tunend/trex/trex_cfg_gtplab2.yaml
similarity index 100%
rename from testsuites/gtplab-sysmo2025/tunend/trex/trex_cfg.yaml
rename to testsuites/gtplab-sysmo2025/tunend/trex/trex_cfg_gtplab2.yaml
diff --git a/testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh b/testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh
index 9e86d78..cc6eeea 100755
--- a/testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh
+++ b/testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh
@@ -1,8 +1,8 @@
#!/bin/bash -xe

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
-
+HOSTNAME="$(hostname)"
sudo sysctl -w vm.nr_hugepages=4096

cd /opt/trex
-sudo /opt/trex/t-rex-64 -i --no-scapy-server --cfg "${SCRIPT_DIR}/trex_cfg.yaml" --no-ofed-check
+sudo /opt/trex/t-rex-64 -i --no-scapy-server --cfg "${SCRIPT_DIR}/trex_cfg_${HOSTNAME}.yaml" --no-ofed-check
diff --git a/testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg.yaml b/testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg_gtplab2.yaml
similarity index 100%
rename from testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg.yaml
rename to testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg_gtplab2.yaml

To view, visit change 39926. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: upf-benchmark
Gerrit-Branch: master
Gerrit-Change-Id: Iedb9104f1e407fb03866d0cc02e7ed48b0756a96
Gerrit-Change-Number: 39926
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>