Skip to contentSkip to conversation

FAILED: patch "[PATCH] IB/mlx5: Replace tunnel mpls capability bits for" failed to apply to 4.19-stable tree

PATCH [email protected] 2 participants 3 messages Apr 10, 2020 – Apr 14, 2020

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 41e684ef3f37ce6e5eac3fb5b9c7c1853f4b0447 Mon Sep 17 00:00:00 2001
From: Alex Vesker <[email protected]>
Date: Thu, 5 Mar 2020 14:38:41 +0200
Subject: [PATCH] IB/mlx5: Replace tunnel mpls capability bits for
tunnel_offloads

Until now the flex parser capability was used in ib_query_device() to indicate tunnel_offloads_caps support for mpls_over_gre/mpls_over_udp.

Newer devices and firmware will have configurations with the flexparser but without mpls support.

Testing for the flex parser capability was a mistake, the tunnel_stateless capability was intended for detecting mpls and was introduced at the same time as the flex parser capability.

Otherwise userspace will be incorrectly informed that a future device supports MPLS when it does not.

Cc <[email protected]> # 4.17
Fixes e818e255a58d ("IB/mlx5: Expose MPLS related tunneling offloads")
drivers/infiniband/hw/mlx5/main.c +2 -4
index eba7604eaa76..9c3993c7e9a1 100644
@@ -1192,12 +1192,10 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
 		if (MLX5_CAP_ETH(mdev, tunnel_stateless_gre))
 			resp.tunnel_offloads_caps |=
 				MLX5_IB_TUNNELED_OFFLOADS_GRE;
-		if (MLX5_CAP_GEN(mdev, flex_parser_protocols) &
-		    MLX5_FLEX_PROTO_CW_MPLS_GRE)
+		if (MLX5_CAP_ETH(mdev, tunnel_stateless_mpls_over_gre))
 			resp.tunnel_offloads_caps |=
 				MLX5_IB_TUNNELED_OFFLOADS_MPLS_GRE;
-		if (MLX5_CAP_GEN(mdev, flex_parser_protocols) &
-		    MLX5_FLEX_PROTO_CW_MPLS_UDP)
+		if (MLX5_CAP_ETH(mdev, tunnel_stateless_mpls_over_udp))
 			resp.tunnel_offloads_caps |=
 				MLX5_IB_TUNNELED_OFFLOADS_MPLS_UDP;
 	}
include/linux/mlx5/mlx5_ifc.h +5 -1
index f9bcbe653fda..f3a7189f9d6d 100644
@@ -877,7 +877,11 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits {
 	u8         swp_csum[0x1];
 	u8         swp_lso[0x1];
 	u8         cqe_checksum_full[0x1];
-	u8         reserved_at_24[0x5];
+	u8         tunnel_stateless_geneve_tx[0x1];
+	u8         tunnel_stateless_mpls_over_udp[0x1];
+	u8         tunnel_stateless_mpls_over_gre[0x1];
+	u8         tunnel_stateless_vxlan_gpe[0x1];
+	u8         tunnel_stateless_ipv4_over_vxlan[0x1];
 	u8         tunnel_stateless_ip_over_ip[0x1];
 	u8         reserved_at_2a[0x6];
 	u8         max_vxlan_udp_ports[0x8];
maintainer
#1 lore raw
Quoted 31 lines · On Fri, Apr 10, 2020 at 11:01:43AM +0200, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 41e684ef3f37ce6e5eac3fb5b9c7c1853f4b0447 Mon Sep 17 00:00:00 2001
From: Alex Vesker <[email protected]>
Date: Thu, 5 Mar 2020 14:38:41 +0200
Subject: [PATCH] IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads

Until now the flex parser capability was used in ib_query_device() to indicate tunnel_offloads_caps support for mpls_over_gre/mpls_over_udp.

Newer devices and firmware will have configurations with the flexparser but without mpls support.

Testing for the flex parser capability was a mistake, the tunnel_stateless capability was intended for detecting mpls and was introduced at the same time as the flex parser capability.

Otherwise userspace will be incorrectly informed that a future device supports MPLS when it does not.

Quoted 7 lines
Cc <[email protected]> # 4.17
Fixes e818e255a58d ("IB/mlx5: Expose MPLS related tunneling offloads")

The conflict was around the cqe_checksum_full cap bit being exposed by db849faa9bef ("net/mlx5e: Rx, Fix checksum calculation for new hardware").

I've resolved it by exposing cqe_checksum_full, but *not* taking db849faa9bef.

Signature · 2 lines
Thanks,
Sasha
author maintainer
#2 lore raw
Quoted 40 lines · Sasha Levin
Quoted 31 lines · On Fri, Apr 10, 2020 at 11:01:43AM +0200, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 41e684ef3f37ce6e5eac3fb5b9c7c1853f4b0447 Mon Sep 17 00:00:00 2001

From: Alex Vesker <[email protected]>
Date: Thu, 5 Mar 2020 14:38:41 +0200
Subject: [PATCH] IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads

Until now the flex parser capability was used in ib_query_device() to indicate tunnel_offloads_caps support for mpls_over_gre/mpls_over_udp.

Newer devices and firmware will have configurations with the flexparser but without mpls support.

Testing for the flex parser capability was a mistake, the tunnel_stateless capability was intended for detecting mpls and was introduced at the same time as the flex parser capability.

Otherwise userspace will be incorrectly informed that a future device supports MPLS when it does not.

Quoted 7 lines
Cc <[email protected]> # 4.17
Fixes e818e255a58d ("IB/mlx5: Expose MPLS related tunneling offloads")
Quoted 6 lines

The conflict was around the cqe_checksum_full cap bit being exposed by db849faa9bef ("net/mlx5e: Rx, Fix checksum calculation for new hardware").

I've resolved it by exposing cqe_checksum_full, but *not* taking db849faa9bef.

Thanks for doing this!

greg k-h