qede: fix offload for IPIP tunnel packets
authorManish Chopra <manishc@marvell.com>
Mon, 21 Dec 2020 14:55:30 +0000 (06:55 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Dec 2020 03:41:22 +0000 (19:41 -0800)
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>
drivers/net/ethernet/qlogic/qede/qede_fp.c

index a2494bf8500798f96eb3b854c95299bf58bf770a..ca0ee29a57b50ac4fd15d19be46ab6de0766a311 100644 (file)
@@ -1799,6 +1799,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);
                }
        }