summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-12-16 16:21:05 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-12-16 16:21:05 -0500
commit3c55d6bcfe8163ff2b5636b4aabe3caa3f5d95f4 (patch)
tree3229c2de6e95352751d1c9e05dcd2925a3212beb /drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
parent4da00fd1b948b408f76488c4e506af748be5fce8 (diff)
parent29ac8e856cb3694e004037de595dec4ec53d42f2 (diff)
downloadlinux-3c55d6bcfe8163ff2b5636b4aabe3caa3f5d95f4.tar.bz2
Merge remote-tracking branch 'djwong/ocfs2-vfs-reflink-6' into for-linus
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index bd93d823cc25..fee1f2918ead 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7277,11 +7277,15 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,
/* initialize outer IP header fields */
if (ip.v4->version == 4) {
+ unsigned char *csum_start = skb_checksum_start(skb);
+ unsigned char *trans_start = ip.hdr + (ip.v4->ihl * 4);
+
/* IP header will have to cancel out any data that
* is not a part of the outer IP header
*/
- ip.v4->check = csum_fold(csum_add(lco_csum(skb),
- csum_unfold(l4.tcp->check)));
+ ip.v4->check = csum_fold(csum_partial(trans_start,
+ csum_start - trans_start,
+ 0));
type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4;
ip.v4->tot_len = 0;