diff options
| author | Yishai Hadas <[email protected]> | 2018-09-20 18:39:26 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2018-09-25 20:06:04 +0000 |
| commit | 443c1cf9d6c845d0dc389469b78cefec842d5868 (patch) | |
| tree | 3cd89ab82c2955920a1eca0612195e64e5482337 /drivers/infiniband/hw/mlx5/cmd.c | |
| parent | IB/mlx5: Set uid as part of MCG commands (diff) | |
| download | kernel-443c1cf9d6c845d0dc389469b78cefec842d5868.tar.gz kernel-443c1cf9d6c845d0dc389469b78cefec842d5868.zip | |
IB/mlx5: Set uid as part of TIR commands
Set uid as part of TIR commands so that the firmware can manage the
TIR object in a secured way.
That will enable using a TIR that was created by verbs application to
be used by the DEVX flow in case the uid is equal.
Signed-off-by: Yishai Hadas <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/cmd.c')
| -rw-r--r-- | drivers/infiniband/hw/mlx5/cmd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/cmd.c b/drivers/infiniband/hw/mlx5/cmd.c index 91cfc2856bc4..9834cd4d1e45 100644 --- a/drivers/infiniband/hw/mlx5/cmd.c +++ b/drivers/infiniband/hw/mlx5/cmd.c @@ -198,6 +198,17 @@ int mlx5_cmd_query_ext_ppcnt_counters(struct mlx5_core_dev *dev, void *out) 0, 0); } +void mlx5_cmd_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u16 uid) +{ + u32 in[MLX5_ST_SZ_DW(destroy_tir_in)] = {}; + u32 out[MLX5_ST_SZ_DW(destroy_tir_out)] = {}; + + MLX5_SET(destroy_tir_in, in, opcode, MLX5_CMD_OP_DESTROY_TIR); + MLX5_SET(destroy_tir_in, in, tirn, tirn); + MLX5_SET(destroy_tir_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)] = {}; |
