[dpdk-dev] [PATCH 06/13] app/pipeline: check code of promiscuous mode switch

Andrew Rybchenko arybchenko at solarflare.com
Thu Sep 5 18:10:44 CEST 2019


From: Ivan Ilchenko <Ivan.Ilchenko at 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/pipeline
according to new return type.

Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 app/test-pipeline/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index b75688a87a..871d9fa2d2 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c
@@ -200,7 +200,10 @@ app_init_ports(void)
 		if (ret < 0)
 			rte_panic("Cannot init NIC port %u (%d)\n", port, ret);
 
-		rte_eth_promiscuous_enable(port);
+		ret = rte_eth_promiscuous_enable(port);
+		if (ret != 0)
+			rte_panic("Cannot enable promiscuous mode for port %u: %s\n",
+				port, rte_strerror(-ret));
 
 		/* Init RX queues */
 		ret = rte_eth_rx_queue_setup(
-- 
2.17.1



More information about the dev mailing list