Loading examples/nvme/identify/identify.c +38 −9 Original line number Diff line number Diff line Loading @@ -444,10 +444,15 @@ static void print_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_device *pci_dev) { const struct spdk_nvme_ctrlr_data *cdata; union spdk_nvme_cap_register cap; union spdk_nvme_vs_register vs; uint8_t str[512]; uint32_t i; struct spdk_nvme_error_information_entry *error_entry; cap = spdk_nvme_ctrlr_get_regs_cap(ctrlr); vs = spdk_nvme_ctrlr_get_regs_vs(ctrlr); get_features(ctrlr); get_log_pages(ctrlr); Loading Loading @@ -493,6 +498,30 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_device *pci_dev) printf("%u milliseconds\n", tler * 100); } } printf("NVMe Specification Version: %u.%u", vs.bits.mjr, vs.bits.mnr); if (vs.bits.ter) { printf(".%u", vs.bits.ter); } printf("\n"); printf("Maximum Queue Entries: %u\n", cap.bits.mqes + 1); printf("Contiguous Queues Required: %s\n", cap.bits.cqr ? "Yes" : "No"); printf("Arbitration Mechanisms Supported\n"); printf(" Weighted Round Robin: %s\n", cap.bits.ams & SPDK_NVME_CAP_AMS_WRR ? "Supported" : "Not Supported"); printf(" Vendor Specific: %s\n", cap.bits.ams & SPDK_NVME_CAP_AMS_VS ? "Supported" : "Not Supported"); printf("Reset Timeout: %" PRIu64 " ms\n", (uint64_t)500 * cap.bits.to); printf("Doorbell Stride: %" PRIu64 " bytes\n", (uint64_t)1 << (2 + cap.bits.dstrd)); printf("NVM Subsystem Reset: %s\n", cap.bits.nssrs ? "Supported" : "Not Supported"); printf("Command Sets Supported\n"); printf(" NVM Command Set: %s\n", cap.bits.css_nvm ? "Supported" : "Not Supported"); printf("Memory Page Size Minimum: %" PRIu64 " bytes\n", (uint64_t)1 << (12 + cap.bits.mpsmin)); printf("Memory Page Size Maximum: %" PRIu64 " bytes\n", (uint64_t)1 << (12 + cap.bits.mpsmax)); printf("\n"); printf("Admin Command Set Attributes\n"); Loading include/spdk/nvme_spec.h +2 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,8 @@ SPDK_STATIC_ASSERT(sizeof(union spdk_nvme_aqa_register) == 4, "Incorrect size"); union spdk_nvme_vs_register { uint32_t raw; struct { uint32_t reserved1 : 8; /** indicates the tertiary version */ uint32_t ter : 8; /** indicates the minor version */ uint32_t mnr : 8; /** indicates the major version */ Loading Loading
examples/nvme/identify/identify.c +38 −9 Original line number Diff line number Diff line Loading @@ -444,10 +444,15 @@ static void print_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_device *pci_dev) { const struct spdk_nvme_ctrlr_data *cdata; union spdk_nvme_cap_register cap; union spdk_nvme_vs_register vs; uint8_t str[512]; uint32_t i; struct spdk_nvme_error_information_entry *error_entry; cap = spdk_nvme_ctrlr_get_regs_cap(ctrlr); vs = spdk_nvme_ctrlr_get_regs_vs(ctrlr); get_features(ctrlr); get_log_pages(ctrlr); Loading Loading @@ -493,6 +498,30 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, struct spdk_pci_device *pci_dev) printf("%u milliseconds\n", tler * 100); } } printf("NVMe Specification Version: %u.%u", vs.bits.mjr, vs.bits.mnr); if (vs.bits.ter) { printf(".%u", vs.bits.ter); } printf("\n"); printf("Maximum Queue Entries: %u\n", cap.bits.mqes + 1); printf("Contiguous Queues Required: %s\n", cap.bits.cqr ? "Yes" : "No"); printf("Arbitration Mechanisms Supported\n"); printf(" Weighted Round Robin: %s\n", cap.bits.ams & SPDK_NVME_CAP_AMS_WRR ? "Supported" : "Not Supported"); printf(" Vendor Specific: %s\n", cap.bits.ams & SPDK_NVME_CAP_AMS_VS ? "Supported" : "Not Supported"); printf("Reset Timeout: %" PRIu64 " ms\n", (uint64_t)500 * cap.bits.to); printf("Doorbell Stride: %" PRIu64 " bytes\n", (uint64_t)1 << (2 + cap.bits.dstrd)); printf("NVM Subsystem Reset: %s\n", cap.bits.nssrs ? "Supported" : "Not Supported"); printf("Command Sets Supported\n"); printf(" NVM Command Set: %s\n", cap.bits.css_nvm ? "Supported" : "Not Supported"); printf("Memory Page Size Minimum: %" PRIu64 " bytes\n", (uint64_t)1 << (12 + cap.bits.mpsmin)); printf("Memory Page Size Maximum: %" PRIu64 " bytes\n", (uint64_t)1 << (12 + cap.bits.mpsmax)); printf("\n"); printf("Admin Command Set Attributes\n"); Loading
include/spdk/nvme_spec.h +2 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,8 @@ SPDK_STATIC_ASSERT(sizeof(union spdk_nvme_aqa_register) == 4, "Incorrect size"); union spdk_nvme_vs_register { uint32_t raw; struct { uint32_t reserved1 : 8; /** indicates the tertiary version */ uint32_t ter : 8; /** indicates the minor version */ uint32_t mnr : 8; /** indicates the major version */ Loading