Commit e39512ec authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

nvmf: add completed_nvme_io to nvmf_poll_group_stat



Basic IO completion counting can be done at the common
layer, to enable some level of stat tracking even for
transports that don't have transport-specific tracking
yet.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: If04f854b97440089b8ad149b64cb59173c73975c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15912


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
parent fe24da16
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -128,6 +128,8 @@ struct spdk_nvmf_poll_group_stat {
	/* current io qpair count */
	uint32_t current_io_qpairs;
	uint64_t pending_bdev_io;
	/* NVMe IO commands completed (excludes admin commands) */
	uint64_t completed_nvme_io;
};

/**
+3 −0
Original line number Diff line number Diff line
@@ -4137,6 +4137,9 @@ _nvmf_request_complete(void *ctx)
		sgroup = &qpair->group->sgroups[qpair->ctrlr->subsys->id];
		assert(sgroup != NULL);
		is_aer = req->cmd->nvme_cmd.opc == SPDK_NVME_OPC_ASYNC_EVENT_REQUEST;
		if (spdk_likely(qpair->qid != 0)) {
			qpair->group->stat.completed_nvme_io++;
		}

		/*
		 * Set the crd value.
+1 −0
Original line number Diff line number Diff line
@@ -1676,6 +1676,7 @@ spdk_nvmf_poll_group_dump_stat(struct spdk_nvmf_poll_group *group, struct spdk_j
	spdk_json_write_named_uint32(w, "current_admin_qpairs", group->stat.current_admin_qpairs);
	spdk_json_write_named_uint32(w, "current_io_qpairs", group->stat.current_io_qpairs);
	spdk_json_write_named_uint64(w, "pending_bdev_io", group->stat.pending_bdev_io);
	spdk_json_write_named_uint64(w, "completed_nvme_io", group->stat.completed_nvme_io);

	spdk_json_write_named_array_begin(w, "transports");