Commit a83c6927 authored by Selvin Xavier's avatar Selvin Xavier Committed by Leon Romanovsky

RDMA/bnxt_re: Decrement resource stats correctly

rc_qp_count and ud_qp_count is not decremented during qp destroy.
Fix this.

Fixes: cb95709e ("bnxt_re: Update the hw counters for resource stats")
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1695199280-13520-3-git-send-email-selvin.xavier@broadcom.comSigned-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 9fc5f9a9
......@@ -910,6 +910,10 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata)
list_del(&qp->list);
mutex_unlock(&rdev->qp_lock);
atomic_dec(&rdev->stats.res.qp_count);
if (qp->qplib_qp.type == CMDQ_CREATE_QP_TYPE_RC)
atomic_dec(&rdev->stats.res.rc_qp_count);
else if (qp->qplib_qp.type == CMDQ_CREATE_QP_TYPE_UD)
atomic_dec(&rdev->stats.res.ud_qp_count);
ib_umem_release(qp->rumem);
ib_umem_release(qp->sumem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment