]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i40e: reset fd_tcp_rule count when restoring filters
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 6 Feb 2017 22:38:44 +0000 (14:38 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 20 Mar 2017 23:45:21 +0000 (16:45 -0700)
Since we're about to reprogram the filters, we need to ensure that the
fd_tcp_rule count is correctly reset to 0. Otherwise, we will keep
a stale count that does not accurately reflect the number of programmed
TCPv4 filters.

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

index 221e1705c031f2a3c672c60024be4a3f7d6b8e4d..437b79eeb8b58de86c13982091862a19adbf4043 100644 (file)
@@ -3283,6 +3283,9 @@ static void i40e_fdir_filter_restore(struct i40e_vsi *vsi)
        if (!(pf->flags & I40E_FLAG_FD_SB_ENABLED))
                return;
 
+       /* Reset FDir counters as we're replaying all existing filters */
+       pf->fd_tcp_rule = 0;
+
        hlist_for_each_entry_safe(filter, node,
                                  &pf->fdir_filter_list, fdir_node) {
                i40e_add_del_fdir(vsi, filter, true);