FIX: Detection if l2fwd/l3fwd is up/down 90/24890/4
authorJan Gelety <jgelety@cisco.com>
Wed, 22 Jan 2020 15:38:39 +0000 (16:38 +0100)
committerJan Gelety <jgelety@cisco.com>
Mon, 10 Feb 2020 13:33:34 +0000 (13:33 +0000)
Change-Id: Ide5de222e8314a0ea0be59f9a478f8d59147f722
Signed-off-by: Jan Gelety <jgelety@cisco.com>
resources/libraries/python/DPDK/DPDKTools.py
resources/libraries/python/DPDK/L2fwdTest.py
resources/libraries/python/DPDK/L3fwdTest.py
tests/dpdk/dpdk_scripts/cleanup_dpdk.sh
tests/dpdk/dpdk_scripts/run_l2fwd.sh
tests/dpdk/dpdk_scripts/run_l3fwd.sh

index ecb23fb..868d2d8 100644 (file)
@@ -86,7 +86,7 @@ class DPDKTools:
                 f"/cleanup_dpdk.sh {if1_driver} {pci_address1} {if2_driver} " \
                 f"{pci_address2}"
 
-            ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=600)
+            ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=1200)
             if ret_code != 0:
                 raise RuntimeError(
                     f"Failed to cleanup the dpdk at node {dut_node[u'host']}"
index 56a055c..de275f9 100644 (file)
@@ -52,7 +52,7 @@ class L2fwdTest:
                 f"/run_l2fwd.sh {cpu_cores} {nb_cores} {queue_nums} {jumbo} " \
                 f"{arch}"
 
-            ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=600)
+            ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=1800)
             if ret_code != 0:
                 raise RuntimeError(
                     f"Failed to execute l2fwd test at node {dut_node['host']}"
index 0a045c0..18becab 100644 (file)
@@ -73,7 +73,7 @@ class L3fwdTest:
                 f"\"{port_config.rstrip(u',')}\" " \
                 f"{adj_mac0} {adj_mac1} {u'yes' if jumbo_frames else u'no'}"
 
-            ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=600)
+            ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=1800)
             if ret_code != 0:
                 raise Exception(
                     f"Failed to execute l3fwd test at node {dut_node[u'host']}"
index a8624a8..a97b4ba 100755 (executable)
@@ -20,7 +20,7 @@ if [ $? -eq "0" ]; then
     success=false
     sudo pkill testpmd
     echo "RC = $?"
-    for attempt in {1..5}; do
+    for attempt in {1..60}; do
         echo "Checking if testpmd is still alive, attempt nr ${attempt}"
         sudo pgrep testpmd
         if [ $? -eq "1" ]; then
@@ -47,7 +47,7 @@ if [ $? -eq "0" ]; then
     success=false
     sudo pkill l3fwd
     echo "RC = $?"
-    for attempt in {1..5}; do
+    for attempt in {1..60}; do
         echo "Checking if l3fwd is still alive, attempt nr ${attempt}"
         sudo pgrep l3fwd
         if [ $? -eq "1" ]; then
@@ -83,8 +83,4 @@ sleep 2
 if1_name=`./usertools/dpdk-devbind.py --s | grep "${port1_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
 if2_name=`./usertools/dpdk-devbind.py --s | grep "${port2_pci}" | sed -n 's/.*if=\(\S\)/\1/p' | awk -F' ' '{print $1}'`
 
-# Remove igb_uio driver
-rmmod igb_uio || \
-    { echo "Removing igb_uio failed"; exit 1; }
-
 cd ${PWDDIR}
index 09cc112..f15461e 100755 (executable)
@@ -42,7 +42,7 @@ if [ ${?} -eq "0" ]; then
     success=false
     sudo pkill testpmd
     echo "RC = ${?}"
-    for attempt in {1..30}; do
+    for attempt in {1..60}; do
         echo "Checking if testpmd is still alive, attempt nr ${attempt}"
         sudo pgrep testpmd
         if [ ${?} -eq "1" ]; then
@@ -69,7 +69,7 @@ if [ ${?} -eq "0" ]; then
     success=false
     sudo pkill l3fwd
     echo "RC = ${?}"
-    for attempt in {1..30}; do
+    for attempt in {1..60}; do
         echo "Checking if l3fwd is still alive, attempt nr ${attempt}"
         sudo pgrep l3fwd
         if [ ${?} -eq "1" ]; then
@@ -133,7 +133,7 @@ else
         --auto-start"
 fi
 
-for attempt in {1..30}; do
+for attempt in {1..60}; do
     echo "Checking if testpmd is alive, attempt nr ${attempt}"
     fgrep "Port 1: link state change event" "${TESTPMDLOG}"
     if [ "${?}" -eq "0" ]; then
index 3940cd4..bab7668 100755 (executable)
@@ -45,7 +45,7 @@ if [ ! -z "${l3fwd_pid}" ]; then
     success=false
     sudo kill -15 "${l3fwd_pid}"
     echo "RC = ${?}"
-    for attempt in {1..30}; do
+    for attempt in {1..60}; do
         echo "Checking if l3fwd is still alive, attempt nr ${attempt}"
         l3fwd_pid=`get_l3fwd_pid`
         if [ -z "${l3fwd_pid}" ]; then
@@ -72,7 +72,7 @@ if [ ${?} -eq "0" ]; then
     success=false
     sudo pkill testpmd
     echo "RC = ${?}"
-    for attempt in {1..30}; do
+    for attempt in {1..60}; do
         echo "Checking if testpmd is still alive, attempt nr ${attempt}"
         sudo pgrep testpmd
         if [ ${?} -eq "1" ]; then
@@ -113,7 +113,7 @@ else
     --eth-dest=0,${adj_mac0} --eth-dest=1,${adj_mac1} --parse-ptype"
 fi
 
-for attempt in {1..30}; do
+for attempt in {1..60}; do
     echo "Checking if l3fwd is alive, attempt nr ${attempt}"
     fgrep "L3FWD: entering main loop on lcore" "${L3FWDLOG}"
     if [ "${?}" -eq "0" ]; then