diff mbox series

[09/11] app/testpmd: check eth dev stop status

Message ID 1602682146-4722-10-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series ethdev: change device stop to return status | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Oct. 14, 2020, 1:29 p.m. UTC
From: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>

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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index ccba71c076..84dedcf919 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2628,7 +2628,9 @@  stop_port(portid_t pid)
 						RTE_PORT_HANDLING) == 0)
 			continue;
 
-		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)