xnvme_spec

Enums

xnvme_spec_adm_opc

enum xnvme_spec_adm_opc

NVMe Admin Command Opcodes.

See

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.

xnvme_spec_csi

enum xnvme_spec_csi

Command Set Identifiers.

See

Specification Section 5.15.2.1, figure X1

Values:

enumerator XNVME_SPEC_CSI_NVM

XNVME_SPEC_CSI_NVM.

enumerator XNVME_SPEC_CSI_ZONED

XNVME_SPEC_CSI_ZONED.

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.

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

Warning

doxygenenum: Cannot find enum “xnvme_spec_fs_opcs” in doxygen xml output for project “xNVMe” from directory: /home/safl/git/xnvme/docs/autogen/build/doxy/xml

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_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.

xnvme_spec_nvm_cmd_cpl_sc

enum xnvme_spec_nvm_cmd_cpl_sc

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

See

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_opc

enum xnvme_spec_nvm_opc

NVMe Non-Volatile Memory Command Opcodes.

See

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_WRITE_ZEROES

XNVME_SPEC_NVM_OPC_WRITE_ZEROES.

enumerator XNVME_SPEC_NVM_OPC_SCOPY

XNVME_SPEC_NVM_OPC_SCOPY.

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_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

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

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

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.

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_sf

enum xnvme_spec_znd_mgmt_send_action_sf

This is not defined in any spec…

it would just seem sane if it was…

Values:

enumerator XNVME_SPEC_ZND_MGMT_SEND_ASF_SALL

XNVME_SPEC_ZND_MGMT_SEND_ASF_SALL.

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

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

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_BOUNDARY_ERROR

Zoned Command Set.

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

Specification Section 6.2.2.3, figure TBDZMRD

Values:

enumerator XNVME_SPEC_ZND_TYPE_SEQWR

XNVME_SPEC_ZND_TYPE_SEQWR.

Structs

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

Specification section 4.3, figure 2

See

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 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_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 lbaf

The format to use.

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 zf

TBD: Zone Format.

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.

uint32_t fid

Feature Identifier.

uint32_t sel

Select.

uint32_t rsvd10
uint32_t cdw11_15[5]

Command dword 11 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 rsvd10
uint32_t rae

Retain Async. Event.

uint32_t numdl

Nr. of DWORDS lower-bits.

uint32_t numdu

Nr. of DWORDS upper-bits.

uint32_t rsvd11
uint32_t lpol

Log-page offset lower 32bits.

uint32_t lpou

Log-page offset upper 32bits.

uint32_t cdw14_15[2]

Command dword 14 to 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.

uint32_t cdw13_15[3]

Command dword 13 to 15.

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.

uint32_t fid

Feature Identifier.

uint32_t rsvd10
uint32_t save

Save.

struct xnvme_spec_feat feat

Feature.

uint32_t cdw12_15[4]

Command dword 12 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.

Copyright (C) Simon A. F. Lund simon.lund@samsung.com Copyright (C) Klaus B. A. Jensen k.jensen@samsung.com SPDX-License-Identifier: Apache-2.0 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 nlb

Length in logical blocks.

uint64_t slba

Starting LBA.

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

Warning

doxygenstruct: Cannot find class “xnvme_spec_fs_idfy_ctrlr” in doxygen xml output for project “xNVMe” from directory: /home/safl/git/xnvme/docs/autogen/build/doxy/xml

xnvme_spec_fs_idfy_ns

Warning

doxygenstruct: Cannot find class “xnvme_spec_fs_idfy_ns” in doxygen xml output for project “xNVMe” from directory: /home/safl/git/xnvme/docs/autogen/build/doxy/xml

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

uint8_t reserved_100[12]
uint8_t fguid[16]

FRU Globally Unique Ident.

uint8_t reserved_128[128]
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.

uint8_t reserved3[180]
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 reserved531
uint16_t acwu

atomic compare & write unit

uint16_t reserved534
union xnvme_spec_idfy_ctrlr.[anonymous] sgls

SGL support.

uint32_t mnan

Maximum Number of Allowed Namespaces.

uint8_t reserved4[224]
uint8_t subnqn[256]
uint8_t reserved5[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_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.

uint8_t reserved64[40]
uint8_t nguid[16]

namespace globally unique identifier

uint64_t eui64

IEEE extended unique identifier.

struct xnvme_spec_lbaf lbaf[16]
uint8_t rsvd3776[3648]

LBA format support.

uint8_t vendor_specific[256]

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_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_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_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

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
uint8_t reserved7[16]

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_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.

See

enum xnvme_spec_znd_cmd_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 cdw12
uint32_t zsa

Zone Send Action.

uint32_t select_all

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

uint32_t zsasf

Zone Send Action Specific Field.

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

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

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

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

TP4053, section 3

Public Members

struct xnvme_spec_znd_idfy_ns.[anonymous] zoc

Zone Operation Characteristics.

struct xnvme_spec_znd_idfy_ns.[anonymous] ozcs

Optional Zoned Command Support.

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 rsvd20_2815[2796]
struct xnvme_spec_znd_idfy_lbafe lbafe[16]
uint8_t rsvd3072_3839[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

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

Specification Section 6.2.2.1, figure TBDZMRRZ

See

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)

libxnvme_spec_pp.h - Autogenerated pretty-print helper functions

Copyright (C) Simon A. F. Lund simon.lund@samsung.com SPDX-License-Identifier: Apache-2.0 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_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_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_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_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_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_sf_str

const char *xnvme_spec_znd_mgmt_send_action_sf_str(enum xnvme_spec_znd_mgmt_send_action_sf eval)

Produces a string representation of the given xnvme_spec_znd_mgmt_send_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_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.