[RFC v3 1/7] devtools: check packet forwarding in null test
David Marchand
david.marchand at redhat.com
Thu Mar 5 17:45:43 CET 2026
Add some simple checks that testpmd was indeed polling two ports, and
some packets got through it.
Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
devtools/test-null.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/devtools/test-null.sh b/devtools/test-null.sh
index e3ac168ce3..8f21189262 100755
--- a/devtools/test-null.sh
+++ b/devtools/test-null.sh
@@ -26,8 +26,14 @@ else
libs=
fi
+logfile=$build/test-null.log
(sleep 1 && echo stop) |
# testpmd only needs 20M, make it x2 (default number of cores) for NUMA systems
$testpmd -l $corelist --no-huge -m 40 \
$libs -a 0:0.0 --vdev net_null1 --vdev net_null2 $eal_options -- \
- --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia
+ --no-mlockall --total-num-mbufs=2048 $testpmd_options -ia | tee $logfile
+
+# we expect two ports and some traffic is received and transmitted
+grep -q 'io packet forwarding - ports=2 -' $build/test-null.log
+grep 'RX-packets: ' $logfile | tail -1 | grep -q 'RX-packets:[[:space:]]*[^0[:space:]]'
+grep 'TX-packets: ' $logfile | tail -1 | grep -q 'TX-packets:[[:space:]]*[^0[:space:]]'
--
2.53.0
More information about the dev
mailing list