1
0
Fork 0

tcp: Call gso_make_checksum

Call common gso_make_checksum when calculating checksum for a
TCP GSO segment.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
wifi-calibration
Tom Herbert 2014-06-04 17:20:09 -07:00 committed by David S. Miller
parent 7e2b10c1e5
commit e9c3a24b3a
1 changed files with 2 additions and 5 deletions

View File

@ -97,9 +97,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
th->check = newcheck;
if (skb->ip_summed != CHECKSUM_PARTIAL)
th->check =
csum_fold(csum_partial(skb_transport_header(skb),
thlen, skb->csum));
th->check = gso_make_checksum(skb, ~th->check);
seq += mss;
if (copy_destructor) {
@ -133,8 +131,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
(__force u32)delta));
if (skb->ip_summed != CHECKSUM_PARTIAL)
th->check = csum_fold(csum_partial(skb_transport_header(skb),
thlen, skb->csum));
th->check = gso_make_checksum(skb, ~th->check);
out:
return segs;
}