linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib
@ 2020-06-18 11:25 Leon Romanovsky
  2020-06-18 11:25 ` [PATCH rdma-rc 1/2] RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs Leon Romanovsky
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Leon Romanovsky @ 2020-06-18 11:25 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, linux-kernel, linux-rdma, Maor Gottlieb, Mark Zhang

From: Leon Romanovsky <leonro@mellanox.com>

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH rdma-rc 1/2] RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs
  2020-06-18 11:25 [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib Leon Romanovsky
@ 2020-06-18 11:25 ` Leon Romanovsky
  2020-06-18 11:25 ` [PATCH rdma-rc 2/2] RDMA/mlx5: Fix remote gid value in query QP Leon Romanovsky
  2020-06-18 18:05 ` [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib Jason Gunthorpe
  2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2020-06-18 11:25 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe; +Cc: Leon Romanovsky, linux-rdma, Mark Zhang

From: Leon Romanovsky <leonro@mellanox.com>

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")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/qp.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index dbe82cdb8d2c..0e42c50373d9 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -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;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH rdma-rc 2/2] RDMA/mlx5: Fix remote gid value in query QP
  2020-06-18 11:25 [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib Leon Romanovsky
  2020-06-18 11:25 ` [PATCH rdma-rc 1/2] RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs Leon Romanovsky
@ 2020-06-18 11:25 ` Leon Romanovsky
  2020-06-18 18:05 ` [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib Jason Gunthorpe
  2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2020-06-18 11:25 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe; +Cc: Maor Gottlieb, linux-rdma, Mark Zhang

From: Maor Gottlieb <maorg@mellanox.com>

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")
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/qp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 0e42c50373d9..9b8012e941b8 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -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));
 	}
 }
 
-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib
  2020-06-18 11:25 [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib Leon Romanovsky
  2020-06-18 11:25 ` [PATCH rdma-rc 1/2] RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs Leon Romanovsky
  2020-06-18 11:25 ` [PATCH rdma-rc 2/2] RDMA/mlx5: Fix remote gid value in query QP Leon Romanovsky
@ 2020-06-18 18:05 ` Jason Gunthorpe
  2 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2020-06-18 18:05 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Leon Romanovsky, linux-kernel, linux-rdma,
	Maor Gottlieb, Mark Zhang

On Thu, Jun 18, 2020 at 02:25:05PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> 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

Applied to for-rc, thanks

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-18 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 11:25 [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib Leon Romanovsky
2020-06-18 11:25 ` [PATCH rdma-rc 1/2] RDMA/mlx5: Remove ECE limitation from the RAW_PACKET QPs Leon Romanovsky
2020-06-18 11:25 ` [PATCH rdma-rc 2/2] RDMA/mlx5: Fix remote gid value in query QP Leon Romanovsky
2020-06-18 18:05 ` [PATCH rdma-rc 0/2] Two small fixes to the mlx5_ib Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).