diff options
author | Dmitry Bogdanov <dmitry.bogdanov@aquantia.com> | 2019-03-16 08:28:18 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-18 16:59:35 -0700 |
commit | a7faaa0c5dc7d091cc9f72b870d7edcdd6f43f12 (patch) | |
tree | e91299b8b191cf62d9fbefc141bbf5f1f3de7639 /drivers/net/ethernet/aquantia | |
parent | bb9e5c5bcd76f4474eac3baf643d7a39f7bac7bb (diff) | |
download | linux-a7faaa0c5dc7d091cc9f72b870d7edcdd6f43f12.tar.gz linux-a7faaa0c5dc7d091cc9f72b870d7edcdd6f43f12.tar.bz2 linux-a7faaa0c5dc7d091cc9f72b870d7edcdd6f43f12.zip |
net: aquantia: fix rx checksum offload for UDP/TCP over IPv6
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 5 |
1 files 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)) |