example/identify: list the number of I/O queues

This kind of information can be useful on related model
of Intel SSDs.

Change-Id: Iea8a8f48999ba36e2f6cbf33a892147262891b44
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/385805
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
GangCao 2017-11-05 20:50:06 -05:00 committed by Jim Harris
parent b41a99f2b0
commit fe408c9791

View File

@ -172,6 +172,7 @@ get_features(struct spdk_nvme_ctrlr *ctrlr)
SPDK_NVME_FEAT_POWER_MANAGEMENT,
SPDK_NVME_FEAT_TEMPERATURE_THRESHOLD,
SPDK_NVME_FEAT_ERROR_RECOVERY,
SPDK_NVME_FEAT_NUMBER_OF_QUEUES,
};
/* Submit several GET FEATURES commands and wait for them to complete */
@ -893,6 +894,16 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport
printf("\n");
}
if (features[SPDK_NVME_FEAT_NUMBER_OF_QUEUES].valid) {
uint32_t result = features[SPDK_NVME_FEAT_NUMBER_OF_QUEUES].result;
printf("Number of Queues\n");
printf("================\n");
printf("Number of I/O Submission Queues: %u\n", (result & 0xFFFF) + 1);
printf("Number of I/O Completion Queues: %u\n", (result & 0xFFFF0000 >> 16) + 1);
printf("\n");
}
if (cdata->hctma.bits.supported) {
printf("Host Controlled Thermal Management\n");
printf("==================================\n");