aboutsummaryrefslogtreecommitdiffstats
path: root/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh
diff options
context:
space:
mode:
authorFangyin Hu <fangyinx.hu@intel.com>2016-11-25 03:52:22 -0800
committerPeter Mikus <pmikus@cisco.com>2017-01-11 13:21:52 +0000
commitb633f4ebf7878ae968e27b71da69b6cde0265904 (patch)
treec7b8949f4fe5e56ae15e177afd0b2051266ba881 /dpdk-tests/dpdk_scripts/cleanup_dpdk.sh
parent6858eef6792e7fae60c7fe2587721e2873bd5fc3 (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/cleanup_dpdk.sh')
-rwxr-xr-xdpdk-tests/dpdk_scripts/cleanup_dpdk.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh b/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh
new file mode 100755
index 0000000000..8ab9c6f676
--- /dev/null
+++ b/dpdk-tests/dpdk_scripts/cleanup_dpdk.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+ROOTDIR=/tmp/openvpp-testing
+PWDDIR=$(pwd)
+
+TESTPMD_LOG=/tmp/testpmd.log
+TESTPMD_PID=/tmp/testpmd.pid
+
+port1_driver=$1
+port1_pci=$2
+port2_driver=$3
+port2_pci=$4
+
+#kill the dpdk application
+sudo pkill testpmd
+sudo pkill l2fwd
+sudo pkill l3fwd
+sudo rm -f ${TESTPMD_PID}
+sudo rm -f /dev/hugepages/*
+cat ${TESTPMD_LOG}
+
+sleep 2
+
+cd ${ROOTDIR}/dpdk-16.07/
+./tools/dpdk-devbind.py -b ${port1_driver} ${port1_pci}
+./tools/dpdk-devbind.py -b ${port2_driver} ${port2_pci}
+
+sleep 2
+
+if1_name=`./tools/dpdk-devbind.py --s | grep "${port1_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
+if2_name=`./tools/dpdk-devbind.py --s | grep "${port2_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
+
+ifconfig ${if1_name} up
+ifconfig ${if2_name} up
+
+rmmod igb_uio
+rmmod uio
+
+cd ${PWDDIR}