OSDN Git Service

i40evf: fix mac filter removal timing issue
authorAlan Brady <alan.brady@intel.com>
Thu, 7 Sep 2017 12:05:47 +0000 (08:05 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 9 Oct 2017 21:17:03 +0000 (14:17 -0700)
commitc766b9af9abe897eb5480ef9ef3914fc07b815c5
treeb25a6aa1fc54693d3275ce449d3c82a65eda9eda
parent784548c40d6f43eff2297220ad7800dc04be03c6
i40evf: fix mac filter removal timing issue

Due to the asynchronous nature in which mac filters are added and
deleted, there exists a bug in which filters are erroneously removed if
removed then added again quickly.

The events are as such:
    - filter marked for removal
    - same filter is re-added before watchdog that cleans up filters
    - we skip re-adding the filter because we have it already in the
list
    - watchdog filter cleanup kicks off and filter is removed

So when we were re-adding the same filter, it didn't actually get added
because it already existed in the list, but was marked for removal and
had yet to actually be removed.

This patch fixes the issue by making sure that when adding a filter, if
we find it already existing in our list, make sure it is not marked to
be removed.

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>
drivers/net/ethernet/intel/i40evf/i40evf_main.c