]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: ignore duplicate port VLAN requests
authorMitch Williams <mitch.a.williams@intel.com>
Mon, 27 Apr 2015 18:57:10 +0000 (14:57 -0400)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 28 Aug 2015 15:11:50 +0000 (08:11 -0700)
Orabug: 21570582

If user attempts to set a port VLAN on a VF that already has the same
port VLAN configured, the driver will go through a completely
unnecessary flurry of filter removals and filter adds. Just check for
this condition and return success instead of doing a bunch of busywork.

Change-ID: Ia1a9e83e6ed48b3f4658bc20dfc6af0cf525d54a
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 85927ec1b369c880407aa82eba70d49c04c35062)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 23f95cdbdfcc2c20d5913fbab3a2b71a1bb61064..433e80320eeaa37b7e339c6c259ff2c0a6450abd 100644 (file)
@@ -2088,6 +2088,10 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
                goto error_pvid;
        }
 
+       if (vsi->info.pvid == (vlan_id | (qos << I40E_VLAN_PRIORITY_SHIFT)))
+               /* duplicate request, so just return success */
+               goto error_pvid;
+
        if (vsi->info.pvid == 0 && i40e_is_vsi_in_vlan(vsi)) {
                dev_err(&pf->pdev->dev,
                        "VF %d has already configured VLAN filters and the administrator is requesting a port VLAN override.\nPlease unload and reload the VF driver for this change to take effect.\n",