xnvme_spec

Enums

xnvme_spec_adm_opc

enum xnvme_spec_adm_opc

NVMe Admin Command Opcodes.

See also

specification Section xx, figure yy

Values:

enumerator XNVME_SPEC_ADM_OPC_LOG

XNVME_SPEC_ADM_OPC_LOG.

enumerator XNVME_SPEC_ADM_OPC_IDFY

XNVME_SPEC_ADM_OPC_IDFY.

enumerator XNVME_SPEC_ADM_OPC_SFEAT

XNVME_SPEC_ADM_OPC_SFEAT.

enumerator XNVME_SPEC_ADM_OPC_GFEAT

XNVME_SPEC_ADM_OPC_GFEAT.

enumerator XNVME_SPEC_ADM_OPC_DSEND

XNVME_SPEC_ADM_OPC_DSEND.

enumerator XNVME_SPEC_ADM_OPC_DRECV

XNVME_SPEC_ADM_OPC_DRECV.

xnvme_spec_csi

enum xnvme_spec_csi

Command Set Identifiers.

See also

Specification Section 5.15.2.1, figure X1

Values:

enumerator XNVME_SPEC_CSI_NVM

XNVME_SPEC_CSI_NVM.

enumerator XNVME_SPEC_CSI_KV

XNVME_SPEC_CSI_KV.

enumerator XNVME_SPEC_CSI_ZONED

XNVME_SPEC_CSI_ZONED.

xnvme_spec_dir_types

enum xnvme_spec_dir_types

Values:

enumerator XNVME_SPEC_DIR_IDENTIFY

XNVME_SPEC_DIR_IDENTIFY.

enumerator XNVME_SPEC_DIR_STREAMS

XNVME_SPEC_DIR_STREAMS.

xnvme_spec_drecv_idfy_doper

enum xnvme_spec_drecv_idfy_doper

Values:

enumerator XNVME_SPEC_DRECV_IDFY_RETPR

xnvme_spec_drecv_streams_doper

enum xnvme_spec_drecv_streams_doper

Values:

enumerator XNVME_SPEC_DRECV_STREAMS_RETPR
enumerator XNVME_SPEC_DRECV_STREAMS_GETST
enumerator XNVME_SPEC_DRECV_STREAMS_ALLRS

xnvme_spec_dsend_idfy_doper

enum xnvme_spec_dsend_idfy_doper

Values:

enumerator XNVME_SPEC_DSEND_IDFY_ENDIR

xnvme_spec_dsend_streams_doper

enum xnvme_spec_dsend_streams_doper

Values:

enumerator XNVME_SPEC_DSEND_STREAMS_RELID
enumerator XNVME_SPEC_DSEND_STREAMS_RELRS

xnvme_spec_feat_id

enum xnvme_spec_feat_id

NVMe Feature Identifiers.

TODO: expand these

Values:

enumerator XNVME_SPEC_FEAT_ARBITRATION

XNVME_SPEC_FEAT_ARBITRATION.

enumerator XNVME_SPEC_FEAT_PWR_MGMT

XNVME_SPEC_FEAT_PWR_MGMT.

enumerator XNVME_SPEC_FEAT_LBA_RANGETYPE

XNVME_SPEC_FEAT_LBA_RANGETYPE.

enumerator XNVME_SPEC_FEAT_TEMP_THRESHOLD

XNVME_SPEC_FEAT_TEMP_THRESHOLD.

enumerator XNVME_SPEC_FEAT_ERROR_RECOVERY

XNVME_SPEC_FEAT_ERROR_RECOVERY.

enumerator XNVME_SPEC_FEAT_VWCACHE

XNVME_SPEC_FEAT_VWCACHE.

enumerator XNVME_SPEC_FEAT_NQUEUES

XNVME_SPEC_FEAT_NQUEUES.

enumerator XNVME_SPEC_FEAT_FDP_MODE

XNVME_SPEC_FEAT_FDP_MODE.

enumerator XNVME_SPEC_FEAT_FDP_EVENTS

XNVME_SPEC_FEAT_FDP_EVENTS.

xnvme_spec_feat_sel

enum xnvme_spec_feat_sel

Values:

enumerator XNVME_SPEC_FEAT_SEL_CURRENT

XNVME_SPEC_FEAT_SEL_CURRENT.

enumerator XNVME_SPEC_FEAT_SEL_DEFAULT

XNVME_SPEC_FEAT_SEL_DEFAULT.

enumerator XNVME_SPEC_FEAT_SEL_SAVED

XNVME_SPEC_FEAT_SEL_SAVED.

enumerator XNVME_SPEC_FEAT_SEL_SUPPORTED

XNVME_SPEC_FEAT_SEL_SUPPORTED.

xnvme_spec_flag

enum xnvme_spec_flag

Enumeration of NVMe flags.

TODO: document

Values:

enumerator XNVME_SPEC_FLAG_LIMITED_RETRY
enumerator XNVME_SPEC_FLAG_FORCE_UNIT_ACCESS
enumerator XNVME_SPEC_FLAG_PRINFO_PRCHK_REF
enumerator XNVME_SPEC_FLAG_PRINFO_PRCHK_APP
enumerator XNVME_SPEC_FLAG_PRINFO_PRCHK_GUARD
enumerator XNVME_SPEC_FLAG_PRINFO_PRACT

xnvme_spec_fs_opcs

enum xnvme_spec_fs_opcs

Values:

enumerator XNVME_SPEC_FS_OPC_FLUSH
enumerator XNVME_SPEC_FS_OPC_WRITE
enumerator XNVME_SPEC_FS_OPC_READ

xnvme_spec_idfy_cns

enum xnvme_spec_idfy_cns

Values:

enumerator XNVME_SPEC_IDFY_NS

XNVME_SPEC_IDFY_NS.

enumerator XNVME_SPEC_IDFY_CTRLR

XNVME_SPEC_IDFY_CTRLR.

enumerator XNVME_SPEC_IDFY_NSLIST

XNVME_SPEC_IDFY_NSLIST.

enumerator XNVME_SPEC_IDFY_NSDSCR

XNVME_SPEC_IDFY_NSDSCR.

enumerator XNVME_SPEC_IDFY_SETL

XNVME_SPEC_IDFY_SETL.

enumerator XNVME_SPEC_IDFY_NS_IOCS

XNVME_SPEC_IDFY_NS_IOCS.

enumerator XNVME_SPEC_IDFY_CTRLR_IOCS

XNVME_SPEC_IDFY_CTRLR_IOCS.

enumerator XNVME_SPEC_IDFY_NSLIST_IOCS

XNVME_SPEC_IDFY_NSLIST_IOCS.

enumerator XNVME_SPEC_IDFY_NSLIST_ALLOC

XNVME_SPEC_IDFY_NSLIST_ALLOC.

enumerator XNVME_SPEC_IDFY_NS_ALLOC

XNVME_SPEC_IDFY_NS_ALLOC.

enumerator XNVME_SPEC_IDFY_CTRLR_NS

XNVME_SPEC_IDFY_CTRLR_NS.

enumerator XNVME_SPEC_IDFY_CTRLR_SUB

XNVME_SPEC_IDFY_CTRLR_SUB.

enumerator XNVME_SPEC_IDFY_CTRLR_PRI

XNVME_SPEC_IDFY_CTRLR_PRI.

enumerator XNVME_SPEC_IDFY_CTRLR_SEC

XNVME_SPEC_IDFY_CTRLR_SEC.

enumerator XNVME_SPEC_IDFY_NSGRAN

XNVME_SPEC_IDFY_NSGRAN.

enumerator XNVME_SPEC_IDFY_UUIDL

XNVME_SPEC_IDFY_UUIDL.

enumerator XNVME_SPEC_IDFY_NSLIST_ALLOC_IOCS

XNVME_SPEC_IDFY_NSLIST_ALLOC_IOCS.

enumerator XNVME_SPEC_IDFY_NS_ALLOC_IOCS

XNVME_SPEC_IDFY_NS_ALLOC_IOCS.

enumerator XNVME_SPEC_IDFY_IOCS

XNVME_SPEC_IDFY_IOCS.

xnvme_spec_io_mgmt_recv_mo

enum xnvme_spec_io_mgmt_recv_mo

Values:

enumerator XNVME_SPEC_IO_MGMT_RECV_RUHS

xnvme_spec_io_mgmt_send_mo

enum xnvme_spec_io_mgmt_send_mo

Values:

enumerator XNVME_SPEC_IO_MGMT_SEND_RUHU

xnvme_spec_kv_opc

enum xnvme_spec_kv_opc

Values:

enumerator XNVME_SPEC_KV_OPC_STORE

XNVME_SPEC_KV_OPC_STORE.

enumerator XNVME_SPEC_KV_OPC_RETRIEVE

XNVME_SPEC_KV_OPC_RETRIEVE.

enumerator XNVME_SPEC_KV_OPC_DELETE

XNVME_SPEC_KV_OPC_DELETE.

enumerator XNVME_SPEC_KV_OPC_EXIST

XNVME_SPEC_KV_OPC_EXIST.

enumerator XNVME_SPEC_KV_OPC_LIST

XNVME_SPEC_KV_OPC_LIST.

xnvme_spec_kv_status_code

enum xnvme_spec_kv_status_code

Command-set specific status codes related to key-value Namespaces.

See also

Key Value Command Set Specification Revision 1.0c, Figure 4

Values:

enumerator XNVME_SPEC_KV_SC_CAPACITY_EXCEEDED

XNVME_SPEC_KV_SC_CAPACITY_EXCEEDED.

enumerator XNVME_SPEC_KV_SC_NS_NOT_READY

XNVME_SPEC_KV_SC_NS_NOT_READY.

enumerator XNVME_SPEC_KV_SC_RESERVATION_CONFLICT

XNVME_SPEC_KV_SC_RESERVATION_CONFLICT.

enumerator XNVME_SPEC_KV_SC_FORMAT_IN_PROGRESS

XNVME_SPEC_KV_SC_FORMAT_IN_PROGRESS.

enumerator XNVME_SPEC_KV_SC_INVALID_VAL_SIZE

XNVME_SPEC_KV_SC_INVALID_VAL_SIZE.

enumerator XNVME_SPEC_KV_SC_INVALID_KEY_SIZE

XNVME_SPEC_KV_SC_INVALID_KEY_SIZE.

enumerator XNVME_SPEC_KV_SC_KEY_NOT_EXISTS

