i40e: do TSO only if CHECKSUM_PARTIAL is set
authorShannon Nelson <shannon.nelson@intel.com>
Mon, 4 Jan 2016 18:33:04 +0000 (10:33 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 17 Feb 2016 16:20:45 +0000 (08:20 -0800)
Don't bother trying to set up a TSO if the skb->ip_summed is not
set to CHECKSUM_PARTIAL.

Change-ID: I6495b3568e404907a2965b48cf3e2effa7c9ab55
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c

index f2e6afce8aae2a549dab03811ab7482c06047565..15130b5dbe73f9b6039e96515ecfc77ea071adb4 100644 (file)
@@ -2221,6 +2221,9 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
        u32 l4len;
        int err;
 
+       if (skb->ip_summed != CHECKSUM_PARTIAL)
+               return 0;
+
        if (!skb_is_gso(skb))
                return 0;
 
index 69fb85ff346fe8a72bf07b82e2fa79a08607f6e2..4205aef2ffcaedcfdbb9c8d892e26a7a9da5b8b8 100644 (file)
@@ -1471,6 +1471,9 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
        u32 l4len;
        int err;
 
+       if (skb->ip_summed != CHECKSUM_PARTIAL)
+               return 0;
+
        if (!skb_is_gso(skb))
                return 0;