summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_qpair.c
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2012-10-10 23:35:16 +0000
committerjimharris <jimharris@FreeBSD.org>2012-10-10 23:35:16 +0000
commit251b0e8a48776676b7c2ff3812b39ab5ec270783 (patch)
tree62b67a90fd070b1a48c592b6ee5dc97c8be3489d /sys/dev/nvme/nvme_qpair.c
parent757271a2133e07d21f479484187385dad725323e (diff)
downloadFreeBSD-src-251b0e8a48776676b7c2ff3812b39ab5ec270783.zip
FreeBSD-src-251b0e8a48776676b7c2ff3812b39ab5ec270783.tar.gz
Count number of times each queue pair's interrupt handler is invoked.
Also add sysctls to query and reset each queue pair's stats, including the new count added here. Sponsored by: Intel
Diffstat (limited to 'sys/dev/nvme/nvme_qpair.c')
-rw-r--r--sys/dev/nvme/nvme_qpair.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index a49a702..5ad1ea8 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -125,6 +125,8 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair)
struct nvme_completion *cpl;
boolean_t retry, error;
+ qpair->num_intr_handler_calls++;
+
while (1) {
cpl = &qpair->cpl[qpair->cq_head];
@@ -238,6 +240,7 @@ nvme_qpair_construct(struct nvme_qpair *qpair, uint32_t id,
NULL, NULL, &qpair->dma_tag);
qpair->num_cmds = 0;
+ qpair->num_intr_handler_calls = 0;
qpair->num_tr = 0;
qpair->num_prp_list = 0;
qpair->sq_head = qpair->sq_tail = qpair->cq_head = 0;
OpenPOWER on IntegriCloud