OSDN Git Service

ixgbe: remove unneeded ipsec test in TX path
authorShannon Nelson <shannon.nelson@oracle.com>
Fri, 16 Mar 2018 18:09:05 +0000 (11:09 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 23 Mar 2018 21:51:57 +0000 (14:51 -0700)
Since the ipsec data fields will be zero anyway in the non-ipsec
case, we can remove the conditional jump.

Suggested-by: Alexander Duyck <alexander.duyck@gmail.com>
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_main.c

index 0eb45d1..74da310 100644 (file)
@@ -7873,10 +7873,8 @@ no_csum:
        vlan_macip_lens |= skb_network_offset(skb) << IXGBE_ADVTXD_MACLEN_SHIFT;
        vlan_macip_lens |= first->tx_flags & IXGBE_TX_FLAGS_VLAN_MASK;
 
-       if (first->tx_flags & IXGBE_TX_FLAGS_IPSEC) {
-               fceof_saidx |= itd->sa_idx;
-               type_tucmd |= itd->flags | itd->trailer_len;
-       }
+       fceof_saidx |= itd->sa_idx;
+       type_tucmd |= itd->flags | itd->trailer_len;
 
        ixgbe_tx_ctxtdesc(tx_ring, vlan_macip_lens, fceof_saidx, type_tucmd, 0);
 }