* [PATCH rdma-next 0/2] Enable querying AH for XRC QP types
@ 2020-11-15 12:14 Leon Romanovsky
2020-11-15 12:14 ` [PATCH rdma-next 1/2] RDMA/mlx5: " Leon Romanovsky
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Leon Romanovsky @ 2020-11-15 12:14 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, Avihai Horon, linux-kernel, linux-rdma,
Maor Gottlieb, Yishai Hadas
From: Leon Romanovsky <leonro@nvidia.com>
Update mlx4 and mlx5 drivers to support querying AH for XRC QP types.
Thanks
Avihai Horon (2):
RDMA/mlx5: Enable querying AH for XRC QP types
RDMA/mlx4: Enable querying AH for XRC QP types
drivers/infiniband/hw/mlx4/qp.c | 4 +++-
drivers/infiniband/hw/mlx5/qp.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
--
2.28.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH rdma-next 1/2] RDMA/mlx5: Enable querying AH for XRC QP types
2020-11-15 12:14 [PATCH rdma-next 0/2] Enable querying AH for XRC QP types Leon Romanovsky
@ 2020-11-15 12:14 ` Leon Romanovsky
2020-11-15 12:14 ` [PATCH rdma-next 2/2] RDMA/mlx4: " Leon Romanovsky
2020-11-26 18:04 ` [PATCH rdma-next 0/2] " Jason Gunthorpe
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2020-11-15 12:14 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Avihai Horon, linux-rdma, Maor Gottlieb
From: Avihai Horon <avihaih@nvidia.com>
Address handle is set for connected QP types such as RC and UC, and
thus can also be queried.
Since XRC QP types INI and TGT are connected, it should be possible
to query their address handle as well.
Until now it was not the case, and although the firmware supported
it, the driver allowed querying the address handle only for RC and UC.
Hence, we enable it now for INI and TGT QPs as well.
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/qp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 8b1c4f509248..c053a790fc60 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -4555,7 +4555,9 @@ static int query_qp_attr(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
pri_path = MLX5_ADDR_OF(qpc, qpc, primary_address_path);
alt_path = MLX5_ADDR_OF(qpc, qpc, secondary_address_path);
- if (qp->ibqp.qp_type == IB_QPT_RC || qp->ibqp.qp_type == IB_QPT_UC) {
+ if (qp->ibqp.qp_type == IB_QPT_RC || qp->ibqp.qp_type == IB_QPT_UC ||
+ qp->ibqp.qp_type == IB_QPT_XRC_INI ||
+ qp->ibqp.qp_type == IB_QPT_XRC_TGT) {
to_rdma_ah_attr(dev, &qp_attr->ah_attr, pri_path);
to_rdma_ah_attr(dev, &qp_attr->alt_ah_attr, alt_path);
qp_attr->alt_pkey_index = MLX5_GET(ads, alt_path, pkey_index);
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH rdma-next 2/2] RDMA/mlx4: Enable querying AH for XRC QP types
2020-11-15 12:14 [PATCH rdma-next 0/2] Enable querying AH for XRC QP types Leon Romanovsky
2020-11-15 12:14 ` [PATCH rdma-next 1/2] RDMA/mlx5: " Leon Romanovsky
@ 2020-11-15 12:14 ` Leon Romanovsky
2020-11-26 18:04 ` [PATCH rdma-next 0/2] " Jason Gunthorpe
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2020-11-15 12:14 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Avihai Horon, linux-rdma, Maor Gottlieb, Yishai Hadas
From: Avihai Horon <avihaih@nvidia.com>
Address handle is set for connected QP types such as RC and UC, and
thus can also be queried.
Since XRC QP types INI and TGT are connected, it should be possible
to query their address handle as well.
Until now it was not the case, and although the firmware supported
it, the driver allowed querying the address handle only for RC and UC.
Hence, we enable it now for INI and TGT QPs as well.
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx4/qp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 44534a12819a..651785bd57f2 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -4015,7 +4015,9 @@ int mlx4_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr
qp_attr->qp_access_flags =
to_ib_qp_access_flags(be32_to_cpu(context.params2));
- if (qp->ibqp.qp_type == IB_QPT_RC || qp->ibqp.qp_type == IB_QPT_UC) {
+ if (qp->ibqp.qp_type == IB_QPT_RC || qp->ibqp.qp_type == IB_QPT_UC ||
+ qp->ibqp.qp_type == IB_QPT_XRC_INI ||
+ qp->ibqp.qp_type == IB_QPT_XRC_TGT) {
to_rdma_ah_attr(dev, &qp_attr->ah_attr, &context.pri_path);
to_rdma_ah_attr(dev, &qp_attr->alt_ah_attr, &context.alt_path);
qp_attr->alt_pkey_index = context.alt_path.pkey_index & 0x7f;
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH rdma-next 0/2] Enable querying AH for XRC QP types
2020-11-15 12:14 [PATCH rdma-next 0/2] Enable querying AH for XRC QP types Leon Romanovsky
2020-11-15 12:14 ` [PATCH rdma-next 1/2] RDMA/mlx5: " Leon Romanovsky
2020-11-15 12:14 ` [PATCH rdma-next 2/2] RDMA/mlx4: " Leon Romanovsky
@ 2020-11-26 18:04 ` Jason Gunthorpe
2 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2020-11-26 18:04 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Doug Ledford, Leon Romanovsky, Avihai Horon, linux-kernel,
linux-rdma, Maor Gottlieb, Yishai Hadas
On Sun, Nov 15, 2020 at 02:14:23PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> Update mlx4 and mlx5 drivers to support querying AH for XRC QP types.
>
> Thanks
>
> Avihai Horon (2):
> RDMA/mlx5: Enable querying AH for XRC QP types
> RDMA/mlx4: Enable querying AH for XRC QP types
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-26 18:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-15 12:14 [PATCH rdma-next 0/2] Enable querying AH for XRC QP types Leon Romanovsky
2020-11-15 12:14 ` [PATCH rdma-next 1/2] RDMA/mlx5: " Leon Romanovsky
2020-11-15 12:14 ` [PATCH rdma-next 2/2] RDMA/mlx4: " Leon Romanovsky
2020-11-26 18:04 ` [PATCH rdma-next 0/2] " Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.