RDMA/bnxt_re: Get the WQE index from slot index while completing the WQEs
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 19 Aug 2024 04:47:24 +0000 (21:47 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 27 Aug 2024 13:15:57 +0000 (10:15 -0300)
commit51edebb73497f5dc1da357947d6ac985f0158a1b
tree575b9f8572be62975e39719aec4629b8cd81b209
parentde1d364c3815f9360a0945097ca2731950e914fa
RDMA/bnxt_re: Get the WQE index from slot index while completing the WQEs

While reporting the completions, SQ Work Queue index is required to
identify the WQE that generated the completions. In variable WQE mode, FW
returns the slot index for Error completions. Driver need to walk through
the shadow queue between the consumer index and producer index and matches
the slot index returned by FW. If a match is found, the next index of the
shadow queue is the WQE index to be considered for remaining poll_cq loop.

Link: https://patch.msgid.link/r/1724042847-1481-3-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Hongguang Gao <hongguang.gao@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_fp.h