Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions .ci/matrix_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@ runs_on_dockers:
runAsUser: '0',
runAsGroup: '0'
}
- {
arch: 'x86_64',
name: 'vg-worker-threads',
url: 'harbor.mellanox.com/swx-infra/media/xlio/x86_64/ubuntu22.04/vg:20250219',
category: 'tool',
annotations: [{ key: 'k8s.v1.cni.cncf.io/networks', value: 'sriov-cx6dx-p2' }],
limits: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p2: 1}',
requests: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p2: 1}',
caps_add: '[ IPC_LOCK, SYS_RESOURCE ]',
runAsUser: '0',
runAsGroup: '0'
}
- {
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
arch: 'x86_64',
Expand All @@ -139,12 +151,9 @@ runs_on_dockers:
runAsGroup: '0'
}
- {
file: '.ci/dockerfiles/Dockerfile.ubuntu22.04',
arch: 'x86_64',
name: 'sockperf-worker-threads',
uri: 'xlio/$arch/ubuntu22.04/$name',
tag: '20251015',
build_args: '--no-cache --target test',
url: 'harbor.mellanox.com/swx-infra/media/xlio/x86_64/ubuntu22.04/sockperf:20251015',
category: 'tests',
annotations: [{ key: 'k8s.v1.cni.cncf.io/networks', value: 'sriov-cx6dx-p1' }],
limits: '{memory: 10Gi, cpu: 10000m, hugepages-2Mi: 10Gi, nvidia.com/sriov-cx6dx-p1: 1}',
Expand Down Expand Up @@ -199,6 +208,7 @@ steps:
- "{category: 'base'}"
- "{category: 'tests'}"
- "{name: 'vg'}"
- "{name: 'vg-worker-threads'}"
agentSelector:
- "{nodeLabel: 'skip-agent'}"
run: |
Expand Down Expand Up @@ -432,7 +442,23 @@ steps:
- "{nodeLabel: 'skip-agent'}"
run: |
[ "x${do_valgrind}" == "xtrue" ] && action=yes || action=no
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} ./contrib/test_jenkins.sh
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} WORKER_THREADS=false ./contrib/test_jenkins.sh
parallel: false
onfail: |
./.ci/artifacts.sh
archiveArtifacts-onfail: |
jenkins/**/arch-*.tar.gz,
jenkins/**/vg/*valgrind*.log

- name: Valgrind (Worker thread mode)
enable: ${do_valgrind}
containerSelector:
- "{name: 'vg-worker-threads'}"
agentSelector:
- "{nodeLabel: 'skip-agent'}"
run: |
[ "x${do_valgrind}" == "xtrue" ] && action=yes || action=no
env WORKSPACE=$PWD TARGET=${flags} jenkins_test_vg=${action} WORKER_THREADS=true ./contrib/test_jenkins.sh
parallel: false
onfail: |
./.ci/artifacts.sh
Expand Down Expand Up @@ -460,6 +486,7 @@ steps:
containerSelector:
- "{category: 'base'}"
- "{name: 'vg'}"
- "{name: 'vg-worker-threads'}"
- "{category: 'tests'}"
agentSelector:
- "{nodeLabel: 'beni09'}"
Expand Down
30 changes: 22 additions & 8 deletions contrib/jenkins_tests/vg.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash -eExl

ulimit -n 50000
ulimit -l unlimited
source $(dirname $0)/globals.sh

# Fix hugepages for docker environments
do_hugepages

echo "Checking for valgrind ..."

#do_module "tools/valgrind-3.12.0"

set +eE

cd $WORKSPACE
Expand Down Expand Up @@ -45,12 +45,25 @@ if [ "$test_ip_list" == "eth_ip4: eth_ip6:" ] || [ -z "${test_ip_list}" ]; then
exit 1
fi

test_list="tcp:--tcp udp:"
test_lib=${vg_dir}/install/lib/${prj_lib}
test_lib_env="XLIO_MEM_ALLOC_TYPE=ANON XLIO_MEMORY_LIMIT=256MB XLIO_TX_WRE=2000 XLIO_RX_WRE=2000 XLIO_STRQ=off"
test_lib_env="XLIO_MEM_ALLOC_TYPE=ANON XLIO_TX_WRE=2000 XLIO_RX_WRE=2000 XLIO_STRQ=off LD_PRELOAD=$test_lib"
test_app=sockperf
test_app_path=${test_dir}/sockperf/install/bin/sockperf
vg_tool=/bin/valgrind
WORKER_THREADS=${WORKER_THREADS:-"false"}

# Enable params based on the mode choice - given by WORKER_THREADS variable
if [[ "$WORKER_THREADS" == "true" ]]; then
echo "Testing mode: Worker Threads"
test_list="tcp:--tcp"
test_lib_env="${test_lib_env} XLIO_WORKER_THREADS=1 XLIO_MEMORY_LIMIT=512MB"
test_params="--nonblocked"
else
echo "Testing mode: R2C"
test_list="tcp:--tcp udp:"
test_lib_env="${test_lib_env} XLIO_MEMORY_LIMIT=256MB"
test_params=""
fi

if [ $(command -v $test_app_path >/dev/null 2>&1 || echo $?) ]; then
test_app_path=sockperf
Expand Down Expand Up @@ -92,10 +105,11 @@ for test_link in $test_ip_list; do
--undef-value-errors=yes --track-fds=yes --num-callers=32 \
--fullpath-after=${WORKSPACE} --gen-suppressions=all \
--suppressions=${WORKSPACE}/contrib/valgrind/valgrind_xlio.supp \
--fair-sched=yes \
"
eval "${sudo_cmd} $timeout_exe env $test_lib_env LD_PRELOAD=$test_lib \
eval "${sudo_cmd} $timeout_exe env $test_lib_env \
${vg_tool} --log-file=${vg_dir}/${test_name}-valgrind-sr.log $vg_args \
$test_app_path sr ${test_opt} -i ${test_ip} 2>&1 | tee ${vg_dir}/${test_name}-output-sr.log &"
$test_app_path sr ${test_opt} -i ${test_ip} ${test_params} 2>&1 | tee ${vg_dir}/${test_name}-output-sr.log &"

wait=0
while [ $wait -lt $sockperf_max_wait ]; do
Expand All @@ -108,9 +122,9 @@ for test_link in $test_ip_list; do
sleep 2
done

eval "${sudo_cmd} $timeout_exe_short env $test_lib_env LD_PRELOAD=$test_lib \
eval "${sudo_cmd} $timeout_exe_short env $test_lib_env \
${vg_tool} --log-file=${vg_dir}/${test_name}-valgrind-cl.log $vg_args \
$test_app_path pp ${test_opt} -i ${test_ip} -t 10 2>&1 | tee ${vg_dir}/${test_name}-output-cl.log"
$test_app_path pp ${test_opt} -i ${test_ip} -t 10 ${test_params} 2>&1 | tee ${vg_dir}/${test_name}-output-cl.log"

if [ `ps -ef | grep $test_app | wc -l` -gt 1 ];
then
Expand Down