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

nvme: add SPDK_NVME_IO_FLAGS_DIRECTIVE macro



The upper bits in the SPDK_NVME_IO_FLAGS map directly to how they
are encoded in cdw12 of the various commands, so clarify that too as part
of this patch.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: I0b4614436a9bf30eb2c4da2144d883025d617fc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22445


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: default avatarAnkit Kumar <ankit.kumar@samsung.com>
Community-CI: Mellanox Build Bot
parent 80280dad
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -4402,10 +4402,16 @@ SPDK_STATIC_ASSERT(sizeof(struct spdk_nvme_ns_streams_status) == 131072, "Incorr
#define SPDK_NVME_IO_FLAGS_FUSE_FIRST (SPDK_NVME_CMD_FUSE_FIRST << 0)
#define SPDK_NVME_IO_FLAGS_FUSE_SECOND (SPDK_NVME_CMD_FUSE_SECOND << 0)
#define SPDK_NVME_IO_FLAGS_FUSE_MASK (SPDK_NVME_CMD_FUSE_MASK << 0)
/** Enable Directive type as streams */
#define SPDK_NVME_IO_FLAGS_STREAMS_DIRECTIVE (1U << 20)
/** Enable Directive type as data placement */
#define SPDK_NVME_IO_FLAGS_DATA_PLACEMENT_DIRECTIVE (2U << 20)

/* Bits 20-31 of SPDK_NVME_IO_FLAGS map directly to their associated bits in
 * cdw12 for NVMe IO commands
 */
/** For enabling directive types on write-oriented commands */
#define SPDK_NVME_IO_FLAGS_DIRECTIVE(dtype) (dtype << 20)
#define SPDK_NVME_IO_FLAGS_STREAMS_DIRECTIVE \
	SPDK_NVME_IO_FLAGS_DIRECTIVE(SPDK_NVME_DIRECTIVE_TYPE_STREAMS)
#define SPDK_NVME_IO_FLAGS_DATA_PLACEMENT_DIRECTIVE \
	SPDK_NVME_IO_FLAGS_DIRECTIVE(SPDK_NVME_DIRECTIVE_TYPE_DATA_PLACEMENT)
/** Zone append specific, determines the contents of the reference tag written to the media */
#define SPDK_NVME_IO_FLAGS_ZONE_APPEND_PIREMAP (1U << 25)
/** Enable protection information checking of the Logical Block Reference Tag field */