Skip to content

Commit 8798e4a

Browse files
yishaihjgunthorpe
authored andcommitted
RDMA/mlx5: Use the correct obj_id upon DEVX TIR creation
Use the correct obj_id upon DEVX TIR creation by strictly taking the tirn 24 bits and not the general obj_id which is 32 bits. Fixes: 7efce36 ("IB/mlx5: Add obj create and destroy functionality") Link: https://lore.kernel.org/r/20201230130121.180350-2-leon@kernel.org Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent ab0da5a commit 8798e4a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/infiniband/hw/mlx5

‎drivers/infiniband/hw/mlx5/devx.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,9 @@ static void devx_obj_build_destroy_cmd(void *in, void *out, void *din,
10641064
MLX5_SET(general_obj_in_cmd_hdr, din, opcode, MLX5_CMD_OP_DESTROY_RQT);
10651065
break;
10661066
case MLX5_CMD_OP_CREATE_TIR:
1067-
MLX5_SET(general_obj_in_cmd_hdr, din, opcode, MLX5_CMD_OP_DESTROY_TIR);
1067+
*obj_id = MLX5_GET(create_tir_out, out, tirn);
1068+
MLX5_SET(destroy_tir_in, din, opcode, MLX5_CMD_OP_DESTROY_TIR);
1069+
MLX5_SET(destroy_tir_in, din, tirn, *obj_id);
10681070
break;
10691071
case MLX5_CMD_OP_CREATE_TIS:
10701072
MLX5_SET(general_obj_in_cmd_hdr, din, opcode, MLX5_CMD_OP_DESTROY_TIS);

0 commit comments

Comments
 (0)