]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
RDMA/bnxt_re: Fix the page_size used during the MR creation
authorSelvin Xavier <selvin.xavier@broadcom.com>
Sun, 7 May 2023 18:29:29 +0000 (11:29 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 4 Sep 2023 09:10:21 +0000 (11:10 +0200)
commit85fa2f80c235a27308f7fe7c6e8a4999b8a03be6
tree9b5279e06669ee9b018a44f650c83ccf9424d2f0
parent8b9f1cbdd9a5bae1e414691d312b008ec888fff4
RDMA/bnxt_re: Fix the page_size used during the MR creation

BugLink: https://bugs.launchpad.net/bugs/2029808
[ Upstream commit 08c7f09356e45d093d1867c7a3c6ac6526e2f98b ]

Driver populates the list of pages used for Memory region wrongly when
page size is more than system page size. This is causing a failure when
some of the applications that creates MR with page size as 2M.  Since HW
can support multiple page sizes, pass the correct page size while creating
the MR.

Also, driver need not adjust the number of pages when HW Queues are
created with user memory. It should work with the number of dma blocks
returned by ib_umem_num_dma_blocks. Fix this calculation also.

Fixes: 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")
Fixes: f6919d56388c ("RDMA/bnxt_re: Code refactor while populating user MRs")
Link: https://lore.kernel.org/r/1683484169-9539-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/infiniband/hw/bnxt_re/qplib_res.c
drivers/infiniband/hw/bnxt_re/qplib_sp.c