XNVME_SPEC_KV_SC_KEY_NOT_EXISTS.

enumerator XNVME_SPEC_KV_SC_UNRECOVERED_ERR

XNVME_SPEC_KV_SC_UNRECOVERED_ERR.

enumerator XNVME_SPEC_KV_SC_KEY_EXISTS

XNVME_SPEC_KV_SC_KEY_EXISTS.

xnvme_spec_log_lpi

enum xnvme_spec_log_lpi

Identifiers (lpi) for NVMe get-log-page.

NVMe 1.4 - Figure ?

Values:

enumerator XNVME_SPEC_LOG_RSVD

XNVME_SPEC_LOG_RSVD.

enumerator XNVME_SPEC_LOG_ERRI

XNVME_SPEC_LOG_ERRI.

enumerator XNVME_SPEC_LOG_HEALTH

XNVME_SPEC_LOG_HEALTH.

enumerator XNVME_SPEC_LOG_FW

XNVME_SPEC_LOG_FW.

enumerator XNVME_SPEC_LOG_CHNS

XNVME_SPEC_LOG_CHNS.

enumerator XNVME_SPEC_LOG_CSAE

XNVME_SPEC_LOG_CSAE.

enumerator XNVME_SPEC_LOG_SELFTEST

XNVME_SPEC_LOG_SELFTEST.

enumerator XNVME_SPEC_LOG_TELEHOST

XNVME_SPEC_LOG_TELEHOST.

enumerator XNVME_SPEC_LOG_TELECTRLR

XNVME_SPEC_LOG_TELECTRLR.

enumerator XNVME_SPEC_LOG_FDPCONF

XNVME_SPEC_LOG_FDPCONF.

enumerator XNVME_SPEC_LOG_FDPRUHU

XNVME_SPEC_LOG_FDPRUHU.

enumerator XNVME_SPEC_LOG_FDPSTATS

XNVME_SPEC_LOG_FDPSTATS.

enumerator XNVME_SPEC_LOG_FDPEVENTS

XNVME_SPEC_LOG_FDPEVENTS.

xnvme_spec_nvm_cmd_cpl_sc

enum xnvme_spec_nvm_cmd_cpl_sc

Command-set specific status codes related to Logical Block Namespaces.

See also

Specification Section 6.TBD.1, figure 355

Values:

enumerator XNVME_SPEC_NVM_CMD_CPL_SC_WRITE_TO_RONLY

Copy Command Specific Status Values.

XNVME_SPEC_NVM_CMD_CPL_SC_WRITE_TO_RONLY

xnvme_spec_nvm_ns_pif

enum xnvme_spec_nvm_ns_pif

Values:

enumerator XNVME_SPEC_NVM_NS_16B_GUARD
enumerator XNVME_SPEC_NVM_NS_32B_GUARD
enumerator XNVME_SPEC_NVM_NS_64B_GUARD

xnvme_spec_nvm_opc

enum xnvme_spec_nvm_opc

NVMe Non-Volatile Memory Command Opcodes.

See also

specification Section xx, figure yy

Values:

enumerator XNVME_SPEC_NVM_OPC_FLUSH

XNVME_SPEC_NVM_OPC_FLUSH.

enumerator XNVME_SPEC_NVM_OPC_WRITE

XNVME_SPEC_NVM_OPC_WRITE.

enumerator XNVME_SPEC_NVM_OPC_READ

XNVME_SPEC_NVM_OPC_READ.

enumerator XNVME_SPEC_NVM_OPC_WRITE_UNCORRECTABLE

XNVME_SPEC_NVM_OPC_WRITE_UNCORRECTABLE.

enumerator XNVME_SPEC_NVM_OPC_COMPARE

XNVME_SPEC_NVM_OPC_COMPARE.

enumerator XNVME_SPEC_NVM_OPC_WRITE_ZEROES

XNVME_SPEC_NVM_OPC_WRITE_ZEROES.

enumerator XNVME_SPEC_NVM_OPC_DATASET_MANAGEMENT

XNVME_SPEC_NVM_OPC_DATASET_MANAGEMENT.

enumerator XNVME_SPEC_NVM_OPC_SCOPY

XNVME_SPEC_NVM_OPC_SCOPY.

enumerator XNVME_SPEC_NVM_OPC_IO_MGMT_RECV

XNVME_SPEC_NVM_OPC_IO_MGMT.

enumerator XNVME_SPEC_NVM_OPC_IO_MGMT_SEND

XNVME_SPEC_NVM_OPC_IO_MGMT_SEND.

enumerator XNVME_SPEC_NVM_OPC_FMT

XNVME_SPEC_NVM_OPC_FMT.

enumerator XNVME_SPEC_NVM_OPC_SANITIZE

XNVME_SPEC_NVM_OPC_SANITIZE.

xnvme_spec_psdt

enum xnvme_spec_psdt

PRP or SGL for Data Transfer field.

Values:

enumerator XNVME_SPEC_PSDT_PRP
enumerator XNVME_SPEC_PSDT_SGL_MPTR_CONTIGUOUS
enumerator XNVME_SPEC_PSDT_SGL_MPTR_SGL

xnvme_spec_sgl_descriptor_subtype

enum xnvme_spec_sgl_descriptor_subtype

Values:

enumerator XNVME_SPEC_SGL_DESCR_SUBTYPE_ADDRESS

XNVME_SPEC_SGL_DESCR_SUBTYPE_ADDRESS.

enumerator XNVME_SPEC_SGL_DESCR_SUBTYPE_OFFSET

XNVME_SPEC_SGL_DESCR_SUBTYPE_OFFSET.

xnvme_spec_status_code

enum xnvme_spec_status_code

NVMe Command Status Code.

Values:

enumerator XNVME_STATUS_CODE_INVALID_FIELD

Invalid Field.

xnvme_spec_status_code_type

enum xnvme_spec_status_code_type

NVMe Command Status Code Types.

Values:

enumerator XNVME_STATUS_CODE_TYPE_GENERIC

Generic.

enumerator XNVME_STATUS_CODE_TYPE_CMDSPEC

Command Specific.

enumerator XNVME_STATUS_CODE_TYPE_MEDIA

Media and data integrity error.

enumerator XNVME_STATUS_CODE_TYPE_PATH

Path related status.

enumerator XNVME_STATUS_CODE_TYPE_VENDOR

Vendor specific.

xnvme_spec_znd_cmd_mgmt_recv_action

enum xnvme_spec_znd_cmd_mgmt_recv_action

Zoned Receive Action.

See also

Specification Section 6.2, figure TBDZMRDW13

Values:

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_ACTION_REPORT

XNvME_SPEC_ZND_CMD_MGMT_RECV_ACTION_REPORT.

XNvME_SPEC_ZND_CMD_MGMT_RECV_ACTION_REPORT_EXTENDED

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_ACTION_REPORT_EXTENDED

xnvme_spec_znd_cmd_mgmt_recv_action_sf

enum xnvme_spec_znd_cmd_mgmt_recv_action_sf

Zone Receive Action (xnvme_spec_znd_cmd_mgmt_recv_action) specific field values.

See also

Specification Section 6.2, figure TBDZMRDW13

Values:

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_ALL

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_ALL.

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_EMPTY

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_EMPTY.

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_IOPEN

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_IOPEN.

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_EOPEN

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_EOPEN.

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_CLOSED

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_CLOSED.

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_FULL

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_FULL.

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_RONLY

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_RONLY.

enumerator XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_OFFLINE

XNVME_SPEC_ZND_CMD_MGMT_RECV_SF_OFFLINE.

xnvme_spec_znd_cmd_mgmt_send_action

enum xnvme_spec_znd_cmd_mgmt_send_action

Actions for the Zone Management Send command.

See also

Specification Section 6.1, figure TBDZMDW13

Values:

enumerator XNVME_SPEC_ZND_CMD_MGMT_SEND_CLOSE

XNVME_SPEC_ZND_CMD_MGMT_SEND_CLOSE.

enumerator XNVME_SPEC_ZND_CMD_MGMT_SEND_FINISH

XNVME_SPEC_ZND_CMD_MGMT_SEND_FINISH.

enumerator XNVME_SPEC_ZND_CMD_MGMT_SEND_OPEN

XNVME_SPEC_ZND_CMD_MGMT_SEND_OPEN.

enumerator XNVME_SPEC_ZND_CMD_MGMT_SEND_RESET

XNVME_SPEC_ZND_CMD_MGMT_SEND_RESET.

enumerator XNVME_SPEC_ZND_CMD_MGMT_SEND_OFFLINE

XNVME_SPEC_ZND_CMD_MGMT_SEND_OFFLINE.

enumerator XNVME_SPEC_ZND_CMD_MGMT_SEND_DESCRIPTOR

XNVME_SPEC_ZND_CMD_MGMT_SEND_DESCRIPTOR.

enumerator XNVME_SPEC_ZND_CMD_MGMT_SEND_FLUSH

XNVME_SPEC_ZND_CMD_MGMT_SEND_FLUSH.

xnvme_spec_znd_log_lid

enum xnvme_spec_znd_log_lid

Log identifiers for Zoned Namespaces.

TODO: merge this with the set of log-identifiers

Values:

enumerator XNVME_SPEC_LOG_ZND_CHANGES

ZND_CMD_LOG_CHANGES.

xnvme_spec_znd_mgmt_send_action_so

enum xnvme_spec_znd_mgmt_send_action_so

This is not defined in any spec…

it would just seem sane if it was…

Values:

enumerator XNVME_SPEC_ZND_MGMT_OPEN_WITH_ZRWA

XNVME_SPEC_ZND_MGMT_OPEN_WITH_ZRWA.

xnvme_spec_znd_opc

enum xnvme_spec_znd_opc

Values:

enumerator XNVME_SPEC_ZND_OPC_MGMT_SEND

XNVME_SPEC_ZND_OPC_MGMT_SEND.

enumerator XNVME_SPEC_ZND_OPC_MGMT_RECV

XNVME_SPEC_ZND_OPC_MGMT_RECV.

enumerator XNVME_SPEC_ZND_OPC_APPEND

XNVME_SPEC_ZND_OPC_APPEND.

xnvme_spec_znd_state

enum xnvme_spec_znd_state

Zone State as reported by Zone Management Receive.

See also

Specification Section 6.2.2.3, figure TBDZMRZD

Values:

enumerator XNVME_SPEC_ZND_STATE_EMPTY

