summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe.c
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2022-03-04 01:08:02 +0100
committerJason Gunthorpe <jgg@nvidia.com>2022-03-16 00:49:57 +0100
commit3ccffe8abf2febab4642033d4675a20bbade151b (patch)
treef4dc0dc32e87054721a7ea6613d3c3d27799f5c1 /drivers/infiniband/sw/rxe/rxe.c
parentRDMA/rxe: Replace obj by elem in declaration (diff)
downloadlinux-3ccffe8abf2febab4642033d4675a20bbade151b.tar.xz
linux-3ccffe8abf2febab4642033d4675a20bbade151b.zip
RDMA/rxe: Move max_elem into rxe_type_info
Move the maximum number of elements from a parameter in rxe_pool_init to a member of the rxe_type_info array. Link: https://lore.kernel.org/r/20220304000808.225811-7-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index fce3994d8f7a..dc1f9dd70966 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -118,43 +118,35 @@ static int rxe_init_pools(struct rxe_dev *rxe)
{
int err;
- err = rxe_pool_init(rxe, &rxe->uc_pool, RXE_TYPE_UC,
- rxe->max_ucontext);
+ err = rxe_pool_init(rxe, &rxe->uc_pool, RXE_TYPE_UC);
if (err)
goto err1;
- err = rxe_pool_init(rxe, &rxe->pd_pool, RXE_TYPE_PD,
- rxe->attr.max_pd);
+ err = rxe_pool_init(rxe, &rxe->pd_pool, RXE_TYPE_PD);
if (err)
goto err2;
- err = rxe_pool_init(rxe, &rxe->ah_pool, RXE_TYPE_AH,
- rxe->attr.max_ah);
+ err = rxe_pool_init(rxe, &rxe->ah_pool, RXE_TYPE_AH);
if (err)
goto err3;
- err = rxe_pool_init(rxe, &rxe->srq_pool, RXE_TYPE_SRQ,
- rxe->attr.max_srq);
+ err = rxe_pool_init(rxe, &rxe->srq_pool, RXE_TYPE_SRQ);
if (err)
goto err4;
- err = rxe_pool_init(rxe, &rxe->qp_pool, RXE_TYPE_QP,
- rxe->attr.max_qp);
+ err = rxe_pool_init(rxe, &rxe->qp_pool, RXE_TYPE_QP);
if (err)
goto err5;
- err = rxe_pool_init(rxe, &rxe->cq_pool, RXE_TYPE_CQ,
- rxe->attr.max_cq);
+ err = rxe_pool_init(rxe, &rxe->cq_pool, RXE_TYPE_CQ);
if (err)
goto err6;
- err = rxe_pool_init(rxe, &rxe->mr_pool, RXE_TYPE_MR,
- rxe->attr.max_mr);
+ err = rxe_pool_init(rxe, &rxe->mr_pool, RXE_TYPE_MR);
if (err)
goto err7;
- err = rxe_pool_init(rxe, &rxe->mw_pool, RXE_TYPE_MW,
- rxe->attr.max_mw);
+ err = rxe_pool_init(rxe, &rxe->mw_pool, RXE_TYPE_MW);
if (err)
goto err8;