aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Sadowski <filip.sadowski@intel.com>2017-08-29 05:32:38 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-10-06 08:11:32 -0700
commit013df598d61161d356d5545f56422766ed3a3a38 (patch)
tree1b4a5d29478fb375967cd36cf2433c712f79635a
parenti40e: Display error message if module does not meet thermal requirements (diff)
downloadlinux-dev-013df598d61161d356d5545f56422766ed3a3a38.tar.xz
linux-dev-013df598d61161d356d5545f56422766ed3a3a38.zip
i40e: Properly maintain flow director filters list
When there is no space for more flow director filters and user requested to add a new one it is rejected by firmware and automatically removed from the filter list maintained by driver. This behaviour is correct. Afterwards existing filter can be removed making free slot for the new one. This however causes the newly added filter to be accepted by firmware but removed from driver filter list resulting in not showing after issuing 'ethtool -n <dev_name>'. This happened due to not clearing the variable pf->fd_inv which stores filter number to be removed from the list when firmware refused to add the requested filter. It caused the filter with this specific ID to be constantly removed once it was added to the list although it has been accepted by firmware and effectively applied to the NIC. It was fixed by clearing pf->fd_inv variable after removal of the filter from the list when it was rejected by firmware. Signed-off-by: Filip Sadowski <filip.sadowski@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 3d6d6a283327..9704cfef2f05 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6232,6 +6232,7 @@ void i40e_fdir_check_and_reenable(struct i40e_pf *pf)
hlist_del(&filter->fdir_node);
kfree(filter);
pf->fdir_pf_active_filters--;
+ pf->fd_inv = 0;
}
}
}