]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Swap use of pf->flags and pf->hw_disabled_flags for ATR Eviction
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 5 Apr 2017 11:50:54 +0000 (07:50 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:22 +0000 (14:15 -0700)
This is a minor cleanup so that we are always updating pf->flags when we
make a change to the private flags instead of updating a mix of either
pf->flags and/or pf->hw_disabled_flags.

In addition I went through and cleaned out all the spots where we were
using the X722 define in regards to this flag.

Lastly since we changed the logic I went through and flushed out any
redundancy and cleaned up the handling of the flags in the Tx path.

Change-ID: I79ff95a7272bb2533251ff11ef91e89ccb80b610
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785018
(cherry picked from commit e8c5f7231cc03153fee1b5fcb173585354c08ee8)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c

index 1b6439557674a84d4d836356cda2611d6ebd195a..3a9a75a497d69acbb4922164aae7044ab1e3bf22 100644 (file)
@@ -2258,8 +2258,7 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
        /* Due to lack of space, no more new filters can be programmed */
        if (th->syn && (pf->hw_disabled_flags & I40E_FLAG_FD_ATR_ENABLED))
                return;
-       if ((pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE) &&
-           (!(pf->hw_disabled_flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE))) {
+       if (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE) {
                /* HW ATR eviction will take care of removing filters on FIN
                 * and RST packets.
                 */
@@ -2321,8 +2320,7 @@ static void i40e_atr(struct i40e_ring *tx_ring, struct sk_buff *skb,
                        I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) &
                        I40E_TXD_FLTR_QW1_CNTINDEX_MASK;
 
-       if ((pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE) &&
-           (!(pf->hw_disabled_flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE)))
+       if (pf->flags & I40E_FLAG_HW_ATR_EVICT_CAPABLE)
                dtype_cmd |= I40E_TXD_FLTR_QW1_ATR_MASK;
 
        fdir_desc->qindex_flex_ptype_vsi = cpu_to_le32(flex_ptype);