Commit e9c3a24b authored by Tom Herbert's avatar Tom Herbert Committed by David S. Miller

tcp: Call gso_make_checksum

Call common gso_make_checksum when calculating checksum for a
TCP GSO segment.
Signed-off-by: default avatarTom Herbert <therbert@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e2b10c1
...@@ -97,9 +97,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, ...@@ -97,9 +97,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
th->check = newcheck; th->check = newcheck;
if (skb->ip_summed != CHECKSUM_PARTIAL) if (skb->ip_summed != CHECKSUM_PARTIAL)
th->check = th->check = gso_make_checksum(skb, ~th->check);
csum_fold(csum_partial(skb_transport_header(skb),
thlen, skb->csum));
seq += mss; seq += mss;
if (copy_destructor) { if (copy_destructor) {
...@@ -133,8 +131,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, ...@@ -133,8 +131,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
th->check = ~csum_fold((__force __wsum)((__force u32)th->check + th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
(__force u32)delta)); (__force u32)delta));
if (skb->ip_summed != CHECKSUM_PARTIAL) if (skb->ip_summed != CHECKSUM_PARTIAL)
th->check = csum_fold(csum_partial(skb_transport_header(skb), th->check = gso_make_checksum(skb, ~th->check);
thlen, skb->csum));
out: out:
return segs; return segs;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment