diff options
| author | Devesh Sharma <[email protected]> | 2020-04-02 18:12:14 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2020-04-14 19:39:35 +0000 |
| commit | fddcbbb02af42a5d6ec0c6ed38f823cc9dba1414 (patch) | |
| tree | 35a19a43f55aaf463b686bb7b45191249686916c /drivers/infiniband/hw/bnxt_re/qplib_res.c | |
| parent | RDMA/bnxt_re: Update missing hsi data structures (diff) | |
| download | kernel-fddcbbb02af42a5d6ec0c6ed38f823cc9dba1414.tar.gz kernel-fddcbbb02af42a5d6ec0c6ed38f823cc9dba1414.zip | |
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/[email protected]
Signed-off-by: Devesh Sharma <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/qplib_res.c')
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/qplib_res.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband/hw/bnxt_re/qplib_res.c index cab1adf1fed9..7efa6e5dce62 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c @@ -347,6 +347,7 @@ done: hwq->depth = hwq_attr->depth; hwq->max_elements = depth; hwq->element_size = stride; + hwq->qe_ppg = pg_size / stride; /* For direct access to the elements */ lvl = hwq->level; if (hwq_attr->sginfo->nopte && hwq->level) |
