title: nvme_identify_ns(2)

summary: Retrieves nvme identify namespace

text:
# nvme_identify_ns(2)

## NAME
nvme_identify_ns - Retrieves nvme identify namespace

## SYNOPSIS
int nvme_identify_ns (int fd , __u32 nsid , struct nvme_id_ns *ns );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace to identify

ns

User space destination address to transfer the data

## DESCRIPTION
If the Namespace Identifier (NSID) field specifies an active NSID, then the Identify Namespace data structure is returned to the host for that specified namespace.

If the controller supports the Namespace Management capability and the NSID field is set to NVME_NSID_ALL, then the controller returns an Identify Namespace data structure that specifies capabilities that are common across namespaces for this controller.

See struct nvme_id_ns for details on the structure returned.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


package: libnvme-devel

title: nvme_identify_ns_csi(2)

text:
# nvme_identify_ns_csi(2)

## NAME
nvme_identify_ns_csi - I/O command set specific identify namespace data

## SYNOPSIS
int nvme_identify_ns_csi (int fd , __u32 nsid , __u8 uuidx , enum nvme_csi csi , void *data );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace to identify

uuidx

UUID Index for differentiating vendor specific encoding

csi

Command Set Identifier

data

User space destination address to transfer the data

## DESCRIPTION
An I/O Command Set specific Identify Namespace data structure is returned for the namespace specified in nsid.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Identify namespace user data format

text:
# nvme_identify_ns_csi_user_data_format(2)

## NAME
nvme_identify_ns_csi_user_data_format - Identify namespace user data format

## SYNOPSIS
int nvme_identify_ns_csi_user_data_format (int fd , __u16 user_data_format , __u8 uuidx , enum nvme_csi csi , void *data );

## ARGUMENTS
fd

File descriptor of nvme device

user_data_format

Return namespaces capability of identifier

uuidx

UUID selection, if supported

csi

Command Set Identifier

data

User space destination address to transfer the data

## DESCRIPTION
Identify Namespace data structure for the specified User Data Format index containing the namespace capabilities for the NVM Command Set.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_identify_ns_descs(2)

summary: Retrieves namespace descriptor list

text:
# nvme_identify_ns_descs(2)

## NAME
nvme_identify_ns_descs - Retrieves namespace descriptor list

## SYNOPSIS
int nvme_identify_ns_descs (int fd , __u32 nsid , struct nvme_ns_id_desc *descs );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

The namespace id to retrieve descriptors

descs

User space destination address to transfer the data

## DESCRIPTION
A list of Namespace Identification Descriptor structures is returned to the host for the namespace specified in the Namespace Identifier (NSID) field if it is an active NSID.

The data returned is in the form of an array of 'struct nvme_ns_id_desc'.

See struct nvme_ns_id_desc for the definition of the returned structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_identify_ns_granularity(2)

text:
# nvme_identify_ns_granularity(2)

## NAME
nvme_identify_ns_granularity - Retrieves namespace granularity identification

## SYNOPSIS
int nvme_identify_ns_granularity (int fd , struct nvme_id_ns_granularity_list *gr_list );

## ARGUMENTS
fd

File descriptor of nvme device

gr_list

User space destination address to transfer the data

## DESCRIPTION
If the controller supports reporting of Namespace Granularity, then a Namespace Granularity List is returned to the host for up to sixteen namespace granularity descriptors

See struct nvme_id_ns_granularity_list for the definition of the returned structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_identify_nsid_ctrl_list(2)

text:
# nvme_identify_nsid_ctrl_list(2)

## NAME
nvme_identify_nsid_ctrl_list - Retrieves controller list attached to an nsid

## SYNOPSIS
int nvme_identify_nsid_ctrl_list (int fd , __u32 nsid , __u16 cntid , struct nvme_ctrl_list *cntlist );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Return controllers that are attached to this nsid

cntid

Starting CNTLID to return in the list

cntlist

User space destination address to transfer the data

## DESCRIPTION
Up to 2047 controller identifiers are returned containing a controller identifier greater than or equal to the controller identifier specified in cntid attached to nsid.

See struct nvme_ctrl_list for a definition of the structure returned.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1


title: nvme_identify_nvmset_list(2)

summary: Retrieves NVM Set List

text:
# nvme_identify_nvmset_list(2)

## NAME
nvme_identify_nvmset_list - Retrieves NVM Set List

## SYNOPSIS
int nvme_identify_nvmset_list (int fd , __u16 nvmsetid , struct nvme_id_nvmset_list *nvmset );

## ARGUMENTS
fd

File descriptor of nvme device

nvmsetid

NVM Set Identifier

nvmset

User space destination address to transfer the data

## DESCRIPTION
Retrieves an NVM Set List, struct nvme_id_nvmset_list. The data structure is an ordered list by NVM Set Identifier, starting with the first NVM Set Identifier supported by the NVM subsystem that is equal to or greater than the NVM Set Identifier.

See struct nvme_id_nvmset_list for the definition of the returned structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_identify_primary_ctrl(2)

text:
# nvme_identify_primary_ctrl(2)

## NAME
nvme_identify_primary_ctrl - Retrieve NVMe Primary Controller identification

## SYNOPSIS
int nvme_identify_primary_ctrl (int fd , __u16 cntid , struct nvme_primary_ctrl_cap *cap );

## ARGUMENTS
fd

File descriptor of nvme device

cntid

Return controllers starting at this identifier

cap

User space destination buffer address to transfer the data

## DESCRIPTION
See struct nvme_primary_ctrl_cap for the definition of the returned structure, cap.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_identify_secondary_ctrl_list(2)

summary: Retrieves secondary controller list

text:
# nvme_identify_secondary_ctrl_list(2)

## NAME
nvme_identify_secondary_ctrl_list - Retrieves secondary controller list

## SYNOPSIS
int nvme_identify_secondary_ctrl_list (int fd , __u32 nsid , __u16 cntid , struct nvme_secondary_ctrl_list *sc_list );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace identifier

cntid

Return controllers starting at this identifier

sc_list

User space destination address to transfer the data

## DESCRIPTION
A Secondary Controller List is returned to the host for up to 127 secondary controllers associated with the primary controller processing this command. The list contains entries for controller identifiers greater than or equal to the value specified in the Controller Identifier (cntid).

See struct nvme_secondary_ctrls_list for a definition of the returned structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_identify_uuid(2)

summary: Retrieves device's UUIDs

text:
# nvme_identify_uuid(2)

## NAME
nvme_identify_uuid - Retrieves device's UUIDs

## SYNOPSIS
int nvme_identify_uuid (int fd , struct nvme_id_uuid_list *uuid_list );

## ARGUMENTS
fd

File descriptor of nvme device

uuid_list

User space destination address to transfer the data

## DESCRIPTION
Each UUID List entry is either 0h, the NVMe Invalid UUID, or a valid UUID. Valid UUIDs are those which are non-zero and are not the NVMe Invalid UUID.

See struct nvme_id_uuid_list for the definition of the returned structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_init_copy_range(2)

summary: Constructs a copy range structure

text:
# nvme_init_copy_range(2)

## NAME
nvme_init_copy_range - Constructs a copy range structure

## SYNOPSIS
void nvme_init_copy_range (struct nvme_copy_range *copy , __u16 *nlbs , __u64 *slbas , __u32 *eilbrts , __u32 *elbatms , __u32 *elbats , __u16 nr );

## ARGUMENTS
copy

Copy range array

nlbs

Number of logical blocks

slbas

Starting LBA

eilbrts

Expected initial logical block reference tag

elbatms

Expected logical block application tag mask

elbats

Expected logical block application tag

nr

Number of descriptors to construct


title: nvme_init_copy_range_f1(2)

summary: Constructs a copy range f1 structure

text:
# nvme_init_copy_range_f1(2)

## NAME
nvme_init_copy_range_f1 - Constructs a copy range f1 structure

## SYNOPSIS
void nvme_init_copy_range_f1 (struct nvme_copy_range_f1 *copy , __u16 *nlbs , __u64 *slbas , __u64 *eilbrts , __u32 *elbatms , __u32 *elbats , __u16 nr );

## ARGUMENTS
copy

Copy range array

nlbs

Number of logical blocks

slbas

Starting LBA

eilbrts

Expected initial logical block reference tag

elbatms

Expected logical block application tag mask

elbats

Expected logical block application tag

nr

Number of descriptors to construct


title: nvme_init_ctrl(2)

text:
# nvme_init_ctrl(2)

## NAME
nvme_init_ctrl - Initialize nvme_ctrl_t object for an existing controller.

## SYNOPSIS
int nvme_init_ctrl (nvme_host_t h , nvme_ctrl_t c , int instance );

## ARGUMENTS
h

nvme_host_t object

c

nvme_ctrl_t object

instance

Instance number (e.g. 1 for nvme1)

## RETURN
The ioctl return code. Typically 0 on success.


title: nvme_init_ctrl_list(2)

text:
# nvme_init_ctrl_list(2)

## NAME
nvme_init_ctrl_list - Initialize an nvme_ctrl_list structure from an array.

## SYNOPSIS
void nvme_init_ctrl_list (struct nvme_ctrl_list *cntlist , __u16 num_ctrls , __u16 *ctrlist );

## ARGUMENTS
cntlist

The controller list structure to initialize

num_ctrls

The number of controllers in the array, ctrlist.

ctrlist

An array of controller identifiers in CPU native endian.

## DESCRIPTION
This is intended to be used with any command that takes a controller list argument. See nvme_ns_attach_ctrls and nvme_ns_detach.


title: nvme_init_dsm_range(2)

summary: Constructs a data set range structure

text:
# nvme_init_dsm_range(2)

## NAME
nvme_init_dsm_range - Constructs a data set range structure

## SYNOPSIS
void nvme_init_dsm_range (struct nvme_dsm_range *dsm , __u32 *ctx_attrs , __u32 *llbas , __u64 *slbas , __u16 nr_ranges );

## ARGUMENTS
dsm

DSM range array

ctx_attrs

Array of context attributes

llbas

Array of length in logical blocks

slbas

Array of starting logical blocks

nr_ranges

The size of the dsm arrays

## DESCRIPTION
Each array must be the same size of size 'nr_ranges'. This is intended to be used with constructing a payload for nvme_dsm.

## RETURN
The nvme command status if a response was received or -errno otherwise.


title: nvme_init_logging(2)

summary: Initialize logging

text:
# nvme_init_logging(2)

## NAME
nvme_init_logging - Initialize logging

## SYNOPSIS
void nvme_init_logging (nvme_root_t r , int lvl , bool log_pid , bool log_tstamp );

## ARGUMENTS
r

nvme_root_t context

lvl

Logging level to set

log_pid

Boolean to enable logging of the PID

log_tstamp

Boolean to enable logging of the timestamp

## DESCRIPTION
Sets the default logging variables for the library.


title: nvme_insert_tls_key(2)

summary: Derive and insert TLS key

text:
# nvme_insert_tls_key(2)

## NAME
nvme_insert_tls_key - Derive and insert TLS key

## SYNOPSIS
long nvme_insert_tls_key (const char *keyring , const char *key_type , const char *hostnqn , const char *subsysnqn , int hmac , unsigned char *configured_key , int key_len );

## ARGUMENTS
keyring

Keyring to use

key_type

Type of the resulting key

hostnqn

Host NVMe Qualified Name

subsysnqn

Subsystem NVMe Qualified Name

hmac

HMAC algorithm

configured_key

Configured key data to derive the key from

key_len

Length of configured_key

## DESCRIPTION
Derives a 'retained' TLS key as specified in NVMe TCP 1.0a and stores it as type key_type in the keyring specified by keyring.

## RETURN
The key serial number if the key could be inserted into the keyring or 0 with errno otherwise.


title: nvme_io(2)

summary: Submit an nvme user I/O command

text:
# nvme_io(2)

## NAME
nvme_io - Submit an nvme user I/O command

## SYNOPSIS
int nvme_io (struct nvme_io_args *args , __u8 opcode );

## ARGUMENTS
args

struct nvme_io_args argument structure

opcode

Opcode to execute

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_io_control_flags(2)

summary: I/O control flags

text:
# nvme_io_control_flags(2)

## NAME
enum nvme_io_control_flags - I/O control flags

## SYNOPSIS
enum nvme_io_control_flags {

NVME_IO_DTYPE_STREAMS ,

NVME_IO_STC ,

NVME_IO_DEAC ,

NVME_IO_ZNS_APPEND_PIREMAP ,

NVME_IO_PRINFO_PRCHK_REF ,

NVME_IO_PRINFO_PRCHK_APP ,

NVME_IO_PRINFO_PRCHK_GUARD ,

NVME_IO_PRINFO_PRACT ,

NVME_IO_FUA ,

NVME_IO_LR

};

