set -x
# Setting variables
-DPDK_VERSION=dpdk-17.11
+DPDK_DIR=dpdk
ROOTDIR=/tmp/openvpp-testing
TESTPMDLOG=screenlog.0
PWDDIR=$(pwd)
nb_cores=$2
queue_nums=$3
jumbo_frames=$4
+arch=${5:-"x86_64"}
+
+# dpdk prefers "arm64" to "aarch64" and does not allow arm64 native target
+if [ $arch == "aarch64" ]; then
+ arch="arm64"
+ machine="armv8a"
+else
+ machine="native"
+fi
# Try to kill the testpmd
sudo pgrep testpmd
sleep 2
-cd ${ROOTDIR}/${DPDK_VERSION}/
+cd ${ROOTDIR}/${DPDK_DIR}/
rm -f ${TESTPMDLOG}
+TESTPMD_BIN=./${arch}-${machine}-linuxapp-gcc/app/testpmd
+
if [ "$jumbo_frames" = "yes" ]; then
- sudo sh -c "screen -dmSL DPDK-test ./x86_64-native-linuxapp-gcc/app/testpmd \
- -l ${cpu_corelist} -n 4 -- \
+ sudo sh -c "screen -dmSL DPDK-test $TESTPMD_BIN \
+ -l ${cpu_corelist} -n 4 --log-level 8 -v -- \
--numa \
--nb-ports=2 \
--portmask=0x3 \
--nb-cores=${nb_cores} \
--max-pkt-len=9000 \
- --txqflags=0 \
+ --tx-offloads=0x7FFFFFFF \
--forward-mode=io \
--rxq=${queue_nums} \
--txq=$((${nb_cores} + 1)) \
--disable-link-check \
--auto-start"
else
- sudo sh -c "screen -dmSL DPDK-test ./x86_64-native-linuxapp-gcc/app/testpmd \
- -l ${cpu_corelist} -n 4 -- \
+ sudo sh -c "screen -dmSL DPDK-test $TESTPMD_BIN \
+ -l ${cpu_corelist} -n 4 --log-level 8 -v -- \
--numa \
--nb-ports=2 \
--portmask=0x3 \