]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: fix disable overflow promiscuous mode
authorAlan Brady <alan.brady@intel.com>
Mon, 12 Dec 2016 23:44:07 +0000 (15:44 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Sat, 10 Jun 2017 01:57:02 +0000 (18:57 -0700)
There exists a bug in which the driver is unable to exit overflow
promiscuous mode after having added "too many" mac filters.  It is
expected that after triggering overflow promiscuous, removing the
failed/extra filters should then disable overflow promiscuous mode.

The bug exists because we were intentionally skipping the sync_vsi_filter
path in cases where we were removing failed filters since they shouldn't
have been added to the firmware in the first place, however we still
need to go through the sync_vsi_filter code path to determine whether or
not it is ok to exit overflow promiscuous mode.  This patch fixes the
bug by making sure we go through the sync_vsi_filter path in cases of
failed filters.

Change-ID: I634d249ca3e5fa50729553137c295e73e7722143
Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26132523
(cherry picked from commit a410c821c0cf50bc0b73a91435852cd04b2c7acd)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 7abdb0aba4459cbd53a1fa97caa50afcbf11b215..cfe66ae64fd8b71203aaf441c9d8439838a089d3 100644 (file)
@@ -1459,18 +1459,20 @@ void __i40e_del_filter(struct i40e_vsi *vsi, struct i40e_mac_filter *f)
        if (!f)
                return;
 
+       /* If the filter was never added to firmware then we can just delete it
+        * directly and we don't want to set the status to remove or else an
+        * admin queue command will unnecessarily fire.
+        */
        if ((f->state == I40E_FILTER_FAILED) ||
            (f->state == I40E_FILTER_NEW)) {
-               /* this one never got added by the FW. Just remove it,
-                * no need to sync anything.
-                */
                hash_del(&f->hlist);
                kfree(f);
        } else {
                f->state = I40E_FILTER_REMOVE;
-               vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
-               vsi->back->flags |= I40E_FLAG_FILTER_SYNC;
        }
+
+       vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
+       vsi->back->flags |= I40E_FLAG_FILTER_SYNC;
 }
 
 /**