XNVME_SPEC_ZND_STATE_EMPTY.

enumerator XNVME_SPEC_ZND_STATE_IOPEN

XNVME_SPEC_ZND_STATE_IOPEN.

enumerator XNVME_SPEC_ZND_STATE_EOPEN

XNVME_SPEC_ZND_STATE_EOPEN.

enumerator XNVME_SPEC_ZND_STATE_CLOSED

XNVME_SPEC_ZND_STATE_CLOSED.

enumerator XNVME_SPEC_ZND_STATE_RONLY

XNVME_SPEC_ZND_STATE_RONLY.

enumerator XNVME_SPEC_ZND_STATE_FULL

XNVME_SPEC_ZND_STATE_FULL.

enumerator XNVME_SPEC_ZND_STATE_OFFLINE

XNVME_SPEC_ZND_STATE_OFFLINE.

xnvme_spec_znd_status_code

enum xnvme_spec_znd_status_code

Command-set specific status codes related to Zoned Namespaces.

See also

Specification Section 4.1.1.1.1, figures GENERICSTATUSCODES and STATUSCODES

Values:

enumerator XNVME_SPEC_ZND_SC_INVALID_FORMAT

ZND_SC_INVALID_FORMAT.

enumerator XNVME_SPEC_ZND_SC_INVALID_ZONE_OP

Zoned Command Set.

ZND_SC_INVALID_ZONE_OP

enumerator XNVME_SPEC_ZND_SC_NOZRWA

ZND_SC_NOZRWA.

enumerator XNVME_SPEC_ZND_SC_BOUNDARY_ERROR

ZND_SC_BOUNDARY_ERROR.

enumerator XNVME_SPEC_ZND_SC_IS_FULL

ZND_SC_IS_FULL.

enumerator XNVME_SPEC_ZND_SC_IS_READONLY

ZND_SC_IS_READONLY.

enumerator XNVME_SPEC_ZND_SC_IS_OFFLINE

ZND_SC_IS_OFFLINE.

enumerator XNVME_SPEC_ZND_SC_INVALID_WRITE

ZND_SC_INVALID_WRITE.

enumerator XNVME_SPEC_ZND_SC_TOO_MANY_ACTIVE

ZND_SC_TOO_MANY_ACTIVE.

enumerator XNVME_SPEC_ZND_SC_TOO_MANY_OPEN

ZND_SC_TOO_MANY_OPEN.

enumerator XNVME_SPEC_ZND_SC_INVALID_TRANS

ZND_SC_INVALID_TRANS.

xnvme_spec_znd_type

enum xnvme_spec_znd_type

Zone Type.

See also

Specification Section 6.2.2.3, figure TBDZMRD

Values:

enumerator XNVME_SPEC_ZND_TYPE_SEQWR

XNVME_SPEC_ZND_TYPE_SEQWR.

Structs

xnvme_spec_alloc_resource

struct xnvme_spec_alloc_resource

This structure is encapsulation for values provided by allocate resource.

Public Members

union xnvme_spec_alloc_resource.[anonymous] [anonymous]

xnvme_spec_cmd

struct xnvme_spec_cmd

NVMe Command Accessors.

Public Members

union xnvme_spec_cmd.[anonymous] [anonymous]

xnvme_spec_cmd_common

struct xnvme_spec_cmd_common

NVMe Command Accessor for common use of the 64byte NVMe command.

See also

Specification section 4.3, figure 2

See also

Specification section 4.3, figure 3

Public Members

uint16_t opcode

OPC: Command Opcode.

uint16_t fuse

FUSE: Fused Operation.

uint16_t rsvd
uint16_t psdt
uint16_t cid

CID: Command Identifier.

uint32_t nsid

NSID: Namespace identifier.

uint32_t cdw02
uint32_t cdw03
uint64_t mptr

MPTR — metadata pointer.

union xnvme_spec_cmd_common.[anonymous] dptr

< DPTR &#8212; data pointer

uint32_t ndt

NDT: Number of dwords in Data Transfer.

uint32_t ndm

NDM: Number of dwords in Meta Transfer.

uint32_t cdw12
uint32_t cdw13
uint32_t cdw14
uint32_t cdw15

xnvme_spec_cmd_drecv

struct xnvme_spec_cmd_drecv

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t numd

Command dowrd 10.

uint32_t doper

Directive operation.

uint32_t dtype

Directive type.

uint32_t dspec

Directive specific.

union xnvme_spec_cmd_drecv.[anonymous] cdw12
uint32_t cdw13_15[3]

Command dword 13 to 15.

xnvme_spec_cmd_dsend

struct xnvme_spec_cmd_dsend

NVMe Command Accessor for the directive send command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t numd

Command dowrd 10.

uint32_t doper

Directive operation.

uint32_t dtype

Directive type.

uint32_t dspec

Directive specific.

union xnvme_spec_cmd_dsend.[anonymous] cdw12
uint32_t cdw13_15[3]

Command dword 13 to 15.

xnvme_spec_cmd_dsm

struct xnvme_spec_cmd_dsm

The Dataset Management command is used by the host to indicate attributes for ranges of logical blocks.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t nr

NR: Number of Ranges.

uint32_t rsvd1
uint32_t idr

IDR: Integral Dataset for Read.

uint32_t idw

IDW: Integral Dataset for Write.

uint32_t ad

AD: Deallocate.

uint32_t rsvd2
uint32_t cdw12_15[4]

Command dword 12 to 15.

xnvme_spec_cmd_format

struct xnvme_spec_cmd_format

NVMe Command Accessor for the NVM-format command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t lbafl

Least significant 4 bits of LBA Format Index.

uint32_t mset

Meta-data settings.

uint32_t pi

Protection Information.

uint32_t pil

Protection Information Loc.

uint32_t ses

Secure Erase Settings.

uint32_t lbafu

Most significant 2 bits of LBA Format Index.

uint32_t rsvd
uint32_t cdw11_15[5]

Command dword 11 to 15.

xnvme_spec_cmd_gfeat

struct xnvme_spec_cmd_gfeat

NVMe Command Accessor for the get-features command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

union xnvme_spec_cmd_gfeat.[anonymous] cdw10
uint32_t cdw11

Command dword 11.

uint32_t cdw12_15[4]

Command dword 12 to 15.

xnvme_spec_cmd_idfy

struct xnvme_spec_cmd_idfy

NVMe Command Accessor for the identify command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t cns

Controller or Namespace Structure.

uint32_t rsvd1
uint32_t cntid

Controller Identifier.

uint32_t nvmsetid

NVM Set Identifier.

uint32_t rsvd2
uint32_t csi

Command Set Identifier.

uint32_t cdw12_13[2]

Command dword 12 to 13.

uint32_t uuid

UUID index.

uint32_t rsvd3
uint32_t cdw15

Command dword 15.

xnvme_spec_cmd_log

struct xnvme_spec_cmd_log

NVMe Command Accessor for the get-log-page command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t lid

Log Page Identifier.

uint32_t lsp

Log Specific Field.

uint32_t rae

Retain Async. Event.

uint32_t numdl

Nr. of DWORDS lower-bits.

uint32_t numdu

Nr. of DWORDS upper-bits.

uint32_t lsi

Log Specific Identifier.

uint32_t lpol

Log-page offset lower 32bits.

uint32_t lpou

Log-page offset upper 32bits.

uint32_t uuidx

UUID Index.

uint32_t rsvd1
uint32_t ot

Offset Type.

uint32_t csi

Command Specific Identifier.

uint32_t cdw15

Command dword 15.

xnvme_spec_cmd_nvm

struct xnvme_spec_cmd_nvm

NVMe Command Accessors for the NVM Command Set.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint64_t slba

SLBA: Start Logical Block Address.

uint32_t nlb

NLB: Number of logical blocks.

uint32_t rsvd
uint32_t dtype

DT: Directive Type.

uint32_t rsvd2
uint32_t prinfo

PI: Protection Information Field.

uint32_t fua

FUA: Force unit access.

uint32_t lr

LR: Limited retry.

union xnvme_spec_cmd_nvm.[anonymous] cdw13
uint32_t ilbrt

Initial Logical Block Reference Tag.

uint32_t lbat

Logical Block Application Tag.

uint32_t lbatm

logical Block Application Tag Mask

xnvme_spec_cmd_sanitize

struct xnvme_spec_cmd_sanitize

NVMe Command Accessor for the Sanitize command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t sanact

Sanitize Action.

uint32_t ause

Allow unrestr. San. Exit.

uint32_t owpass

Overwrite Pass Count.

uint32_t oipbp

Overwrite Invert.

uint32_t nodas

NoDeallocate after Sanitize.

uint32_t rsvd
uint32_t ovrpat

Overwrite Pattern.

uint32_t cdw12_15[4]

Command dword 12 to 15.

xnvme_spec_cmd_sfeat

struct xnvme_spec_cmd_sfeat

NVMe Command Accessor for the set-features command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

union xnvme_spec_cmd_sfeat.[anonymous] cdw10
struct xnvme_spec_feat feat

Feature.

uint32_t cdw12

Command dword 12.

uint32_t cdw13_15[3]

Command dword 13 to 15.

xnvme_spec_cpl

struct xnvme_spec_cpl

Completion Queue Entry.

Public Members

union xnvme_spec_cpl.[anonymous] [anonymous]
uint16_t sqhd

submission queue head pointer

uint16_t sqid

submission queue identifier

uint16_t cid

command identifier

struct xnvme_spec_status status

xnvme_spec_cs_vector

struct xnvme_spec_cs_vector

Representation of I/O Command Set Vector.

See NVMe spec tbd, section xyz, for details

Public Members

union xnvme_spec_cs_vector.[anonymous] [anonymous]

xnvme_spec_ctrlr_bar

struct xnvme_spec_ctrlr_bar

libxnvme_spec - NVMe structs, enum, values and helper function declarations

If an entity is defined in the NVMe specification, then an enum or struct should exist in this header file. The purpose of this is to provide a single point of entry for spec. definitions for the purpose of providing structs with accessors, possibly bit-fields, and enums for values such as command opcodes.

Auxilary header files are provided for the different IO command-sets, e.g. libxnvme_nvm.h, providing utility functions such as xnvme_nvm_read, xnvme_nvm_write, and similarly libxnvme_znd.h with utilities such as xnvme_znd_append, xnvme_znd_mgmt_send. These can also contain enums and structs, however, these are not based on definitions in the NVMe specification, rather, these build on the spec. definition in order to provide something sligthly more convenient to the user.