## Constants
NVME_IO_DTYPE_STREAMS

Directive Type Streams

NVME_IO_STC

Storage Tag Check

NVME_IO_DEAC

Deallocate

NVME_IO_ZNS_APPEND_PIREMAP

Protection Information Remap

NVME_IO_PRINFO_PRCHK_REF

Protection Information Check Reference Tag

NVME_IO_PRINFO_PRCHK_APP

Protection Information Check Application Tag

NVME_IO_PRINFO_PRCHK_GUARD

Protection Information Check Guard field

NVME_IO_PRINFO_PRACT

Protection Information Action

NVME_IO_FUA

Force Unit Access

NVME_IO_LR

Limited Retry


title: nvme_io_dsm_flags(2)

summary: Dataset Management flags

text:
# nvme_io_dsm_flags(2)

## NAME
enum nvme_io_dsm_flags - Dataset Management flags

## SYNOPSIS
enum nvme_io_dsm_flags {

NVME_IO_DSM_FREQ_UNSPEC ,

NVME_IO_DSM_FREQ_TYPICAL ,

NVME_IO_DSM_FREQ_RARE ,

NVME_IO_DSM_FREQ_READS ,

NVME_IO_DSM_FREQ_WRITES ,

NVME_IO_DSM_FREQ_RW ,

NVME_IO_DSM_FREQ_ONCE ,

NVME_IO_DSM_FREQ_PREFETCH ,

NVME_IO_DSM_FREQ_TEMP ,

NVME_IO_DSM_LATENCY_NONE ,

NVME_IO_DSM_LATENCY_IDLE ,

NVME_IO_DSM_LATENCY_NORM ,

NVME_IO_DSM_LATENCY_LOW ,

NVME_IO_DSM_SEQ_REQ ,

NVME_IO_DSM_COMPRESSED

};

## Constants
NVME_IO_DSM_FREQ_UNSPEC

No frequency information provided

NVME_IO_DSM_FREQ_TYPICAL

Typical number of reads and writes expected for this LBA range

NVME_IO_DSM_FREQ_RARE

Infrequent writes and infrequent reads to the LBA range indicated

NVME_IO_DSM_FREQ_READS

Infrequent writes and frequent reads to the LBA range indicated

NVME_IO_DSM_FREQ_WRITES

Frequent writes and infrequent reads to the LBA range indicated

NVME_IO_DSM_FREQ_RW

Frequent writes and frequent reads to the LBA range indicated

NVME_IO_DSM_FREQ_ONCE

NVME_IO_DSM_FREQ_PREFETCH

NVME_IO_DSM_FREQ_TEMP

NVME_IO_DSM_LATENCY_NONE

No latency information provided

NVME_IO_DSM_LATENCY_IDLE

Longer latency acceptable

NVME_IO_DSM_LATENCY_NORM

Typical latency

NVME_IO_DSM_LATENCY_LOW

Smallest possible latency

NVME_IO_DSM_SEQ_REQ

NVME_IO_DSM_COMPRESSED


title: nvme_io_mgmt_recv(2)

summary: I/O Management Receive command

text:
# nvme_io_mgmt_recv(2)

## NAME
nvme_io_mgmt_recv - I/O Management Receive command

## SYNOPSIS
int nvme_io_mgmt_recv (struct nvme_io_mgmt_recv_args *args );

## ARGUMENTS
args

struct nvme_io_mgmt_recv_args argument structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_io_mgmt_recv_mo(2)

text:
# nvme_io_mgmt_recv_mo(2)

## NAME
enum nvme_io_mgmt_recv_mo - I/O Management Receive - Management Operation

## SYNOPSIS
enum nvme_io_mgmt_recv_mo {

NVME_IO_MGMT_RECV_RUH_STATUS

};

## Constants
NVME_IO_MGMT_RECV_RUH_STATUS

Reclaim Unit Handle Status


title: nvme_io_mgmt_send(2)

summary: I/O Management Send command

text:
# nvme_io_mgmt_send(2)

## NAME
nvme_io_mgmt_send - I/O Management Send command

## SYNOPSIS
int nvme_io_mgmt_send (struct nvme_io_mgmt_send_args *args );

## ARGUMENTS
args

struct nvme_io_mgmt_send_args argument structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_io_mgmt_send_mo(2)

text:
# nvme_io_mgmt_send_mo(2)

## NAME
enum nvme_io_mgmt_send_mo - I/O Management Send - Management Operation

## SYNOPSIS
enum nvme_io_mgmt_send_mo {

NVME_IO_MGMT_SEND_RUH_UPDATE

};

## Constants
NVME_IO_MGMT_SEND_RUH_UPDATE

Reclaim Unit Handle Update


title: nvme_io_opcode(2)

summary: Opcodes for I/O Commands

text:
# nvme_io_opcode(2)

## NAME
enum nvme_io_opcode - Opcodes for I/O Commands

## SYNOPSIS
enum nvme_io_opcode {

nvme_cmd_flush ,

nvme_cmd_write ,

nvme_cmd_read ,

nvme_cmd_write_uncor ,

nvme_cmd_compare ,

nvme_cmd_write_zeroes ,

nvme_cmd_dsm ,

nvme_cmd_verify ,

nvme_cmd_resv_register ,

nvme_cmd_resv_report ,

nvme_cmd_resv_acquire ,

nvme_cmd_io_mgmt_recv ,

nvme_cmd_resv_release ,

nvme_cmd_copy ,

nvme_cmd_io_mgmt_send ,

nvme_zns_cmd_mgmt_send ,

nvme_zns_cmd_mgmt_recv ,

nvme_zns_cmd_append

};

## Constants
nvme_cmd_flush

Flush

nvme_cmd_write

Write

nvme_cmd_read

Read

nvme_cmd_write_uncor

Write Uncorrectable

nvme_cmd_compare

Compare

nvme_cmd_write_zeroes

write Zeros

nvme_cmd_dsm

Dataset Management

nvme_cmd_verify

Verify

nvme_cmd_resv_register

Reservation Register

nvme_cmd_resv_report

Reservation Report

nvme_cmd_resv_acquire

Reservation Acquire

nvme_cmd_io_mgmt_recv

I/O Management Receive

nvme_cmd_resv_release

Reservation Release

nvme_cmd_copy

Copy

nvme_cmd_io_mgmt_send

I/O Management Send

nvme_zns_cmd_mgmt_send

Zone Management Send

nvme_zns_cmd_mgmt_recv

Zone Management Receive

nvme_zns_cmd_append

Zone Append


title: nvme_io_passthru(2)

summary: Submit an nvme io passthrough command

text:
# nvme_io_passthru(2)

## NAME
nvme_io_passthru - Submit an nvme io passthrough command

