SRBEX_DATA_NVME_COMMAND structure (srb.h)

The SRBEX_DATA_NVME_COMMAND structure enables the user to frame and issue a command in NVMe format. This structure is currently reserved for system use.

Syntax

typedef struct _SRBEX_DATA_NVME_COMMAND {
  SRBEXDATATYPE Type;
  ULONG         Length;
  union {
    PVOID     ControllerHandle;
    ULONGLONG Reserved0;
  };
  union {
    struct {
      ULONG     CommandDWORD0;
      ULONG     CommandNSID;
      ULONG     Reserved1[2];
      ULONGLONG CommandMPTR;
      union {
        struct {
          ULONGLONG CommandPRP1;
          ULONGLONG CommandPRP2;
        };
        ULONGLONG CommandSGL1[2];
      };
      ULONG     CommandCDW10;
      ULONG     CommandCDW11;
      ULONG     CommandCDW12;
      ULONG     CommandCDW13;
      ULONG     CommandCDW14;
      ULONG     CommandCDW15;
    };
    struct {
      UCHAR  OPC;
      UCHAR  PSDT;
      USHORT CID;
      UCHAR  FCTYPE;
      UCHAR  Reserved[35];
      UCHAR  Specific[24];
    } FabricsCommand;
    struct {
      ULONG OPC : 8;
      ULONG FUSE : 2;
      ULONG Reserved : 4;
      ULONG PSDT : 2;
      ULONG CID : 16;
      UCHAR TypeSpecific[60];
    } Command;
  };
  UCHAR         CommandType;
  UCHAR         Reserved2;
  USHORT        CommandFlags;
  USHORT        ResponseFlags;
  union {
    struct {
      USHORT P : 1;
      USHORT SC : 8;
      USHORT SCT : 3;
      USHORT CRD : 2;
      USHORT M : 1;
      USHORT DNR : 1;
    } DUMMYSTRUCTNAME;
    USHORT AsUshort;
  } CommandStatus;
  ULONG         QID;
  ULONG         CommandTag;
  union {
    struct {
      ULONG CQEntryDW0;
      ULONG CQEntryDW1;
    };
    UCHAR Specific[8];
  };
  USHORT        SQHD;
  USHORT        SQID;
} SRBEX_DATA_NVME_COMMAND, *PSRBEX_DATA_NVME_COMMAND;

Members

Type

Command type. Currently this must be set to SrbExDataTypeNvmeCommand.

Length

Size of this structure, in bytes.

ControllerHandle

Miniport's handle for the NVMe controller.

Reserved0

Reserved; do not use.

CommandDWORD0

Command Dword 0 within the NVMe command (see the NVMe specifications).

CommandNSID

Namespace identifier within the NVMe command (see the NVMe specifications).

Reserved1[2]

CommandMPTR

Metadata pointer within the NVMe command (see the NVMe specifications).

CommandPRP1

Physical region page (PRP) Entry 1 within the NVMe command (see the NVMe specifications). To indicate that PRP information is present, the user must set the SRBEX_DATA_NVME_COMMAND_FLAG_PRP_SET_ALREADY flag of SRBEX_DATA_NVME_COMMAND_FLAG.

CommandPRP2

PRP Entry 2 within the NVMe command (see the NVMe specifications). To indicate that PRP information is present, the user must set the SRBEX_DATA_NVME_COMMAND_FLAG_PRP_SET_ALREADY flag of SRBEX_DATA_NVME_COMMAND_FLAG.

CommandSGL1[2]

CommandCDW10

Command-specific Dword 10 (see the NVMe specifications).

CommandCDW11

Command-specific Dword 11 (see the NVMe specifications).

CommandCDW12

Command-specific Dword 12 (see the NVMe specifications).

CommandCDW13

Command-specific Dword 13 (see the NVMe specifications).

CommandCDW14

Command-specific Dword 14 (see the NVMe specifications).

CommandCDW15

Command-specific Dword 15 (see the NVMe specifications).

FabricsCommand

NVMEOF_FABRICS_COMMAND in nvme.h

FabricsCommand.OPC

Opcode (7Fh).

FabricsCommand.PSDT

PRP or SGL for data transfer. (only bits 7:6 are used, the rest are reserved).

FabricsCommand.CID

Fabrics command identifier.

FabricsCommand.FCTYPE

Fabrics command type.

FabricsCommand.Reserved[35]

FabricsCommand.Specific[24]

Command

To reference command DW0 (see the NVMe specifications).

Command.OPC

Opcode (OPC).

Command.FUSE

Fused Operation (FUSE).

Command.Reserved

Reserved; do not use.

Command.PSDT

PRP or SGL for data transfer.

Command.CID

Command identifier.

Command.TypeSpecific[60]

CommandType

A SRBEX_DATA_NVME_COMMAND_TYPE value that specifies the NVMe command type.

Reserved2

Reserved; do not use.

CommandFlags

A SRBEX_DATA_NVME_COMMAND_FLAG value that specifies the properties of this SRBEX data NVMe command.

ResponseFlags

Defined in SRBEX_DATA_NVME_RESPONSE_FLAG.

CommandStatus

Status field from the Completion Queue entry (see the NVMe specifications).

CommandStatus.DUMMYSTRUCTNAME

Embedded structure.

CommandStatus.DUMMYSTRUCTNAME.P

Phase tag (P).

CommandStatus.DUMMYSTRUCTNAME.SC

Status code (SC).

CommandStatus.DUMMYSTRUCTNAME.SCT

Status code type (SCT).

CommandStatus.DUMMYSTRUCTNAME.CRD

Command retry delay (CRD).

CommandStatus.DUMMYSTRUCTNAME.M

More (M).

CommandStatus.DUMMYSTRUCTNAME.DNR

Do not retry (DNR).

CommandStatus.AsUshort

QID

User-specified queue ID (see the NVMe specifications). If unspecified, set this value to 0xFFFFFFFF.

CommandTag

Unique, user-specified identifier for the command identifier to mark a specific command. A user can use CommandTag to trace the result of the command in an Event Tracing for Windows (ETW) trace (for example, in Event Viewer's Storage log).

CQEntryDW0

Completion queue entry DW0.

CQEntryDW1

Completion queue entry DW1.

Specific[8]

SQHD

SQ head pointer in completion queue entry.

SQID

SQ identifier.

Requirements

Requirement Value
Minimum supported server Windows Server 2022
Header srb.h

See also