A special class of utility functions are pretty-printers, all spec. defintions have two associated pretty-printers named by the type, suffixed by _fpr and _pr, for example:

  • xnvme_spec_cpl_fpr(), prints the given struct xnvme_spec_cpl struct to the given fstream

  • xnvme_spec_cpl_pr(), prints the given struct xnvme_spec_cpl struct to stdout

These functions are auto-generated and available by importing libxnvme_spec_pp.h. Thus, when you see a definition in libxnvme_spec.h then you can count on always having a textual representation available for that definition by importing libxnvme_spec_pp.h. You can also choose to add the libxnvme_pp.h which includes pretty-printers for all enums and struct known by xNVMe.

SPDX-FileCopyrightText: Samsung Electronics Co., Ltd

SPDX-License-Identifier: BSD-3-Clause NVMe PCIe BAR0 as-a-struct.

Public Members

uint64_t cap
uint32_t vs
uint32_t intms
uint32_t intmc
uint32_t cc
uint32_t rsvd24
uint32_t csts
uint32_t nssr
uint32_t aqa
uint64_t asq
uint64_t acq
uint32_t cmbloc
uint32_t cmbsz
uint32_t bpinfo
uint32_t bprsel
uint64_t bpmbl
uint64_t cmbmsc
uint32_t cmbsts
uint8_t rsvd92[3492]
uint32_t pmrcap
uint32_t pmrctl
uint32_t pmrsts
uint32_t pmrebs
uint32_t pmrswtp
uint32_t pmrmscl
uint32_t pmrmscu
uint8_t css[484]

xnvme_spec_dsm_range

struct xnvme_spec_dsm_range

Representation of DSM ranges as defined in NVM Express 1.3 Figure 207 Dataset Management Range Definition Figure 207.

Public Members

uint32_t cattr

Context attributes.

uint32_t llb

Length in logical blocks (this is a 1-based value)

uint64_t slba

Starting LBA.

xnvme_spec_elbaf

struct xnvme_spec_elbaf

Public Members

uint32_t sts

storage tag size

uint32_t pif

protection information format

uint32_t rsvd

xnvme_spec_fdp_conf_desc

struct xnvme_spec_fdp_conf_desc

NVMe FDP configuration descriptor.

Public Members

uint16_t ds
union xnvme_spec_fdp_conf_desc.[anonymous] fdpa

FDP attributes.

uint8_t vss

Vendor specific size.

uint32_t nrg

Number of reclaim groups.

uint16_t nruh

Number of reclaim unit handles.

uint16_t maxpids

Max placement identifiers.

uint32_t nns

Number of namespaces supported.

uint64_t runs

Reclaim unit nominal size.

uint32_t erutl

Estimated reclaim unit time limit.

uint8_t rsvd28[36]
struct xnvme_spec_ruh_desc ruh_desc[]

xnvme_spec_fdp_event

struct xnvme_spec_fdp_event

NVMe FDP event.

xnvme_spec_fdp_event_desc

struct xnvme_spec_fdp_event_desc

NVMe FDP event descriptor.

Public Members

uint8_t type

Event type.

union xnvme_spec_fdp_event_desc.[anonymous] fdpeta

FDP event type attributes.

xnvme_spec_fdp_event_media_reallocated

struct xnvme_spec_fdp_event_media_reallocated

Media reallocated.

xnvme_spec_feat

struct xnvme_spec_feat

Encapsulation of NVMe/NVM features.

This structure is an accessor for Command Dword 11 of an Get Features Cmd. and encapsulation of values provided to the xnvme_cmd_gfeat.

Public Members

union xnvme_spec_feat.[anonymous] [anonymous]

xnvme_spec_fs_idfy_ctrlr

struct xnvme_spec_fs_idfy_ctrlr

SPDX-FileCopyrightText: Samsung Electronics Co., Ltd.

SPDX-License-Identifier: BSD-3-Clause Encapsulate file-system properties as Identify Controller

Public Members

uint8_t byte0_519[520]
struct xnvme_spec_fs_idfy_ctrlr.[anonymous] caps

File System Capabilities.

struct xnvme_spec_fs_idfy_ctrlr.[anonymous] limits
struct xnvme_spec_fs_idfy_ctrlr.[anonymous] properties
struct xnvme_spec_fs_idfy_ctrlr.[anonymous] iosizes
uint8_t rsvd[3509]
uint8_t ac
uint8_t dc

xnvme_spec_fs_idfy_ns

struct xnvme_spec_fs_idfy_ns

Encapsulate file properties as Identify Namespace.

Public Members

uint64_t nsze

Total size of the underlying file-system, in bytes.

uint64_t ncap

Total size that can be allocated to a file, in bytes.

uint64_t nuse

The current size of file, in bytes.

uint8_t rsvd[3816]
uint8_t vendor_specific[254]
uint8_t ac
uint8_t dc

xnvme_spec_idfy

struct xnvme_spec_idfy

NVMe completion result accessor.

TODO: clarify

Public Members

union xnvme_spec_idfy.[anonymous] [anonymous]

xnvme_spec_idfy_cs

struct xnvme_spec_idfy_cs

Representation of I/O Command Set data structure.

See NVMe spec tbd, section xyz, for details

Public Members

struct xnvme_spec_cs_vector iocsc[XNVME_SPEC_IDFY_CS_IOCSC_LEN]

xnvme_spec_idfy_ctrlr

struct xnvme_spec_idfy_ctrlr

Public Members

uint16_t vid

PCI Vendor ID.

uint16_t ssvid

PCI Subsystem Vendor ID.

int8_t sn[XNVME_SPEC_CTRLR_SN_LEN]

SerialNumber.

int8_t mn[XNVME_SPEC_CTRLR_MN_LEN]

Model Number.

uint8_t fr[XNVME_SPEC_CTRLR_FR_LEN]

Firmware Revision.

uint8_t rab

Recomm. Arbitration Burst.

uint8_t ieee[3]

IEEE OUI Identifier.

union xnvme_spec_idfy_ctrlr.[anonymous] cmic

controller multi-path I/O and namespace sharing capabilities

uint8_t mdts

Maximum Data Transfer Size.

uint16_t cntlid

Controller ID.

union xnvme_spec_vs_register ver

Version.

uint32_t rtd3r

RTD3 Resume Latency.

uint32_t rtd3e

RTD3 Resume Latency.

union xnvme_spec_idfy_ctrlr.[anonymous] oaes

optional asynchronous events supported

union xnvme_spec_idfy_ctrlr.[anonymous] ctratt

controller attributes

uint16_t rrls

Read Recovery Levels Supported.

uint8_t reserved_102[9]
uint8_t cntrltype

Controller Type.

uint8_t fguid[16]

FRU Globally Unique Ident.

uint16_t crdt1

Command Retry Delay Time1.

uint16_t crdt2

Command Retry Delay Time2.

uint16_t crdt3

Command Retry Delay Time3.

uint8_t reserved_134[119]
union xnvme_spec_idfy_ctrlr.[anonymous] nvmsr

NVM Subsystem Report.

union xnvme_spec_idfy_ctrlr.[anonymous] vwci

VPD Write Cycle Information.

union xnvme_spec_idfy_ctrlr.[anonymous] mec

Management Endpoint Capabilities.

union xnvme_spec_idfy_ctrlr.[anonymous] oacs

optional admin command support

uint8_t acl

abort command limit

uint8_t aerl

asynchronous event request limit

union xnvme_spec_idfy_ctrlr.[anonymous] frmw

firmware updates

union xnvme_spec_idfy_ctrlr.[anonymous] lpa

Log Page Attributes.

uint8_t elpe

Error Log Page Entries.

uint8_t npss

Number of Power States Supported.

union xnvme_spec_idfy_ctrlr.[anonymous] avscc

admin vendor specific command configuration

union xnvme_spec_idfy_ctrlr.[anonymous] apsta

autonomous power state transition attributes

uint16_t wctemp

Warning Composite Temperature threshold.

uint16_t cctemp

Critical Composite Temperature threshold.

uint16_t mtfa

Maximum Time for Firmware Activation.

uint32_t hmpre

Host Memory Buffer Preferred size.

uint32_t hmmin

Host Memory Buffer Minimum size.

uint64_t tnvmcap[2]

total NVM capacity

uint64_t unvmcap[2]

unallocated NVM capacity

union xnvme_spec_idfy_ctrlr.[anonymous] rpmbs

replay protected memory block support

uint16_t edstt

extended device self-test time (in minutes)

union xnvme_spec_idfy_ctrlr.[anonymous] dsto

device self-test options

uint8_t fwug

Firmware update granularity.

4KB units 0x00 = no information provided 0xFF = no restriction

uint16_t kas

Keep Alive Support.

Granularity of keep alive timer in 100 ms units 0 = keep alive not supported

union xnvme_spec_idfy_ctrlr.[anonymous] hctma

Host controlled thermal management attributes.

uint16_t mntmt

Minimum Thermal Management Temperature.

uint16_t mxtmt

Maximum Thermal Management Temperature.

union xnvme_spec_idfy_ctrlr.[anonymous] sanicap

Sanitize capabilities.

uint32_t hmminds

Host Memory Buffer Minimum Descriptor Entry Size.

uint16_t hmmaxd

Host Memory Maximum Descriptor Entries.

uint16_t nsetidmax

NVM Set Identifier Maximum.

uint16_t endgidmax

Endurance Group Identifier Maximum.

uint8_t anatt

ANA Transition Time.

union xnvme_spec_idfy_ctrlr.[anonymous] anacap

Asymmetric Namespace Access capabilities.

uint32_t anagrpmax

ANA Group Identifier Maximum.

uint32_t nanagrpid

Number of ANA Group Identifiers.

uint32_t pels

Persistent Event Log Size.

uint16_t domain_identifier

Domain Identifier.

uint8_t reserved_358[10]
uint64_t megcap[2]

Max Endurance Group Capacity.

uint8_t reserved_384[128]
union xnvme_spec_idfy_ctrlr.[anonymous] sqes

submission queue entry size

union xnvme_spec_idfy_ctrlr.[anonymous] cqes

completion queue entry size

uint16_t maxcmd
uint32_t nn

Number of Namespaces.

union xnvme_spec_idfy_ctrlr.[anonymous] oncs

optional nvm command support

