]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ixgbe: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 30 Oct 2012 06:01:40 +0000 (06:01 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 19 Jan 2013 11:45:56 +0000 (03:45 -0800)
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>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 20d6764cedc85e1c4aee59c720d34379617a1c1a..e197cc2493eba43e8d8a9ed1d7a9aba56441213f 100644 (file)
@@ -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;