diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-09-12 13:11:43 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-09-23 09:52:00 +0300 |
commit | f68847718beb3443b9625bb1ab035227ddbc339b (patch) | |
tree | 3a0066f9e1574cd765488ec7ee274f042c28fd05 /test/performance/odp_l2fwd.c | |
parent | c9446aaefea60022c550c16d7cf7d55b26a339ee (diff) |
test: performance: check pktio promisc mode status before enabling it
Some pktio devices may not support changing promisc mode but have it
permanently enabled.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Diffstat (limited to 'test/performance/odp_l2fwd.c')
-rw-r--r-- | test/performance/odp_l2fwd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |