]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/bnxt_re: Avoid repeated requests to allocate WC pages
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 15 Jun 2026 22:47:47 +0000 (15:47 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 16 Jun 2026 17:30:40 +0000 (14:30 -0300)
commit441baa79043431807115fd030d7d0bb14ed441a0
tree6b77ebd1d55fcd609cd0b5aca33b12f49b60ee98
parent87267803a8c824616eb147c5dad7030a5db6f878
RDMA/bnxt_re: Avoid repeated requests to allocate WC pages

Applications can request multiple WC pages for the same ucontext.
As of now, only 1 WC page per ucontext is supported. Add a lock to
avoid concurrent access and a check to fail repeated requests.
Also, if the mmap entry insert fails for the WC, free the Doorbell
page index mapped for the WC page.

Fixes: eee6268421a2 ("RDMA/bnxt_re: Move the UAPI methods to a dedicated file")
Fixes: 360da60d6c6e ("RDMA/bnxt_re: Enable low latency push")
Link: https://patch.msgid.link/r/20260615224751.232802-12-selvin.xavier@broadcom.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/ib_verbs.h
drivers/infiniband/hw/bnxt_re/uapi.c