Add the DPDK l3fwd performance test case.
[csit.git] / dpdk-tests / dpdk_scripts / cleanup_dpdk.sh
index 7961a5b..48e1a29 100755 (executable)
@@ -3,7 +3,7 @@
 set -x
 
 # Setting variables
-DPDK_VERSION=dpdk-17.02
+DPDK_VERSION=dpdk-17.05
 ROOTDIR=/tmp/openvpp-testing
 TESTPMDLOG=screenlog.0
 PWDDIR=$(pwd)
@@ -41,6 +41,33 @@ else
     echo "testpmd is not running"
 fi
 
+#also kill the l3fwd
+sudo pgrep l3fwd
+if [ $? -eq "0" ]; then
+    success=false
+    sudo pkill l3fwd
+    echo "RC = $?"
+    for attempt in {1..5}; do
+        echo "Checking if l3fwd is still alive, attempt nr ${attempt}"
+        sudo pgrep l3fwd
+        if [ $? -eq "1" ]; then
+            echo "l3fwd is dead"
+            success=true
+            break
+        fi
+        echo "l3fwd is still alive, waiting 1 second"
+        sleep 1
+    done
+    if [ "$success" = false ]; then
+        echo "The command sudo pkill l3fwd failed"
+        sudo pkill -9 l3fwd
+        echo "RC = $?"
+        exit 1
+    fi
+else
+    echo "l3fwd is not running"
+fi
+
 # Remove hugepages
 sudo rm -f /dev/hugepages/*
 
@@ -60,4 +87,4 @@ if2_name=`./usertools/dpdk-devbind.py --s | grep "${port2_pci}" | sed -n 's/.*if
 rmmod igb_uio || \
     { echo "Removing igb_uio failed"; exit 1; }
 
-cd ${PWDDIR}
\ No newline at end of file
+cd ${PWDDIR}