]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: fix disabling overflow promiscuous mode
authorAlan Brady <alan.brady@intel.com>
Wed, 7 Jun 2017 09:43:10 +0000 (05:43 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:24 +0000 (14:15 -0700)
There exists a bug in which the driver does not correctly exit overflow
promiscuous mode.  This can occur if "too many" mac filters are added,
putting the driver into overflow promiscuous mode, and the filters are
then removed.  When the failed filters are removed, the driver reports
exiting overflow promiscuous mode which is correct, however traffic
continues to be received as if in promiscuous mode still.

The bug occurs because the conditional for toggling promiscuous mode was
set to only execute when promiscuous mode was enabled and not when it
was disabled as well.  This patch fixes the conditional to correctly
execute when promiscuous mode is toggled and not just enabled.  Without
this patch, the driver is unable to correctly exit overflow promiscuous
mode.

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: 26785018
(cherry picked from commit e588723986845457942e8a1acb1e31cf18e8eb08)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 1be3f236235de0ff1acb93c70050dec5f2c52c00..50052fb9c3d0e070d25f28becfabf89cf4fe0f6e 100644 (file)
@@ -2354,9 +2354,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
                                 i40e_aq_str(hw, hw->aq.asq_last_status));
                }
        }
-       if ((changed_flags & IFF_PROMISC) ||
-           (promisc_changed &&
-            test_bit(__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state))) {
+
+       if ((changed_flags & IFF_PROMISC) || promisc_changed) {
                bool cur_promisc;
 
                cur_promisc = (!!(vsi->current_netdev_flags & IFF_PROMISC) ||