app/testpmd: check stop call status
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Thu, 15 Oct 2020 13:30:43 +0000 (14:30 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 20:26:41 +0000 (22:26 +0200)
rte_eth_dev_stop() return value was changed from void to int,
so this patch modify usage of this function across app/testpmd
according to new return type.

Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
app/test-pmd/testpmd.c

index 00cffae..94e3688 100644 (file)
@@ -2806,7 +2806,9 @@ stop_port(portid_t pid)
                        }
                }
 
-               rte_eth_dev_stop(pi);
+               if (rte_eth_dev_stop(pi) != 0)
+                       RTE_LOG(ERR, EAL, "rte_eth_dev_stop failed for port %u\n",
+                               pi);
 
                if (rte_atomic16_cmpset(&(port->port_status),
                        RTE_PORT_HANDLING, RTE_PORT_STOPPED) == 0)