6 DPDK_VERSION=dpdk-17.02
7 ROOTDIR=/tmp/openvpp-testing
11 # Setting command line arguments
17 # Try to kill the testpmd
19 if [ $? -eq "0" ]; then
23 for attempt in {1..5}; do
24 echo "Checking if testpmd is still alive, attempt nr ${attempt}"
26 if [ $? -eq "1" ]; then
27 echo "testpmd is dead"
31 echo "testpmd is still alive, waiting 1 second"
34 if [ "$success" = false ]; then
35 echo "The command sudo pkill testpmd failed"
41 echo "testpmd is not running"
45 sudo rm -f /dev/hugepages/*
48 cd ${ROOTDIR}/${DPDK_VERSION}/
49 sudo ./usertools/dpdk-devbind.py -b ${port1_driver} ${port1_pci} || \
50 { echo "Unbind ${port1_pci} failed"; exit 1; }
51 sudo ./usertools/dpdk-devbind.py -b ${port2_driver} ${port2_pci} || \
52 { echo "Unbind ${port1_pci} failed"; exit 1; }
56 if1_name=`./usertools/dpdk-devbind.py --s | grep "${port1_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
57 if2_name=`./usertools/dpdk-devbind.py --s | grep "${port2_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
59 # Remove igb_uio driver
61 { echo "Removing igb_uio failed"; exit 1; }