Blame SOURCES/0069-netdrv-net-mlx5e-Add-missing-capability-bit-check-fo.patch

d8f823
From 5e5a9d6b5e750e39e8f5bb8837d4f22dc2d9867a Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Sun, 10 May 2020 14:52:45 -0400
d8f823
Subject: [PATCH 069/312] [netdrv] net/mlx5e: Add missing capability bit check
d8f823
 for IP-in-IP
d8f823
d8f823
Message-id: <20200510145245.10054-83-ahleihel@redhat.com>
d8f823
Patchwork-id: 306623
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1789378 v2 82/82] net/mlx5e: Add missing capability bit check for IP-in-IP
d8f823
Bugzilla: 1789378
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
d8f823
RH-Acked-by: Jonathan Toppins <jtoppins@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1789378
d8f823
Upstream: v5.4
d8f823
d8f823
commit 9c98f7ec01d78b5c12db97d1e5edb7022eefa398
d8f823
Author: Marina Varshaver <marinav@mellanox.com>
d8f823
Date:   Tue Nov 19 18:52:13 2019 +0200
d8f823
d8f823
    net/mlx5e: Add missing capability bit check for IP-in-IP
d8f823
d8f823
    Device that doesn't support IP-in-IP offloads has to filter csum and gso
d8f823
    offload support, otherwise kernel will conclude that device is capable of
d8f823
    offloading csum and gso for IP-in-IP tunnels and that might result in
d8f823
    IP-in-IP tunnel not functioning.
d8f823
d8f823
    Fixes: 25948b87dda2 ("net/mlx5e: Support TSO and TX checksum offloads for IP-in-IP")
d8f823
    Signed-off-by: Marina Varshaver <marinav@mellanox.com>
d8f823
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
d8f823
d8f823
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
d8f823
---
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 ++++-
d8f823
 1 file changed, 4 insertions(+), 1 deletion(-)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
index 7cd3ac6a23a8..2f337a70e157 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
d8f823
@@ -4230,9 +4230,12 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
d8f823
 
d8f823
 	switch (proto) {
d8f823
 	case IPPROTO_GRE:
d8f823
+		return features;
d8f823
 	case IPPROTO_IPIP:
d8f823
 	case IPPROTO_IPV6:
d8f823
-		return features;
d8f823
+		if (mlx5e_tunnel_proto_supported(priv->mdev, IPPROTO_IPIP))
d8f823
+			return features;
d8f823
+		break;
d8f823
 	case IPPROTO_UDP:
d8f823
 		udph = udp_hdr(skb);
d8f823
 		port = be16_to_cpu(udph->dest);
d8f823
-- 
d8f823
2.13.6
d8f823