[dpdk-dev] scripts: test null forwarding

Message ID 1428652170-19356-1-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Thomas Monjalon April 10, 2015, 7:49 a.m. UTC
  This script ease testing of basic initializations and Rx/Tx bursts.
It may help to check obvious regressions.
In order to run it on a standard development machine, it doesn't use
neither hugepages nor real interfaces.

The optional parameters are:
- build directory (default: build)
- coremask (default: 3 i.e. cores 0 and 1)

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 scripts/test-null.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100755 scripts/test-null.sh
  

Comments

Thomas Monjalon April 13, 2015, 8:16 p.m. UTC | #1
> This script ease testing of basic initializations and Rx/Tx bursts.
> It may help to check obvious regressions.
> In order to run it on a standard development machine, it doesn't use
> neither hugepages nor real interfaces.
> 
> The optional parameters are:
> - build directory (default: build)
> - coremask (default: 3 i.e. cores 0 and 1)
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Added BSD header and applied.
  

Patch

diff --git a/scripts/test-null.sh b/scripts/test-null.sh
new file mode 100755
index 0000000..6f6918e
--- /dev/null
+++ b/scripts/test-null.sh
@@ -0,0 +1,14 @@ 
+#! /bin/sh -e
+
+build=${1:-build}
+coremask=${2:-3} # default using cores 0 and 1
+
+if grep -q SHARED_LIB=y $build/.config; then
+	export LD_LIBRARY_PATH=$build/lib:$LD_LIBRARY_PATH
+	pmd='-d librte_pmd_null.so'
+fi
+
+(sleep 1 && echo stop) |
+$build/app/testpmd -c $coremask -n 1 --no-huge \
+	$pmd --vdev eth_null1 --vdev eth_null2 -- \
+	--total-num-mbufs=2048 -ia