Commit 0ce1f5c7 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

nvme_spec: Add IOCS Identify Namespace Data for NVM command set



Add struct spdk_nvme_nvm_ns_data for the IOCS Identify Namespace Data
for NVM command set. Related with this, add the LBAFEE field to struct
spdk_nvme_host_behavior to enable extended LBA formats.

Signed-off-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I272bfac0503c223fd1d712fac5901af678ae5960
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23618


Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent df96ddcc
Loading
Loading
Loading
Loading
+43 −1
Original line number Diff line number Diff line
@@ -1792,7 +1792,9 @@ spdk_nvme_bytes_to_numd(uint32_t len)
#pragma pack(push, 1)
struct spdk_nvme_host_behavior {
	uint8_t acre;
	uint8_t reserved[511];
	uint8_t etdas;
	uint8_t lbafee;
	uint8_t reserved[509];
};
SPDK_STATIC_ASSERT(sizeof(struct spdk_nvme_host_behavior) == 512, "Incorrect size");
#pragma pack(pop)
@@ -3017,6 +3019,46 @@ struct spdk_nvme_ns_data {
};
SPDK_STATIC_ASSERT(sizeof(struct spdk_nvme_ns_data) == 4096, "Incorrect size");

enum spdk_nvme_pi_format {
	SPDK_NVME_16B_GUARD_PI	= 0,
	SPDK_NVME_32B_GUARD_PI	= 1,
	SPDK_NVME_64B_GUARD_PI	= 2,
};

struct spdk_nvme_nvm_ns_data {
	/** logical block storage tag mask */
	uint64_t		lbstm;

	/** protection information capabilities */
	struct {
		/** 16b guard protection information storage tag support */
		uint8_t		_16bpists	: 1;

		/** 16b guard protection information storage tag mask */
		uint8_t		_16bpistm	: 1;

		/** storage tag check read support */
		uint8_t		stcrs		: 1;

		uint8_t		reserved	: 5;
	} pic;

	uint8_t			reserved[3];

	struct {
		/** storage tag size */
		uint32_t	sts		: 7;

		/** protection information format */
		uint32_t	pif		: 2;

		uint32_t	reserved	: 23;
	} elbaf[64];

	uint8_t			reserved2[3828];
};
SPDK_STATIC_ASSERT(sizeof(struct spdk_nvme_nvm_ns_data) == 4096, "Incorrect size");

struct spdk_nvme_nvm_ctrlr_data {
	/* verify size limit */
	uint8_t			vsl;