File tree Expand file tree Collapse file tree 2 files changed +6
-47
lines changed Expand file tree Collapse file tree 2 files changed +6
-47
lines changed Original file line number Diff line number Diff line change @@ -288,35 +288,14 @@ static int tcp_v4_gso_send_check(struct sk_buff *skb)
288
288
289
289
static struct sk_buff * * tcp4_gro_receive (struct sk_buff * * head , struct sk_buff * skb )
290
290
{
291
- /* Use the IP hdr immediately proceeding for this transport */
292
- const struct iphdr * iph = skb_gro_network_header (skb );
293
- __wsum wsum ;
294
-
295
291
/* Don't bother verifying checksum if we're going to flush anyway. */
296
- if (NAPI_GRO_CB (skb )-> flush )
297
- goto skip_csum ;
298
-
299
- wsum = NAPI_GRO_CB (skb )-> csum ;
300
-
301
- switch (skb -> ip_summed ) {
302
- case CHECKSUM_NONE :
303
- wsum = skb_checksum (skb , skb_gro_offset (skb ), skb_gro_len (skb ),
304
- 0 );
305
-
306
- /* fall through */
307
-
308
- case CHECKSUM_COMPLETE :
309
- if (!tcp_v4_check (skb_gro_len (skb ), iph -> saddr , iph -> daddr ,
310
- wsum )) {
311
- skb -> ip_summed = CHECKSUM_UNNECESSARY ;
312
- break ;
313
- }
314
-
292
+ if (!NAPI_GRO_CB (skb )-> flush &&
293
+ skb_gro_checksum_validate (skb , IPPROTO_TCP ,
294
+ inet_gro_compute_pseudo )) {
315
295
NAPI_GRO_CB (skb )-> flush = 1 ;
316
296
return NULL ;
317
297
}
318
298
319
- skip_csum :
320
299
return tcp_gro_receive (head , skb );
321
300
}
322
301
Original file line number Diff line number Diff line change @@ -35,34 +35,14 @@ static int tcp_v6_gso_send_check(struct sk_buff *skb)
35
35
static struct sk_buff * * tcp6_gro_receive (struct sk_buff * * head ,
36
36
struct sk_buff * skb )
37
37
{
38
- const struct ipv6hdr * iph = skb_gro_network_header (skb );
39
- __wsum wsum ;
40
-
41
38
/* Don't bother verifying checksum if we're going to flush anyway. */
42
- if (NAPI_GRO_CB (skb )-> flush )
43
- goto skip_csum ;
44
-
45
- wsum = NAPI_GRO_CB (skb )-> csum ;
46
-
47
- switch (skb -> ip_summed ) {
48
- case CHECKSUM_NONE :
49
- wsum = skb_checksum (skb , skb_gro_offset (skb ), skb_gro_len (skb ),
50
- wsum );
51
-
52
- /* fall through */
53
-
54
- case CHECKSUM_COMPLETE :
55
- if (!tcp_v6_check (skb_gro_len (skb ), & iph -> saddr , & iph -> daddr ,
56
- wsum )) {
57
- skb -> ip_summed = CHECKSUM_UNNECESSARY ;
58
- break ;
59
- }
60
-
39
+ if (!NAPI_GRO_CB (skb )-> flush &&
40
+ skb_gro_checksum_validate (skb , IPPROTO_TCP ,
41
+ ip6_gro_compute_pseudo )) {
61
42
NAPI_GRO_CB (skb )-> flush = 1 ;
62
43
return NULL ;
63
44
}
64
45
65
- skip_csum :
66
46
return tcp_gro_receive (head , skb );
67
47
}
68
48
You can’t perform that action at this time.
0 commit comments