From: Matthew G McGovern <mamcg...@microsoft.com> Problem: Some devices do not allow promiscuous mode.
Testpmd handles this by warning and ignoring failures from rte_eth_promiscuous_enable. Changes: make mp example apps warn if promiscuous mode cannot be enabled, rather than failing. Signed-off-by: Matthew G McGovern <mamcg...@microsoft.com> --- v3: * fix incorrect statement in v2 2/2 commit message * squash small changes to a single commit examples/multi_process/client_server_mp/mp_server/init.c | 4 +++- examples/multi_process/symmetric_mp/main.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c index 65713dbea8..87acc38101 100644 --- a/examples/multi_process/client_server_mp/mp_server/init.c +++ b/examples/multi_process/client_server_mp/mp_server/init.c @@ -134,7 +134,9 @@ init_port(uint16_t port_num) retval = rte_eth_promiscuous_enable(port_num); if (retval < 0) - return retval; + fprintf(stderr, + "Error during enabling promiscuous mode for port %u: %s - ignore\n", + retval, rte_strerror(-retval)); retval = rte_eth_dev_start(port_num); if (retval < 0) return retval; diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index f7d8439cd4..22ede756fd 100644 --- a/examples/multi_process/symmetric_mp/main.c +++ b/examples/multi_process/symmetric_mp/main.c @@ -275,7 +275,9 @@ smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool, retval = rte_eth_promiscuous_enable(port); if (retval != 0) - return retval; + fprintf(stderr, + "Error during enabling promiscuous mode for port %u: %s - ignore\n", + retval, rte_strerror(-retval)); retval = rte_eth_dev_start(port); if (retval < 0) -- 2.34.1