[dpdk-dev] [PATCH v3 08/13] app/eventdev: check code of promiscuous mode switch

Andrew Rybchenko arybchenko at solarflare.com
Sat Sep 14 13:37:28 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/eventdev
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-eventdev/test_perf_common.c     | 7 ++++++-
 app/test-eventdev/test_pipeline_common.c | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index e75582b1a..e24519179 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -726,7 +726,12 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
 			return -EINVAL;
 		}
 
-		rte_eth_promiscuous_enable(i);
+		ret = rte_eth_promiscuous_enable(i);
+		if (ret != 0) {
+			evt_err("Failed to enable promiscuous mode for eth port [%d]: %s",
+				i, rte_strerror(-ret));
+			return ret;
+		}
 	}
 
 	return 0;
diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index ef8ae28c9..616651681 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -233,7 +233,12 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
 			return -EINVAL;
 		}
 
-		rte_eth_promiscuous_enable(i);
+		ret = rte_eth_promiscuous_enable(i);
+		if (ret != 0) {
+			evt_err("Failed to enable promiscuous mode for eth port [%d]: %s",
+				i, rte_strerror(-ret));
+			return ret;
+		}
 	}
 
 	return 0;
-- 
2.17.1



More information about the dev mailing list