]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/bnxt_re: Simplify obtaining queue entry from hw ring
authorDevesh Sharma <devesh.sharma@broadcom.com>
Thu, 2 Apr 2020 18:12:14 +0000 (14:12 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 14 Apr 2020 19:39:35 +0000 (16:39 -0300)
commit2bc9f582d9eed2f24f54afd6d3fd11c9b3cb6509
tree35a19a43f55aaf463b686bb7b45191249686916c
parent3b13c967ce8038cb620339a0788ec45a59534a2b
RDMA/bnxt_re: Simplify obtaining queue entry from hw ring

Restructring the data path and control path queue management code to
simplify the way a queue element is extracted from the hardware ring.

Introduced a new function which will give a pointer to the next ring item
depending upon the current cons/prod index in the hardware queue.

Further, there are hardcoding when size of queue entry is calculated,
replacing it with an inline function. This function would be easier to
expand if need going forward.

The code section to initialize the PSN search areas has also been
restructured and couple of functions has been added there.

Link: https://lore.kernel.org/r/1585851136-2316-4-git-send-email-devesh.sharma@broadcom.com
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/ib_verbs.h
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