uint16_t fuses

Fused Operation Support.

union xnvme_spec_idfy_ctrlr.[anonymous] fna

format nvm attributes

union xnvme_spec_idfy_ctrlr.[anonymous] vwc

volatile write cache

uint16_t awun

Atomic Write Unit Normal.

uint16_t awupf

Atomic Write Unit Power Fail.

uint8_t nvscc

NVM vendor specific command configuration.

uint8_t nwpc

Namespace write protection capabilities.

uint16_t acwu

atomic compare & write unit

union xnvme_spec_idfy_ctrlr.[anonymous] cdfs

Copy descriptors formats supported.

union xnvme_spec_idfy_ctrlr.[anonymous] sgls

SGL support.

uint32_t mnan

Maximum Number of Allowed Namespaces.

uint64_t maxdna[2]

Maximum Domain Namespace Attachments.

uint32_t maxcna

Maximum I/O Controllers Namespace Attachments.

uint8_t reserved_564[204]
uint8_t subnqn[256]

NVM Subsystems NVMe Qualified Name.

uint8_t reserved_1024[768]
struct xnvme_spec_idfy_ctrlr.[anonymous] nvmf_specific

NVMe over Fabrics-specific fields.

struct xnvme_spec_power_state psd[32]
uint8_t vs[1024]

xnvme_spec_idfy_dir_rp

struct xnvme_spec_idfy_dir_rp

This structure holds the return parameters data structure for identify directive.

Public Members

struct xnvme_spec_idfy_dir_rp.[anonymous] directives_supported
struct xnvme_spec_idfy_dir_rp.[anonymous] directives_enabled
struct xnvme_spec_idfy_dir_rp.[anonymous] directives_persistence
uint8_t rsvd4[4000]

xnvme_spec_idfy_ns

struct xnvme_spec_idfy_ns

Representation of NVMe completion result Identify Namespace.

That is, for opcode XNVME_SPEC_OPC_IDFY(0x06) with XNVME_SPEC_IDFY_NS(0x0)

Public Members

uint64_t nsze

namespace size

uint64_t ncap

namespace capacity

uint64_t nuse

namespace utilization

struct xnvme_spec_idfy_ns.[anonymous] nsfeat

namespace features

uint8_t nlbaf

number of lba formats

struct xnvme_spec_idfy_ns.[anonymous] flbas

formatted lba size

struct xnvme_spec_idfy_ns.[anonymous] mc

metadata capabilities

union xnvme_spec_idfy_ns.[anonymous] dpc

end-to-end data protection capabilities

union xnvme_spec_idfy_ns.[anonymous] dps

end-to-end data protection type settings

struct xnvme_spec_idfy_ns.[anonymous] nmic

namespace multi-path I/O and namespace sharing capabilities

union xnvme_spec_idfy_ns.[anonymous] nsrescap

reservation capabilities

union xnvme_spec_idfy_ns.[anonymous] fpi

format progress indicator

union xnvme_spec_idfy_ns.[anonymous] dlfeat

deallocate logical features

uint16_t nawun

namespace atomic write unit normal

uint16_t nawupf

namespace atomic write unit power fail

uint16_t nacwu

namespace atomic compare & write unit

uint16_t nabsn

namespace atomic boundary size normal

uint16_t nabo

namespace atomic boundary offset

uint16_t nabspf

namespace atomic boundary size power fail

uint16_t noiob

namespace optimal I/O boundary in logical blocks

uint64_t nvmcap[2]

NVM Capacity.

uint16_t npwg

namespace preferred write granularity

uint16_t npwa

namespace preferred write alignment

uint16_t npdg

namespace preferred deallocate granularity

uint16_t npda

namespace preferred deallocate alignment

uint16_t nows

namespace optimal write size

uint16_t mssrl

maximum single source range length

uint32_t mcl

max copy length

uint8_t msrc

maximum source range count

uint8_t reserved81[11]
uint32_t anagrpid

ANA group identifier.

uint8_t reserved96[3]
uint8_t nsattr

namespace attributes

uint16_t nvmsetid

NVM set identifier.

uint16_t endgid

Endurance group identifier.

uint8_t nguid[16]

namespace globally unique identifier

uint64_t eui64

IEEE extended unique identifier.

struct xnvme_spec_lbaf lbaf[64]
uint8_t vendor_specific[3712]

LBA format support.

xnvme_spec_io_mgmt_cmd

struct xnvme_spec_io_mgmt_cmd

NVMe Command Accessors for I/O management.

Public Members

union xnvme_spec_io_mgmt_cmd.[anonymous] [anonymous]

xnvme_spec_io_mgmt_recv_cmd

struct xnvme_spec_io_mgmt_recv_cmd

NVMe Command Accessor for io management receive command.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t mo

Management Operation.

uint32_t rsvd
uint32_t mos

Management Operation Specific.

uint32_t numd

cdw11

uint32_t cdw12_15[4]

Command dword 12 to 15.

xnvme_spec_io_mgmt_send_cmd

struct xnvme_spec_io_mgmt_send_cmd

NVMe Command Accessor for I/O management send.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint32_t mo

Management Operation.

uint32_t rsvd
uint32_t mos

Management Operation Specific.

uint32_t cdw11_15[5]

Command dword 11 to 15.

xnvme_spec_kvs_cmd

struct xnvme_spec_kvs_cmd

NVMe Command Accessors for the KV Command Set.

See also

Key Value Command Set Specification Revision 1.0c, Section 3

Public Members

uint32_t cdw0
uint32_t nsid
uint64_t key

KV key bits 0:63.

uint64_t mptr

Reserverd for MPTR.

uint32_t cdw06

< DPTR &#8212; data pointer

uint32_t cdw07
uint32_t cdw08
uint32_t cdw09
uint32_t cdw10

Host Buffer Size or Value Size.

struct xnvme_spec_kvs_cmd.[anonymous] cdw11
uint32_t cdw12
uint32_t cdw13
uint64_t key_hi

KV key bits 64:127.

xnvme_spec_kvs_idfy

struct xnvme_spec_kvs_idfy

Public Members

union xnvme_spec_kvs_idfy.[anonymous] [anonymous]

xnvme_spec_kvs_idfy_ns

struct xnvme_spec_kvs_idfy_ns

Key Value Command Set identify namespace data structure.

See also

Key Value Command Set Specification Revision 1.0c, Figure 39

Public Members

uint64_t nsze

Namespace Size.

uint8_t rsvd8[8]
uint64_t nuse

Namespace Utilization.

uint8_t nsfeat

Namespace Features.

uint8_t nkvf

Number of KV Formats.

uint8_t nmic

Namespace Multi-path I/O and Namespace Sharing Capabilities.

uint8_t rescap

Reservation Capabilities.

uint8_t fpi

Format Progress Indicator.

uint8_t rsvd29[3]
uint32_t novg

Namespace Optimal Value Granularity.

uint32_t anagrpid

ANA Group Identifier.

uint8_t rsvd40[3]
uint8_t nsattr

Namespace Attributes.

uint16_t nvmsetid

NVM Set Identifier.

uint16_t endgid

Endurance Group Identifier.

uint64_t nguid[2]

Namespace Globally Unique Identifier.

uint64_t eui64

IEEE Extended Unique Identifier.

struct xnvme_spec_kvs_idfy_ns_format kvf[16]

KV Format 0 to 15.

uint8_t rsvd328[3512]
uint8_t vs[256]

xnvme_spec_kvs_idfy_ns_format

struct xnvme_spec_kvs_idfy_ns_format

Key Value Command Set KV Format data structure.

See also

Key Value Command Set Specification Revision 1.0c, Figure 40

Public Members

uint16_t kml

KV Key Max Length.

uint8_t rsvd2
uint8_t fopt

Additional format options.

uint32_t vml

KV Value Max Length.

uint32_t mnk

Max Num Keys.

uint8_t rsvd12[4]

xnvme_spec_lbaf

struct xnvme_spec_lbaf

Public Members

uint16_t ms

metadata size

uint8_t ds

lba data size

uint8_t rp

relative performance

uint8_t rsvd

xnvme_spec_log_erri_entry

struct xnvme_spec_log_erri_entry

NVMe get-log-page entry for error information.

NVMe 1.4 - Figure ?

Public Members

uint64_t ecnt
uint16_t sqid
uint16_t cid
struct xnvme_spec_status status
uint16_t eloc
uint64_t lba
uint32_t nsid
uint8_t ven_si
uint8_t trtype
uint8_t reserved30[2]
uint64_t cmd_si
uint16_t trtype_si
uint8_t reserved42[22]

xnvme_spec_log_fdp_conf

struct xnvme_spec_log_fdp_conf

NVMe FDP configurations log page.

Public Members

uint16_t ncfg

Number of FDP configurations.

uint8_t version
uint8_t rsvd1
uint32_t size
uint8_t rsvd2[8]
struct xnvme_spec_fdp_conf_desc conf_desc[]

xnvme_spec_log_fdp_events

struct xnvme_spec_log_fdp_events

NVMe FDP events log page.

Public Members

uint32_t nevents

Number of FDP events.

uint8_t rsvd[60]
struct xnvme_spec_fdp_event event[]

xnvme_spec_log_fdp_stats

struct xnvme_spec_log_fdp_stats

NVMe FDP statistics log page.

Public Members

uint64_t hbmw[2]

Host bytes with metadata written.

uint64_t mbmw[2]

Media bytes with metadata written.

uint64_t mbe[2]

Media bytes erased.

uint8_t rsvd48[16]

xnvme_spec_log_health_entry

struct xnvme_spec_log_health_entry

NVMe get-log-page entry for error information.

NVMe 1.4: Figure 194

NOTE: using attribute((packed))__ as GCC does not like “uint16_t ct” for some reason. Without the packing it becomes 2 bytes larger

xnvme_spec_log_ruhu

struct xnvme_spec_log_ruhu

NVMe Reclaim unit handle usage log page.

Public Members

uint16_t nruh

Number of Reclaim Unit Handles.

uint8_t rsvd[6]
struct xnvme_spec_ruhu_desc ruhu_desc[]

xnvme_spec_nvm_cmd

struct xnvme_spec_nvm_cmd

NVMe Command Accessors for the NVM Command Set.

Public Members

union xnvme_spec_nvm_cmd.[anonymous] [anonymous]

xnvme_spec_nvm_cmd_scopy

struct xnvme_spec_nvm_cmd_scopy

