From f68847718beb3443b9625bb1ab035227ddbc339b Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Mon, 12 Sep 2022 13:11:43 +0300 Subject: test: performance: check pktio promisc mode status before enabling it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some pktio devices may not support changing promisc mode but have it permanently enabled. Signed-off-by: Matias Elo Reviewed-by: Tuomas Taipale Reviewed-by: Jere Leppänen --- test/performance/odp_l2fwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/performance/odp_l2fwd.c') diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 9ba0d775a..84f7fd2d6 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -982,7 +982,7 @@ static int create_pktio(const char *dev, int idx, int num_rx, int num_tx, odp_po odp_pktio_config(pktio, &config); - if (gbl_args->appl.promisc_mode) { + if (gbl_args->appl.promisc_mode && odp_pktio_promisc_mode(pktio) != 1) { if (!pktio_capa.set_op.op.promisc_mode) { ODPH_ERR("Promisc mode set not supported: %s\n", dev); return -1; -- cgit v1.2.3