diff options
| author | Kalesh AP <[email protected]> | 2024-11-14 09:49:07 +0000 |
|---|---|---|
| committer | Leon Romanovsky <[email protected]> | 2024-11-14 14:52:37 +0000 |
| commit | cb97b377a13589b4880eeb1524dbc47087c3244b (patch) | |
| tree | 5ccbeff850550fbcb29d97e577bd135d4bc8232d /drivers/infiniband/hw/bnxt_re/main.c | |
| parent | RDMA/bnxt_re: Refactor NQ allocation (diff) | |
| download | kernel-cb97b377a13589b4880eeb1524dbc47087c3244b.tar.gz kernel-cb97b377a13589b4880eeb1524dbc47087c3244b.zip | |
RDMA/bnxt_re: Refurbish CQ to NQ hash calculation
There are few use cases where CQ create and destroy
is seen before re-creating the CQ, this kind of use
case is disturbing the RR distribution and all the
active CQ getting mapped to only 2 NQ alternatively.
Fixing the CQ to NQ hash calculation by implementing
a quick load sorting mechanism under a mutex.
Using this, if the CQ was allocated and destroyed
before using it, the nq selecting algorithm still
obtains the least loaded CQ. Thus balancing the load
on NQs.
Signed-off-by: Selvin Xavier <[email protected]>
Signed-off-by: Kalesh AP <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/main.c')
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 9669defcebf6..fcaf2b3cc01d 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1566,6 +1566,8 @@ static int bnxt_re_init_res(struct bnxt_re_dev *rdev) bnxt_qplib_init_res(&rdev->qplib_res); + mutex_init(&rdev->nqr->load_lock); + for (i = 1; i < rdev->nqr->num_msix ; i++) { db_offt = rdev->en_dev->msix_entries[i].db_offset; rc = bnxt_qplib_enable_nq(rdev->en_dev->pdev, &rdev->nqr->nq[i - 1], |
