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