diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2020-07-06 14:27:14 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-07-07 00:32:23 +0200 |
commit | f4375443b7861ca5d93a10dba5ef5a478d5df96a (patch) | |
tree | 1303c266b70e8ca0ae14db94dc94a5be2a0a1668 /drivers/infiniband/hw/mlx5/srq.c | |
parent | RDMA: Remove the udata parameter from alloc_mr callback (diff) | |
download | linux-f4375443b7861ca5d93a10dba5ef5a478d5df96a.tar.xz linux-f4375443b7861ca5d93a10dba5ef5a478d5df96a.zip |
RDMA/mlx5: Get XRCD number directly for the internal use
The mlx5_ib creates XRC domain and uses for creating internal SRQ.
However all that is needed is XRCD number and not full blown ib_xrcd
objects.
Update the code to get and store the number only.
Link: https://lore.kernel.org/r/20200706122716.647338-2-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/srq.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/srq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c index 6d1ff13d2283..7e10cbcb6d5c 100644 --- a/drivers/infiniband/hw/mlx5/srq.c +++ b/drivers/infiniband/hw/mlx5/srq.c @@ -274,10 +274,10 @@ int mlx5_ib_create_srq(struct ib_srq *ib_srq, if (srq->wq_sig) in.flags |= MLX5_SRQ_FLAG_WQ_SIG; - if (init_attr->srq_type == IB_SRQT_XRC) + if (init_attr->srq_type == IB_SRQT_XRC && init_attr->ext.xrc.xrcd) in.xrcd = to_mxrcd(init_attr->ext.xrc.xrcd)->xrcdn; else - in.xrcd = to_mxrcd(dev->devr.x0)->xrcdn; + in.xrcd = dev->devr.xrcdn0; if (init_attr->srq_type == IB_SRQT_TM) { in.tm_log_list_size = |