NVMe Command Accessor for command with opcode XNVME_SPEC_NVM_CMD_OPC_SCOPY.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint64_t sdlba

Start Destination LBA.

uint32_t nr

Number of Ranges.

uint32_t df

Descriptor Format.

uint32_t prinfor

Protection Info. Field Read.

uint32_t rsvd1
uint32_t dtype

Directive Type.

uint32_t rsvd2
uint32_t prinfow

Protection Info. Field Write.

uint32_t fua

Force Unit Access.

uint32_t lr

Limited Retry.

uint32_t rsvd3
uint32_t dspec

Directive Specific.

uint32_t ilbrt

Initial Logical Block Ref. Tag.

uint32_t lbat

Logical Block App. Tag.

uint32_t lbatm

Logical Block App. Tag Mask.

xnvme_spec_nvm_cmd_scopy_fmt_srclen

struct xnvme_spec_nvm_cmd_scopy_fmt_srclen

Kernel format structure for scopy.

Note

Intruder alert!T his is not defined in the NVMe specification. Yet, it is provided here as though it was. It is intensionally done so to provide a format within the framework provided by NVMe.

Public Members

uint64_t start
uint64_t len

xnvme_spec_nvm_idfy

struct xnvme_spec_nvm_idfy

Public Members

union xnvme_spec_nvm_idfy.[anonymous] [anonymous]

xnvme_spec_nvm_idfy_ctrlr

struct xnvme_spec_nvm_idfy_ctrlr

Public Members

uint8_t byte0_519[520]
union xnvme_spec_nvm_idfy_ctrlr.[anonymous] oncs

optional nvm command support

uint8_t byte522_533[12]
union xnvme_spec_nvm_idfy_ctrlr.[anonymous] ocfs

Optional Copy Format Supported.

uint8_t byte536_4095[3559]

xnvme_spec_nvm_idfy_ns

struct xnvme_spec_nvm_idfy_ns

Todo:

Document this

Public Members

uint8_t byte0_73[74]
uint16_t mssrl

Maximum Single Source Range Length.

uint32_t mcl

Maximum Copy Length.

uint8_t msrc

Maximum Source Range Count.

uint8_t byte81_4095[4014]

xnvme_spec_nvm_idfy_ns_iocs

struct xnvme_spec_nvm_idfy_ns_iocs

Representation of NVMe completion result for NVM command set I/O command set specific Identify Namespace.

That is, for opcode XNVME_SPEC_OPC_IDFY(0x06) with XNVME_SPEC_IDFY_NS_IOCS(0x05)

Public Members

uint64_t lbstm

Logical block storage tag mask.

union xnvme_spec_nvm_idfy_ns_iocs.[anonymous] pic

Protection information capabilities.

uint8_t reserved9[3]
struct xnvme_spec_elbaf elbaf[64]
uint8_t reserved268[3828]

xnvme_spec_nvm_scopy_fmt_zero

struct xnvme_spec_nvm_scopy_fmt_zero

Public Members

uint8_t rsvd0[8]
uint64_t slba

Start LBA.

uint32_t nlb

Number of logical blocks, zero-based.

uint32_t rsvd20
uint32_t eilbrt

Expected Initial Logical Block Ref. Tag.

uint32_t elbatm

Expected Logical Block App. Tag Mask.

uint32_t elbat

Expected Logical Block App. Tag.

xnvme_spec_nvm_scopy_source_range

struct xnvme_spec_nvm_scopy_source_range

See also

Specification Section 6.TBD.1

Public Members

struct xnvme_spec_nvm_scopy_fmt_zero entry[XNVME_SPEC_NVM_SCOPY_NENTRY_MAX]

xnvme_spec_nvm_write_zeroes

struct xnvme_spec_nvm_write_zeroes

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint64_t slba

Start LBA.

uint32_t nlb

Number of logical blocks, zero-based.

uint32_t rsvd1
uint32_t deac

Dealocate.

uint32_t prinfo

Protection Info.

uint32_t fua

Force Unit Access.

uint32_t lr

Limited Retry.

uint32_t cdw_13

Command dword 13.

uint32_t ilbrt

Initial Logical Block Reference Tag.

uint32_t lbat

Logical Block Application Tag.

uint32_t lbatm

logical Block Application Tag Mask

xnvme_spec_power_state

struct xnvme_spec_power_state

Public Members

uint16_t mp
uint8_t reserved1
uint8_t mps
uint8_t nops
uint8_t reserved2
uint32_t enlat
uint32_t exlat
uint8_t rrt
uint8_t reserved3
uint8_t rrl
uint8_t reserved4
uint8_t rwt
uint8_t reserved5
uint8_t rwl
uint8_t reserved6
uint16_t idlp
uint8_t reserved7
uint8_t ips
uint8_t reserved8
uint16_t actp
uint8_t apw
uint8_t reserved9
uint8_t aps
uint8_t reserved10[9]

xnvme_spec_ruh_desc

struct xnvme_spec_ruh_desc

NVMe Reclaim unit handle descriptor.

Public Members

uint8_t ruht

Reclaim unit handle type.

uint8_t rsvd[3]

xnvme_spec_ruhs

struct xnvme_spec_ruhs

NVMe Reclaim Unit Handle Status.

Public Members

uint8_t rsvd[14]
uint16_t nruhsd

Number of Reclaim Unit Handle Status Descriptors.

struct xnvme_spec_ruhs_desc desc[]

xnvme_spec_ruhs_desc

struct xnvme_spec_ruhs_desc

NVMe Reclaim unit handle status descriptor.

Public Members

uint16_t pi

Placement Identifier.

uint16_t ruhi

Reclaim Unit Handle Identifier.

uint32_t earutr

Estimated Active Reclaim Unit Time Remaining.

uint64_t ruamw

Reclaim Unit Available Media Writes.

uint8_t rsvd[16]

xnvme_spec_ruhu_desc

struct xnvme_spec_ruhu_desc

NVMe Reclaim unit handle usage descriptor.

Public Members

uint8_t ruha

Reclaim unit handle attributes.

uint8_t rsvd[7]

xnvme_spec_sgl_descriptor

struct xnvme_spec_sgl_descriptor

SGL descriptor.

Public Members

uint64_t addr

common field

union xnvme_spec_sgl_descriptor.[anonymous] [anonymous]

xnvme_spec_status

struct xnvme_spec_status

NVMe Command Completion Status field.

Public Members

union xnvme_spec_status.[anonymous] [anonymous]

xnvme_spec_streams_dir_gs

struct xnvme_spec_streams_dir_gs

This structure holds the get status data structure for streams directive.

Public Members

uint16_t open_sc

Open stream count.

uint16_t sid[]

Stream identifier.

xnvme_spec_streams_dir_rp

struct xnvme_spec_streams_dir_rp

This structure holds the return parameters data structure for streams directive.

Public Members

uint16_t msl

Max streams limit.

uint16_t nssa

NVM subsystem streams available.

uint16_t nsso

NVM subsystems streams open.

union xnvme_spec_streams_dir_rp.[anonymous] nssc
uint8_t reserved1[9]
uint32_t sws

Stream write size.

uint16_t sgs

Stream granularity size.

uint16_t nsa

Namespace streams allocated.

uint16_t nso

Namespace streams open.

uint8_t reserved2[6]

xnvme_spec_znd_cmd

struct xnvme_spec_znd_cmd

NVMe Command Accessors for the Zoned Command Set.

Public Members

union xnvme_spec_znd_cmd.[anonymous] [anonymous]

xnvme_spec_znd_cmd_append

struct xnvme_spec_znd_cmd_append

NVMe Command Accessor for a command with opcode ZND_CMD_OPC_APPEND.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint64_t zslba

SLBA: Start Logical Block Address.

uint32_t nlb

NLB: Number of logical blocks.

uint32_t rsvd
uint32_t dtype

DT: Directive Type.

uint32_t prinfo

PI: Protection Information Field.

uint32_t rsvd2
uint32_t fua

FUA: Force unit access.

uint32_t lr

LR: Limited retry.

uint32_t cdw13_15[3]

Command dword 13 to 15.

xnvme_spec_znd_cmd_mgmt_recv

struct xnvme_spec_znd_cmd_mgmt_recv

NVMe Command Accessor for a command with opcode XNVME_SPEC_ZND_OPC_MGMT_RECV.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint64_t slba

Start LBA.

uint32_t ndwords

Number of dwords in data-payload.

uint32_t zra

Zone Receive Action.

uint32_t zrasf

Zone Receive Action Specific Field.

uint32_t partial

Partial.

uint32_t rsvd
uint64_t addrs_dst

destination addresses

xnvme_spec_znd_cmd_mgmt_send

struct xnvme_spec_znd_cmd_mgmt_send

NVMe Command Accessor for command with opcode ZND_CMD_OPC_MGMT_SEND.

Public Members

uint32_t cdw00_09[10]

Command dword 0 to 9.

uint64_t slba

Start LBA.

uint32_t nrange

Number of ranges <= 32.

uint32_t zsa

Zone Send Action.

uint32_t select_all

Select All, that is, ignore the slba, affects all LBAs.

uint32_t zsaso

Zone Send Action Specific Option.

uint32_t rsvd
uint32_t cdw14_15[2]

Command dword 14 to 15.

xnvme_spec_znd_descr

struct xnvme_spec_znd_descr

Zone Descriptor as reported by Zone Management Receive command.

See also

Specification Section 6.2.2.3, figure TBDZMRZD

Public Members

uint8_t zt

Zone Type.

uint8_t rsvd0
uint8_t rsvd1
uint8_t zs

Zone State.

union xnvme_spec_znd_descr.[anonymous] za

Zone Attributes.

uint8_t rsvd7[5]
uint64_t zcap

Zone Capacity (in number of LBAs)

uint64_t zslba

Zone Start LBA.

uint64_t wp

Write Pointer.

uint8_t rsvd63[32]

xnvme_spec_znd_idfy

struct xnvme_spec_znd_idfy

Representation of the NVMe Identify Namespace command completion result.

Todo:

merge this into the libxnvme_spec.h providing a one-stop shop for idfy-representation

Public Members

union xnvme_spec_znd_idfy.[anonymous] [anonymous]

xnvme_spec_znd_idfy_ctrlr

struct xnvme_spec_znd_idfy_ctrlr

Identify controller accessor only for Zoned specific fields.

See also

Specification, section 3.1.2

Public Members

