From: Selvin Xavier <selvin.xavier@broadcom.com> To: dledford@redhat.com, jgg@nvidia.com Cc: linux-rdma@vger.kernel.org, Selvin Xavier <selvin.xavier@broadcom.com> Subject: [PATCH for-next 08/12] RDMA/bnxt_re: Fix FRMR issue with single page MR allocation Date: Sun, 12 Sep 2021 11:15:22 -0700 [thread overview] Message-ID: <1631470526-22228-9-git-send-email-selvin.xavier@broadcom.com> (raw) In-Reply-To: <1631470526-22228-1-git-send-email-selvin.xavier@broadcom.com> When the FRMR is allocated with single page, driver is attempting to create a level 0 HWQ and not allocating any page because the nopte field is set. This causes the crash during post_send as the pbl is not populated. To avoid this crash, check for the nopte bit during HWQ creation with single page and create a level 1 page table and populate the pbl address correctly. Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> --- drivers/infiniband/hw/bnxt_re/qplib_res.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband/hw/bnxt_re/qplib_res.c index 44282a8..bf49363 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c @@ -228,15 +228,16 @@ int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq, npages++; } - if (npages == MAX_PBL_LVL_0_PGS) { + if (npages == MAX_PBL_LVL_0_PGS && !hwq_attr->sginfo->nopte) { /* This request is Level 0, map PTE */ rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_0], hwq_attr->sginfo); if (rc) goto fail; hwq->level = PBL_LVL_0; + goto done; } - if (npages > MAX_PBL_LVL_0_PGS) { + if (npages >= MAX_PBL_LVL_0_PGS) { if (npages > MAX_PBL_LVL_1_PGS) { u32 flag = (hwq_attr->type == HWQ_TYPE_L2_CMPL) ? 0 : PTU_PTE_VALID; -- 2.5.5
next prev parent reply other threads:[~2021-09-12 18:15 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-12 18:15 [PATCH for-next 00/12] RDMA/bnxt_re: Driver update Selvin Xavier 2021-09-12 18:15 ` [PATCH for-next 01/12] RDMA/bnxt_re: Add extended statistics counters Selvin Xavier 2021-09-13 10:45 ` Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 02/12] RDMA/bnxt_re: Update statistics counter name Selvin Xavier 2021-09-13 10:45 ` Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 03/12] RDMA/bnxt_re: Use separate response buffer for stat_ctx_free Selvin Xavier 2021-09-13 10:46 ` Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 04/12] RDMA/bnxt_re: Reduce the delay in polling for hwrm command completion Selvin Xavier 2021-09-13 10:49 ` Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 05/12] RDMA/bnxt_re: Support multiple page sizes Selvin Xavier 2021-09-13 10:51 ` Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 06/12] RDMA/bnxt_re: Suppress unwanted error messages Selvin Xavier 2021-09-13 10:52 ` Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 07/12] RDMA/bnxt_re: Fix query SRQ failure Selvin Xavier 2021-09-13 10:55 ` Leon Romanovsky 2021-09-13 11:10 ` Selvin Xavier 2021-09-12 18:15 ` Selvin Xavier [this message] 2021-09-13 10:57 ` [PATCH for-next 08/12] RDMA/bnxt_re: Fix FRMR issue with single page MR allocation Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 09/12] RDMA/bnxt_re: Use GFP_KERNEL in non atomic context Selvin Xavier 2021-09-13 11:10 ` Leon Romanovsky 2021-09-13 11:15 ` Selvin Xavier 2021-09-12 18:15 ` [PATCH for-next 10/12] RDMA/bnxt_re: Correct FRMR size calculation Selvin Xavier 2021-09-13 11:11 ` Leon Romanovsky 2021-09-12 18:15 ` [PATCH for-next 11/12] RDMA/bnxt_re: Check if the vlan is valid before reporting Selvin Xavier 2021-09-12 18:15 ` [PATCH for-next 12/12] MAINTAINERS: Update Broadcom RDMA maintainers Selvin Xavier
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=1631470526-22228-9-git-send-email-selvin.xavier@broadcom.com \ --to=selvin.xavier@broadcom.com \ --cc=dledford@redhat.com \ --cc=jgg@nvidia.com \ --cc=linux-rdma@vger.kernel.org \ --subject='Re: [PATCH for-next 08/12] RDMA/bnxt_re: Fix FRMR issue with single page MR allocation' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).