DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wang Ying A <ying.a.wang@intel.com>
To: wenzhuo.lu@intel.com, qiming.yang@intel.com
Cc: dev@dpdk.org, Wang Ying A <ying.a.wang@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] net/ice: fix promiscuous mode
Date: Fri, 12 Apr 2019 21:52:19 +0800	[thread overview]
Message-ID: <1555077139-244831-3-git-send-email-ying.a.wang@intel.com> (raw)
Message-ID: <20190412135219.ZYTQTfPkrkDPn4ElQIvbAysnAwpJsI1mT5dYRYXCFHg@z> (raw)
In-Reply-To: <1555077139-244831-1-git-send-email-ying.a.wang@intel.com>

When device promiscuous mode has already been enabled,
if user re-enables the promisc mode, he/she should be
prompted with "Promisc has already been enabled"
rather than "Failed to enable promisc".

Fixes: c945e4bf9063 ("net/ice: support promiscuous mode")
Cc: stable@dpdk.org

Signed-off-by: Wang Ying A <ying.a.wang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 72831bb..cb82a6f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2759,7 +2759,9 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
 		ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
 
 	status = ice_set_vsi_promisc(hw, vsi->idx, pmask, 0);
-	if (status != ICE_SUCCESS)
+	if (status == ICE_ERR_ALREADY_EXISTS)
+		PMD_DRV_LOG(DEBUG, "Promisc mode has already been enabled");
+	else if (status != ICE_SUCCESS)
 		PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status);
 }
 
-- 
1.8.3.1


  parent reply	other threads:[~2019-04-12 14:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 13:52 [dpdk-dev] [PATCH 0/2] ice: code clean and promisc mode fix Wang Ying A
2019-04-12 13:52 ` Wang Ying A
2019-04-12 13:52 ` [dpdk-dev] [PATCH 1/2] net/ice: code clean Wang Ying A
2019-04-12 13:52   ` Wang Ying A
2019-04-15 12:43   ` Zhang, Qi Z
2019-04-15 12:43     ` Zhang, Qi Z
2019-04-17  0:45     ` Wang, Ying A
2019-04-17  0:45       ` Wang, Ying A
2019-04-17  1:47   ` [dpdk-dev] [PATCH v2 0/2] ice: fix wrong type and promisc mode Wang Ying A
2019-04-17  1:47     ` Wang Ying A
2019-04-17  1:47     ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix wrong type Wang Ying A
2019-04-17  1:47       ` Wang Ying A
2019-04-17  1:47     ` [dpdk-dev] [PATCH v2 2/2] net/ice: fix promiscuous mode Wang Ying A
2019-04-17  1:47       ` Wang Ying A
2019-04-17  3:09     ` [dpdk-dev] [PATCH v2 0/2] ice: fix wrong type and promisc mode Yang, Qiming
2019-04-17  3:09       ` Yang, Qiming
2019-04-17  3:46       ` Zhang, Qi Z
2019-04-17  3:46         ` Zhang, Qi Z
2019-04-12 13:52 ` Wang Ying A [this message]
2019-04-12 13:52   ` [dpdk-dev] [PATCH 2/2] net/ice: fix promiscuous mode Wang Ying A
2019-04-15 21:40   ` Rami Rosen
2019-04-15 21:40     ` Rami Rosen

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=1555077139-244831-3-git-send-email-ying.a.wang@intel.com \
    --to=ying.a.wang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@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).