RDMA/bnxt_re: Change the sequence of updating the CQ toggle value
authorChandramohan Akula <chandramohan.akula@broadcom.com>
Tue, 8 Oct 2024 07:41:40 +0000 (00:41 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Oct 2024 23:49:01 +0000 (20:49 -0300)
commit2df411353dacc4b0c911f8c4944f8ffab955391c
treebd4257c8c6603e98885ab6aeafd740c251c1c037
parenta5e099e0c464ac3d077339f481981e0d859b8545
RDMA/bnxt_re: Change the sequence of updating the CQ toggle value

Currently the CQ toggle value in the shared page (read by the userlib) is
updated as part of the cqn_handler. There is a potential race of
application calling the CQ ARM doorbell immediately and using the old
toggle value.

Change the sequence of updating CQ toggle value to update in the
bnxt_qplib_service_nq function immediately after reading the toggle value
to be in sync with the HW updated value.

Fixes: e275919d9669 ("RDMA/bnxt_re: Share a page to expose per CQ info with userspace")
Link: https://patch.msgid.link/r/1728373302-19530-9-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Chandramohan Akula <chandramohan.akula@broadcom.com>
Reviewed-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/bnxt_re/qplib_fp.c