netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: skb_needs_check() accepts CHECKSUM_NONE for tx
@ 2017-02-03 22:29 Eric Dumazet
  2017-02-03 22:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2017-02-03 22:29 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Willem de Bruijn, Maciej Żenczykowski, Eric Dumazet,
	Dmitry Vyukov

From: Eric Dumazet <edumazet@google.com>

My recent change missed fact that UFO would perform a complete
UDP checksum before segmenting in frags.

In this case skb->ip_summed is set to CHECKSUM_NONE.

We need to add this valid case to skb_needs_check()

Fixes: b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
---
 net/core/dev.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 727b6fda0e8c6497ee42dc6d3065e326e9192c21..2ba5ef33e83909871fcf69a036062e00f0cf86c7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2637,9 +2637,10 @@ EXPORT_SYMBOL(skb_mac_gso_segment);
 static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
 {
 	if (tx_path)
-		return skb->ip_summed != CHECKSUM_PARTIAL;
-	else
-		return skb->ip_summed == CHECKSUM_NONE;
+		return skb->ip_summed != CHECKSUM_PARTIAL &&
+		       skb->ip_summed != CHECKSUM_NONE;
+
+	return skb->ip_summed == CHECKSUM_NONE;
 }
 
 /**

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

* Re: [PATCH net-next] net: skb_needs_check() accepts CHECKSUM_NONE for tx
  2017-02-03 22:29 [PATCH net-next] net: skb_needs_check() accepts CHECKSUM_NONE for tx Eric Dumazet
@ 2017-02-03 22:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-02-03 22:33 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, willemb, maze, edumazet, dvyukov

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 03 Feb 2017 14:29:42 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> My recent change missed fact that UFO would perform a complete
> UDP checksum before segmenting in frags.
> 
> In this case skb->ip_summed is set to CHECKSUM_NONE.
> 
> We need to add this valid case to skb_needs_check()
> 
> Fixes: b2504a5dbef3 ("net: reduce skb_warn_bad_offload() noise")
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

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

end of thread, other threads:[~2017-02-03 22:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-03 22:29 [PATCH net-next] net: skb_needs_check() accepts CHECKSUM_NONE for tx Eric Dumazet
2017-02-03 22:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).