Skip to content

Commit

Permalink
ipv6: gro: fix CHECKSUM_COMPLETE support
Browse files Browse the repository at this point in the history
When GRE support was added in linux-3.14, CHECKSUM_COMPLETE handling
broke on GRE+IPv6 because we did not update/use the appropriate csum :

GRO layer is supposed to use/update NAPI_GRO_CB(skb)->csum instead of
skb->csum

Tested using a GRE tunnel and IPv6 traffic. GRO aggregation now happens
at the first level (ethernet device) instead of being done in gre
tunnel. Native IPv6+TCP is still properly aggregated.

Fixes: bf5a755 ("net-gre-gro: Add GRE support to the GRO stack")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jerry Chu <hkchu@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and davem330 committed May 21, 2014
1 parent bf63ac7 commit 4de462a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions net/ipv6/ip6_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
unsigned int off;
u16 flush = 1;
int proto;
__wsum csum;

off = skb_gro_offset(skb);
hlen = off + sizeof(*iph);
Expand Down Expand Up @@ -264,13 +263,10 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,

NAPI_GRO_CB(skb)->flush |= flush;

csum = skb->csum;
skb_postpull_rcsum(skb, iph, skb_network_header_len(skb));
skb_gro_postpull_rcsum(skb, iph, nlen);

pp = ops->callbacks.gro_receive(head, skb);

skb->csum = csum;

out_unlock:
rcu_read_unlock();

Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/tcpv6_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static struct sk_buff **tcp6_gro_receive(struct sk_buff **head,
if (NAPI_GRO_CB(skb)->flush)
goto skip_csum;

wsum = skb->csum;
wsum = NAPI_GRO_CB(skb)->csum;

switch (skb->ip_summed) {
case CHECKSUM_NONE:
Expand Down

0 comments on commit 4de462a

Please sign in to comment.