RDMA/bnxt_re: Refactor the queue index update
authorChandramohan Akula <chandramohan.akula@broadcom.com>
Mon, 23 Oct 2023 14:03:22 +0000 (07:03 -0700)
committerLeon Romanovsky <leon@kernel.org>
Mon, 13 Nov 2023 08:26:41 +0000 (10:26 +0200)
commit3a4304d82695015d0703ee0c3331458d22e3ba7c
treed3e6c6f64c954bd1e5c4b9b3b029902b0762e64f
parentc170d4ff21a8a525d782e3d1bc58d9538d95afe6
RDMA/bnxt_re: Refactor the queue index update

The queue index wrap around logic is based on power of 2 size depth.
All queues are created with power of 2 depth. This increases the
memory usage by the driver. This change is required for the next
patches that avoids the power of 2 depth requirement for each of
the queues.

Update the function that increments producer index and consumer
index during wrap around. Also, changes the index handling across
multiple functions.

Signed-off-by: Chandramohan Akula <chandramohan.akula@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1698069803-1787-2-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_fp.h
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
drivers/infiniband/hw/bnxt_re/qplib_res.c
drivers/infiniband/hw/bnxt_re/qplib_res.h