All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: aquantia: fix rx checksum offload for UDP/TCP over IPv6
@ 2019-03-16  8:28 Igor Russkikh
  2019-03-19  0:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Russkikh @ 2019-03-16  8:28 UTC (permalink / raw)
  To: David S . Miller; +Cc: netdev, Igor Russkikh, Nikita Danilov, Dmitry Bogdanov

From: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>

TCP/UDP checksum validity was propagated to skb
only if IP checksum is valid.
But for IPv6 there is no validity as there is no checksum in IPv6.
This patch propagates TCP/UDP checksum validity regardless of IP checksum.

Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code")
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com>
Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
index 74550ccc7a20..e2ffb159cbe2 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
@@ -186,11 +186,12 @@ static void aq_rx_checksum(struct aq_ring_s *self,
 	}
 	if (buff->is_ip_cso) {
 		__skb_incr_checksum_unnecessary(skb);
-		if (buff->is_udp_cso || buff->is_tcp_cso)
-			__skb_incr_checksum_unnecessary(skb);
 	} else {
 		skb->ip_summed = CHECKSUM_NONE;
 	}
+
+	if (buff->is_udp_cso || buff->is_tcp_cso)
+		__skb_incr_checksum_unnecessary(skb);
 }
 
 #define AQ_SKB_ALIGN SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
-- 
2.17.1


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

* Re: [PATCH net] net: aquantia: fix rx checksum offload for UDP/TCP over IPv6
  2019-03-16  8:28 [PATCH net] net: aquantia: fix rx checksum offload for UDP/TCP over IPv6 Igor Russkikh
@ 2019-03-19  0:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-03-19  0:01 UTC (permalink / raw)
  To: Igor.Russkikh; +Cc: netdev, Nikita.Danilov, Dmitry.Bogdanov

From: Igor Russkikh <Igor.Russkikh@aquantia.com>
Date: Sat, 16 Mar 2019 08:28:18 +0000

> From: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
> 
> TCP/UDP checksum validity was propagated to skb
> only if IP checksum is valid.
> But for IPv6 there is no validity as there is no checksum in IPv6.
> This patch propagates TCP/UDP checksum validity regardless of IP checksum.
> 
> Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code")
> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
> Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com>
> Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2019-03-19  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-16  8:28 [PATCH net] net: aquantia: fix rx checksum offload for UDP/TCP over IPv6 Igor Russkikh
2019-03-19  0:01 ` 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.