aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_l2fwd.c
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2022-09-12 13:11:43 +0300
committerMatias Elo <matias.elo@nokia.com>2022-09-14 10:40:08 +0300
commit99f2290572d7dd268692277468b970bd88783fa5 (patch)
treee295a4602de05536d4487d52cbc87cf0afbf5a51 /test/performance/odp_l2fwd.c
parent1b854f99415c773bbe4ad77f84127fd787ee80bb (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.c2
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;