All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] udp: Fix inverted NAPI_GRO_CB(skb)->flush test
@ 2014-09-11  2:23 Scott Wood
  2014-09-11  5:13 ` Eric Dumazet
  2014-09-12 21:55 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Scott Wood @ 2014-09-11  2:23 UTC (permalink / raw)
  To: netdev, davem, Tom Herbert; +Cc: Scott Wood

Commit 2abb7cdc0d ("udp: Add support for doing checksum unnecessary
conversion") caused napi_gro_cb structs with the "flush" field zero to
take the "udp_gro_receive" path rather than the "set flush to 1" path
that they would previously take.  As a result I saw booting from an NFS
root hang shortly after starting userspace, with "server not
responding" messages.

This change to the handling of "flush == 0" packets appears to be
incidental to the goal of adding new code in the case where
skb_gro_checksum_validate_zero_check() returns zero.  Based on that and
the fact that it breaks things, I'm assuming that it is unintentional.

Fixes: 2abb7cdc0d ("udp: Add support for doing checksum unnecessary conversion")
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 net/ipv4/udp_offload.c | 2 +-
 net/ipv6/udp_offload.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 84e0e05..b8c845a 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -294,7 +294,7 @@ static struct sk_buff **udp4_gro_receive(struct sk_buff **head,
 		goto flush;
 
 	/* Don't bother verifying checksum if we're going to flush anyway. */
-	if (!NAPI_GRO_CB(skb)->flush)
+	if (NAPI_GRO_CB(skb)->flush)
 		goto skip;
 
 	if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check,
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
index 89cb9a9..2907fb8 100644
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -138,7 +138,7 @@ static struct sk_buff **udp6_gro_receive(struct sk_buff **head,
 		goto flush;
 
 	/* Don't bother verifying checksum if we're going to flush anyway. */
-	if (!NAPI_GRO_CB(skb)->flush)
+	if (NAPI_GRO_CB(skb)->flush)
 		goto skip;
 
 	if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] udp: Fix inverted NAPI_GRO_CB(skb)->flush test
  2014-09-11  2:23 [PATCH] udp: Fix inverted NAPI_GRO_CB(skb)->flush test Scott Wood
@ 2014-09-11  5:13 ` Eric Dumazet
  2014-09-12 21:55 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2014-09-11  5:13 UTC (permalink / raw)
  To: Scott Wood; +Cc: netdev, davem, Tom Herbert

On Wed, 2014-09-10 at 21:23 -0500, Scott Wood wrote:
> Commit 2abb7cdc0d ("udp: Add support for doing checksum unnecessary
> conversion") caused napi_gro_cb structs with the "flush" field zero to
> take the "udp_gro_receive" path rather than the "set flush to 1" path
> that they would previously take.  As a result I saw booting from an NFS
> root hang shortly after starting userspace, with "server not
> responding" messages.
> 
> This change to the handling of "flush == 0" packets appears to be
> incidental to the goal of adding new code in the case where
> skb_gro_checksum_validate_zero_check() returns zero.  Based on that and
> the fact that it breaks things, I'm assuming that it is unintentional.
> 
> Fixes: 2abb7cdc0d ("udp: Add support for doing checksum unnecessary conversion")
> Cc: Tom Herbert <therbert@google.com>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
>  net/ipv4/udp_offload.c | 2 +-
>  net/ipv6/udp_offload.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Good catch, thanks !

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] udp: Fix inverted NAPI_GRO_CB(skb)->flush test
  2014-09-11  2:23 [PATCH] udp: Fix inverted NAPI_GRO_CB(skb)->flush test Scott Wood
  2014-09-11  5:13 ` Eric Dumazet
@ 2014-09-12 21:55 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-09-12 21:55 UTC (permalink / raw)
  To: scottwood; +Cc: netdev, therbert

From: Scott Wood <scottwood@freescale.com>
Date: Wed, 10 Sep 2014 21:23:18 -0500

> Commit 2abb7cdc0d ("udp: Add support for doing checksum unnecessary
> conversion") caused napi_gro_cb structs with the "flush" field zero to
> take the "udp_gro_receive" path rather than the "set flush to 1" path
> that they would previously take.  As a result I saw booting from an NFS
> root hang shortly after starting userspace, with "server not
> responding" messages.
> 
> This change to the handling of "flush == 0" packets appears to be
> incidental to the goal of adding new code in the case where
> skb_gro_checksum_validate_zero_check() returns zero.  Based on that and
> the fact that it breaks things, I'm assuming that it is unintentional.
> 
> Fixes: 2abb7cdc0d ("udp: Add support for doing checksum unnecessary conversion")
> Cc: Tom Herbert <therbert@google.com>
> Signed-off-by: Scott Wood <scottwood@freescale.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-12 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11  2:23 [PATCH] udp: Fix inverted NAPI_GRO_CB(skb)->flush test Scott Wood
2014-09-11  5:13 ` Eric Dumazet
2014-09-12 21:55 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.