uint8_t zasl

Zone Append Size Limit.

uint8_t rsvd8[4095]

xnvme_spec_znd_idfy_lbafe

struct xnvme_spec_znd_idfy_lbafe

LBA Format Extension.

See also

Specification Section 5.1.2, figure LBAFE

Public Members

uint64_t zsze

Zone Size in number of logical blocks.

uint8_t zdes

Zone Descriptor Extensions Size.

uint8_t rsvd[7]

xnvme_spec_znd_idfy_ns

struct xnvme_spec_znd_idfy_ns

Zoned Command Set specific identify namespace data structure.

See also

TP4053, section 3

Public Members

union xnvme_spec_znd_idfy_ns.[anonymous] zoc

Zone Operation Characteristics.

union xnvme_spec_znd_idfy_ns.[anonymous] ozcs
uint32_t mar

Maximum Active Resources.

uint32_t mor

Maximum Open Resources.

uint32_t rrl

Reset Recommended Limit.

uint32_t frl

Finish Recommended Limit.

uint8_t rsvd12[24]
uint32_t numzrwa

Number of ZRWA resources available to the namespace.

uint16_t zrwafg

ZRWA Flush Granularity; in unit of LBAs.

uint16_t zrwas

ZRWA Size; in unit of LBAs.

union xnvme_spec_znd_idfy_ns.[anonymous] zrwacap
uint8_t rsvd53[2763]
struct xnvme_spec_znd_idfy_lbafe lbafe[16]
uint8_t rsvd3072[768]
uint8_t vs[256]

Vendor Specific.

xnvme_spec_znd_log_changes

struct xnvme_spec_znd_log_changes

Zone Identifier List as returned by get-log-page.

See also

Specification Section 5.3.1.1, figure TBDZONELIST

Public Members

uint16_t nidents

Number of Zone Identifiers.

uint8_t rsvd2[6]
uint64_t idents[ZND_CHANGES_LEN]

Zone Identifiers.

xnvme_spec_znd_report_hdr

struct xnvme_spec_znd_report_hdr

Report Zones Data Structure header.

The first 16 bytes of the two Report Zoned data structures

See also

Specification Section 6.2.2.1, figure TBDZMRRZ

See also

Specification Section 6.2.2.2, figure TBDZMRERZ

Public Members

uint64_t nzones

Number of zones in namespace when receiving with partial=0 Number of zones in the data-buffer, when receiving with partial=1.

uint8_t rsvd[56]

Functions

xnvme_spec_adm_opc_str

const char *xnvme_spec_adm_opc_str(enum xnvme_spec_adm_opc eval)

SPDX-FileCopyrightText: Samsung Electronics Co., Ltd.

SPDX-License-Identifier: BSD-3-Clause Produces a string representation of the given xnvme_spec_adm_opc

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_cmd_fpr

int xnvme_spec_cmd_fpr(FILE *stream, struct xnvme_spec_cmd *cmd, int opts)

Prints the given :;xnvme_spec_cmd to the given output stream.

Parameters:
  • stream – output stream used for printing

  • cmd – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_cmd_pr

int xnvme_spec_cmd_pr(struct xnvme_spec_cmd *cmd, int opts)

Prints the given :;xnvme_spec_cmd to stdout.

Parameters:
  • cmd – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_csi_str

const char *xnvme_spec_csi_str(enum xnvme_spec_csi eval)

Produces a string representation of the given xnvme_spec_csi.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_ctrlr_bar_fpr

int xnvme_spec_ctrlr_bar_fpr(FILE *stream, struct xnvme_spec_ctrlr_bar *bar, int opts)

xnvme_spec_ctrlr_bar_pp

int xnvme_spec_ctrlr_bar_pp(struct xnvme_spec_ctrlr_bar *bar, int opts)

xnvme_spec_drecv_idfy_pr

int xnvme_spec_drecv_idfy_pr(struct xnvme_spec_idfy_dir_rp *idfy, int opts)

Prints the given :;xnvme_spec_idfy_dir_rp to stdout.

Parameters:
  • idfy – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_drecv_sar_pr

int xnvme_spec_drecv_sar_pr(struct xnvme_spec_alloc_resource sar, int opts)

Prints the given :;xnvme_spec_alloc_resource to stdout.

Parameters:
  • sar – structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_drecv_sgs_pr

int xnvme_spec_drecv_sgs_pr(struct xnvme_spec_streams_dir_gs *sgs, int opts)

Prints the given :;xnvme_spec_streams_dir_gs to stdout.

Parameters:
  • sgs – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_drecv_srp_pr

int xnvme_spec_drecv_srp_pr(struct xnvme_spec_streams_dir_rp *srp, int opts)

Prints the given :;xnvme_spec_streams_dir_rp to stdout.

Parameters:
  • srp – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_feat_fdp_events_pr

int xnvme_spec_feat_fdp_events_pr(void *buf, struct xnvme_spec_feat feat, int opts)

Prints the :;xnvme_spec_fdp_event_desc to the given output stream.

Parameters:
Returns:

On success, the number of characters printed is returned.

xnvme_spec_feat_fpr

int xnvme_spec_feat_fpr(FILE *stream, uint8_t fid, struct xnvme_spec_feat feat, int opts)

Prints the given :;xnvme_spec_feat to the given output stream.

Parameters:
  • stream – output stream used for printing

  • fid – feature identifier

  • feat – feature values

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_feat_id_str

const char *xnvme_spec_feat_id_str(enum xnvme_spec_feat_id eval)

Produces a string representation of the given xnvme_spec_feat_id.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_feat_pr

int xnvme_spec_feat_pr(uint8_t fid, struct xnvme_spec_feat feat, int opts)

Prints the given :;xnvme_spec_feat to the given output stream.

Parameters:
  • fid – feature identifier

  • feat – feature values

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_feat_sel_str

const char *xnvme_spec_feat_sel_str(enum xnvme_spec_feat_sel eval)

Produces a string representation of the given xnvme_spec_feat_sel.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_flag_str

const char *xnvme_spec_flag_str(enum xnvme_spec_flag eval)

Produces a string representation of the given xnvme_spec_flag.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_idfy_cns_str

const char *xnvme_spec_idfy_cns_str(enum xnvme_spec_idfy_cns eval)

Produces a string representation of the given xnvme_spec_idfy_cns.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_idfy_cs_fpr

int xnvme_spec_idfy_cs_fpr(FILE *stream, const struct xnvme_spec_idfy_cs *idfy, int opts)

xnvme_spec_idfy_cs_pr

int xnvme_spec_idfy_cs_pr(const struct xnvme_spec_idfy_cs *idfy, int opts)

xnvme_spec_idfy_ctrl_fpr

int xnvme_spec_idfy_ctrl_fpr(FILE *stream, const struct xnvme_spec_idfy_ctrlr *idfy, int opts)

Prints the given :;xnvme_spec_idfy_ctrlr to the given output stream.

Parameters:
  • stream – output stream used for printing

  • idfy – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_idfy_ctrl_pr

int xnvme_spec_idfy_ctrl_pr(const struct xnvme_spec_idfy_ctrlr *idfy, int opts)

Prints the given :;xnvme_spec_idfy_ctrlr to stdout.

Parameters:
  • idfy – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_idfy_ctrlr_fpr

int xnvme_spec_idfy_ctrlr_fpr(FILE *stream, struct xnvme_spec_nvm_idfy_ctrlr *idfy, int opts)

Prints the given xnvme_spec_nvm_idfy_ctrlr to the given output stream.

Only fields specific to Logical Block Namespaces are printed by this function

Parameters:
  • stream – output stream used for printing

  • idfy – pointer to the structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_idfy_ns_fpr

int xnvme_spec_idfy_ns_fpr(FILE *stream, const struct xnvme_spec_idfy_ns *idfy, int opts)

Prints the given :;xnvme_spec_idfy_ns to the given output stream.

Parameters:
  • stream – output stream used for printing

  • idfy – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_idfy_ns_pr

int xnvme_spec_idfy_ns_pr(const struct xnvme_spec_idfy_ns *idfy, int opts)

Prints the given :;xnvme_spec_idfy_ns to stdout.

Parameters:
  • idfy – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_kvs_idfy_ns_fpr

int xnvme_spec_kvs_idfy_ns_fpr(FILE *stream, const struct xnvme_spec_kvs_idfy_ns *idfy, int opts)

Prints the given xnvme_spec_kvs_idfy to the given output stream.

Parameters:
  • stream – output stream used for printing

  • idfy – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_kvs_idfy_ns_pr

int xnvme_spec_kvs_idfy_ns_pr(const struct xnvme_spec_kvs_idfy_ns *idfy, int opts)

Prints the given :;xnvme_spec_kvs_idfy to stdout.

Parameters:
  • idfy – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_erri_fpr

int xnvme_spec_log_erri_fpr(FILE *stream, const struct xnvme_spec_log_erri_entry *log, int limit, int opts)

Prints the given :;xnvme_spec_log_erri_entry to stdout.

Parameters:
  • stream – output stream used for printing

  • log

  • limit

  • opts

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_erri_pr

int xnvme_spec_log_erri_pr(const struct xnvme_spec_log_erri_entry *log, int limit, int opts)

Prints the given :;xnvme_spec_log_erri_entry to stdout.

Parameters:
  • log

  • limit

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_fdp_conf_pr

int xnvme_spec_log_fdp_conf_pr(const struct xnvme_spec_log_fdp_conf *log, int opts)

Prints the given :;xnvme_spec_log_fdp_conf to stdout.

Parameters:
  • log

  • opts

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_fdp_events_pr

int xnvme_spec_log_fdp_events_pr(const struct xnvme_spec_log_fdp_events *log, int limit, int opts)

Prints the given :;xnvme_spec_log_fdp_events_entry to stdout.

Parameters:
  • log

  • limit

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_fdp_stats_pr

int xnvme_spec_log_fdp_stats_pr(const struct xnvme_spec_log_fdp_stats *log, int opts)

Prints the given :;xnvme_spec_log_fdp_stats to stdout.

Parameters:
  • log

  • opts

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_health_fpr

int xnvme_spec_log_health_fpr(FILE *stream, const struct xnvme_spec_log_health_entry *log, int opts)

Prints the given :;xnvme_spec_log_health_entry to the given output stream.

Parameters:
  • stream – output stream used for printing

  • log – pointer to the structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_health_pr

