i40e: implement __i40e_del_filter and use where applicable
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 5 Oct 2016 16:30:36 +0000 (09:30 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 31 Oct 2016 21:26:40 +0000 (14:26 -0700)
commit290d255719af42ae4baaf49165a69b9ad47f2049
tree36af4338fcdd4d1350d82f73b3bc99830632760f
parent57b341d66684e380cae332eadcc210e177a9f289
i40e: implement __i40e_del_filter and use where applicable

When inside a loop where we call i40e_del_filter we use an O(n^2)
pattern where i40e_del_filter calls i40e_find_filter for us. We can
avoid this O(n^2) logic by factoring a function, __i40e_del_filter() out
from the i40e_del_filter code. This allows us to re-use the delete logic
where appropriate without having to search for the filter twice.

This new function benefits several functions including i40e_vsi_add_vlan,
i40e_vsi_kill_vlan, i40e_del_mac_vlan_all, and i40e_vsi_release.

Change-ID: I75fabe0f53bf73f56b80d342e5fdcfcc28f4d3eb
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c