## SYNOPSIS
int nvme_io_passthru (int fd , __u8 opcode , __u8 flags , __u16 rsvd , __u32 nsid , __u32 cdw2 , __u32 cdw3 , __u32 cdw10 , __u32 cdw11 , __u32 cdw12 , __u32 cdw13 , __u32 cdw14 , __u32 cdw15 , __u32 data_len , void *data , __u32 metadata_len , void *metadata , __u32 timeout_ms , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

opcode

The nvme io command to send

flags

NVMe command flags (not used)

rsvd

Reserved for future use

nsid

Namespace identifier

cdw2

Command dword 2

cdw3

Command dword 3

cdw10

Command dword 10

cdw11

Command dword 11

cdw12

Command dword 12

cdw13

Command dword 13

cdw14

Command dword 14

cdw15

Command dword 15

data_len

Length of the data transferred in this command in bytes

data

Pointer to user address of the data buffer

metadata_len

Length of metadata transferred in this command

metadata

Pointer to user address of the metadata buffer

timeout_ms

How long the kernel waits for the command to complete

result

Optional field to return the result from the CQE dword 0

## DESCRIPTION
Parameterized form of nvme_submit_io_passthru. This sets up and submits a struct nvme_passthru_cmd.

Known values for opcode are defined in enum nvme_io_opcode.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_io_passthru64(2)

summary: Submit an nvme io passthrough command

text:
# nvme_io_passthru64(2)

## NAME
nvme_io_passthru64 - Submit an nvme io passthrough command

## SYNOPSIS
int nvme_io_passthru64 (int fd , __u8 opcode , __u8 flags , __u16 rsvd , __u32 nsid , __u32 cdw2 , __u32 cdw3 , __u32 cdw10 , __u32 cdw11 , __u32 cdw12 , __u32 cdw13 , __u32 cdw14 , __u32 cdw15 , __u32 data_len , void *data , __u32 metadata_len , void *metadata , __u32 timeout_ms , __u64 *result );

## ARGUMENTS
fd

File descriptor of nvme device

opcode

The nvme io command to send

flags

NVMe command flags (not used)

rsvd

Reserved for future use

nsid

Namespace identifier

cdw2

Command dword 2

cdw3

Command dword 3

cdw10

Command dword 10

cdw11

Command dword 11

cdw12

Command dword 12

cdw13

Command dword 13

cdw14

Command dword 14

cdw15

Command dword 15

data_len

Length of the data transferred in this command in bytes

data

Pointer to user address of the data buffer

metadata_len

Length of metadata transferred in this command

metadata

Pointer to user address of the metadata buffer

timeout_ms

How long the kernel waits for the command to complete

result

Optional field to return the result from the CQE dword 0

## DESCRIPTION
Parameterized form of nvme_submit_io_passthru64. This sets up and submits a struct nvme_passthru_cmd64.

Known values for opcode are defined in enum nvme_io_opcode.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_is_64bit_reg(2)

text:
# nvme_is_64bit_reg(2)

## NAME
nvme_is_64bit_reg - Checks if offset of the controller register is a know 64bit value.

## SYNOPSIS
bool nvme_is_64bit_reg (__u32 offset );

## ARGUMENTS
offset

Offset of controller register field in bytes

## DESCRIPTION
This function does not care about transport so that the offset is not going to be checked inside of this function for the unsupported fields in a specific transport. For example, BPMBL(Boot Partition Memory Buffer Location) register is not supported by fabrics, but it can be checked here.

## RETURN
true if given offset is 64bit register, otherwise it returns false.


title: nvme_lba_range_type(2)

summary: LBA Range Type

text:
# nvme_lba_range_type(2)

## NAME
struct nvme_lba_range_type - LBA Range Type

## SYNOPSIS
struct nvme_lba_range_type {

struct nvme_lba_range_type_entry entry[NVME_FEAT_LBA_RANGE_MAX];

};

## Members
entry

LBA range type entry. See struct nvme_lba_range_type_entry


title: nvme_lba_range_type_entry(2)

summary: LBA Range Type - Data Structure Entry

text:
# nvme_lba_range_type_entry(2)

## NAME
struct nvme_lba_range_type_entry - LBA Range Type - Data Structure Entry

## SYNOPSIS
struct nvme_lba_range_type_entry {

__u8 type;

__u8 attributes;

__u8 rsvd2[14];

__le64 slba;

__le64 nlb;

__u8 guid[16];

__u8 rsvd48[16];

};

## Members
type

Specifies the Type of the LBA range

attributes

Specifies attributes of the LBA range

rsvd2

Reserved

slba

Starting LBA

nlb

Number of Logical Blocks

guid

Unique Identifier

rsvd48

Reserved


title: nvme_lba_rd(2)

summary: LBA Range Descriptor

text:
# nvme_lba_rd(2)

## NAME
struct nvme_lba_rd - LBA Range Descriptor

## SYNOPSIS
struct nvme_lba_rd {

__le64 rslba;

__le32 rnlb;

__u8 rsvd12[4];

};

## Members
rslba

Range Starting LBA

rnlb

Range Number of Logical Blocks

rsvd12

Reserved


title: nvme_lba_status(2)

summary: LBA Status Descriptor List

text:
# nvme_lba_status(2)

## NAME
struct nvme_lba_status - LBA Status Descriptor List

## SYNOPSIS
struct nvme_lba_status {

__le32 nlsd;

__u8 cmpc;

__u8 rsvd5[3];

struct nvme_lba_status_desc descs[];

};

## Members
nlsd

Number of LBA Status Descriptors

cmpc

Completion Condition

rsvd5

Reserved

descs

LBA status descriptor Entry


title: nvme_lba_status_atype(2)

summary: Potentially Unrecoverable LBAs

text:
# nvme_lba_status_atype(2)

## NAME
enum nvme_lba_status_atype - Potentially Unrecoverable LBAs

## SYNOPSIS
enum nvme_lba_status_atype {

NVME_LBA_STATUS_ATYPE_SCAN_UNTRACKED ,

NVME_LBA_STATUS_ATYPE_SCAN_TRACKED

};

## Constants
NVME_LBA_STATUS_ATYPE_SCAN_UNTRACKED

Potentially Unrecoverable LBAs

NVME_LBA_STATUS_ATYPE_SCAN_TRACKED

Potentially Unrecoverable LBAs associated with physical storage


title: nvme_lba_status_desc(2)

summary: LBA Status Descriptor Entry

text:
# nvme_lba_status_desc(2)

## NAME
struct nvme_lba_status_desc - LBA Status Descriptor Entry

## SYNOPSIS
struct nvme_lba_status_desc {

__le64 dslba;

__le32 nlb;

__u8 rsvd12;

__u8 status;

__u8 rsvd14[2];

};

## Members
dslba

Descriptor Starting LBA

nlb

Number of Logical Blocks

rsvd12

Reserved

status

Additional status about this LBA range

rsvd14

Reserved


title: nvme_lba_status_log(2)

summary: LBA Status Information Log

text:
# nvme_lba_status_log(2)

## NAME
struct nvme_lba_status_log - LBA Status Information Log

## SYNOPSIS
struct nvme_lba_status_log {

__le32 lslplen;

__le32 nlslne;

__le32 estulb;

__u8 rsvd12[2];

__le16 lsgc;

struct nvme_lbas_ns_element elements[];

};

## Members
lslplen

LBA Status Log Page Length

nlslne

Number of LBA Status Log Namespace Elements

estulb

Estimate of Unrecoverable Logical Blocks

rsvd12

Reserved

lsgc

LBA Status Generation Counter

elements

LBA Status Log Namespace Element List


title: nvme_lbaf(2)

summary: LBA Format Data Structure

text:
# nvme_lbaf(2)

## NAME
struct nvme_lbaf - LBA Format Data Structure

## SYNOPSIS
struct nvme_lbaf {

__le16 ms;

__u8 ds;

__u8 rp;

};

## Members
ms

Metadata Size indicates the number of metadata bytes provided per LBA based on the LBA Data Size indicated.

ds

LBA Data Size indicates the LBA data size supported, reported as a power of two.

rp

Relative Performance, see enum nvme_lbaf_rp.


title: nvme_lbaf_rp(2)

text:
# nvme_lbaf_rp(2)

## NAME
enum nvme_lbaf_rp - This field indicates the relative performance of the LBA format indicated relative to other LBA formats supported by the controller.

## SYNOPSIS
enum nvme_lbaf_rp {

NVME_LBAF_RP_BEST ,

NVME_LBAF_RP_BETTER ,

NVME_LBAF_RP_GOOD ,

NVME_LBAF_RP_DEGRADED ,

NVME_LBAF_RP_MASK

};

## Constants
NVME_LBAF_RP_BEST

Best performance

NVME_LBAF_RP_BETTER

Better performance

NVME_LBAF_RP_GOOD

Good performance

NVME_LBAF_RP_DEGRADED

Degraded performance

NVME_LBAF_RP_MASK

Mask to get the relative performance value from the field


title: nvme_lbart(2)

summary: LBA Range Type - Data Structure Entry

text:
# nvme_lbart(2)

## NAME
enum nvme_lbart - LBA Range Type - Data Structure Entry

## SYNOPSIS
enum nvme_lbart {

NVME_LBART_TYPE_GP ,

NVME_LBART_TYPE_FS ,

NVME_LBART_TYPE_RAID ,

NVME_LBART_TYPE_CACHE ,

NVME_LBART_TYPE_SWAP ,

NVME_LBART_ATTRIB_TEMP ,

NVME_LBART_ATTRIB_HIDE

};

## Constants
NVME_LBART_TYPE_GP

General Purpose

NVME_LBART_TYPE_FS

Filesystem

NVME_LBART_TYPE_RAID

RAID

NVME_LBART_TYPE_CACHE

Cache

NVME_LBART_TYPE_SWAP

Page / swap file

NVME_LBART_ATTRIB_TEMP

Temp

NVME_LBART_ATTRIB_HIDE

Hidden


title: nvme_lbas_ns_element(2)

summary: LBA Status Log Namespace Element

text:
# nvme_lbas_ns_element(2)

## NAME
struct nvme_lbas_ns_element - LBA Status Log Namespace Element

## SYNOPSIS
struct nvme_lbas_ns_element {

__le32 neid;

__le32 nlrd;

__u8 ratype;

__u8 rsvd8[7];

struct nvme_lba_rd lba_rd[];

};

## Members
neid

Namespace Element Identifier

nlrd

Number of LBA Range Descriptors

ratype

Recommended Action Type. see enum nvme_lba_status_atype

rsvd8

Reserved

lba_rd

LBA Range Descriptor


title: nvme_lockdown(2)

summary: Issue lockdown command

text:
# nvme_lockdown(2)

## NAME
nvme_lockdown - Issue lockdown command

## SYNOPSIS
int nvme_lockdown (struct nvme_lockdown_args *args );

## ARGUMENTS
args

struct nvme_lockdown_args argument structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_log_ana_lsp(2)

text:
# nvme_log_ana_lsp(2)

## NAME
enum nvme_log_ana_lsp - Asymmetric Namespace Access - Return Groups Only

## SYNOPSIS
enum nvme_log_ana_lsp {

NVME_LOG_ANA_LSP_RGO_NAMESPACES ,

NVME_LOG_ANA_LSP_RGO_GROUPS_ONLY

};

## Constants
NVME_LOG_ANA_LSP_RGO_NAMESPACES

NVME_LOG_ANA_LSP_RGO_GROUPS_ONLY


title: nvme_lookup_ctrl(2)

summary: Lookup nvme_ctrl_t object

text:
# nvme_lookup_ctrl(2)

## NAME
nvme_lookup_ctrl - Lookup nvme_ctrl_t object

## SYNOPSIS
nvme_ctrl_t nvme_lookup_ctrl (nvme_subsystem_t s , const char *transport , const char *traddr , const char *host_traddr , const char *host_iface , const char *trsvcid , nvme_ctrl_t p );

## ARGUMENTS
s

nvme_subsystem_t object

transport

Transport name

traddr

Transport address

host_traddr

Host transport address

host_iface

Host interface name

trsvcid

Transport service identifier

p

Previous controller instance

## DESCRIPTION
Lookup a controller in s based on transport, traddr, host_traddr, host_iface, and trsvcid. transport must be specified, other fields may be required depending on the transport. A new object is created if none is found. If p is specified the lookup will start at p instead of the first controller.

## RETURN
Controller instance


title: nvme_lookup_host(2)

summary: Lookup nvme_host_t object

text:
# nvme_lookup_host(2)

## NAME
nvme_lookup_host - Lookup nvme_host_t object

## SYNOPSIS
nvme_host_t nvme_lookup_host (nvme_root_t r , const char *hostnqn , const char *hostid );

## ARGUMENTS
r

nvme_root_t object

hostnqn

Host NQN

hostid

Host ID

## DESCRIPTION
Lookup a nvme_host_t object based on hostnqn and hostid or create one if not found.

## RETURN
nvme_host_t object


title: nvme_lookup_key(2)

summary: Lookup key serial number

text:
# nvme_lookup_key(2)

## NAME
nvme_lookup_key - Lookup key serial number

## SYNOPSIS
long nvme_lookup_key (const char *type , const char *identity );

## ARGUMENTS
type

Key type

identity

Key description

## DESCRIPTION
Looks up the serial number of the key identity with type type in the current session keyring.

## RETURN
The key serial number of the key or 0 with errno set otherwise.


title: nvme_lookup_keyring(2)

summary: Lookup keyring serial number

text:
# nvme_lookup_keyring(2)

## NAME
nvme_lookup_keyring - Lookup keyring serial number

## SYNOPSIS
long nvme_lookup_keyring (const char *keyring );

## ARGUMENTS
keyring

Keyring name

## DESCRIPTION
Looks up the serial number of the keyring keyring.

## RETURN
The key serial number of the keyring or 0 with errno set otherwise.


title: nvme_lookup_subsystem(2)

summary: Lookup nvme_subsystem_t object

text:
# nvme_lookup_subsystem(2)

## NAME
nvme_lookup_subsystem - Lookup nvme_subsystem_t object

## SYNOPSIS
nvme_subsystem_t nvme_lookup_subsystem (struct nvme_host *h , const char *name , const char *subsysnqn );

## ARGUMENTS
h

nvme_host_t object

name

Name of the subsystem (may be NULL)

subsysnqn

Subsystem NQN

## DESCRIPTION
Lookup a nvme_subsystem_t object in h base on name (if present) and subsysnqn or create one if not found.

## RETURN
nvme_subsystem_t object


title: nvme_media_unit_config_desc(2)

summary: Media Unit Configuration Descriptor

text:
# nvme_media_unit_config_desc(2)

## NAME
struct nvme_media_unit_config_desc - Media Unit Configuration Descriptor

## SYNOPSIS
struct nvme_media_unit_config_desc {

__le16 muid;

__u8 rsvd2[4];

__le16 mudl;

};

## Members
muid

Media Unit Identifier

rsvd2

Reserved

mudl

Media Unit Descriptor Length


title: nvme_media_unit_stat_desc(2)

summary: Media Unit Status Descriptor

text:
# nvme_media_unit_stat_desc(2)

## NAME
struct nvme_media_unit_stat_desc - Media Unit Status Descriptor

## SYNOPSIS
struct nvme_media_unit_stat_desc {

__le16 muid;

__le16 domainid;

__le16 endgid;

__le16 nvmsetid;

__le16 cap_adj_fctr;

__u8 avl_spare;

__u8 percent_used;

__u8 mucs;

__u8 cio;

};

## Members
muid

Media Unit Identifier

domainid

Domain Identifier

endgid

Endurance Group Identifier

nvmsetid

NVM Set Identifier

cap_adj_fctr

Capacity Adjustment Factor

avl_spare

Available Spare

percent_used

Percentage Used

mucs

Number of Channels attached to media units

cio

Channel Identifiers Offset


title: nvme_media_unit_stat_log(2)

summary: Media Unit Status

text:
# nvme_media_unit_stat_log(2)

## NAME
struct nvme_media_unit_stat_log - Media Unit Status

## SYNOPSIS
struct nvme_media_unit_stat_log {

__le16 nmu;

__le16 cchans;

__le16 sel_config;

__u8 rsvd6[10];

struct nvme_media_unit_stat_desc mus_desc[];

};

## Members
nmu

Number unit status descriptor

cchans

Number of Channels

sel_config

Selected Configuration

rsvd6

Reserved

mus_desc

Media unit statistic descriptors


title: nvme_metadata_element_desc(2)

summary: Metadata Element Descriptor

text:
# nvme_metadata_element_desc(2)

## NAME
struct nvme_metadata_element_desc - Metadata Element Descriptor

## SYNOPSIS
struct nvme_metadata_element_desc {

__u8 type;

__u8 rev;

__le16 len;

__u8 val[0];

};

## Members
type

Element Type (ET)

rev

Element Revision (ER)

len

Element Length (ELEN)

val

Element Value (EVAL), UTF-8 string


title: nvme_mi_admin_admin_passthru(2)

text:
# nvme_mi_admin_admin_passthru(2)

## NAME
nvme_mi_admin_admin_passthru - Submit an nvme admin passthrough command

## SYNOPSIS
int nvme_mi_admin_admin_passthru (nvme_mi_ctrl_t ctrl , __u8 opcode , __u8 flags , __u16 rsvd , __u32 nsid , __u32 cdw2 , __u32 cdw3 , __u32 cdw10 , __u32 cdw11 , __u32 cdw12 , __u32 cdw13 , __u32 cdw14 , __u32 cdw15 , __u32 data_len , void *data , __u32 metadata_len , void *metadata , __u32 timeout_ms , __u32 *result );

## ARGUMENTS
ctrl

Controller to send command to

opcode

The nvme admin command to send

flags

NVMe command flags (not used)

rsvd

Reserved for future use

nsid

Namespace identifier

cdw2

Command dword 2

cdw3

Command dword 3

cdw10

Command dword 10

cdw11

Command dword 11

cdw12

Command dword 12

cdw13

Command dword 13

cdw14

Command dword 14

cdw15

Command dword 15

data_len

Length of the data transferred in this command in bytes

data

Pointer to user address of the data buffer

metadata_len

Length of metadata transferred in this command(not used)

metadata

Pointer to user address of the metadata buffer(not used)

timeout_ms

How long to wait for the command to complete

result

Optional field to return the result from the CQE dword 0

## DESCRIPTION
Send a customized NVMe Admin command request message and get the corresponding response message.

This interface supports no data, host to controller and controller to host but it doesn't support bidirectional data transfer. Also this interface only supports data transfer size range [0, 4096] (bytes) so the & data_len parameter must be less than 4097.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_format_nvm(2)

summary: Format NVMe namespace

text:
# nvme_mi_admin_format_nvm(2)

## NAME
nvme_mi_admin_format_nvm - Format NVMe namespace

## SYNOPSIS
int nvme_mi_admin_format_nvm (nvme_mi_ctrl_t ctrl , struct nvme_format_nvm_args *args );

## ARGUMENTS
ctrl

Controller to send command to

args

Format NVM command arguments

## DESCRIPTION
Perform a low-level format to set the LBA data & metadata size. May destroy data & metadata on the specified namespaces

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_fw_commit(2)

text:
# nvme_mi_admin_fw_commit(2)

## NAME
nvme_mi_admin_fw_commit - Commit firmware using the specified action

## SYNOPSIS
int nvme_mi_admin_fw_commit (nvme_mi_ctrl_t ctrl , struct nvme_fw_commit_args *args );

## ARGUMENTS
ctrl

Controller to send firmware data to

args

struct nvme_fw_download_args argument structure

## DESCRIPTION
The Firmware Commit command modifies the firmware image or Boot Partitions.

## RETURN
0 on success, non-zero on failure


title: nvme_mi_admin_fw_download(2)

text:
# nvme_mi_admin_fw_download(2)

## NAME
nvme_mi_admin_fw_download - Download part or all of a firmware image to the controller

## SYNOPSIS
int nvme_mi_admin_fw_download (nvme_mi_ctrl_t ctrl , struct nvme_fw_download_args *args );

## ARGUMENTS
ctrl

Controller to send firmware data to

args

struct nvme_fw_download_args argument structure

## DESCRIPTION
The Firmware Image Download command downloads all or a portion of an image for a future update to the controller. The Firmware Image Download command downloads a new image (in whole or in part) to the controller.

The image may be constructed of multiple pieces that are individually downloaded with separate Firmware Image Download commands. Each Firmware Image Download command includes a Dword Offset and Number of Dwords that specify a dword range.

The new firmware image is not activated as part of the Firmware Image Download command. Use the nvme_mi_admin_fw_commit to activate a newly downloaded image.

## RETURN
0 on success, non-zero on failure


title: nvme_mi_admin_get_features_data(2)

text:
# nvme_mi_admin_get_features_data(2)

## NAME
nvme_mi_admin_get_features_data - Helper function for &nvme_mi_admin_get_features()

## SYNOPSIS
int nvme_mi_admin_get_features_data (nvme_mi_ctrl_t ctrl , enum nvme_features_id fid , __u32 nsid , __u32 data_len , void *data , __u32 *result );

## ARGUMENTS
ctrl

Controller to send command to

fid

Feature identifier

nsid

Namespace ID, if applicable for fid

data_len

Length of feature data, if applicable for fid, in bytes

data

User address of feature data, if applicable

result

The command completion result from CQE dword0

## DESCRIPTION
Helper for optionally features that optionally return data, using the SEL_CURRENT selector value.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log(2)

summary: Retrieve log page data from controller

text:
# nvme_mi_admin_get_log(2)

## NAME
nvme_mi_admin_get_log - Retrieve log page data from controller

## SYNOPSIS
int nvme_mi_admin_get_log (nvme_mi_ctrl_t ctrl , struct nvme_get_log_args *args );

## ARGUMENTS
ctrl

Controller to query

args

Get Log Page command arguments

## DESCRIPTION
Performs a Get Log Page Admin command as specified by args. Response data is stored in args->data, which should be a buffer of args->data_len bytes. Resulting data length is stored in args->data_len on successful command completion.

This request may be implemented as multiple log page commands, in order to fit within MI message-size limits.

See: struct nvme_get_log_args

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_ana(2)

text:
# nvme_mi_admin_get_log_ana(2)

## NAME
nvme_mi_admin_get_log_ana - Retrieve Asymmetric Namespace Access log page

## SYNOPSIS
int nvme_mi_admin_get_log_ana (nvme_mi_ctrl_t ctrl , enum nvme_log_ana_lsp lsp , bool rae , __u64 offset , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

lsp

Log specific, see enum nvme_get_log_ana_lsp

rae

Retain asynchronous events

offset

Offset to the start of the log page

len

The allocated length of the log page

log

User address to store the ana log

## DESCRIPTION
This log consists of a header describing the log and descriptors containing the asymmetric namespace access information for ANA Groups that contain namespaces that are attached to the controller processing the command.

See struct nvme_ana_rsp_hdr for the definition of the returned structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_ana_groups(2)

text:
# nvme_mi_admin_get_log_ana_groups(2)

## NAME
nvme_mi_admin_get_log_ana_groups - Retrieve Asymmetric Namespace Access groups only log page

## SYNOPSIS
int nvme_mi_admin_get_log_ana_groups (nvme_mi_ctrl_t ctrl , bool rae , __u32 len , struct nvme_ana_group_desc *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

len

The allocated length of the log page

log

User address to store the ana group log

## DESCRIPTION
See struct nvme_ana_group_desc for the definition of the returned structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_boot_partition(2)

summary: Retrieve Boot Partition

text:
# nvme_mi_admin_get_log_boot_partition(2)

## NAME
nvme_mi_admin_get_log_boot_partition - Retrieve Boot Partition

## SYNOPSIS
int nvme_mi_admin_get_log_boot_partition (nvme_mi_ctrl_t ctrl , bool rae , __u8 lsp , __u32 len , struct nvme_boot_partition *part );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

lsp

The log specified field of LID

len

The allocated size, minimum struct nvme_boot_partition

part

User address to store the log page

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Retrieve namespace changed list

text:
# nvme_mi_admin_get_log_changed_ns_list(2)

## NAME
nvme_mi_admin_get_log_changed_ns_list - Retrieve namespace changed list

## SYNOPSIS
int nvme_mi_admin_get_log_changed_ns_list (nvme_mi_ctrl_t ctrl , bool rae , struct nvme_ns_list *ns_log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

ns_log

User address to store the log page

## DESCRIPTION
This log page describes namespaces attached to this controller that have changed since the last time the namespace was identified, been added, or deleted.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_cmd_effects(2)

summary: Retrieve nvme command effects log

text:
# nvme_mi_admin_get_log_cmd_effects(2)

## NAME
nvme_mi_admin_get_log_cmd_effects - Retrieve nvme command effects log

## SYNOPSIS
int nvme_mi_admin_get_log_cmd_effects (nvme_mi_ctrl_t ctrl , enum nvme_csi csi , struct nvme_cmd_effects_log *effects_log );

## ARGUMENTS
ctrl

Controller to query

csi

Command Set Identifier

effects_log

User address to store the effects log

## DESCRIPTION
This log page describes the commands that the controller supports and the effects of those commands on the state of the NVM subsystem.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Create host telemetry log

text:
# nvme_mi_admin_get_log_create_telemetry_host(2)

## NAME
nvme_mi_admin_get_log_create_telemetry_host - Create host telemetry log

## SYNOPSIS
int nvme_mi_admin_get_log_create_telemetry_host (nvme_mi_ctrl_t ctrl , struct nvme_telemetry_log *log );

## ARGUMENTS
ctrl

Controller to query

log

Userspace address of the log payload

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Retrieve the device self test log

text:
# nvme_mi_admin_get_log_device_self_test(2)

## NAME
nvme_mi_admin_get_log_device_self_test - Retrieve the device self test log

## SYNOPSIS
int nvme_mi_admin_get_log_device_self_test (nvme_mi_ctrl_t ctrl , struct nvme_self_test_log *log );

## ARGUMENTS
ctrl

Controller to query

log

Userspace address of the log payload

## DESCRIPTION
The log page indicates the status of an in progress self test and the percent complete of that operation, and the results of the previous 20 self-test operations.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_discovery(2)

summary: Retrieve Discovery log page

text:
# nvme_mi_admin_get_log_discovery(2)

## NAME
nvme_mi_admin_get_log_discovery - Retrieve Discovery log page

## SYNOPSIS
int nvme_mi_admin_get_log_discovery (nvme_mi_ctrl_t ctrl , bool rae , __u32 offset , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

offset

Offset of this log to retrieve

len

The allocated size for this portion of the log

log

User address to store the discovery log

## DESCRIPTION
Supported only by fabrics discovery controllers, returning discovery records.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Get Endurance Group log

text:
# nvme_mi_admin_get_log_endurance_group(2)

## NAME
nvme_mi_admin_get_log_endurance_group - Get Endurance Group log

## SYNOPSIS
int nvme_mi_admin_get_log_endurance_group (nvme_mi_ctrl_t ctrl , __u16 endgid , struct nvme_endurance_group_log *log );

## ARGUMENTS
ctrl

Controller to query

endgid

Starting group identifier to return in the list

log

User address to store the endurance log

## DESCRIPTION
This log page indicates if an Endurance Group Event has occurred for a particular Endurance Group. If an Endurance Group Event has occurred, the details of the particular event are included in the Endurance Group Information log page for that Endurance Group. An asynchronous event is generated when an entry for an Endurance Group is newly added to this log page.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Retrieve Rotational Media Information

text:
# nvme_mi_admin_get_log_endurance_grp_evt(2)

## NAME
nvme_mi_admin_get_log_endurance_grp_evt - Retrieve Rotational Media Information

## SYNOPSIS
int nvme_mi_admin_get_log_endurance_grp_evt (nvme_mi_ctrl_t ctrl , bool rae , __u32 offset , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

offset

Offset to the start of the log page

len

The allocated length of the log page

log

User address to store the log page

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_error(2)

summary: Retrieve nvme error log

text:
# nvme_mi_admin_get_log_error(2)

## NAME
nvme_mi_admin_get_log_error - Retrieve nvme error log

## SYNOPSIS
int nvme_mi_admin_get_log_error (nvme_mi_ctrl_t ctrl , unsigned int nr_entries , bool rae , struct nvme_error_log_page *err_log );

## ARGUMENTS
ctrl

Controller to query

nr_entries

Number of error log entries allocated

rae

Retain asynchronous events

err_log

Array of error logs of size 'entries'

## DESCRIPTION
This log page describes extended error information for a command that completed with error, or may report an error that is not specific to a particular command.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_get_log_fid_supported_effects(2)

## NAME
nvme_mi_admin_get_log_fid_supported_effects - Retrieve Feature Identifiers Supported and Effects

## SYNOPSIS
int nvme_mi_admin_get_log_fid_supported_effects (nvme_mi_ctrl_t ctrl , bool rae , struct nvme_fid_supported_effects_log *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

log

FID Supported and Effects data structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_fw_slot(2)

summary: Retrieves the controller firmware log

text:
# nvme_mi_admin_get_log_fw_slot(2)

## NAME
nvme_mi_admin_get_log_fw_slot - Retrieves the controller firmware log

## SYNOPSIS
int nvme_mi_admin_get_log_fw_slot (nvme_mi_ctrl_t ctrl , bool rae , struct nvme_firmware_slot *fw_log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

fw_log

User address to store the log page

## DESCRIPTION
This log page describes the firmware revision stored in each firmware slot supported. The firmware revision is indicated as an ASCII string. The log page also indicates the active slot number.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_lba_status(2)

summary: Retrieve LBA Status

text:
# nvme_mi_admin_get_log_lba_status(2)

## NAME
nvme_mi_admin_get_log_lba_status - Retrieve LBA Status

## SYNOPSIS
int nvme_mi_admin_get_log_lba_status (nvme_mi_ctrl_t ctrl , bool rae , __u64 offset , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

offset

Offset to the start of the log page

len

The allocated length of the log page

log

User address to store the log page

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Retrieve Media Unit Status

text:
# nvme_mi_admin_get_log_media_unit_stat(2)

## NAME
nvme_mi_admin_get_log_media_unit_stat - Retrieve Media Unit Status

## SYNOPSIS
int nvme_mi_admin_get_log_media_unit_stat (nvme_mi_ctrl_t ctrl , __u16 domid , struct nvme_media_unit_stat_log *mus );

## ARGUMENTS
ctrl

Controller to query

domid

Domain Identifier selection, if supported

mus

User address to store the Media Unit statistics log

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_get_log_mi_cmd_supported_effects(2)

## NAME
nvme_mi_admin_get_log_mi_cmd_supported_effects - displays the MI Commands Supported by the controller

## SYNOPSIS
int nvme_mi_admin_get_log_mi_cmd_supported_effects (nvme_mi_ctrl_t ctrl , bool rae , struct nvme_mi_cmd_supported_effects_log *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

log

MI Command Supported and Effects data structure

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_page(2)

summary: Retrieve log page data from controller

text:
# nvme_mi_admin_get_log_page(2)

## NAME
nvme_mi_admin_get_log_page - Retrieve log page data from controller

## SYNOPSIS
int nvme_mi_admin_get_log_page (nvme_mi_ctrl_t ctrl , __u32 xfer_len , struct nvme_get_log_args *args );

## ARGUMENTS
ctrl

Controller to query

xfer_len

The chunk size of the read

args

Get Log Page command arguments

## DESCRIPTION
Performs a Get Log Page Admin command as specified by args. Response data is stored in args->data, which should be a buffer of args->data_len bytes. Resulting data length is stored in args->data_len on successful command completion.

This request may be implemented as multiple log page commands, in order to fit within MI message-size limits.

See: struct nvme_get_log_args

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Retrieve Persistent Event Log

text:
# nvme_mi_admin_get_log_persistent_event(2)

## NAME
nvme_mi_admin_get_log_persistent_event - Retrieve Persistent Event Log

## SYNOPSIS
int nvme_mi_admin_get_log_persistent_event (nvme_mi_ctrl_t ctrl , enum nvme_pevent_log_action action , __u32 size , void *pevent_log );

## ARGUMENTS
ctrl

Controller to query

action

Action the controller should take during processing this command

size

Size of pevent_log

pevent_log

User address to store the persistent event log

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_get_log_predictable_lat_event(2)

## NAME
nvme_mi_admin_get_log_predictable_lat_event - Retrieve Predictable Latency Event Aggregate Log Page

## SYNOPSIS
int nvme_mi_admin_get_log_predictable_lat_event (nvme_mi_ctrl_t ctrl , bool rae , __u32 offset , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

offset

Offset into the predictable latency event

len

Length of provided user buffer to hold the log data in bytes

log

User address for log page data

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Predictable Latency Per NVM Set

text:
# nvme_mi_admin_get_log_predictable_lat_nvmset(2)

## NAME
nvme_mi_admin_get_log_predictable_lat_nvmset - Predictable Latency Per NVM Set

## SYNOPSIS
int nvme_mi_admin_get_log_predictable_lat_nvmset (nvme_mi_ctrl_t ctrl , __u16 nvmsetid , struct nvme_nvmset_predictable_lat_log *log );

## ARGUMENTS
ctrl

Controller to query

nvmsetid

NVM set id

log

User address to store the predictable latency log

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_reservation(2)

summary: Retrieve Reservation Notification

text:
# nvme_mi_admin_get_log_reservation(2)

## NAME
nvme_mi_admin_get_log_reservation - Retrieve Reservation Notification

## SYNOPSIS
int nvme_mi_admin_get_log_reservation (nvme_mi_ctrl_t ctrl , bool rae , struct nvme_resv_notification_log *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

log

User address to store the reservation log

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_sanitize(2)

summary: Retrieve Sanitize Status

text:
# nvme_mi_admin_get_log_sanitize(2)

## NAME
nvme_mi_admin_get_log_sanitize - Retrieve Sanitize Status

## SYNOPSIS
int nvme_mi_admin_get_log_sanitize (nvme_mi_ctrl_t ctrl , bool rae , struct nvme_sanitize_log_page *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

log

User address to store the sanitize log

## DESCRIPTION
The Sanitize Status log page reports sanitize operation time estimates and information about the most recent sanitize operation.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_simple(2)

text:
# nvme_mi_admin_get_log_simple(2)

## NAME
nvme_mi_admin_get_log_simple - Helper for Get Log Page functions with no NSID or RAE requirements

## SYNOPSIS
int nvme_mi_admin_get_log_simple (nvme_mi_ctrl_t ctrl , enum nvme_cmd_get_log_lid lid , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

lid

Log identifier

len

length of log buffer

log

pointer for resulting log data

## DESCRIPTION
Performs a Get Log Page Admin command for a specific log ID lid, using NVME_NSID_ALL for the namespace identifier, and rae set to false.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_smart(2)

summary: Retrieve nvme smart log

text:
# nvme_mi_admin_get_log_smart(2)

## NAME
nvme_mi_admin_get_log_smart - Retrieve nvme smart log

## SYNOPSIS
int nvme_mi_admin_get_log_smart (nvme_mi_ctrl_t ctrl , __u32 nsid , bool rae , struct nvme_smart_log *smart_log );

## ARGUMENTS
ctrl

Controller to query

nsid

Optional namespace identifier

rae

Retain asynchronous events

smart_log

User address to store the smart log

## DESCRIPTION
This log page provides SMART and general health information. The information provided is over the life of the controller and is retained across power cycles. To request the controller log page, the namespace identifier specified is FFFFFFFFh. The controller may also support requesting the log page on a per namespace basis, as indicated by bit 0 of the LPA field in the Identify Controller data structure.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_get_log_support_cap_config_list(2)

## NAME
nvme_mi_admin_get_log_support_cap_config_list - Retrieve Supported Capacity Configuration List

## SYNOPSIS
int nvme_mi_admin_get_log_support_cap_config_list (nvme_mi_ctrl_t ctrl , __u16 domid , struct nvme_supported_cap_config_list_log *cap );

## ARGUMENTS
ctrl

Controller to query

domid

Domain Identifier selection, if supported

cap

User address to store supported capabilities config list

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


summary: Retrieve nmve supported log pages

text:
# nvme_mi_admin_get_log_supported_log_pages(2)

## NAME
nvme_mi_admin_get_log_supported_log_pages - Retrieve nmve supported log pages

## SYNOPSIS
int nvme_mi_admin_get_log_supported_log_pages (nvme_mi_ctrl_t ctrl , bool rae , struct nvme_supported_log_pages *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

log

Array of LID supported and Effects data structures

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_telemetry_ctrl(2)

text:
# nvme_mi_admin_get_log_telemetry_ctrl(2)

## NAME
nvme_mi_admin_get_log_telemetry_ctrl - Get Telemetry Controller-Initiated log page

## SYNOPSIS
int nvme_mi_admin_get_log_telemetry_ctrl (nvme_mi_ctrl_t ctrl , bool rae , __u64 offset , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain asynchronous events

offset

Offset into the telemetry data

len

Length of provided user buffer to hold the log data in bytes

log

User address for log page data

## DESCRIPTION
Retrieves the Telemetry Controller-Initiated log page at the requested offset using the previously existing capture.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_log_telemetry_host(2)

summary: Get Telemetry Host-Initiated log page

text:
# nvme_mi_admin_get_log_telemetry_host(2)

## NAME
nvme_mi_admin_get_log_telemetry_host - Get Telemetry Host-Initiated log page

## SYNOPSIS
int nvme_mi_admin_get_log_telemetry_host (nvme_mi_ctrl_t ctrl , __u64 offset , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

offset

Offset into the telemetry data

len

Length of provided user buffer to hold the log data in bytes

log

User address for log page data

## DESCRIPTION
Retrieves the Telemetry Host-Initiated log page at the requested offset using the previously existing capture.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_get_log_zns_changed_zones(2)

## NAME
nvme_mi_admin_get_log_zns_changed_zones - Retrieve list of zones that have changed

## SYNOPSIS
int nvme_mi_admin_get_log_zns_changed_zones (nvme_mi_ctrl_t ctrl , __u32 nsid , bool rae , struct nvme_zns_changed_zone_log *log );

## ARGUMENTS
ctrl

Controller to query

nsid

Namespace ID

rae

Retain asynchronous events

log

User address to store the changed zone log

## DESCRIPTION
The list of zones that have changed state due to an exceptional event.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_get_nsid_log(2)

summary: Helper for Get Log Page functions

text:
# nvme_mi_admin_get_nsid_log(2)

## NAME
nvme_mi_admin_get_nsid_log - Helper for Get Log Page functions

## SYNOPSIS
int nvme_mi_admin_get_nsid_log (nvme_mi_ctrl_t ctrl , bool rae , enum nvme_cmd_get_log_lid lid , __u32 nsid , __u32 len , void *log );

## ARGUMENTS
ctrl

Controller to query

rae

Retain Asynchronous Events

lid

Log identifier

nsid

Namespace ID

len

length of log buffer

log

pointer for resulting log data

## DESCRIPTION
Performs a Get Log Page Admin command for a specific log ID lid and namespace ID nsid. Log data is expected to be len bytes, and is stored in log on success. The rae flag is passed as-is to the Get Log Page command, and is specific to the Log Page requested.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify(2)

summary: Perform an Admin identify command.

text:
# nvme_mi_admin_identify(2)

## NAME
nvme_mi_admin_identify - Perform an Admin identify command.

## SYNOPSIS
int nvme_mi_admin_identify (nvme_mi_ctrl_t ctrl , struct nvme_identify_args *args );

## ARGUMENTS
ctrl

Controller to process identify command

args

Identify command arguments

## DESCRIPTION
Perform an Identify command, using the Identify command parameters in args. Stores the identify data in ->data, and (if set) the result from cdw0 into args->result.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE.

See: struct nvme_identify_args

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_identify_active_ns_list(2)

## NAME
nvme_mi_admin_identify_active_ns_list - Perform an Admin identify for an active namespace list

## SYNOPSIS
int nvme_mi_admin_identify_active_ns_list (nvme_mi_ctrl_t ctrl , __u32 nsid , struct nvme_ns_list *list );

## ARGUMENTS
ctrl

Controller to process identify command

nsid

Namespace ID to specify list start

list

List data to populate

## DESCRIPTION
Perform an Identify command, for the active namespace list starting with IDs greater than or equal to nsid. Specify NVME_NSID_NONE for the start of the list.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE, so list will be be fully populated on success.

See: struct nvme_ns_list

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_allocated_ns(2)

text:
# nvme_mi_admin_identify_allocated_ns(2)

## NAME
nvme_mi_admin_identify_allocated_ns - Perform an Admin identify command for an allocated namespace

## SYNOPSIS
int nvme_mi_admin_identify_allocated_ns (nvme_mi_ctrl_t ctrl , __u32 nsid , struct nvme_id_ns *ns );

## ARGUMENTS
ctrl

Controller to process identify command

nsid

namespace ID

ns

Namespace identification to populate

## DESCRIPTION
Perform an Identify (namespace) command, setting the namespace id data in ns.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_identify_allocated_ns_list(2)

## NAME
nvme_mi_admin_identify_allocated_ns_list - Perform an Admin identify for an allocated namespace list

## SYNOPSIS
int nvme_mi_admin_identify_allocated_ns_list (nvme_mi_ctrl_t ctrl , __u32 nsid , struct nvme_ns_list *list );

## ARGUMENTS
ctrl

Controller to process identify command

nsid

Namespace ID to specify list start

list

List data to populate

## DESCRIPTION
Perform an Identify command, for the allocated namespace list starting with IDs greater than or equal to nsid. Specify NVME_NSID_NONE for the start of the list.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE, so list will be be fully populated on success.

See: struct nvme_ns_list

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_cns_nsid(2)

text:
# nvme_mi_admin_identify_cns_nsid(2)

## NAME
nvme_mi_admin_identify_cns_nsid - Perform an Admin identify command using specific CNS/NSID parameters.

## SYNOPSIS
int nvme_mi_admin_identify_cns_nsid (nvme_mi_ctrl_t ctrl , enum nvme_identify_cns cns , __u32 nsid , void *data );

## ARGUMENTS
ctrl

Controller to process identify command

cns

Controller or Namespace Structure, specifying identified object

nsid

namespace ID

data

buffer for identify data response

## DESCRIPTION
Perform an Identify command, using the CNS specifier cns, and the namespace ID nsid if required by the CNS type.

Stores the identify data in data, which is expected to be a buffer of NVME_IDENTIFY_DATA_SIZE bytes.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_ctrl(2)

text:
# nvme_mi_admin_identify_ctrl(2)

## NAME
nvme_mi_admin_identify_ctrl - Perform an Admin identify for a controller

## SYNOPSIS
int nvme_mi_admin_identify_ctrl (nvme_mi_ctrl_t ctrl , struct nvme_id_ctrl *id );

## ARGUMENTS
ctrl

Controller to process identify command

id

Controller identify data to populate

## DESCRIPTION
Perform an Identify command, for the controller specified by ctrl, writing identify data to id.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE, so id will be fully populated on success.

See: struct nvme_id_ctrl

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_ctrl_list(2)

text:
# nvme_mi_admin_identify_ctrl_list(2)

## NAME
nvme_mi_admin_identify_ctrl_list - Perform an Admin identify for a controller list.

## SYNOPSIS
int nvme_mi_admin_identify_ctrl_list (nvme_mi_ctrl_t ctrl , __u16 cntid , struct nvme_ctrl_list *list );

## ARGUMENTS
ctrl

Controller to process identify command

cntid

Controller ID to specify list start

list

List data to populate

## DESCRIPTION
Perform an Identify command, for the controller list starting with IDs greater than or equal to cntid.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE, so id will be fully populated on success.

See: struct nvme_ctrl_list

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_ns(2)

text:
# nvme_mi_admin_identify_ns(2)

## NAME
nvme_mi_admin_identify_ns - Perform an Admin identify command for a namespace

## SYNOPSIS
int nvme_mi_admin_identify_ns (nvme_mi_ctrl_t ctrl , __u32 nsid , struct nvme_id_ns *ns );

## ARGUMENTS
ctrl

Controller to process identify command

nsid

namespace ID

ns

Namespace identification to populate

## DESCRIPTION
Perform an Identify (namespace) command, setting the namespace id data in ns. The namespace is expected to active and allocated.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_ns_descs(2)

text:
# nvme_mi_admin_identify_ns_descs(2)

## NAME
nvme_mi_admin_identify_ns_descs - Perform an Admin identify Namespace Identification Descriptor list command for a namespace

## SYNOPSIS
int nvme_mi_admin_identify_ns_descs (nvme_mi_ctrl_t ctrl , __u32 nsid , struct nvme_ns_id_desc *descs );

## ARGUMENTS
ctrl

Controller to process identify command

nsid

Namespace ID

descs

Namespace Identification Descriptor list to populate

## DESCRIPTION
Perform an Identify namespace identification description list command, setting the namespace identification description list in descs

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


text:
# nvme_mi_admin_identify_nsid_ctrl_list(2)

## NAME
nvme_mi_admin_identify_nsid_ctrl_list - Perform an Admin identify for a controller list with specific namespace ID

## SYNOPSIS
int nvme_mi_admin_identify_nsid_ctrl_list (nvme_mi_ctrl_t ctrl , __u32 nsid , __u16 cntid , struct nvme_ctrl_list *list );

## ARGUMENTS
ctrl

Controller to process identify command

nsid

Namespace identifier

cntid

Controller ID to specify list start

list

List data to populate

## DESCRIPTION
Perform an Identify command, for the controller list for nsid, starting with IDs greater than or equal to cntid.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE, so id will be fully populated on success.

See: struct nvme_ctrl_list

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_partial(2)

text:
# nvme_mi_admin_identify_partial(2)

## NAME
nvme_mi_admin_identify_partial - Perform an Admin identify command, and retrieve partial response data.

## SYNOPSIS
int nvme_mi_admin_identify_partial (nvme_mi_ctrl_t ctrl , struct nvme_identify_args *args , off_t offset , size_t size );

## ARGUMENTS
ctrl

Controller to process identify command

args

Identify command arguments

offset

offset of identify data to retrieve from response

size

size of identify data to return

## DESCRIPTION
Perform an Identify command, using the Identify command parameters in args. The offset and size arguments allow the caller to retrieve part of the identify response. See NVMe-MI section 6.2 for the semantics (and some handy diagrams) of the offset & size parameters.

Will return an error if the length of the response data (from the controller) did not match size.

Unless you're performing a vendor-unique identify command, You'll probably want to use one of the identify helpers (nvme_mi_admin_identify, nvme_mi_admin_identify_cns_nsid, or nvme_mi_admin_identify_<type>) instead of this. If the type of your identify command is standardized but not yet supported by libnvme-mi, please contact the maintainers.

See: struct nvme_identify_args

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_identify_primary_ctrl(2)

text:
# nvme_mi_admin_identify_primary_ctrl(2)

## NAME
nvme_mi_admin_identify_primary_ctrl - Perform an Admin identify for primary controller capabilities data structure.

## SYNOPSIS
int nvme_mi_admin_identify_primary_ctrl (nvme_mi_ctrl_t ctrl , __u16 cntid , struct nvme_primary_ctrl_cap *cap );

## ARGUMENTS
ctrl

Controller to process identify command

cntid

Controller ID to specify

cap

Primary Controller Capabilities data structure to populate

## DESCRIPTION
Perform an Identify command to get the Primary Controller Capabilities data for the controller specified by cntid

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE, so cap will be be fully populated on success.

See: struct nvme_primary_ctrl_cap

## RETURN
0 on success, non-zero on failure


text:
# nvme_mi_admin_identify_secondary_ctrl_list(2)

## NAME
nvme_mi_admin_identify_secondary_ctrl_list - Perform an Admin identify for a secondary controller list.

## SYNOPSIS
int nvme_mi_admin_identify_secondary_ctrl_list (nvme_mi_ctrl_t ctrl , __u32 nsid , __u16 cntid , struct nvme_secondary_ctrl_list *list );

## ARGUMENTS
ctrl

Controller to process identify command

nsid

Namespace ID to specify list start

cntid

Controller ID to specify list start

list

List data to populate

## DESCRIPTION
Perform an Identify command, for the secondary controllers associated with the current primary controller. Only entries with IDs greater than or equal to cntid are returned.

Will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE, so list will be be fully populated on success.

See: struct nvme_secondary_ctrl_list

## RETURN
0 on success, non-zero on failure


title: nvme_mi_admin_ns_attach(2)

text:
# nvme_mi_admin_ns_attach(2)

## NAME
nvme_mi_admin_ns_attach - Attach or detach namespace to controller(s)

## SYNOPSIS
int nvme_mi_admin_ns_attach (nvme_mi_ctrl_t ctrl , struct nvme_ns_attach_args *args );

## ARGUMENTS
ctrl

Controller to send command to

args

Namespace Attach command arguments

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_ns_attach_ctrls(2)

summary: Attach namespace to controllers

text:
# nvme_mi_admin_ns_attach_ctrls(2)

## NAME
nvme_mi_admin_ns_attach_ctrls - Attach namespace to controllers

## SYNOPSIS
int nvme_mi_admin_ns_attach_ctrls (nvme_mi_ctrl_t ctrl , __u32 nsid , struct nvme_ctrl_list *ctrlist );

## ARGUMENTS
ctrl

Controller to send command to

nsid

Namespace ID to attach

ctrlist

Controller list to modify attachment state of nsid

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_ns_detach_ctrls(2)

summary: Detach namespace from controllers

text:
# nvme_mi_admin_ns_detach_ctrls(2)

## NAME
nvme_mi_admin_ns_detach_ctrls - Detach namespace from controllers

## SYNOPSIS
int nvme_mi_admin_ns_detach_ctrls (nvme_mi_ctrl_t ctrl , __u32 nsid , struct nvme_ctrl_list *ctrlist );

## ARGUMENTS
ctrl

Controller to send command to

nsid

Namespace ID to detach

ctrlist

Controller list to modify attachment state of nsid

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_req_hdr(2)

summary: Admin command request header.

text:
# nvme_mi_admin_req_hdr(2)

## NAME
struct nvme_mi_admin_req_hdr - Admin command request header.

## SYNOPSIS
struct nvme_mi_admin_req_hdr {

struct nvme_mi_msg_hdr hdr;

__u8 opcode;

__u8 flags;

__le16 ctrl_id;

__le32 cdw1, cdw2, cdw3, cdw4, cdw5;

__le32 doff;

__le32 dlen;

__le32 rsvd0, rsvd1;

__le32 cdw10, cdw11, cdw12, cdw13, cdw14, cdw15;

};

## Members
hdr

Generic MI message header

opcode

Admin command opcode (using enum nvme_admin_opcode)

flags

Command Flags, indicating dlen and doff validity; Only defined in NVMe-MI version 1.1, no fields defined in 1.2 (where the dlen/doff are always considered valid).

ctrl_id

Controller ID target of command

cdw1

Submission Queue Entry doubleword 1

cdw2

Submission Queue Entry doubleword 2

cdw3

Submission Queue Entry doubleword 3

cdw4

Submission Queue Entry doubleword 4

cdw5

Submission Queue Entry doubleword 5

doff

Offset of data to return from command

dlen

Length of sent/returned data

rsvd0

Reserved

rsvd1

Reserved

cdw10

Submission Queue Entry doubleword 10

cdw11

Submission Queue Entry doubleword 11

cdw12

Submission Queue Entry doubleword 12

cdw13

Submission Queue Entry doubleword 13

cdw14

Submission Queue Entry doubleword 14

cdw15

Submission Queue Entry doubleword 15

## Description
Wire format for Admin command message headers, defined in section 6 of NVMe-MI.


title: nvme_mi_admin_resp_hdr(2)

summary: Admin command response header.

text:
# nvme_mi_admin_resp_hdr(2)

## NAME
struct nvme_mi_admin_resp_hdr - Admin command response header.

## SYNOPSIS
struct nvme_mi_admin_resp_hdr {

struct nvme_mi_msg_hdr hdr;

__u8 status;

__u8 rsvd0[3];

__le32 cdw0, cdw1, cdw3;

};

## Members
hdr

Generic MI message header

status

Generic response code, non-zero on failure

rsvd0

Reserved

cdw0

Completion Queue Entry doubleword 0

cdw1

Completion Queue Entry doubleword 1

cdw3

Completion Queue Entry doubleword 3

## Description
This is the generic response format with the three doublewords of completion queue data, plus optional response data.


title: nvme_mi_admin_sanitize_nvm(2)

summary: Start a subsystem Sanitize operation

text:
# nvme_mi_admin_sanitize_nvm(2)

## NAME
nvme_mi_admin_sanitize_nvm - Start a subsystem Sanitize operation

## SYNOPSIS
int nvme_mi_admin_sanitize_nvm (nvme_mi_ctrl_t ctrl , struct nvme_sanitize_nvm_args *args );

## ARGUMENTS
ctrl

Controller to send command to

args

Sanitize command arguments

## DESCRIPTION
A sanitize operation alters all user data in the NVM subsystem such that recovery of any previous user data from any cache, the non-volatile media, or any Controller Memory Buffer is not possible.

The Sanitize command starts a sanitize operation or to recover from a previously failed sanitize operation. The sanitize operation types that may be supported are Block Erase, Crypto Erase, and Overwrite. All sanitize operations are processed in the background, i.e., completion of the sanitize command does not indicate completion of the sanitize operation.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_security_recv(2)

text:
# nvme_mi_admin_security_recv(2)

## NAME
nvme_mi_admin_security_recv - Perform a Security Receive command on a controller.

## SYNOPSIS
int nvme_mi_admin_security_recv (nvme_mi_ctrl_t ctrl , struct nvme_security_receive_args *args );

## ARGUMENTS
ctrl

Controller to send command to

args

Security Receive command arguments

## DESCRIPTION
Performs a Security Receive Admin command as specified by args. Response data is stored in args->data, which should be a buffer of args->data_len bytes. Resulting data length is stored in args->data_len on successful command completion.

Security Receive data length should not be greater than 4096 bytes to comply with specification limits.

See: struct nvme_get_log_args

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_security_send(2)

text:
# nvme_mi_admin_security_send(2)

## NAME
nvme_mi_admin_security_send - Perform a Security Send command on a controller.

## SYNOPSIS
int nvme_mi_admin_security_send (nvme_mi_ctrl_t ctrl , struct nvme_security_send_args *args );

## ARGUMENTS
ctrl

Controller to send command to

args

Security Send command arguments

## DESCRIPTION
Performs a Security Send Admin command as specified by args. Response data is stored in args->data, which should be a buffer of args->data_len bytes. Resulting data length is stored in args->data_len on successful command completion.

Security Send data length should not be greater than 4096 bytes to comply with specification limits.

See: struct nvme_get_log_args

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.


title: nvme_mi_admin_xfer(2)

summary: Raw admin transfer interface.

text:
# nvme_mi_admin_xfer(2)

## NAME
nvme_mi_admin_xfer - Raw admin transfer interface.

## SYNOPSIS
int nvme_mi_admin_xfer (nvme_mi_ctrl_t ctrl , struct nvme_mi_admin_req_hdr *admin_req , size_t req_data_size , struct nvme_mi_admin_resp_hdr *admin_resp , off_t resp_data_offset , size_t *resp_data_size );

## ARGUMENTS
ctrl

controller to send the admin command to

admin_req

request data

req_data_size

size of request data payload

admin_resp

buffer for response data

resp_data_offset

offset into request data to retrieve from controller

resp_data_size

size of response data buffer, updated to received size

## DESCRIPTION
Performs an arbitrary NVMe Admin command, using the provided request data, in admin_req. The size of the request data *payload* is specified in req_data_size - this does not include the standard header length (so a header-only request would have a size of 0).

On success, response data is stored in admin_resp, which has an optional appended payload buffer of resp_data_size bytes. The actual payload transferred will be stored in resp_data_size. These sizes do not include the Admin request header, so 0 represents no payload.

As with all Admin commands, we can request partial data from the Admin Response payload, offset by resp_data_offset.

See: struct nvme_mi_admin_req_hdr and struct nvme_mi_admin_resp_hdr.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise..


title: nvme_mi_ccs(2)

text:
# nvme_mi_ccs(2)

## NAME
enum nvme_mi_ccs - Get State Control Primitive Success Response Fields - Control Primitive Specific Response

## SYNOPSIS
enum nvme_mi_ccs {

NVME_MI_CCS_RDY ,

NVME_MI_CCS_CFS ,

NVME_MI_CCS_SHST ,

NVME_MI_CCS_NSSRO ,

NVME_MI_CCS_CECO ,

NVME_MI_CCS_NAC ,

NVME_MI_CCS_FA ,

NVME_MI_CCS_CSTS ,

NVME_MI_CCS_CTEMP ,

NVME_MI_CCS_PDLU ,

NVME_MI_CCS_SPARE ,

NVME_MI_CCS_CCWARN

};

## Constants
NVME_MI_CCS_RDY

Ready

NVME_MI_CCS_CFS

Controller Fatal Status

NVME_MI_CCS_SHST

Shutdown Status

NVME_MI_CCS_NSSRO

NVM Subsystem Reset Occurred

NVME_MI_CCS_CECO

Controller Enable Change Occurred

NVME_MI_CCS_NAC

Namespace Attribute Changed

NVME_MI_CCS_FA

Firmware Activated

NVME_MI_CCS_CSTS

Controller Status Change

NVME_MI_CCS_CTEMP

Composite Temperature Change

NVME_MI_CCS_PDLU

Percentage Used

NVME_MI_CCS_SPARE

Available Spare

NVME_MI_CCS_CCWARN

Critical Warning


title: nvme_mi_close(2)

text:
# nvme_mi_close(2)

## NAME
nvme_mi_close - Close an endpoint connection and release resources, including controller objects.

## SYNOPSIS
void nvme_mi_close (nvme_mi_ep_t ep );

## ARGUMENTS
ep

Endpoint object to close


title: nvme_mi_close_ctrl(2)

summary: free a controller

text:
# nvme_mi_close_ctrl(2)

## NAME
nvme_mi_close_ctrl - free a controller

## SYNOPSIS
void nvme_mi_close_ctrl (nvme_mi_ctrl_t ctrl );

## ARGUMENTS
ctrl

controller to free


title: nvme_mi_cmd_supported_effects(2)

text:
# nvme_mi_cmd_supported_effects(2)

## NAME
enum nvme_mi_cmd_supported_effects - MI Command Supported and Effects Data Structure

## SYNOPSIS
enum nvme_mi_cmd_supported_effects {

NVME_MI_CMD_SUPPORTED_EFFECTS_CSUPP ,

NVME_MI_CMD_SUPPORTED_EFFECTS_UDCC ,

NVME_MI_CMD_SUPPORTED_EFFECTS_NCC ,

NVME_MI_CMD_SUPPORTED_EFFECTS_NIC ,

NVME_MI_CMD_SUPPORTED_EFFECTS_CCC ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_SHIFT ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_MASK ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_NS ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_CTRL ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_NVM_SET ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_ENDGRP ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_DOMAIN ,

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_NSS

};

## Constants
NVME_MI_CMD_SUPPORTED_EFFECTS_CSUPP

Command Supported

NVME_MI_CMD_SUPPORTED_EFFECTS_UDCC

User Data Content Change

NVME_MI_CMD_SUPPORTED_EFFECTS_NCC

Namespace Capability Change

NVME_MI_CMD_SUPPORTED_EFFECTS_NIC

Namespace Inventory Change

NVME_MI_CMD_SUPPORTED_EFFECTS_CCC

Controller Capability Change

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_SHIFT

20 bit shift

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_MASK

12 bit mask - 0xfff

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_NS

Namespace Scope

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_CTRL

Controller Scope

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_NVM_SET

NVM Set Scope

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_ENDGRP

Endurance Group Scope

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_DOMAIN

Domain Scope

NVME_MI_CMD_SUPPORTED_EFFECTS_SCOPE_NSS

NVM Subsystem Scope


title: nvme_mi_cmd_supported_effects_log(2)

text:
# nvme_mi_cmd_supported_effects_log(2)

## NAME
struct nvme_mi_cmd_supported_effects_log - NVMe-MI Commands Supported and Effects Log

## SYNOPSIS
struct nvme_mi_cmd_supported_effects_log {

__le32 mi_cmd_support[NVME_LOG_MI_CMD_SUPPORTED_EFFECTS_MAX];

__le32 reserved1[NVME_LOG_MI_CMD_SUPPORTED_EFFECTS_RESERVED];

};

## Members
mi_cmd_support

NVMe-MI Commands Supported

reserved1

Reserved


title: nvme_mi_config_id(2)

summary: NVMe-MI Configuration identifier.

text:
# nvme_mi_config_id(2)

## NAME
enum nvme_mi_config_id - NVMe-MI Configuration identifier.

## SYNOPSIS
enum nvme_mi_config_id {

NVME_MI_CONFIG_SMBUS_FREQ ,

NVME_MI_CONFIG_HEALTH_STATUS_CHANGE ,

NVME_MI_CONFIG_MCTP_MTU

};

## Constants
NVME_MI_CONFIG_SMBUS_FREQ

Current SMBus/I2C frequency

NVME_MI_CONFIG_HEALTH_STATUS_CHANGE

Health Status change - used to clear health status bits in CCS bits of status poll. Only for Set ops.

NVME_MI_CONFIG_MCTP_MTU

MCTP maximum transmission unit size of port specified in dw 0

## Description
Configuration parameters for the MI Get/Set Configuration commands.

See &nvme_mi_mi_config_get and &nvme_mi_config_set.


title: nvme_mi_config_smbus_freq(2)

summary: SMBus/I2C frequency values

text:
# nvme_mi_config_smbus_freq(2)

## NAME
enum nvme_mi_config_smbus_freq - SMBus/I2C frequency values

## SYNOPSIS
enum nvme_mi_config_smbus_freq {

NVME_MI_CONFIG_SMBUS_FREQ_100kHz ,

NVME_MI_CONFIG_SMBUS_FREQ_400kHz ,

NVME_MI_CONFIG_SMBUS_FREQ_1MHz

};

## Constants
NVME_MI_CONFIG_SMBUS_FREQ_100kHz

100kHz

NVME_MI_CONFIG_SMBUS_FREQ_400kHz

400kHz

NVME_MI_CONFIG_SMBUS_FREQ_1MHz

1MHz

## Description
Values used in the SMBus Frequency device configuration. See &nvme_mi_mi_config_get_smbus_freq and &nvme_mi_mi_config_set_smbus_freq.


title: nvme_mi_create_root(2)

summary: Create top-level MI (root) handle.

text:
# nvme_mi_create_root(2)

## NAME
nvme_mi_create_root - Create top-level MI (root) handle.

## SYNOPSIS
nvme_root_t nvme_mi_create_root (FILE *fp , int log_level );

## ARGUMENTS
fp

File descriptor for logging messages

log_level

Logging level to use

## DESCRIPTION
Create the top-level (library) handle for creating subsequent endpoint objects. Similar to nvme_create_root, but we provide this to allow linking without the core libnvme.

See nvme_create_root.

## RETURN
new root object, or NULL on failure.


title: nvme_mi_csts(2)

text:
# nvme_mi_csts(2)

## NAME
enum nvme_mi_csts - Controller Health Data Structure (CHDS) - Controller Status (CSTS)

## SYNOPSIS
enum nvme_mi_csts {

NVME_MI_CSTS_RDY ,

NVME_MI_CSTS_CFS ,

NVME_MI_CSTS_SHST ,

NVME_MI_CSTS_NSSRO ,

NVME_MI_CSTS_CECO ,

NVME_MI_CSTS_NAC ,

NVME_MI_CSTS_FA

};

## Constants
NVME_MI_CSTS_RDY

Ready

NVME_MI_CSTS_CFS

Controller Fatal Status

NVME_MI_CSTS_SHST

Shutdown Status

NVME_MI_CSTS_NSSRO

NVM Subsystem Reset Occurred

NVME_MI_CSTS_CECO

Controller Enable Change Occurred

NVME_MI_CSTS_NAC

Namespace Attribute Changed

NVME_MI_CSTS_FA

Firmware Activated


title: nvme_mi_ctrl_health_status(2)

summary: Controller Health Data Structure (CHDS)

text:
# nvme_mi_ctrl_health_status(2)

## NAME
struct nvme_mi_ctrl_health_status - Controller Health Data Structure (CHDS)

## SYNOPSIS
struct nvme_mi_ctrl_health_status {

__le16 ctlid;

__le16 csts;

__le16 ctemp;

__u8 pdlu;

__u8 spare;

__u8 cwarn;

__u8 rsvd9[7];

};

## Members
ctlid

Controller Identifier

csts

Controller Status

ctemp

Composite Temperature

pdlu

Percentage Used

spare

Available Spare

cwarn

Critical Warning

rsvd9

Reserved


title: nvme_mi_ctrl_id(2)

summary: get the ID of a controller

text:
# nvme_mi_ctrl_id(2)

## NAME
nvme_mi_ctrl_id - get the ID of a controller

## SYNOPSIS
__u16 nvme_mi_ctrl_id (nvme_mi_ctrl_t ctrl );

## ARGUMENTS
ctrl

controller to query

## DESCRIPTION
Retrieve the ID of the controller, as defined by hardware, and available in the Identify (Controller List) data. This is the value passed to nvme_mi_init_ctrl, but may have been created internally via nvme_mi_scan_ep.

## RETURN
the (locally-stored) ID of this controller.


title: nvme_mi_cwarn(2)

text:
# nvme_mi_cwarn(2)

## NAME
enum nvme_mi_cwarn - Controller Health Data Structure (CHDS) - Critical Warning (CWARN)

## SYNOPSIS
enum nvme_mi_cwarn {

NVME_MI_CWARN_ST ,

NVME_MI_CWARN_TAUT ,

NVME_MI_CWARN_RD ,

NVME_MI_CWARN_RO ,

NVME_MI_CWARN_VMBF

};

## Constants
NVME_MI_CWARN_ST

Spare Threshold

NVME_MI_CWARN_TAUT

Temperature Above or Under Threshold

NVME_MI_CWARN_RD

Reliability Degraded

NVME_MI_CWARN_RO

Read Only

NVME_MI_CWARN_VMBF

Volatile Memory Backup Failed


title: nvme_mi_dtyp(2)

summary: Data Structure Type field.

text:
# nvme_mi_dtyp(2)

## NAME
enum nvme_mi_dtyp - Data Structure Type field.

## SYNOPSIS
enum nvme_mi_dtyp {

nvme_mi_dtyp_subsys_info ,

nvme_mi_dtyp_port_info ,

nvme_mi_dtyp_ctrl_list ,

nvme_mi_dtyp_ctrl_info ,

nvme_mi_dtyp_opt_cmd_support ,

nvme_mi_dtyp_meb_support

};

## Constants
nvme_mi_dtyp_subsys_info

NVM Subsystem Information

nvme_mi_dtyp_port_info

Port information

nvme_mi_dtyp_ctrl_list

Controller List

nvme_mi_dtyp_ctrl_info

Controller Information

nvme_mi_dtyp_opt_cmd_support

Optionally Supported Command List

nvme_mi_dtyp_meb_support

Management Endpoint Buffer Command Support List

## Description
Data Structure Type field for Read NVMe-MI Data Structure command, used to indicate the particular structure to query from the endpoint.


title: nvme_mi_elem(2)

summary: Element Descriptor Types

text:
# nvme_mi_elem(2)

## NAME
enum nvme_mi_elem - Element Descriptor Types

## SYNOPSIS
enum nvme_mi_elem {

NVME_MI_ELEM_EED ,

NVME_MI_ELEM_USCE ,

NVME_MI_ELEM_ECED ,

NVME_MI_ELEM_LED ,

NVME_MI_ELEM_SMBMED ,

NVME_MI_ELEM_PCIESED ,

NVME_MI_ELEM_NVMED

};

## Constants
NVME_MI_ELEM_EED

Extended Element Descriptor

NVME_MI_ELEM_USCE

Upstream Connector Element Descriptor

NVME_MI_ELEM_ECED

Expansion Connector Element Descriptor

NVME_MI_ELEM_LED

Label Element Descriptor

NVME_MI_ELEM_SMBMED

SMBus/I2C Mux Element Descriptor

NVME_MI_ELEM_PCIESED

PCIe Switch Element Descriptor

NVME_MI_ELEM_NVMED

NVM Subsystem Element Descriptor


title: nvme_mi_free_root(2)

summary: Free root object.

text:
# nvme_mi_free_root(2)

## NAME
nvme_mi_free_root - Free root object.

## SYNOPSIS
void nvme_mi_free_root (nvme_root_t root );

## ARGUMENTS
root

root to free


title: nvme_mi_init_ctrl(2)

summary: initialise a NVMe controller.

text:
# nvme_mi_init_ctrl(2)

## NAME
nvme_mi_init_ctrl - initialise a NVMe controller.

## SYNOPSIS
nvme_mi_ctrl_t nvme_mi_init_ctrl (nvme_mi_ep_t ep , __u16 ctrl_id );

## ARGUMENTS
ep

Endpoint to create under

ctrl_id

ID of controller to initialize.

## DESCRIPTION
Create a connection to a controller behind the endpoint specified in ep. Controller IDs may be queried from the endpoint through nvme_mi_mi_read_mi_data_ctrl_list.

See nvme_mi_close_ctrl

## RETURN
New controller object, or NULL on failure.


title: nvme_mi_message_type(2)

summary: NVMe-MI message type field.

text:
# nvme_mi_message_type(2)

## NAME
enum nvme_mi_message_type - NVMe-MI message type field.

## SYNOPSIS
enum nvme_mi_message_type {

NVME_MI_MT_CONTROL ,

NVME_MI_MT_MI ,

NVME_MI_MT_ADMIN ,

NVME_MI_MT_PCIE

};

## Constants
NVME_MI_MT_CONTROL

NVME-MI Control Primitive

NVME_MI_MT_MI

NVMe-MI command

NVME_MI_MT_ADMIN

NVMe Admin command

NVME_MI_MT_PCIE

PCIe command

## Description
Used as byte 1 of both request and response messages (NMIMT bits of NMP byte). Not to be confused with the MCTP message type in byte 0.


title: nvme_mi_mi_opcode(2)

text:
# nvme_mi_mi_opcode(2)

## NAME
enum nvme_mi_mi_opcode - Operation code for supported NVMe-MI commands.

## SYNOPSIS
enum nvme_mi_mi_opcode {

nvme_mi_mi_opcode_mi_data_read ,

nvme_mi_mi_opcode_subsys_health_status_poll ,

nvme_mi_mi_opcode_configuration_set ,

nvme_mi_mi_opcode_configuration_get

};

## Constants
nvme_mi_mi_opcode_mi_data_read

Read NVMe-MI Data Structure

nvme_mi_mi_opcode_subsys_health_status_poll

Subsystem Health Status Poll

nvme_mi_mi_opcode_configuration_set

MI Configuration Set

nvme_mi_mi_opcode_configuration_get

MI Configuration Get


title: nvme_mi_mi_read_mi_data_ctrl(2)

text:
# nvme_mi_mi_read_mi_data_ctrl(2)

## NAME
nvme_mi_mi_read_mi_data_ctrl - Perform a Read MI Data Structure command, retrieving controller information

## SYNOPSIS
int nvme_mi_mi_read_mi_data_ctrl (nvme_mi_ep_t ep , __u16 ctrl_id , struct nvme_mi_read_ctrl_info *ctrl );

## ARGUMENTS
ep

endpoint for MI communication

ctrl_id

ID of controller to query

ctrl

controller data to populate

## DESCRIPTION
Retrieves the Controller Information Data Structure for the attached controller with ID ctrlid.

See struct nvme_mi_read_ctrl_info.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise..


title: nvme_mi_mi_read_mi_data_ctrl_list(2)

text:
# nvme_mi_mi_read_mi_data_ctrl_list(2)

## NAME
nvme_mi_mi_read_mi_data_ctrl_list - Perform a Read MI Data Structure command, retrieving the list of attached controllers.

## SYNOPSIS
int nvme_mi_mi_read_mi_data_ctrl_list (nvme_mi_ep_t ep , __u8 start_ctrlid , struct nvme_ctrl_list *list );

## ARGUMENTS
ep

endpoint for MI communication

start_ctrlid

starting controller ID

list

controller list to populate

## DESCRIPTION
Retrieves the list of attached controllers, with IDs greater than or equal to start_ctrlid.

See struct nvme_ctrl_list.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise..


title: nvme_mi_mi_read_mi_data_port(2)

text:
# nvme_mi_mi_read_mi_data_port(2)

## NAME
nvme_mi_mi_read_mi_data_port - Perform a Read MI Data Structure command, retrieving port data.

## SYNOPSIS
int nvme_mi_mi_read_mi_data_port (nvme_mi_ep_t ep , __u8 portid , struct nvme_mi_read_port_info *p );

## ARGUMENTS
ep

endpoint for MI communication

portid

id of port data to retrieve

p

port information to populate

## DESCRIPTION
Retrieves the Port information, for the specified port ID. The subsystem data (from nvme_mi_mi_read_mi_data_subsys) nmp field contains the allowed range of port IDs.

See struct nvme_mi_read_port_info.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise..


title: nvme_mi_mi_read_mi_data_subsys(2)

text:
# nvme_mi_mi_read_mi_data_subsys(2)

## NAME
nvme_mi_mi_read_mi_data_subsys - Perform a Read MI Data Structure command, retrieving subsystem data.

## SYNOPSIS
int nvme_mi_mi_read_mi_data_subsys (nvme_mi_ep_t ep , struct nvme_mi_read_nvm_ss_info *s );

## ARGUMENTS
ep

endpoint for MI communication

s

subsystem information to populate

## DESCRIPTION
Retrieves the Subsystem information - number of external ports and NVMe version information. See struct nvme_mi_read_nvm_ss_info.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise..


title: nvme_mi_mi_req_hdr(2)

summary: MI request message header.

text:
# nvme_mi_mi_req_hdr(2)

## NAME
struct nvme_mi_mi_req_hdr - MI request message header.

## SYNOPSIS
struct nvme_mi_mi_req_hdr {

struct nvme_mi_msg_hdr hdr;

__u8 opcode;

__u8 rsvd0[3];

__le32 cdw0, cdw1;

};

## Members
hdr

generic MI message header

opcode

opcode (OPC) for the specific MI command

rsvd0

reserved bytes

cdw0

Management Request Doubleword 0 - command specific usage

cdw1

Management Request Doubleword 1 - command specific usage

## Description
Wire format for MI request message headers, defined in section 5 of NVMe-MI.


title: nvme_mi_mi_resp_hdr(2)

summary: MI response message header.

text:
# nvme_mi_mi_resp_hdr(2)

## NAME
struct nvme_mi_mi_resp_hdr - MI response message header.

## SYNOPSIS
struct nvme_mi_mi_resp_hdr {

struct nvme_mi_msg_hdr hdr;

__u8 status;

__u8 nmresp[3];

};

## Members
hdr

generic MI message header

status

generic response status from command; non-zero on failure.

nmresp

NVMe Management Response: command-type-specific response data

## Description
Wire format for MI response message header, defined in section 5 of NVMe-MI.


text:
# nvme_mi_mi_subsystem_health_status_poll(2)

## NAME
nvme_mi_mi_subsystem_health_status_poll - Read the Subsystem Health Data Structure from the NVM subsystem

## SYNOPSIS
int nvme_mi_mi_subsystem_health_status_poll (nvme_mi_ep_t ep , bool clear , struct nvme_mi_nvm_ss_health_status *nshds );

## ARGUMENTS
ep

endpoint for MI communication

clear

flag to clear the Composite Controller Status state

nshds

subsystem health status data to populate

## DESCRIPTION
Retrieves the Subsystem Health Data Structure into nshds. If clear is set, requests that the Composite Controller Status bits are cleared after the read. See NVMe-MI section 5.6 for details on the CCS bits.

See struct nvme_mi_nvm_ss_health_status.

## RETURN
The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise..


title: nvme_mi_msg_hdr(2)

summary: General MI message header.

text:
# nvme_mi_msg_hdr(2)

## NAME
struct nvme_mi_msg_hdr - General MI message header.

## SYNOPSIS
struct nvme_mi_msg_hdr {

__u8 type;

__u8 nmp;

__u8 meb;

__u8 rsvd0;

};

## Members
type

MCTP message type, will always be NVME_MI_MSGTYPE_NVME

nmp

NVMe-MI message parameters (including MI message type)

meb

Management Endpoint Buffer flag; unused for libnvme-mi implementation

rsvd0

currently reserved

## Description
Wire format shared by both request and response messages, per NVMe-MI section 3.1. This is used for all message types, MI and Admin.


title: nvme_mi_msg_resp(2)

summary: Generic response type.

text:
# nvme_mi_msg_resp(2)

## NAME
struct nvme_mi_msg_resp - Generic response type.

## SYNOPSIS
struct nvme_mi_msg_resp {

struct nvme_mi_msg_hdr hdr;

__u8 status;

__u8 rsvd0[3];

};

## Members
hdr

the general request/response message header

status

response status value (see enum nvme_mi_resp_status)

rsvd0

reserved data, may be defined by specific response

## Description
Every response will start with one of these; command-specific responses will define parts of the reserved data, and may add further fields.


title: nvme_mi_nvm_ss_health_status(2)

summary: Subsystem Management Data Structure

text:
# nvme_mi_nvm_ss_health_status(2)

## NAME
struct nvme_mi_nvm_ss_health_status - Subsystem Management Data Structure

## SYNOPSIS
struct nvme_mi_nvm_ss_health_status {

__u8 nss;

__u8 sw;

__u8 ctemp;

__u8 pdlu;

__le16 ccs;

__u8 rsvd8[2];

};

## Members
nss

NVM Subsystem Status

sw

Smart Warnings

ctemp

Composite Temperature

pdlu

Percentage Drive Life Used

ccs

Composite Controller Status

rsvd8

Reserved


title: nvme_mi_open_mctp(2)

text:
# nvme_mi_open_mctp(2)

## NAME
nvme_mi_open_mctp - Create an endpoint using a MCTP connection.

## SYNOPSIS
nvme_mi_ep_t nvme_mi_open_mctp (nvme_root_t root , unsigned int netid , uint8_t eid );

## ARGUMENTS
root

root object to create under

netid

MCTP network ID on this system

eid

MCTP endpoint ID

## DESCRIPTION
Transport-specific endpoint initialization for MI-connected endpoints. Once an endpoint is created, the rest of the API is transport-independent.

See nvme_mi_close

## RETURN
New endpoint object for netid & eid, or NULL on failure.


title: nvme_mi_osc(2)

text:
# nvme_mi_osc(2)

## NAME
struct nvme_mi_osc - Optionally Supported Command Data Structure

## SYNOPSIS
struct nvme_mi_osc {

__u8 type;

__u8 opc;

};

## Members
type

Command Type

opc

Opcode


title: nvme_mi_port_pcie(2)

summary: PCIe Port Specific Data

text:
# nvme_mi_port_pcie(2)

## NAME
struct nvme_mi_port_pcie - PCIe Port Specific Data

## SYNOPSIS
struct nvme_mi_port_pcie {

__u8 mps;

__u8 sls;

__u8 cls;

__u8 mlw;

__u8 nlw;

__u8 pn;

__u8 rsvd14[18];

};

## Members
mps

PCIe Maximum Payload Size

sls

PCIe Supported Link Speeds Vector

cls

PCIe Current Link Speed

mlw

PCIe Maximum Link Width

nlw

PCIe Negotiated Link Width

pn

PCIe Port Number

rsvd14

Reserved


title: nvme_mi_port_smb(2)

summary: SMBus Port Specific Data

text:
# nvme_mi_port_smb(2)

## NAME
struct nvme_mi_port_smb - SMBus Port Specific Data

## SYNOPSIS
struct nvme_mi_port_smb {

__u8 vpd_addr;

__u8 mvpd_freq;

__u8 mme_addr;

__u8 mme_freq;

__u8 nvmebm;

__u8 rsvd13[19];

};

## Members
vpd_addr

Current VPD SMBus/I2C Address

mvpd_freq

Maximum VPD Access SMBus/I2C Frequency

mme_addr

Current Management Endpoint SMBus/I2C Address

mme_freq

Maximum Management Endpoint SMBus/I2C Frequency

nvmebm

NVMe Basic Management

rsvd13

Reserved


title: nvme_mi_read_ctrl_info(2)

summary: Controller Information Data Structure

text:
# nvme_mi_read_ctrl_info(2)

## NAME
struct nvme_mi_read_ctrl_info - Controller Information Data Structure

## SYNOPSIS
struct nvme_mi_read_ctrl_info {

__u8 portid;

__u8 rsvd1[4];

__u8 prii;

__le16 pri;

__le16 vid;

__le16 did;

__le16 ssvid;

__le16 ssid;

__u8 rsvd16[16];

};

## Members
portid

Port Identifier

rsvd1

Reserved

prii

PCIe Routing ID Information

pri

PCIe Routing ID

vid

PCI Vendor ID

did

PCI Device ID

ssvid

PCI Subsystem Vendor ID

ssid

PCI Subsystem Device ID

rsvd16

Reserved