From: Selvin Xavier <selvin.xavier@broadcom.com>
To: leon@kernel.org, jgg@ziepe.ca
Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com,
kalesh-anakkur.purayil@broadcom.com,
Abhishek Mohapatra <abhishek.mohapatra@broadcom.com>,
Selvin Xavier <selvin.xavier@broadcom.com>
Subject: [PATCH for-rc 1/2] RDMA/bnxt_re: Use kvzalloc for QP table allocation
Date: Tue, 13 Oct 2026 07:04:26 -0700 [thread overview]
Message-ID: <20261013140427.256612-2-selvin.xavier@broadcom.com> (raw)
In-Reply-To: <20261013140427.256612-1-selvin.xavier@broadcom.com>
From: Abhishek Mohapatra <abhishek.mohapatra@broadcom.com>
The QP table size depends on the firmware reported max_qp, so it can
be large and a physically contiguous kzalloc may fail. Use kvzalloc_objs()
and free it with kvfree().
Fixes: 82f1f575aa13 ("RDMA/bnxt_re: Fix allocation of QP table")
Signed-off-by: Abhishek Mohapatra <abhishek.mohapatra@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
drivers/infiniband/hw/bnxt_re/qplib_res.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband/hw/bnxt_re/qplib_res.c
index 756f8b5f042a..086cf9fe3920 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_res.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c
@@ -909,7 +909,7 @@ int bnxt_qplib_init_res(struct bnxt_qplib_res *res)
void bnxt_qplib_free_res(struct bnxt_qplib_res *res)
{
- kfree(res->rcfw->qp_tbl);
+ kvfree(res->rcfw->qp_tbl);
bnxt_qplib_free_sgid_tbl(res, &res->sgid_tbl);
bnxt_qplib_free_pd_tbl(&res->pd_tbl);
bnxt_qplib_free_dpi_tbl(res, &res->dpi_tbl);
@@ -926,8 +926,8 @@ int bnxt_qplib_alloc_res(struct bnxt_qplib_res *res, struct net_device *netdev)
/* Allocate one extra to hold the QP1 entries */
rcfw->qp_tbl_size = max_t(u32, BNXT_RE_MAX_QPC_COUNT + 1, dev_attr->max_qp);
- rcfw->qp_tbl = kzalloc_objs(struct bnxt_qplib_qp_node,
- rcfw->qp_tbl_size);
+ rcfw->qp_tbl = kvzalloc_objs(struct bnxt_qplib_qp_node,
+ rcfw->qp_tbl_size);
if (!rcfw->qp_tbl)
return -ENOMEM;
--
2.39.3
next prev parent reply other threads:[~2026-10-13 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 14:04 [PATCH for-rc 0/2] RDMA/bnxt_re: Fix QP table fixes Selvin Xavier
2026-10-13 14:04 ` Selvin Xavier [this message]
2026-10-13 8:52 ` [PATCH for-rc 1/2] RDMA/bnxt_re: Use kvzalloc for QP table allocation sashiko-bot
2026-10-13 14:04 ` [PATCH for-rc 2/2] RDMA/bnxt_re: Unpublish QP table before freeing it Selvin Xavier
2026-10-13 9:06 ` sashiko-bot
2026-10-13 15:11 ` [PATCH for-rc 0/2] RDMA/bnxt_re: Fix QP table fixes Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013140427.256612-2-selvin.xavier@broadcom.com \
--to=selvin.xavier@broadcom.com \
--cc=abhishek.mohapatra@broadcom.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=jgg@ziepe.ca \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox