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

Matthew Ruffell matthew.ruffell at canonical.com
Thu Jan 14 22:12:43 UTC 2021


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

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);
 		}
 	}
 
-- 
2.27.0




More information about the kernel-team mailing list