i40e: always remove old filter when adding new FDir filter
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 6 Feb 2017 22:39:13 +0000 (14:39 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 20 Mar 2017 23:45:22 +0000 (16:45 -0700)
commitc6da525de724e3fbe439b8dad385395bb4fd2211
tree77bc5c659cdf63297e79c2b7f20b0916f40a0af1
parent1ec8deac8c63505194e773b9657824ed3c2fbdd8
i40e: always remove old filter when adding new FDir filter

The previous code relied on i40e_match_fdir_input_set to determine when
determining whether to free the old filter. Change this code so that we
simply unconditionally delete the old filter, even if it's identical to
the new filter. This ensures that we don't leak any memory, and that we
always update the filters as expected.

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_ethtool.c