RDMA/cxgb4: Add missing debug stats
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
c3f98fa291
commit
98a3e87990
|
@ -259,8 +259,12 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
|
||||||
|
|
||||||
if ((!reset_tpt_entry) && (*stag == T4_STAG_UNSET)) {
|
if ((!reset_tpt_entry) && (*stag == T4_STAG_UNSET)) {
|
||||||
stag_idx = c4iw_get_resource(&rdev->resource.tpt_table);
|
stag_idx = c4iw_get_resource(&rdev->resource.tpt_table);
|
||||||
if (!stag_idx)
|
if (!stag_idx) {
|
||||||
|
mutex_lock(&rdev->stats.lock);
|
||||||
|
rdev->stats.stag.fail++;
|
||||||
|
mutex_unlock(&rdev->stats.lock);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
mutex_lock(&rdev->stats.lock);
|
mutex_lock(&rdev->stats.lock);
|
||||||
rdev->stats.stag.cur += 32;
|
rdev->stats.stag.cur += 32;
|
||||||
if (rdev->stats.stag.cur > rdev->stats.stag.max)
|
if (rdev->stats.stag.cur > rdev->stats.stag.max)
|
||||||
|
|
|
@ -179,8 +179,12 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx)
|
||||||
kfree(entry);
|
kfree(entry);
|
||||||
} else {
|
} else {
|
||||||
qid = c4iw_get_resource(&rdev->resource.qid_table);
|
qid = c4iw_get_resource(&rdev->resource.qid_table);
|
||||||
if (!qid)
|
if (!qid) {
|
||||||
|
mutex_lock(&rdev->stats.lock);
|
||||||
|
rdev->stats.qid.fail++;
|
||||||
|
mutex_unlock(&rdev->stats.lock);
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
mutex_lock(&rdev->stats.lock);
|
mutex_lock(&rdev->stats.lock);
|
||||||
rdev->stats.qid.cur += rdev->qpmask + 1;
|
rdev->stats.qid.cur += rdev->qpmask + 1;
|
||||||
mutex_unlock(&rdev->stats.lock);
|
mutex_unlock(&rdev->stats.lock);
|
||||||
|
|
Loading…
Reference in New Issue