diff --git a/scripts/perf-tests/test/test_run_perf_tests.sh b/scripts/perf-tests/test/test_run_perf_tests.sh index 6531563..cce59e2 100755 --- a/scripts/perf-tests/test/test_run_perf_tests.sh +++ b/scripts/perf-tests/test/test_run_perf_tests.sh @@ -81,6 +81,15 @@ if [[ "$ACMD" == *"--lro-disable"* ]]; then ok "astf launch includes --lro-disab if [[ "$SCMD" == *"--lro-disable"* ]]; then ok "stl launch includes --lro-disable"; else bad "stl launch includes --lro-disable"; fi if [[ "$SCMD" != *"--astf"* ]]; then ok "stl mode omits --astf"; else bad "stl mode omits --astf"; fi +echo "== run_tcp_benchmark.py: ASTFIPGenDist ip_range must be a [start,end] list ==" +TCP_PY="$TEST_DIR/../trex/run_tcp_benchmark.py" +if grep -nE 'ASTFIPGenDist\(ip_range=' "$TCP_PY" | grep -qvE 'ip_range=\['; then + bad "ASTFIPGenDist uses a single-IP ip_range (TRex needs [start,end]):" + grep -nE 'ASTFIPGenDist\(ip_range=' "$TCP_PY" | grep -vE 'ip_range=\[' +else + ok "all ASTFIPGenDist ip_range args are lists" +fi + # ── 3. TRex mode selection: stl for UDP, astf for any *-tcp ─────────────────── echo "== TRex STL/ASTF mode selection ==" for c in "rust-dpdk-tcp,tokio-dpdk-tcp,plain-rust-tcp" "rust-dpdk-tcp"; do diff --git a/scripts/perf-tests/trex/run_tcp_benchmark.py b/scripts/perf-tests/trex/run_tcp_benchmark.py index bc1efa5..9c8888f 100644 --- a/scripts/perf-tests/trex/run_tcp_benchmark.py +++ b/scripts/perf-tests/trex/run_tcp_benchmark.py @@ -49,10 +49,13 @@ def build_tcp_profile(payload_size, src_ip, dst_ip, dst_port): prog_s.recv(payload_size) prog_s.send(payload) - ip_gen_c = ASTFIPGenDist(ip_range=src_ip, distribution="seq") - ip_gen_s = ASTFIPGenDist(ip_range=dst_ip, distribution="seq") + # TRex ASTFIPGenDist requires a 2-element [start, end] range, even for a + # single host — pass [ip, ip]. A bare string fails ArgVerify with + # "Bad IP range ... Range should contain two IPs". + ip_gen_c = ASTFIPGenDist(ip_range=[src_ip, src_ip], distribution="seq") + ip_gen_s = ASTFIPGenDist(ip_range=[dst_ip, dst_ip], distribution="seq") ip_gen = ASTFIPGen( - glob=ASTFIPGenDist(ip_range="0.0.0.0", distribution="seq"), + glob=ASTFIPGenDist(ip_range=["0.0.0.0", "0.0.0.0"], distribution="seq"), dist_client=ip_gen_c, dist_server=ip_gen_s, )