Thread (40 messages) 40 messages, 5 authors, 2018-09-20
STALE2845d

[PATCH rdma-next 09/25] IB/mlx5: Set uid as part of QP creation

From: Leon Romanovsky <leon@kernel.org>
Date: 2018-09-17 16:31:51
Also in: linux-rdma
Subsystem: infiniband subsystem, mellanox mlx5 ib driver, the rest · Maintainers: Jason Gunthorpe, Leon Romanovsky, Linus Torvalds

From: Yishai Hadas <redacted>

Set uid as part of QP creation so that the firmware can manage the
QP object in a secured way.

The uid for the destroy and the modify commands is set by mlx5_core.

This will enable using a QP that was created by verbs application to
be used by the DEVX flow in case the uid is equal.

Signed-off-by: Yishai Hadas <redacted>
Signed-off-by: Leon Romanovsky <redacted>
---
 drivers/infiniband/hw/mlx5/qp.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index e7ebe50ffdb5..786db05dfb91 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -850,6 +850,7 @@ static int create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd,
 		goto err_umem;
 	}
 
+	MLX5_SET(create_qp_in, *in, uid, context->devx_uid);
 	pas = (__be64 *)MLX5_ADDR_OF(create_qp_in, *in, pas);
 	if (ubuffer->umem)
 		mlx5_ib_populate_pas(dev, ubuffer->umem, page_shift, pas, 0);
-- 
2.14.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help