diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-12-31 11:51:02 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-12-31 11:51:02 -0500 |
commit | b28bc9b38c52f63f43e3fd875af982f2240a2859 (patch) | |
tree | 76cdb7b52b58f5685993cc15ed81d1c903023358 /net/ipv4/tcp_offload.c | |
parent | 8d30726912cb39c3a3ebde06214d54861f8fdde2 (diff) | |
parent | 802eee95bde72fd0cd0f3a5b2098375a487d1eda (diff) |
Merge tag 'v3.13-rc6' into for-3.14/core
Needed to bring blk-mq uptodate, since changes have been going in
since for-3.14/core was established.
Fixup merge issues related to the immutable biovec changes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Conflicts:
block/blk-flush.c
fs/btrfs/check-integrity.c
fs/btrfs/extent_io.c
fs/btrfs/scrub.c
fs/logfs/dev_bdev.c
Diffstat (limited to 'net/ipv4/tcp_offload.c')
-rw-r--r-- | net/ipv4/tcp_offload.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c index a2b68a108eae..05606353c7e7 100644 --- a/net/ipv4/tcp_offload.c +++ b/net/ipv4/tcp_offload.c | |||
@@ -274,33 +274,32 @@ static struct sk_buff **tcp4_gro_receive(struct sk_buff **head, struct sk_buff * | |||
274 | { | 274 | { |
275 | const struct iphdr *iph = skb_gro_network_header(skb); | 275 | const struct iphdr *iph = skb_gro_network_header(skb); |
276 | __wsum wsum; | 276 | __wsum wsum; |
277 | __sum16 sum; | 277 | |
278 | /* Don't bother verifying checksum if we're going to flush anyway. */ | ||
279 | if (NAPI_GRO_CB(skb)->flush) | ||
280 | goto skip_csum; | ||
281 | |||
282 | wsum = skb->csum; | ||
278 | 283 | ||
279 | switch (skb->ip_summed) { | 284 | switch (skb->ip_summed) { |
285 | case CHECKSUM_NONE: | ||
286 | wsum = skb_checksum(skb, skb_gro_offset(skb), skb_gro_len(skb), | ||
287 | 0); | ||
288 | |||
289 | /* fall through */ | ||
290 | |||
280 | case CHECKSUM_COMPLETE: | 291 | case CHECKSUM_COMPLETE: |
281 | if (!tcp_v4_check(skb_gro_len(skb), iph->saddr, iph->daddr, | 292 | if (!tcp_v4_check(skb_gro_len(skb), iph->saddr, iph->daddr, |
282 | skb->csum)) { | 293 | wsum)) { |
283 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 294 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
284 | break; | 295 | break; |
285 | } | 296 | } |
286 | flush: | 297 | |
287 | NAPI_GRO_CB(skb)->flush = 1; | 298 | NAPI_GRO_CB(skb)->flush = 1; |
288 | return NULL; | 299 | return NULL; |
289 | |||
290 | case CHECKSUM_NONE: | ||
291 | wsum = csum_tcpudp_nofold(iph->saddr, iph->daddr, | ||
292 | skb_gro_len(skb), IPPROTO_TCP, 0); | ||
293 | sum = csum_fold(skb_checksum(skb, | ||
294 | skb_gro_offset(skb), | ||
295 | skb_gro_len(skb), | ||
296 | wsum)); | ||
297 | if (sum) | ||
298 | goto flush; | ||
299 | |||
300 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
301 | break; | ||
302 | } | 300 | } |
303 | 301 | ||
302 | skip_csum: | ||
304 | return tcp_gro_receive(head, skb); | 303 | return tcp_gro_receive(head, skb); |
305 | } | 304 | } |
306 | 305 | ||