diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index 20f944940..af883fce6 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -622,7 +622,9 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport printf("Atomic Write Unit (PFail): %d\n", cdata->awupf + 1); printf("Scatter-Gather List\n"); printf(" SGL Command Set: %s\n", - cdata->sgls.supported ? "Supported" : "Not Supported"); + cdata->sgls.supported == SPDK_NVME_SGLS_SUPPORTED ? "Supported" : + cdata->sgls.supported == SPDK_NVME_SGLS_SUPPORTED_DWORD_ALIGNED ? "Supported (Dword aligned)" : + "Not Supported"); printf(" SGL Keyed: %s\n", cdata->sgls.keyed_sgl ? "Supported" : "Not Supported"); printf(" SGL Bit Bucket Descriptor: %s\n", diff --git a/include/spdk/nvme_spec.h b/include/spdk/nvme_spec.h index bc645345c..3842da2b8 100644 --- a/include/spdk/nvme_spec.h +++ b/include/spdk/nvme_spec.h @@ -849,6 +849,18 @@ enum spdk_nvmf_ctrlr_model { #define SPDK_NVME_CTRLR_MN_LEN 40 #define SPDK_NVME_CTRLR_FR_LEN 8 +/** Identify Controller data sgls.supported values */ +enum spdk_nvme_sgls_supported { + /** SGLs are not supported */ + SPDK_NVME_SGLS_NOT_SUPPORTED = 0, + + /** SGLs are supported with no alignment or granularity requirement. */ + SPDK_NVME_SGLS_SUPPORTED = 1, + + /** SGLs are supported with a DWORD alignment and granularity requirement. */ + SPDK_NVME_SGLS_SUPPORTED_DWORD_ALIGNED = 2, +}; + struct __attribute__((packed)) spdk_nvme_ctrlr_data { /* bytes 0-255: controller capabilities and features */ @@ -1174,8 +1186,7 @@ struct __attribute__((packed)) spdk_nvme_ctrlr_data { /** SGL support */ struct { - uint32_t supported : 1; - uint32_t reserved0 : 1; + uint32_t supported : 2; uint32_t keyed_sgl : 1; uint32_t reserved1 : 13; uint32_t bit_bucket_descriptor : 1;