diff options
author | Fangyin Hu <fangyinx.hu@intel.com> | 2016-11-25 03:52:22 -0800 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2017-01-11 13:21:52 +0000 |
commit | b633f4ebf7878ae968e27b71da69b6cde0265904 (patch) | |
tree | c7b8949f4fe5e56ae15e177afd0b2051266ba881 /dpdk-tests/dpdk_scripts/run_l2fwd.sh | |
parent | 6858eef6792e7fae60c7fe2587721e2873bd5fc3 (diff) |
Add the DPDK l2fwd performance test cases.
Change-Id: I996847a4871ed994cd9b5edb459fb079ff39c86d
Signed-off-by: Fangyin Hu <fangyinx.hu@intel.com>
Diffstat (limited to 'dpdk-tests/dpdk_scripts/run_l2fwd.sh')
-rwxr-xr-x | dpdk-tests/dpdk_scripts/run_l2fwd.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/dpdk-tests/dpdk_scripts/run_l2fwd.sh b/dpdk-tests/dpdk_scripts/run_l2fwd.sh new file mode 100755 index 0000000000..6df33a1317 --- /dev/null +++ b/dpdk-tests/dpdk_scripts/run_l2fwd.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +ROOTDIR=/tmp/openvpp-testing +PWDDIR=$(pwd) + +TESTPMD_LOG=/tmp/testpmd.log +TESTPMD_PID=/tmp/testpmd.pid + +cpu_coremask=$1 +nb_cores=$2 +queue_nums=$3 +jumbo_frames=$4 + +#kill the testpmd +sudo pkill testpmd +sudo rm -f ${TESTPMD_PID} + +sleep 2 + +pid=`pgrep testpmd` +if [ "$pid" != "" ]; then + echo "terminate the testpmd failed!" + exit 1 +fi + +#run the testpmd +cd ${ROOTDIR} +if [ "$jumbo_frames" = "yes" ]; then +#sudo sh -c "screen -dmS DPDK-test ./dpdk-16.07/x86_64-native-linuxapp-gcc/app/testpmd -c ${cpu_coremask} \ +# -n 4 -- --nb-ports=2 --portmask=0x3 --nb-cores=${nb_cores} \ +# --max-pkt-len=9000 --txqflags=0 --forward-mode=io --rxq=${queue_nums} \ +# --txq=${queue_nums} --auto-start" +tail -f /dev/null | nohup ./dpdk-16.07/x86_64-native-linuxapp-gcc/app/testpmd -c ${cpu_coremask} \ + -n 4 -- --nb-ports=2 --portmask=0x3 --nb-cores=${nb_cores} \ + --max-pkt-len=9000 --txqflags=0 --forward-mode=io --rxq=${queue_nums} \ + --txq=${queue_nums} --auto-start > ${TESTPMD_LOG} 2>&1 & +echo $! > ${TESTPMD_PID} +else +#sudo sh -c "screen -dmS DPDK-test ./dpdk-16.07/x86_64-native-linuxapp-gcc/app/testpmd -c ${cpu_coremask} \ +# -n 4 -- --nb-ports=2 --portmask=0x3 --nb-cores=${nb_cores} \ +# --forward-mode=io --rxq=${queue_nums} --txq=${queue_nums} --auto-start" +tail -f /dev/null | nohup ./dpdk-16.07/x86_64-native-linuxapp-gcc/app/testpmd -c ${cpu_coremask} \ + -n 4 -- --nb-ports=2 --portmask=0x3 --nb-cores=${nb_cores} \ + --forward-mode=io --rxq=${queue_nums} --txq=${queue_nums} --auto-start > ${TESTPMD_LOG} 2>&1 & +echo $! > ${TESTPMD_PID} +fi + +cd ${PWDDIR} |