Skip to contentSkip to conversation

Two small fixes to the mlx5_ib

PATCH Applied Leon Romanovsky 2 participants 4 messages Jun 18, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Two small fixes to the mlx5_ib

From: Leon Romanovsky <[email protected]>

Hi,

The following two fixes are user-visible one. The first patch is needed to continue to use RAW_PACKET QPs after PR [1] is merged and new FW will be released. The second patch fixes wrongly reported GID.

Thanks

[1] https://github.com/linux-rdma/rdma-core/pull/745

Leon Romanovsky (1):
RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs

Maor Gottlieb (1):
RDMA/mlx5: Fix remote gid value in query QP

 drivers/infiniband/hw/mlx5/qp.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

--
2.26.2

#1 lore raw

PATCH 1/2 RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs

From: Leon Romanovsky <[email protected]>

Like any other QP type, rely on FW for the RAW_PACKET QPs to decide if ECE is supported or not. This fixes an inability to create RAW_PACKET QPs with latest rdma-core with the ECE support.

Fixes e383085c2425 ("RDMA/mlx5: Set ECE options during QP create")
---
 drivers/infiniband/hw/mlx5/qp.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/infiniband/hw/mlx5/qp.c +1 -9
index dbe82cdb8d2c..0e42c50373d9 100644
@@ -2873,7 +2873,6 @@ static int mlx5_ib_destroy_dct(struct mlx5_ib_qp *mqp)
 static int check_ucmd_data(struct mlx5_ib_dev *dev,
 			   struct mlx5_create_qp_params *params)
 {
-	struct ib_qp_init_attr *attr = params->attr;
 	struct ib_udata *udata = params->udata;
 	size_t size, last;
 	int ret;
@@ -2885,14 +2884,7 @@ static int check_ucmd_data(struct mlx5_ib_dev *dev,
 		 */
 		last = sizeof(struct mlx5_ib_create_qp_rss);
 	else
-		/* IB_QPT_RAW_PACKET doesn't have ECE data */
-		switch (attr->qp_type) {
-		case IB_QPT_RAW_PACKET:
-			last = offsetof(struct mlx5_ib_create_qp, ece_options);
-			break;
-		default:
-			last = offsetof(struct mlx5_ib_create_qp, reserved);
-		}
+		last = offsetof(struct mlx5_ib_create_qp, reserved);
 
 	if (udata->inlen <= last)
 		return 0;
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 RDMA/mlx5: Fix remote gid value in query QP

In reply to Leon Romanovsky

From: Maor Gottlieb <[email protected]>

Remote gid is not copied to the right address. Fix it by using rdma_ah_set_dgid_raw to copy the remote gid value from the QP context on query QP.

Fixes 70bd7fb87625 ("RDMA/mlx5: Remove manually crafted QP context the query call")
---
 drivers/infiniband/hw/mlx5/qp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/mlx5/qp.c +1 -2
index 0e42c50373d9..9b8012e941b8 100644
@@ -4374,8 +4374,7 @@ static void to_rdma_ah_attr(struct mlx5_ib_dev *ibdev,
 				MLX5_GET(ads, path, src_addr_index),
 				MLX5_GET(ads, path, hop_limit),
 				MLX5_GET(ads, path, tclass));
-		memcpy(ah_attr, MLX5_ADDR_OF(ads, path, rgid_rip),
-		       MLX5_FLD_SZ_BYTES(ads, rgid_rip));
+		rdma_ah_set_dgid_raw(ah_attr, MLX5_ADDR_OF(ads, path, rgid_rip));
 	}
 }
 
Signature · 1 line
2.26.2
maintainer Applied
#3 lore raw
In reply to Leon Romanovsky
Quoted 10 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

Hi,

The following two fixes are user-visible one. The first patch is needed to continue to use RAW_PACKET QPs after PR [1] is merged and new FW will be released. The second patch fixes wrongly reported GID.

Thanks

Quoted 7 lines

[1] https://github.com/linux-rdma/rdma-core/pull/745

Leon Romanovsky (1):
RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs

Maor Gottlieb (1):
RDMA/mlx5: Fix remote gid value in query QP

Applied to for-rc, thanks

Jason