DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
To: Marko Kovacevic <marko.kovacevic@intel.com>,
	Ori Kam <orika@mellanox.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	Tomasz Kantecki <tomasz.kantecki@intel.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support
Date: Wed, 26 Feb 2020 09:15:01 +0000	[thread overview]
Message-ID: <20200226091501.27967-1-Sivaprasad.Tummala@intel.com> (raw)

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@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


             reply	other threads:[~2020-02-26  9:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  9:15 Sivaprasad Tummala [this message]
2020-02-26  9:22 ` David Marchand
2020-02-26 13:43   ` Ye Xiaolong
2020-04-24 20:33     ` David Marchand
2020-02-26 13:45   ` [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default Xiaolong Ye
2020-03-04  8:03     ` Maxime Coquelin
2020-04-10 14:44     ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200226091501.27967-1-Sivaprasad.Tummala@intel.com \
    --to=sivaprasad.tummala@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=marko.kovacevic@intel.com \
    --cc=orika@mellanox.com \
    --cc=pbhagavatula@marvell.com \
    --cc=radu.nicolau@intel.com \
    --cc=skori@marvell.com \
    --cc=tomasz.kantecki@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).