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
9 changes: 9 additions & 0 deletions scripts/perf-tests/test/test_run_perf_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions scripts/perf-tests/trex/run_tcp_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
Loading