From 3ccffe8abf2febab4642033d4675a20bbade151b Mon Sep 17 00:00:00 2001 From: Bob Pearson Date: Thu, 3 Mar 2022 18:08:02 -0600 Subject: 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 Signed-off-by: Jason Gunthorpe --- drivers/infiniband/sw/rxe/rxe.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'drivers/infiniband/sw/rxe/rxe.c') 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; -- cgit v1.2.3