net/qede: fix unicast filter routine return code
authorShahed Shaikh <shahed.shaikh@cavium.com>
Sun, 20 May 2018 00:15:46 +0000 (17:15 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 22 May 2018 22:35:01 +0000 (00:35 +0200)
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
drivers/net/qede/qede_fdir.c

index 3e1a62c..30b6519 100644 (file)
@@ -857,10 +857,10 @@ qede_ucast_filter(struct rte_eth_dev *eth_dev, 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;
                        }
                }
 
index da6364e..153ef96 100644 (file)
@@ -141,8 +141,8 @@ qede_config_cmn_fdir_filter(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;
                        }
                }