DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: dev@dpdk.org
Cc: Shahed Shaikh <shahed.shaikh@cavium.com>,
	ferruh.yigit@intel.com, Dept-EngDPDKDev@cavium.com,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH 4/4] net/qede: fix ucast filter routine return code
Date: Sat, 19 May 2018 17:15:46 -0700	[thread overview]
Message-ID: <1526775346-10643-4-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1526775346-10643-1-git-send-email-rasesh.mody@cavium.com>

From: Shahed Shaikh <shahed.shaikh@cavium.com>

There is no need to return failure (-EEXIST) when the requested
filter is already configured.

Fixes: d6cb17535f88 ("net/qede: fix VLAN filters")
Fixes: 77fac1b54fc9 ("net/qede: fix filtering code")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |   14 +++++++-------
 drivers/net/qede/qede_fdir.c   |    4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 3e1a62c..30b6519 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -857,10 +857,10 @@ static void qede_set_ucast_cmn_params(struct ecore_filter_ucast *ucast)
 				    ETHER_ADDR_LEN) == 0) &&
 			     ucast->vni == tmp->vni &&
 			     ucast->vlan == tmp->vlan) {
-				DP_ERR(edev, "Unicast MAC is already added"
-				       " with vlan = %u, vni = %u\n",
-				       ucast->vlan,  ucast->vni);
-					return -EEXIST;
+				DP_INFO(edev, "Unicast MAC is already added"
+					" with vlan = %u, vni = %u\n",
+					ucast->vlan,  ucast->vni);
+					return 0;
 			}
 		}
 		u = rte_malloc(NULL, sizeof(struct qede_ucast_entry),
@@ -1117,9 +1117,9 @@ static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
 
 		SLIST_FOREACH(tmp, &qdev->vlan_list_head, list) {
 			if (tmp->vid == vlan_id) {
-				DP_ERR(edev, "VLAN %u already configured\n",
-				       vlan_id);
-				return -EEXIST;
+				DP_INFO(edev, "VLAN %u already configured\n",
+					vlan_id);
+				return 0;
 			}
 		}
 
diff --git a/drivers/net/qede/qede_fdir.c b/drivers/net/qede/qede_fdir.c
index da6364e..153ef96 100644
--- a/drivers/net/qede/qede_fdir.c
+++ b/drivers/net/qede/qede_fdir.c
@@ -141,8 +141,8 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev)
 	if (add) {
 		SLIST_FOREACH(tmp, &qdev->fdir_info.fdir_list_head, list) {
 			if (memcmp(tmp->mz->addr, pkt, pkt_len) == 0) {
-				DP_ERR(edev, "flowdir filter exist\n");
-				rc = -EEXIST;
+				DP_INFO(edev, "flowdir filter exist\n");
+				rc = 0;
 				goto err2;
 			}
 		}
-- 
1.7.10.3

  parent reply	other threads:[~2018-05-20  0:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-20  0:15 [dpdk-dev] [PATCH 1/4] net/qede: fix multicast filtering Rasesh Mody
2018-05-20  0:15 ` [dpdk-dev] [PATCH 2/4] net/qede: fix missing loop index in Tx SG mode Rasesh Mody
2018-05-20  0:15 ` [dpdk-dev] [PATCH 3/4] net/qede/base: reduce verbosity in HW init log Rasesh Mody
2018-05-20  0:15 ` Rasesh Mody [this message]
2018-05-20 22:02 ` [dpdk-dev] [PATCH 1/4] net/qede: fix multicast filtering Ferruh Yigit

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=1526775346-10643-4-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=shahed.shaikh@cavium.com \
    --cc=stable@dpdk.org \
    /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).