diff options
| author | Tom Herbert <therbert@google.com> | 2014-06-04 20:20:09 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-06-05 01:46:38 -0400 |
| commit | e9c3a24b3ace90b428848fdaf772ed264982abcc (patch) | |
| tree | f26309bd487abf81f6413e083a58cbecc9ab97d1 | |
| parent | 7e2b10c1e52ca37fb522be49f4be367f9311d0cd (diff) | |
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>
| -rw-r--r-- | net/ipv4/tcp_offload.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c index b92b81718ca4..d8de7b9e0720 100644 --- a/net/ipv4/tcp_offload.c +++ b/net/ipv4/tcp_offload.c | |||
| @@ -97,9 +97,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
| 97 | th->check = newcheck; | 97 | th->check = newcheck; |
| 98 | 98 | ||
| 99 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 99 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
| 100 | th->check = | 100 | th->check = gso_make_checksum(skb, ~th->check); |
| 101 | csum_fold(csum_partial(skb_transport_header(skb), | ||
| 102 | thlen, skb->csum)); | ||
| 103 | 101 | ||
| 104 | seq += mss; | 102 | seq += mss; |
| 105 | if (copy_destructor) { | 103 | if (copy_destructor) { |
| @@ -133,8 +131,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
| 133 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + | 131 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + |
| 134 | (__force u32)delta)); | 132 | (__force u32)delta)); |
| 135 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 133 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
| 136 | th->check = csum_fold(csum_partial(skb_transport_header(skb), | 134 | th->check = gso_make_checksum(skb, ~th->check); |
| 137 | thlen, skb->csum)); | ||
| 138 | out: | 135 | out: |
| 139 | return segs; | 136 | return segs; |
| 140 | } | 137 | } |
