From: Alexander Duyck Date: Tue, 13 Nov 2012 04:03:22 +0000 (+0000) Subject: igb: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check X-Git-Tag: firefly_0821_release~3680^2~1480^2~370 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ed6aa10580b852e29acd48b686438fac8605a97b;p=firefly-linux-kernel-4.4.55.git igb: 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 igb_tx_csum call we start with that check as well. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index da9fd7b8e23a..b0730e9c7766 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -3998,6 +3998,9 @@ static int igb_tso(struct igb_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;