diff mbox series

[SRU,F,G,H,1/1] qede: fix offload for IPIP tunnel packets

Message ID 20210114221243.21614-2-matthew.ruffell@canonical.com
State New
Headers show
Series qede: Kubernetes Internal DNS Failure due to QL41xxx NIC not supporting IPIP tx csum offload. | expand

Commit Message

Matthew Ruffell Jan. 14, 2021, 10:12 p.m. UTC
From: Manish Chopra <manishc@marvell.com>

BugLink: https://bugs.launchpad.net/bugs/1909062

IPIP tunnels packets are unknown to device,
hence these packets are incorrectly parsed and
caused the packet corruption, so disable offlods
for such packets at run time.

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Sudarsana Kalluru <skalluru@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Link: https://lore.kernel.org/r/20201221145530.7771-1-manishc@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 5d5647dad259bb416fd5d3d87012760386d97530)
Signed-off-by: Matthew Ruffell <matthew.ruffell@canonical.com>
---
 drivers/net/ethernet/qlogic/qede/qede_fp.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Paolo Pisati Jan. 19, 2021, 9:27 a.m. UTC | #1
On Fri, Jan 15, 2021 at 11:12:43AM +1300, Matthew Ruffell wrote:
> From: Manish Chopra <manishc@marvell.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1909062

Already part of 5.10 stable updates, so consider this applied in H+.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c
index 004c0bfec41d..f310a94e0489 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
@@ -1737,6 +1737,11 @@  netdev_features_t qede_features_check(struct sk_buff *skb,
 			      ntohs(udp_hdr(skb)->dest) != gnv_port))
 				return features & ~(NETIF_F_CSUM_MASK |
 						    NETIF_F_GSO_MASK);
+		} else if (l4_proto == IPPROTO_IPIP) {
+			/* IPIP tunnels are unknown to the device or at least unsupported natively,
+			 * offloads for them can't be done trivially, so disable them for such skb.
+			 */
+			return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
 		}
 	}