ixgbe: don't clear IPsec sa counters on HW clearing
authorShannon Nelson <shannon.nelson@oracle.com>
Fri, 10 Aug 2018 19:24:10 +0000 (12:24 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 28 Aug 2018 21:32:22 +0000 (14:32 -0700)
The software SA record counters should not be cleared when clearing
the hardware tables.  This causes the counters to be out of sync
after a driver reset.

Fixes: 63a67fe229ea ("ixgbe: add ipsec offload add and remove SA")
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c

index da4322e4daed5de4fb44f06d8cdb488bc41f6432..e515246d0bcec1bf4e5c4f8c9088e01b9966eeff 100644 (file)
@@ -113,7 +113,6 @@ static void ixgbe_ipsec_set_rx_ip(struct ixgbe_hw *hw, u16 idx, __be32 addr[])
  **/
 static void ixgbe_ipsec_clear_hw_tables(struct ixgbe_adapter *adapter)
 {
-       struct ixgbe_ipsec *ipsec = adapter->ipsec;
        struct ixgbe_hw *hw = &adapter->hw;
        u32 buf[4] = {0, 0, 0, 0};
        u16 idx;
@@ -132,9 +131,6 @@ static void ixgbe_ipsec_clear_hw_tables(struct ixgbe_adapter *adapter)
                ixgbe_ipsec_set_tx_sa(hw, idx, buf, 0);
                ixgbe_ipsec_set_rx_sa(hw, idx, 0, buf, 0, 0, 0);
        }
-
-       ipsec->num_rx_sa = 0;
-       ipsec->num_tx_sa = 0;
 }
 
 /**