aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/cmd.c
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@mellanox.com>2018-09-20 21:39:28 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-25 14:06:04 -0600
commit5deba86ee2cddaebaa1d37ad71efcda26b626592 (patch)
treeea82632bb51dd6ff01fa904dcadd765eb206e04f /drivers/infiniband/hw/mlx5/cmd.c
parentIB/mlx5: Set uid as part of TIS commands (diff)
downloadlinux-dev-5deba86ee2cddaebaa1d37ad71efcda26b626592.tar.xz
linux-dev-5deba86ee2cddaebaa1d37ad71efcda26b626592.zip
IB/mlx5: Set uid as part of RQT commands
Set uid as part of RQT commands so that the firmware can manage the RQT object in a secured way. That will enable using an RQT that was created by verbs application to be used by the DEVX flow in case the uid is equal. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/cmd.c')
-rw-r--r--drivers/infiniband/hw/mlx5/cmd.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/cmd.c b/drivers/infiniband/hw/mlx5/cmd.c
index 40f7299dbb1d..6862b03dbdec 100644
--- a/drivers/infiniband/hw/mlx5/cmd.c
+++ b/drivers/infiniband/hw/mlx5/cmd.c
@@ -220,6 +220,17 @@ void mlx5_cmd_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u16 uid)
mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
}
+void mlx5_cmd_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn, u16 uid)
+{
+ u32 in[MLX5_ST_SZ_DW(destroy_rqt_in)] = {};
+ u32 out[MLX5_ST_SZ_DW(destroy_rqt_out)] = {};
+
+ MLX5_SET(destroy_rqt_in, in, opcode, MLX5_CMD_OP_DESTROY_RQT);
+ MLX5_SET(destroy_rqt_in, in, rqtn, rqtn);
+ MLX5_SET(destroy_rqt_in, in, uid, uid);
+ mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
+}
+
void mlx5_cmd_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn, u16 uid)
{
u32 out[MLX5_ST_SZ_DW(dealloc_pd_out)] = {};