[v2,06/13] app/pipeline: check code of promiscuous mode switch

Message ID 1568030331-16526-7-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Series ethdev: change promiscuous mode functions to return status |


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

Commit Message

Andrew Rybchenko Sept. 9, 2019, 11:58 a.m. UTC
  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/pipeline
according to new return type.

Signed-off-by: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@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(