[dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support
Sivaprasad Tummala
Sivaprasad.Tummala at intel.com
Wed Feb 26 10:15:01 CET 2020
l2fwd application exits, if return for rte_eth_promiscuous_enable
is not success. But for vHost PMD, promiscuous enable returns "Not
Supported".
This patch validates success and no support of promiscuous enable.
Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala at intel.com>
---
examples/l2fwd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 09257aab1..ea9831f07 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -727,7 +727,7 @@ main(int argc, char **argv)
printf("done: \n");
ret = rte_eth_promiscuous_enable(portid);
- if (ret != 0)
+ if ((ret != 0) && (ret != -ENOTSUP))
rte_exit(EXIT_FAILURE,
"rte_eth_promiscuous_enable:err=%s, port=%u\n",
rte_strerror(-ret), portid);
--
2.17.1
More information about the dev
mailing list