int xnvme_spec_log_health_pr(const struct xnvme_spec_log_health_entry *log, int opts)

Prints the given :;xnvme_spec_log_health_entry to stdout.

Parameters:
  • log

  • opts

Returns:

On success, the number of characters printed is returned.

xnvme_spec_log_lpi_str

const char *xnvme_spec_log_lpi_str(enum xnvme_spec_log_lpi eval)

Produces a string representation of the given xnvme_spec_log_lpi.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_log_ruhu_pr

int xnvme_spec_log_ruhu_pr(const struct xnvme_spec_log_ruhu *log, int limit, int opts)

Prints the given :;xnvme_spec_log_ruhu to stdout.

Parameters:
  • log

  • limit

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_nvm_cmd_cpl_sc_str

const char *xnvme_spec_nvm_cmd_cpl_sc_str(enum xnvme_spec_nvm_cmd_cpl_sc eval)

Produces a string representation of the given xnvme_spec_nvm_cmd_cpl_sc.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_nvm_idfy_ctrlr_pr

int xnvme_spec_nvm_idfy_ctrlr_pr(struct xnvme_spec_nvm_idfy_ctrlr *idfy, int opts)

Prints the given xnvme_spec_nvm_idfy_ctrlr to stdout.

Parameters:
Returns:

On success, the number of characters printed is returned

xnvme_spec_nvm_idfy_ns_fpr

int xnvme_spec_nvm_idfy_ns_fpr(FILE *stream, struct xnvme_spec_nvm_idfy_ns *idfy, int opts)

Prints the given xnvme_spec_nvm_idfy_ns to the given output stream.

Only fields specific to Logical Block Namespaces are printed by this function

Parameters:
  • stream – output stream used for printing

  • idfy – pointer to the structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_nvm_idfy_ns_pr

int xnvme_spec_nvm_idfy_ns_pr(struct xnvme_spec_nvm_idfy_ns *idfy, int opts)

Prints the given xnvme_spec_nvm_idfy_ns to stdout.

Parameters:
Returns:

On success, the number of characters printed is returned

xnvme_spec_nvm_opc_str

const char *xnvme_spec_nvm_opc_str(enum xnvme_spec_nvm_opc eval)

Produces a string representation of the given xnvme_spec_nvm_opc.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_nvm_scopy_fmt_zero_fpr

int xnvme_spec_nvm_scopy_fmt_zero_fpr(FILE *stream, const struct xnvme_spec_nvm_scopy_fmt_zero *entry, int opts)

xnvme_spec_nvm_scopy_fmt_zero_pr

int xnvme_spec_nvm_scopy_fmt_zero_pr(const struct xnvme_spec_nvm_scopy_fmt_zero *entry, int opts)

Prints the given xnvme_spec_nvm_scopy_fmt_zero to stdout.

Parameters:
  • entry – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_nvm_scopy_source_range_fpr

int xnvme_spec_nvm_scopy_source_range_fpr(FILE *stream, const struct xnvme_spec_nvm_scopy_source_range *srange, uint8_t nr, int opts)

Prints the given xnvme_spec_nvm_scopy_source_range to the given output stream.

Parameters:
  • stream – output stream used for printing

  • srange – pointer to structure to print

  • nr – zero-based number of entries, at most XNVME_SPEC_NVM_SCOPY_NENTRY_MAX -1

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_nvm_scopy_source_range_pr

int xnvme_spec_nvm_scopy_source_range_pr(const struct xnvme_spec_nvm_scopy_source_range *srange, uint8_t nr, int opts)

Prints the given xnvme_spec_nvm_scopy_source_range to stdout.

Parameters:
  • srange – pointer to structure to print

  • nr – nr=0: print XNVME_SPEC_NVM_SCOPY_NENTRY_MAX entries from the given , nr>0: print no more than nr

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_psdt_str

const char *xnvme_spec_psdt_str(enum xnvme_spec_psdt eval)

Produces a string representation of the given xnvme_spec_psdt.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_ruhs_pr

int xnvme_spec_ruhs_pr(const struct xnvme_spec_ruhs *ruhs, int limit, int opts)

Prints the given :;xnvme_spec_ruhs to stdout.

Parameters:
  • ruhs

  • limit

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_sgl_descriptor_subtype_str

const char *xnvme_spec_sgl_descriptor_subtype_str(enum xnvme_spec_sgl_descriptor_subtype eval)

Produces a string representation of the given xnvme_spec_sgl_descriptor_subtype.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_cmd_mgmt_recv_action_sf_str

const char *xnvme_spec_znd_cmd_mgmt_recv_action_sf_str(enum xnvme_spec_znd_cmd_mgmt_recv_action_sf eval)

Produces a string representation of the given xnvme_spec_znd_cmd_mgmt_recv_action_sf.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_cmd_mgmt_recv_action_str

const char *xnvme_spec_znd_cmd_mgmt_recv_action_str(enum xnvme_spec_znd_cmd_mgmt_recv_action eval)

Produces a string representation of the given xnvme_spec_znd_cmd_mgmt_recv_action.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_cmd_mgmt_send_action_str

const char *xnvme_spec_znd_cmd_mgmt_send_action_str(enum xnvme_spec_znd_cmd_mgmt_send_action eval)

Produces a string representation of the given xnvme_spec_znd_cmd_mgmt_send_action.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_descr_fpr

int xnvme_spec_znd_descr_fpr(FILE *stream, const struct xnvme_spec_znd_descr *descr, int opts)

Prints the given xnvme_spec_znd_descr to the given stream.

Parameters:
  • stream – output stream used for printing

  • descr – the struct to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_znd_descr_fpr_yaml

int xnvme_spec_znd_descr_fpr_yaml(FILE *stream, const struct xnvme_spec_znd_descr *descr, int indent, const char *sep)

xnvme_spec_znd_descr_pr

int xnvme_spec_znd_descr_pr(const struct xnvme_spec_znd_descr *descr, int opts)

Prints the given xnvme_spec_znd_descr to stdout.

Parameters:
  • descr – the structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_znd_idfy_ctrlr_fpr

int xnvme_spec_znd_idfy_ctrlr_fpr(FILE *stream, struct xnvme_spec_znd_idfy_ctrlr *zctrlr, int opts)

Prints the given xnvme_spec_znd_idfy_ctrlr to the given output stream.

Only fields specific to Zoned Namespaces are printed by this function

Parameters:
  • stream – output stream used for printing

  • zctrlr – pointer to the structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_znd_idfy_ctrlr_pr

int xnvme_spec_znd_idfy_ctrlr_pr(struct xnvme_spec_znd_idfy_ctrlr *zctrlr, int opts)

Prints the given xnvme_spec_znd_idfy_ctrlr to the given output stream.

Only fields specific to Zoned Namespaces are printed by this function

Parameters:
  • zctrlr – pointer to the structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_znd_idfy_lbafe_fpr

int xnvme_spec_znd_idfy_lbafe_fpr(FILE *stream, struct xnvme_spec_znd_idfy_lbafe *zonef, int opts)

Prints the given xnvme_spec_znd_idfy_lbafe to the given output stream.

Parameters:
  • stream – output stream used for printing

  • zonef – pointer to structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_znd_idfy_ns_fpr

int xnvme_spec_znd_idfy_ns_fpr(FILE *stream, struct xnvme_spec_znd_idfy_ns *zns, int opts)

Prints the given xnvme_spec_znd_idfy_ns to the given output stream.

Only fields specific to Zoned Namespaces are printed by this function

Parameters:
  • stream – output stream used for printing

  • zns – pointer to the structure to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned

xnvme_spec_znd_idfy_ns_pr

int xnvme_spec_znd_idfy_ns_pr(struct xnvme_spec_znd_idfy_ns *zns, int opts)

Prints the given xnvme_spec_znd_idfy_ns to stdout.

Parameters:
Returns:

On success, the number of characters printed is returned

xnvme_spec_znd_log_changes_fpr

int xnvme_spec_znd_log_changes_fpr(FILE *stream, const struct xnvme_spec_znd_log_changes *changes, int opts)

Prints the given xnvme_spec_znd_log_changes to the given output stream.

Parameters:
  • stream – output stream used for printing

  • changes – pointer to subject to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_znd_log_changes_pr

int xnvme_spec_znd_log_changes_pr(const struct xnvme_spec_znd_log_changes *changes, int opts)

Pretty-printer of xnvme_spec_znd_log_changes.

Parameters:
  • changes – pointer to subject to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_znd_log_lid_str

const char *xnvme_spec_znd_log_lid_str(enum xnvme_spec_znd_log_lid eval)

Produces a string representation of the given xnvme_spec_znd_log_lid.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_mgmt_send_action_so_str

const char *xnvme_spec_znd_mgmt_send_action_so_str(enum xnvme_spec_znd_mgmt_send_action_so eval)

Produces a string representation of the given xnvme_spec_znd_mgmt_send_action_so.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_opc_str

const char *xnvme_spec_znd_opc_str(enum xnvme_spec_znd_opc eval)

Produces a string representation of the given xnvme_spec_znd_opc.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_report_hdr_fpr

int xnvme_spec_znd_report_hdr_fpr(FILE *stream, const struct xnvme_spec_znd_report_hdr *hdr, int opts)

Print the given xnvme_spec_znd_report_hdr to the given output stream.

Parameters:
  • stream – output stream used for printing

  • hdr – the struct to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_znd_report_hdr_pr

int xnvme_spec_znd_report_hdr_pr(const struct xnvme_spec_znd_report_hdr *hdr, int opts)

Print the given xnvme_spec_znd_report_hdr to the stdout.

Parameters:
  • hdr – the struct to print

  • opts – printer options, see xnvme_pr

Returns:

On success, the number of characters printed is returned.

xnvme_spec_znd_state_str

const char *xnvme_spec_znd_state_str(enum xnvme_spec_znd_state eval)

Produces a string representation of the given xnvme_spec_znd_state.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_status_code_str

const char *xnvme_spec_znd_status_code_str(enum xnvme_spec_znd_status_code eval)

Produces a string representation of the given xnvme_spec_znd_status_code.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.

xnvme_spec_znd_type_str

const char *xnvme_spec_znd_type_str(enum xnvme_spec_znd_type eval)

Produces a string representation of the given xnvme_spec_znd_type.

Parameters:
  • eval – the enum value to produce a string representation of

Returns:

On success, a string representation is returned. On error, the string “ENOSYS” is returned.