From: Alexander Duyck Date: Tue, 30 Oct 2012 06:01:40 +0000 (+0000) Subject: ixgbe: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check X-Git-Tag: MMI-PSA29.97-13-9~15013^2~320^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8f4fbb9bfc8f0eac8932d45f57e29507d5b631a3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ixgbe: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check This change is meant to reduce the overhead for workloads that are not using either TSO or checksum offloads. Most of the time the compiler should jump ahead after failing this check to the VLAN check since in the ixgbe_tx_csum call we start with that check as well. Signed-off-by: Alexander Duyck Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 20d6764cedc8..e197cc2493eb 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -5899,6 +5899,9 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring, u32 vlan_macip_lens, type_tucmd; u32 mss_l4len_idx, l4len; + if (skb->ip_summed != CHECKSUM_PARTIAL) + return 0; + if (!skb_is_gso(skb)) return 0;