diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 26d296c2447c..a6077ef56345 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3962,13 +3962,6 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff | |||
3962 | 3962 | ||
3963 | gro_list_prepare(napi, skb); | 3963 | gro_list_prepare(napi, skb); |
3964 | 3964 | ||
3965 | if (skb->ip_summed == CHECKSUM_COMPLETE) { | ||
3966 | NAPI_GRO_CB(skb)->csum = skb->csum; | ||
3967 | NAPI_GRO_CB(skb)->csum_valid = 1; | ||
3968 | } else { | ||
3969 | NAPI_GRO_CB(skb)->csum_valid = 0; | ||
3970 | } | ||
3971 | |||
3972 | rcu_read_lock(); | 3965 | rcu_read_lock(); |
3973 | list_for_each_entry_rcu(ptype, head, list) { | 3966 | list_for_each_entry_rcu(ptype, head, list) { |
3974 | if (ptype->type != type || !ptype->callbacks.gro_receive) | 3967 | if (ptype->type != type || !ptype->callbacks.gro_receive) |
@@ -3980,7 +3973,22 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff | |||
3980 | NAPI_GRO_CB(skb)->flush = 0; | 3973 | NAPI_GRO_CB(skb)->flush = 0; |
3981 | NAPI_GRO_CB(skb)->free = 0; | 3974 | NAPI_GRO_CB(skb)->free = 0; |
3982 | NAPI_GRO_CB(skb)->udp_mark = 0; | 3975 | NAPI_GRO_CB(skb)->udp_mark = 0; |
3983 | NAPI_GRO_CB(skb)->encapsulation = 0; | 3976 | |
3977 | /* Setup for GRO checksum validation */ | ||
3978 | switch (skb->ip_summed) { | ||
3979 | case CHECKSUM_COMPLETE: | ||
3980 | NAPI_GRO_CB(skb)->csum = skb->csum; | ||
3981 | NAPI_GRO_CB(skb)->csum_valid = 1; | ||
3982 | NAPI_GRO_CB(skb)->csum_cnt = 0; | ||
3983 | break; | ||
3984 | case CHECKSUM_UNNECESSARY: | ||
3985 | NAPI_GRO_CB(skb)->csum_cnt = skb->csum_level + 1; | ||
3986 | NAPI_GRO_CB(skb)->csum_valid = 0; | ||
3987 | break; | ||
3988 | default: | ||
3989 | NAPI_GRO_CB(skb)->csum_cnt = 0; | ||
3990 | NAPI_GRO_CB(skb)->csum_valid = 0; | ||
3991 | } | ||
3984 | 3992 | ||
3985 | pp = ptype->callbacks.gro_receive(&napi->gro_list, skb); | 3993 | pp = ptype->callbacks.gro_receive(&napi->gro_list, skb); |
3986 | break; | 3994 | break; |