IB/mlx5: Set uid as part of QP creation
authorYishai Hadas <yishaih@mellanox.com>
Thu, 20 Sep 2018 18:39:20 +0000 (21:39 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 25 Sep 2018 20:06:04 +0000 (14:06 -0600)
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 <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/qp.c

index 1f318a47040cf1d754e007ecac62c4340eab40a0..127b386911e149452715c02848513843ab7a5e99 100644 (file)
@@ -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, to_mpd(pd)->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);