Skip to content

Commit f86b31c

Browse files
nareshkumarpbsjgunthorpe
authored andcommitted
RDMA/bnxt_re: Static NQ depth allocation
At first, driver allocates memory for NQ based on qplib_ctx->cq_count and qplib_ctx->srqc_count. Later when creating ring, it uses a static value of 128K -1. Fixing this with a static value for now. Fixes: b08fe04 ("RDMA/bnxt_re: Refactor net ring allocation function") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Naresh Kumar PBS <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 84cf229 commit f86b31c

File tree

1 file changed

+1
-2
lines changed
  • drivers/infiniband/hw/bnxt_re

1 file changed

+1
-2
lines changed

drivers/infiniband/hw/bnxt_re/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,7 @@ static int bnxt_re_alloc_res(struct bnxt_re_dev *rdev)
10371037
struct bnxt_qplib_nq *nq;
10381038

10391039
nq = &rdev->nq[i];
1040-
nq->hwq.max_elements = (qplib_ctx->cq_count +
1041-
qplib_ctx->srqc_count + 2);
1040+
nq->hwq.max_elements = BNXT_QPLIB_NQE_MAX_CNT;
10421041
rc = bnxt_qplib_alloc_nq(&rdev->qplib_res, &rdev->nq[i]);
10431042
if (rc) {
10441043
ibdev_err(&rdev->ibdev, "Alloc Failed NQ%d rc:%#x",

0 commit comments

Comments
 (0)