[v2,09/13] app/pdump: check code of promiscuous mode switch

Message ID 1568030331-16526-10-git-send-email-arybchenko@solarflare.com
State Superseded
Delegated to: Ferruh Yigit
Headers show
Series
  • ethdev: change promiscuous mode functions to return status
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Sept. 9, 2019, 11:58 a.m.
From: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>

rte_eth_promiscuous_enable()/rte_eth_promiscuous_disable() return
value was changed from void to int, so this patch modify usage
of these functions across app/pdump
according to new return type.

Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 app/pdump/main.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch

diff --git a/app/pdump/main.c b/app/pdump/main.c
index c1b901279f..9d6be8ed1b 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -614,7 +614,13 @@  configure_vdev(uint16_t port_id)
 			addr.addr_bytes[2], addr.addr_bytes[3],
 			addr.addr_bytes[4], addr.addr_bytes[5]);
 
-	rte_eth_promiscuous_enable(port_id);
+	ret = rte_eth_promiscuous_enable(port_id);
+	if (ret != 0) {
+		rte_exit(EXIT_FAILURE,
+			 "promiscuous mode enable failed: %s\n",
+			 rte_strerror(-ret));
+		return ret;
+	}
 
 	return 0;
 }