[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e98dff0fc7f807be45fbae1411c468e6d6a7c55c.1552724501.git.igor.russkikh@aquantia.com>
Date: Sat, 16 Mar 2019 08:28:18 +0000
From: Igor Russkikh <Igor.Russkikh@...antia.com>
To: "David S . Miller" <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Igor Russkikh <Igor.Russkikh@...antia.com>,
Nikita Danilov <Nikita.Danilov@...antia.com>,
Dmitry Bogdanov <Dmitry.Bogdanov@...antia.com>
Subject: [PATCH net] net: aquantia: fix rx checksum offload for UDP/TCP over
IPv6
From: Dmitry Bogdanov <dmitry.bogdanov@...antia.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@...antia.com>
Signed-off-by: Nikita Danilov <nikita.danilov@...antia.com>
Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@...antia.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
Powered by blists - more mailing lists