Skip to content

Commit

Permalink
ixgbe: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check
Browse files Browse the repository at this point in the history
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 <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Jan 19, 2013
1 parent 610a63f commit 8f4fbb9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8f4fbb9

Please sign in to comment.