RDMA/bnxt_re: Share a page to expose per CQ info with userspace
authorSelvin Xavier <selvin.xavier@broadcom.com>
Thu, 14 Dec 2023 06:31:24 +0000 (22:31 -0800)
committerLeon Romanovsky <leon@kernel.org>
Sun, 17 Dec 2023 13:35:58 +0000 (15:35 +0200)
commite275919d96693c5ca964b20d73a33d52a7e57f04
tree740cda6ce4659cb6466459085e191ee190453054
parent9b0a7a2cb87d9c430a3588d7d2b6e471200b86ad
RDMA/bnxt_re: Share a page to expose per CQ info with userspace

Gen P7 adapters needs to share a toggle bits information received
in kernel driver with the user space. User space needs this
info during the request notify call back to arm the CQ.

User space application can get this page using the
UAPI routines. Library will mmap this page and get the
toggle bits to be used in the next ARM Doorbell.

Uses a hash list to map the CQ structure from the CQ ID.
CQ structure is retrieved from the hash list while the
library calls the UAPI routine to get the toggle page
mapping. Currently the full page is mapped per CQ. This
can be optimized to enable multiple CQs from the same
application share the same page and different offsets
in the page.

Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1702535484-26844-3-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/bnxt_re.h
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/ib_verbs.h
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/bnxt_re/qplib_res.h
include/uapi/rdma/bnxt_re-abi.h