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"
46 if [ $? -eq "0" ]; then
50 for attempt in {1..5}; do
51 echo "Checking if l3fwd is still alive, attempt nr ${attempt}"
53 if [ $? -eq "1" ]; then
58 echo "l3fwd is still alive, waiting 1 second"
61 if [ "$success" = false ]; then
62 echo "The command sudo pkill l3fwd failed"
68 echo "l3fwd is not running"
72 sudo rm -f /dev/hugepages/*
75 cd ${ROOTDIR}/${DPDK_DIR}/
76 sudo ./usertools/dpdk-devbind.py -b ${port1_driver} ${port1_pci} || \
77 { echo "Unbind ${port1_pci} failed"; exit 1; }
78 sudo ./usertools/dpdk-devbind.py -b ${port2_driver} ${port2_pci} || \
79 { echo "Unbind ${port1_pci} failed"; exit 1; }
83 if1_name=`./usertools/dpdk-devbind.py --s | grep "${port1_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
84 if2_name=`./usertools/dpdk-devbind.py --s | grep "${port2_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
86 # Remove igb_uio driver
88 { echo "Removing igb_uio failed"; exit 1; }