title: nvme_mi_aem_process(2)

summary: Process AEM on the provided endpoint

text:
# nvme_mi_aem_process(2)

## NAME
nvme_mi_aem_process - Process AEM on the provided endpoint

## SYNOPSIS
int nvme_mi_aem_process (nvme_mi_ep_t ep , void *userdata );

## ARGUMENTS
ep

Endpoint to process

userdata

Application provided context pointer for callback function

## DESCRIPTION
Call this if poll indicates data is available on the fd provided by nvme_mi_aem_get_fd

This will call the fn pointer, aem_handler, provided with nvme_mi_aem_config and the application can call nvme_mi_aem_get_next_event from within this callback to get aem event data. The callback function should return NVME_MI_AEM_HNA_ACK for normal operation.

## RETURN
0 is a success, nonzero is an error and errno may be read for further details


package: libnvme-devel

title: nvme_mi_aem_supported_item(2)

summary: AE Supported List Item

text:
# nvme_mi_aem_supported_item(2)

## NAME
struct nvme_mi_aem_supported_item - AE Supported List Item

## SYNOPSIS
struct nvme_mi_aem_supported_item {

__u8 aesl;

__le16 aesi;

};

## Members
aesl

AE supported list item length

aesi

AE supported info

## Description
Following this header should be hdr.numaes entries of nvme_mi_aem_supported_item structures

branch: sisyphus


title: nvme_mi_aem_supported_list(2)

text:
# nvme_mi_aem_supported_list(2)

## NAME
struct nvme_mi_aem_supported_list - AE Supported List received with GET CONFIG Asynchronous Event

## SYNOPSIS
struct nvme_mi_aem_supported_list {

struct nvme_mi_aem_supported_list_header hdr;

};

## Members
hdr

AE supported list header

## Description
Following this header should be hdr.numaes entries of nvme_mi_aem_supported_item structures


title: nvme_mi_aem_supported_list_header(2)

text:
# nvme_mi_aem_supported_list_header(2)

## NAME
struct nvme_mi_aem_supported_list_header - Asynchronous Event Supported List Header.

## SYNOPSIS
struct nvme_mi_aem_supported_list_header {

__u8 numaes;

__u8 aeslver;

__le16 aest;

__u8 aeslhl;

};

## Members
numaes

Number of AE supported data structures that follow the header

aeslver

AE Supported List Version

aest

AE Supported list length (including this header)

aeslhl

AE Supported list header length

## Description
This header preceeds a number, (numaes), of AE supported data structures


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 ,

NVME_MI_CONFIG_AE

};

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

NVME_MI_CONFIG_AE

Asynchronous Events configuration Configuration parameters for the MI Get/Set Configuration commands.

## Description
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_control(2)

summary: Perform a Control Primitive command

text:
# nvme_mi_control(2)

## NAME
nvme_mi_control - Perform a Control Primitive command

## SYNOPSIS
int nvme_mi_control (nvme_mi_ep_t ep , __u8 opcode , __u16 cpsp , __u16 *result_cpsr );

## ARGUMENTS
ep

endpoint for MI communication

opcode

Control Primitive opcode (using enum nvme_mi_control_opcode)

cpsp

Control Primitive Specific Parameter

result_cpsr

Optional field to return the result from the CPSR field

## DESCRIPTION
Perform a Control Primitive command, using the opcode specified in opcode Stores the result from the CPSR field in result_cpsr if set.

See: enum nvme_mi_control_opcode

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


title: nvme_mi_control_opcode(2)

summary: Operation code for Control Primitives.

text:
# nvme_mi_control_opcode(2)

## NAME
enum nvme_mi_control_opcode - Operation code for Control Primitives.

## SYNOPSIS
enum nvme_mi_control_opcode {

nvme_mi_control_opcode_pause ,

nvme_mi_control_opcode_resume ,

nvme_mi_control_opcode_abort ,

nvme_mi_control_opcode_get_state ,

nvme_mi_control_opcode_replay

};

## Constants
nvme_mi_control_opcode_pause

Suspend response transmission/timeout

nvme_mi_control_opcode_resume

Resume from a paused condition

nvme_mi_control_opcode_abort

Re-initialize a Command Slot to the Idle state

nvme_mi_control_opcode_get_state

Get the state of a Command Slot

nvme_mi_control_opcode_replay

Retransmit the Response Message


title: nvme_mi_control_req(2)

summary: The Control Primitive request.

text:
# nvme_mi_control_req(2)

## NAME
struct nvme_mi_control_req - The Control Primitive request.

## SYNOPSIS
struct nvme_mi_control_req {

struct nvme_mi_msg_hdr hdr;

__u8 opcode;

__u8 tag;

__le16 cpsp;

};

## Members
hdr

Generic MI message header

opcode

Control Primitive Opcodes (using enum nvme_mi_control_opcode)

tag

flag - Opaque value passed from request to response

cpsp

Control Primitive Specific Parameter


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_event(2)

summary: AE event information structure

text:
# nvme_mi_event(2)

## NAME
struct nvme_mi_event - AE event information structure

## SYNOPSIS
struct nvme_mi_event {

uint8_t aeoi;

uint8_t aessi;

uint32_t aeocidi;

void *spec_info;

size_t spec_info_len;

void *vend_spec_info;

size_t vend_spec_info_len;

};

## Members
aeoi

Event identifier

aessi

Event occurrence scope info

aeocidi

Event occurrence scope ID info

spec_info

Specific info buffer

spec_info_len

Length of specific info buffer

vend_spec_info

Vendor specific info buffer

vend_spec_info_len

Length of vendor specific info buffer

## Description
Application callbacks for nvme_mi_aem_process will be able to call nvme_mi_aem_get_next_event which will return a pointer to such an identifier for the next event the application should parse


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 ,

NVME_MI_MT_AE

};

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

NVME_MI_MT_AE

Asynchronous Event

## 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_mi_xfer(2)

summary: Raw mi transfer interface.

text:
# nvme_mi_mi_xfer(2)

## NAME
nvme_mi_mi_xfer - Raw mi transfer interface.

## SYNOPSIS
int nvme_mi_mi_xfer (nvme_mi_ep_t ep , struct nvme_mi_mi_req_hdr *mi_req , size_t req_data_size , struct nvme_mi_mi_resp_hdr *mi_resp , size_t *resp_data_size );

## ARGUMENTS
ep

endpoint to send the MI command to

mi_req

request data

req_data_size

size of request data payload

mi_resp

buffer for response data

resp_data_size

size of response data buffer, updated to received size

## DESCRIPTION
Performs an arbitrary NVMe MI command, using the provided request data, in mi_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). Note that the Management Request Doublewords are considered part of the header data.

On success, response data is stored in mi_resp, which has an optional appended payload buffer of resp_data_size bytes. The actual payload size transferred will be stored in resp_data_size. This size does not include the MI response header, so 0 represents no payload.

See: struct nvme_mi_mi_req_hdr and struct nvme_mi_mi_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_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


title: nvme_mi_read_nvm_ss_info(2)

text:
# nvme_mi_read_nvm_ss_info(2)

## NAME
struct nvme_mi_read_nvm_ss_info - NVM Subsystem Information Data Structure

## SYNOPSIS
struct nvme_mi_read_nvm_ss_info {

__u8 nump;

__u8 mjr;

__u8 mnr;

__u8 rsvd3[29];

};

## Members
nump

Number of Ports

mjr

NVMe-MI Major Version Number

mnr

NVMe-MI Minor Version Number

rsvd3

Reserved


title: nvme_mi_read_port_info(2)

summary: Port Information Data Structure

text:
# nvme_mi_read_port_info(2)

## NAME
struct nvme_mi_read_port_info - Port Information Data Structure

## SYNOPSIS
struct nvme_mi_read_port_info {

__u8 portt;

__u8 rsvd1;

__le16 mmctptus;

__le32 meb;

union {

struct nvme_mi_port_pcie pcie;

struct nvme_mi_port_smb smb;

};

};

## Members
portt

Port Type

rsvd1

Reserved

mmctptus

Maximum MCTP Transmission Unit Size

meb

Management Endpoint Buffer Size

{unnamed_union}

anonymous

pcie

PCIe Port Specific Data

smb

SMBus Port Specific Data


title: nvme_mi_read_sc_list(2)

text:
# nvme_mi_read_sc_list(2)

## NAME
struct nvme_mi_read_sc_list - Management Endpoint Buffer Supported Command List Data Structure

## SYNOPSIS
struct nvme_mi_read_sc_list {

__le16 numcmd;

struct nvme_mi_osc cmds[];

};

## Members
numcmd

Number of Commands

cmds

MEB supported Command Data Structure. See struct nvme_mi_osc


title: nvme_mi_resp_status(2)

summary: values for the response status field

text:
# nvme_mi_resp_status(2)

## NAME
enum nvme_mi_resp_status - values for the response status field

## SYNOPSIS
enum nvme_mi_resp_status {

NVME_MI_RESP_SUCCESS ,

NVME_MI_RESP_MPR ,

NVME_MI_RESP_INTERNAL_ERR ,

NVME_MI_RESP_INVALID_OPCODE ,

NVME_MI_RESP_INVALID_PARAM ,

NVME_MI_RESP_INVALID_CMD_SIZE ,

NVME_MI_RESP_INVALID_INPUT_SIZE ,

NVME_MI_RESP_ACCESS_DENIED ,

NVME_MI_RESP_VPD_UPDATES_EXCEEDED ,

NVME_MI_RESP_PCIE_INACCESSIBLE ,

NVME_MI_RESP_MEB_SANITIZED ,

NVME_MI_RESP_ENC_SERV_FAILURE ,

NVME_MI_RESP_ENC_SERV_XFER_FAILURE ,

NVME_MI_RESP_ENC_FAILURE ,

NVME_MI_RESP_ENC_XFER_REFUSED ,

NVME_MI_RESP_ENC_FUNC_UNSUP ,

NVME_MI_RESP_ENC_SERV_UNAVAIL ,

NVME_MI_RESP_ENC_DEGRADED ,

NVME_MI_RESP_SANITIZE_IN_PROGRESS

};

## Constants
NVME_MI_RESP_SUCCESS

success

NVME_MI_RESP_MPR

More Processing Required

NVME_MI_RESP_INTERNAL_ERR

Internal Error

NVME_MI_RESP_INVALID_OPCODE

Invalid command opcode

NVME_MI_RESP_INVALID_PARAM

Invalid command parameter

NVME_MI_RESP_INVALID_CMD_SIZE

Invalid command size

NVME_MI_RESP_INVALID_INPUT_SIZE

Invalid command input data size

NVME_MI_RESP_ACCESS_DENIED

Access Denied

NVME_MI_RESP_VPD_UPDATES_EXCEEDED

More VPD updates than allowed

NVME_MI_RESP_PCIE_INACCESSIBLE

PCIe functionality currently unavailable

NVME_MI_RESP_MEB_SANITIZED

MEB has been cleared due to sanitize

NVME_MI_RESP_ENC_SERV_FAILURE

Enclosure services process failed

NVME_MI_RESP_ENC_SERV_XFER_FAILURE

Transfer with enclosure services failed

NVME_MI_RESP_ENC_FAILURE

Unreoverable enclosure failure

NVME_MI_RESP_ENC_XFER_REFUSED

Enclosure services transfer refused

NVME_MI_RESP_ENC_FUNC_UNSUP

Unsupported enclosure services function

NVME_MI_RESP_ENC_SERV_UNAVAIL

Enclosure services unavailable

NVME_MI_RESP_ENC_DEGRADED

Noncritical failure detected by enc. services

NVME_MI_RESP_SANITIZE_IN_PROGRESS

Command prohibited during sanitize


title: nvme_mi_set_probe_enabled(2)

text:
# nvme_mi_set_probe_enabled(2)

## NAME
nvme_mi_set_probe_enabled - enable/disable the probe for new endpoints

## SYNOPSIS
void nvme_mi_set_probe_enabled (nvme_root_t root , bool enabled );

## ARGUMENTS
root

nvme_root_t object

enabled

whether to probe new endpoints

## DESCRIPTION
Controls whether newly-created endpoints are probed for quirks on creation. Defaults to enabled, which results in some initial messaging with the endpoint to determine model-specific details.


title: nvme_mi_status_to_string(2)

text:
# nvme_mi_status_to_string(2)

## NAME
nvme_mi_status_to_string - return a string representation of the MI status.

## SYNOPSIS
const char * nvme_mi_status_to_string (int status );

## ARGUMENTS
status

MI response status

## DESCRIPTION
Gives a string description of status, as per section 4.1.2 of the NVMe-MI spec. The status value should be of type NVME_STATUS_MI, and extracted from the return value using nvme_status_get_value.

Returned string is const, and should not be freeed.

## RETURN
A string representing the status value


title: nvme_mi_vpd_hdr(2)

summary: Vital Product Data Common Header

text:
# nvme_mi_vpd_hdr(2)

## NAME
struct nvme_mi_vpd_hdr - Vital Product Data Common Header

## SYNOPSIS
struct nvme_mi_vpd_hdr {

__u8 ipmiver;

__u8 iuaoff;

__u8 ciaoff;

__u8 biaoff;

__u8 piaoff;

__u8 mrioff;

__u8 rsvd6;

__u8 chchk;

__u8 vpd[];

};

## Members
ipmiver

IPMI Format Version Number

iuaoff

Internal Use Area Starting Offset

ciaoff

Chassis Info Area Starting Offset

biaoff

Board Info Area Starting Offset

piaoff

Product Info Area Starting Offset

mrioff

MultiRecord Info Area Starting Offset

rsvd6

Reserved

chchk

Common Header Checksum

vpd

Vital Product Data


title: nvme_mi_vpd_mr_common(2)

summary: NVMe MultiRecord Area

text:
# nvme_mi_vpd_mr_common(2)

## NAME
struct nvme_mi_vpd_mr_common - NVMe MultiRecord Area

## SYNOPSIS
struct nvme_mi_vpd_mr_common {

__u8 type;

__u8 rf;

__u8 rlen;

__u8 rchksum;

__u8 hchksum;

union {

struct nvme_mi_vpd_mra nmra;

struct nvme_mi_vpd_ppmra ppmra;

struct nvme_mi_vpd_tra tmra;

};

};

## Members
type

NVMe Record Type ID

rf

Record Format

rlen

Record Length

rchksum

Record Checksum

hchksum

Header Checksum

{unnamed_union}

anonymous

nmra

NVMe MultiRecord Area

ppmra

NVMe PCIe Port MultiRecord Area

tmra

Topology MultiRecord Area


title: nvme_mi_vpd_mra(2)

summary: NVMe MultiRecord Area

text:
# nvme_mi_vpd_mra(2)

## NAME
struct nvme_mi_vpd_mra - NVMe MultiRecord Area

## SYNOPSIS
struct nvme_mi_vpd_mra {

__u8 nmravn;

__u8 ff;

__u8 rsvd7[6];

__u8 i18vpwr;

__u8 m18vpwr;

__u8 i33vpwr;

__u8 m33vpwr;

__u8 rsvd17;

__u8 m33vapsr;

__u8 i5vapsr;

__u8 m5vapsr;

__u8 i12vapsr;

__u8 m12vapsr;

__u8 mtl;

__u8 tnvmcap[16];

__u8 rsvd37[27];

};

## Members
nmravn

NVMe MultiRecord Area Version Number

ff

Form Factor

rsvd7

Reserved

i18vpwr

Initial 1.8 V Power Supply Requirements

m18vpwr

Maximum 1.8 V Power Supply Requirements

i33vpwr

Initial 3.3 V Power Supply Requirements

m33vpwr

Maximum 3.3 V Power Supply Requirements

rsvd17

Reserved

m33vapsr

Maximum 3.3 Vi aux Power Supply Requirements

i5vapsr

Initial 5 V Power Supply Requirements

m5vapsr

Maximum 5 V Power Supply Requirements

i12vapsr

Initial 12 V Power Supply Requirements

m12vapsr

Maximum 12 V Power Supply Requirements

mtl

Maximum Thermal Load

tnvmcap

Total NVM Capacity

rsvd37

Reserved


title: nvme_mi_vpd_ppmra(2)

summary: NVMe PCIe Port MultiRecord Area

text:
# nvme_mi_vpd_ppmra(2)

## NAME
struct nvme_mi_vpd_ppmra - NVMe PCIe Port MultiRecord Area

## SYNOPSIS
struct nvme_mi_vpd_ppmra {

__u8 nppmravn;

__u8 pn;

__u8 ppi;

__u8 ls;

__u8 mlw;

__u8 mctp;

__u8 refccap;

__u8 pi;

__u8 rsvd13[3];

};

## Members
nppmravn

NVMe PCIe Port MultiRecord Area Version Number

pn

PCIe Port Number

ppi

Port Information

ls

PCIe Link Speed

mlw

PCIe Maximum Link Width

mctp

MCTP Support

refccap

Ref Clk Capability

pi

Port Identifier

rsvd13

Reserved


title: nvme_mi_vpd_telem(2)

summary: Vital Product Data Element Descriptor

text:
# nvme_mi_vpd_telem(2)

## NAME
struct nvme_mi_vpd_telem - Vital Product Data Element Descriptor

## SYNOPSIS
struct nvme_mi_vpd_telem {

__u8 type;

__u8 rev;

__u8 len;

__u8 data[0];

};

## Members
type

Type of the Element Descriptor

rev

Revision of the Element Descriptor

len

Number of bytes in the Element Descriptor

data

Type-specific information associated with the Element Descriptor


title: nvme_mi_vpd_tra(2)

summary: Vital Product Data Topology MultiRecord

text:
# nvme_mi_vpd_tra(2)

## NAME
struct nvme_mi_vpd_tra - Vital Product Data Topology MultiRecord

## SYNOPSIS
struct nvme_mi_vpd_tra {

__u8 vn;

__u8 rsvd6;

__u8 ec;

struct nvme_mi_vpd_telem elems[0];

};

## Members
vn

Version Number

rsvd6

Reserved

ec

Element Count

elems

Element Descriptor


title: nvme_namespace_attach_ctrls(2)

summary: Attach namespace to controller(s)

text:
# nvme_namespace_attach_ctrls(2)

## NAME
nvme_namespace_attach_ctrls - Attach namespace to controller(s)

## SYNOPSIS
int nvme_namespace_attach_ctrls (int fd , __u32 nsid , __u16 num_ctrls , __u16 *ctrlist );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID to attach

num_ctrls

Number of controllers in ctrlist

ctrlist

List of controller IDs to perform the attach action

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


title: nvme_namespace_detach_ctrls(2)

summary: Detach namespace from controller(s)

text:
# nvme_namespace_detach_ctrls(2)

## NAME
nvme_namespace_detach_ctrls - Detach namespace from controller(s)

## SYNOPSIS
int nvme_namespace_detach_ctrls (int fd , __u32 nsid , __u16 num_ctrls , __u16 *ctrlist );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID to detach

num_ctrls

Number of controllers in ctrlist

ctrlist

List of controller IDs to perform the detach action

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


title: nvme_namespace_filter(2)

summary: Filter for namespaces

text:
# nvme_namespace_filter(2)

## NAME
nvme_namespace_filter - Filter for namespaces

## SYNOPSIS
int nvme_namespace_filter (const struct dirent *d );

## ARGUMENTS
d

dirent to check

## RETURN
1 if d matches, 0 otherwise


title: nvme_namespace_first_path(2)

summary: Start path iterator

text:
# nvme_namespace_first_path(2)

## NAME
nvme_namespace_first_path - Start path iterator

## SYNOPSIS
nvme_path_t nvme_namespace_first_path (nvme_ns_t ns );

## ARGUMENTS
ns

Namespace instance

## RETURN
First nvme_path_t object of an ns iterator


title: nvme_namespace_for_each_path(2)

summary: Traverse paths

text:
# nvme_namespace_for_each_path(2)

## NAME
nvme_namespace_for_each_path - Traverse paths

## SYNOPSIS
nvme_namespace_for_each_path (n , p );

## ARGUMENTS
n

Namespace instance

p

nvme_path_t object


title: nvme_namespace_for_each_path_safe(2)

summary: Traverse paths

text:
# nvme_namespace_for_each_path_safe(2)

## NAME
nvme_namespace_for_each_path_safe - Traverse paths

## SYNOPSIS
nvme_namespace_for_each_path_safe (n , p , _p );

## ARGUMENTS
n

Namespace instance

p

nvme_path_t object

_p

A nvme_path_t_node to use as temporary storage


title: nvme_namespace_next_path(2)

summary: Next path iterator

text:
# nvme_namespace_next_path(2)

## NAME
nvme_namespace_next_path - Next path iterator

## SYNOPSIS
nvme_path_t nvme_namespace_next_path (nvme_ns_t ns , nvme_path_t p );

## ARGUMENTS
ns

Namespace instance

p

Previous nvme_path_t object of an ns iterator

## RETURN
Next nvme_path_t object of an ns iterator


title: nvme_nbft_free(2)

text:
# nvme_nbft_free(2)

## NAME
nvme_nbft_free - Free the struct nbft_info and its contents

## SYNOPSIS
void nvme_nbft_free (struct nbft_info *nbft );

## ARGUMENTS
nbft

Parsed NBFT table data.


title: nvme_nbft_read(2)

text:
# nvme_nbft_read(2)

## NAME
nvme_nbft_read - Read and parse contents of an ACPI NBFT table

## SYNOPSIS
int nvme_nbft_read (struct nbft_info **nbft , const char *filename );

## ARGUMENTS
nbft

Parsed NBFT table data.

filename

Filename of the raw NBFT table to read.

## DESCRIPTION
Read and parse the specified NBFT file into a struct nbft_info. Free with nvme_nbft_free.

## RETURN
0 on success, errno otherwise.


title: nvme_nd_ns_fpi(2)

text:
# nvme_nd_ns_fpi(2)

## NAME
enum nvme_nd_ns_fpi - If a format operation is in progress, this field indicates the percentage of the namespace that remains to be formatted.

## SYNOPSIS
enum nvme_nd_ns_fpi {

NVME_NS_FPI_REMAINING ,

NVME_NS_FPI_SUPPORTED

};

## Constants
NVME_NS_FPI_REMAINING

Mask to get the format percent remaining value

NVME_NS_FPI_SUPPORTED

If set, indicates that the namespace supports the Format Progress Indicator defined for the field.


title: nvme_next_host(2)

summary: Next host iterator

text:
# nvme_next_host(2)

## NAME
nvme_next_host - Next host iterator

## SYNOPSIS
nvme_host_t nvme_next_host (nvme_root_t r , nvme_host_t h );

## ARGUMENTS
r

nvme_root_t object

h

Previous nvme_host_t iterator

## RETURN
Next nvme_host_t object in an iterator


title: nvme_next_subsystem(2)

summary: Next subsystem iterator

text:
# nvme_next_subsystem(2)

## NAME
nvme_next_subsystem - Next subsystem iterator

## SYNOPSIS
nvme_subsystem_t nvme_next_subsystem (nvme_host_t h , nvme_subsystem_t s );

## ARGUMENTS
h

nvme_host_t object

s

Previous nvme_subsystem_t iterator

## RETURN
next nvme_subsystem_t object in an iterator


title: nvme_ns_attach(2)

text:
# nvme_ns_attach(2)

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

## SYNOPSIS
int nvme_ns_attach (struct nvme_ns_attach_args *args );

## ARGUMENTS
args

struct nvme_ns_attach_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_ns_attach_args(2)

text:
# nvme_ns_attach_args(2)

## NAME
struct nvme_ns_attach_args - Arguments for Nvme Namespace Management command

## SYNOPSIS
struct nvme_ns_attach_args {

__u32 *result;

struct nvme_ctrl_list *ctrlist;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

enum nvme_ns_attach_sel sel;

};

## Members
result

NVMe command result

ctrlist

Controller list to modify attachment state of nsid

args_size

Size of struct nvme_ns_attach_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace ID to execute attach selection

sel

Attachment selection, see enum nvme_ns_attach_sel


title: nvme_ns_attach_ctrls(2)

summary: Attach namespace to controllers

text:
# nvme_ns_attach_ctrls(2)

## NAME
nvme_ns_attach_ctrls - Attach namespace to controllers

## SYNOPSIS
int nvme_ns_attach_ctrls (int fd , __u32 nsid , struct nvme_ctrl_list *ctrlist );

## ARGUMENTS
fd

File descriptor of nvme device

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_ns_attach_sel(2)

summary: Namespace Attachment - Select

text:
# nvme_ns_attach_sel(2)

## NAME
enum nvme_ns_attach_sel - Namespace Attachment - Select

## SYNOPSIS
enum nvme_ns_attach_sel {

NVME_NS_ATTACH_SEL_CTRL_ATTACH ,

NVME_NS_ATTACH_SEL_CTRL_DEATTACH

};

## Constants
NVME_NS_ATTACH_SEL_CTRL_ATTACH

Namespace attach selection

NVME_NS_ATTACH_SEL_CTRL_DEATTACH

Namespace detach selection


title: nvme_ns_compare(2)

summary: Compare data on a namespace

text:
# nvme_ns_compare(2)

## NAME
nvme_ns_compare - Compare data on a namespace

## SYNOPSIS
int nvme_ns_compare (nvme_ns_t n , void *buf , off_t offset , size_t count );

## ARGUMENTS
n

Namespace instance

buf

Buffer with data to be compared

offset

LBA offset of n

count

Number of sectors in buf

## RETURN
Number of sectors compared


title: nvme_ns_detach_ctrls(2)

summary: Detach namespace from controllers

text:
# nvme_ns_detach_ctrls(2)

## NAME
nvme_ns_detach_ctrls - Detach namespace from controllers

## SYNOPSIS
int nvme_ns_detach_ctrls (int fd , __u32 nsid , struct nvme_ctrl_list *ctrlist );

## ARGUMENTS
fd

File descriptor of nvme device

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_ns_flush(2)

summary: Flush data to a namespace

text:
# nvme_ns_flush(2)

## NAME
nvme_ns_flush - Flush data to a namespace

## SYNOPSIS
int nvme_ns_flush (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
0 on success, -1 on error.


title: nvme_ns_get_csi(2)

summary: Command set identifier of a namespace

text:
# nvme_ns_get_csi(2)

## NAME
nvme_ns_get_csi - Command set identifier of a namespace

## SYNOPSIS
enum nvme_csi nvme_ns_get_csi (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
The namespace's command set identifier in use


title: nvme_ns_get_ctrl(2)

summary: &nvme_ctrl_t of a namespace

text:
# nvme_ns_get_ctrl(2)

## NAME
nvme_ns_get_ctrl - &nvme_ctrl_t of a namespace

## SYNOPSIS
nvme_ctrl_t nvme_ns_get_ctrl (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## DESCRIPTION
nvme_ctrl_t object may be NULL for a multipathed namespace

## RETURN
nvme_ctrl_t object of n if present


title: nvme_ns_get_eui64(2)

summary: 64-bit eui of a namespace

text:
# nvme_ns_get_eui64(2)

## NAME
nvme_ns_get_eui64 - 64-bit eui of a namespace

## SYNOPSIS
const uint8_t * nvme_ns_get_eui64 (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
A pointer to the 64-bit eui


title: nvme_ns_get_fd(2)

summary: Get associated file descriptor

text:
# nvme_ns_get_fd(2)

## NAME
nvme_ns_get_fd - Get associated file descriptor

## SYNOPSIS
int nvme_ns_get_fd (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## DESCRIPTION
libnvme will open the file (if not already opened) and keep an internal copy of the file descriptor. Following calls to this API retrieve the internal cached copy of the file descriptor. The file will remain opened and the fd will remain cached until the ns object is deleted or nvme_ns_release_fd is called.

## RETURN
File descriptor associated with n or -1


title: nvme_ns_get_firmware(2)

summary: Firmware string of a namespace

text:
# nvme_ns_get_firmware(2)

## NAME
nvme_ns_get_firmware - Firmware string of a namespace

## SYNOPSIS
const char * nvme_ns_get_firmware (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
Firmware string of n


title: nvme_ns_get_generic_name(2)

text:
# nvme_ns_get_generic_name(2)

## NAME
nvme_ns_get_generic_name - Returns name of generic namespace chardev.

## SYNOPSIS
const char * nvme_ns_get_generic_name (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
Name of generic namespace chardev


title: nvme_ns_get_lba_count(2)

summary: LBA count of a namespace

text:
# nvme_ns_get_lba_count(2)

## NAME
nvme_ns_get_lba_count - LBA count of a namespace

## SYNOPSIS
uint64_t nvme_ns_get_lba_count (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
LBA count of n


title: nvme_ns_get_lba_size(2)

summary: LBA size of a namespace

text:
# nvme_ns_get_lba_size(2)

## NAME
nvme_ns_get_lba_size - LBA size of a namespace

## SYNOPSIS
int nvme_ns_get_lba_size (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
LBA size of n


title: nvme_ns_get_lba_util(2)

summary: LBA utilization of a namespace

text:
# nvme_ns_get_lba_util(2)

## NAME
nvme_ns_get_lba_util - LBA utilization of a namespace

## SYNOPSIS
uint64_t nvme_ns_get_lba_util (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
LBA utilization of n


title: nvme_ns_get_meta_size(2)

summary: Metadata size of a namespace

text:
# nvme_ns_get_meta_size(2)

## NAME
nvme_ns_get_meta_size - Metadata size of a namespace

## SYNOPSIS
int nvme_ns_get_meta_size (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
Metadata size of n


title: nvme_ns_get_model(2)

summary: Model of a namespace

text:
# nvme_ns_get_model(2)

## NAME
nvme_ns_get_model - Model of a namespace

## SYNOPSIS
const char * nvme_ns_get_model (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
Model string of n


title: nvme_ns_get_name(2)

summary: sysfs name of a namespace

text:
# nvme_ns_get_name(2)

## NAME
nvme_ns_get_name - sysfs name of a namespace

## SYNOPSIS
const char * nvme_ns_get_name (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
sysfs name of n


title: nvme_ns_get_nguid(2)

summary: 128-bit nguid of a namespace

text:
# nvme_ns_get_nguid(2)

## NAME
nvme_ns_get_nguid - 128-bit nguid of a namespace

## SYNOPSIS
const uint8_t * nvme_ns_get_nguid (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
A pointer to the 128-bit nguid


title: nvme_ns_get_nsid(2)

summary: NSID of a namespace

text:
# nvme_ns_get_nsid(2)

## NAME
nvme_ns_get_nsid - NSID of a namespace

## SYNOPSIS
int nvme_ns_get_nsid (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
NSID of n


title: nvme_ns_get_serial(2)

summary: Serial number of a namespace

text:
# nvme_ns_get_serial(2)

## NAME
nvme_ns_get_serial - Serial number of a namespace

## SYNOPSIS
const char * nvme_ns_get_serial (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
Serial number string of n


title: nvme_ns_get_subsystem(2)

summary: &nvme_subsystem_t of a namespace

text:
# nvme_ns_get_subsystem(2)

## NAME
nvme_ns_get_subsystem - &nvme_subsystem_t of a namespace

## SYNOPSIS
nvme_subsystem_t nvme_ns_get_subsystem (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
nvme_subsystem_t object of n


title: nvme_ns_get_sysfs_dir(2)

summary: sysfs directory of a namespace

text:
# nvme_ns_get_sysfs_dir(2)

## NAME
nvme_ns_get_sysfs_dir - sysfs directory of a namespace

## SYNOPSIS
const char * nvme_ns_get_sysfs_dir (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance

## RETURN
sysfs directory name of n


title: nvme_ns_get_uuid(2)

summary: UUID of a namespace

text:
# nvme_ns_get_uuid(2)

## NAME
nvme_ns_get_uuid - UUID of a namespace

## SYNOPSIS
void nvme_ns_get_uuid (nvme_ns_t n , unsigned char out[NVME_UUID_LEN] );

## ARGUMENTS
n

Namespace instance

out

buffer for the UUID

## DESCRIPTION
Copies the namespace's uuid into out


title: nvme_ns_head_get_sysfs_dir(2)

summary: sysfs dir of namespave head

text:
# nvme_ns_head_get_sysfs_dir(2)

## NAME
nvme_ns_head_get_sysfs_dir - sysfs dir of namespave head

## SYNOPSIS
const char * nvme_ns_head_get_sysfs_dir (nvme_ns_head_t head );

## ARGUMENTS
head

namespace head instance

## RETURN
sysfs directory name of head


title: nvme_ns_id_desc(2)

summary: Namespace identifier type descriptor

text:
# nvme_ns_id_desc(2)

## NAME
struct nvme_ns_id_desc - Namespace identifier type descriptor

## SYNOPSIS
struct nvme_ns_id_desc {

__u8 nidt;

__u8 nidl;

__le16 rsvd;

__u8 nid[];

};

## Members
nidt

Namespace Identifier Type, see enum nvme_ns_id_desc_nidt

nidl

Namespace Identifier Length contains the length in bytes of the struct nvme_id_ns.nid.

rsvd

Reserved

nid

Namespace Identifier contains a value that is globally unique and assigned to the namespace when the namespace is created. The length is defined in struct nvme_id_ns.nidl.


title: nvme_ns_id_desc_nidt(2)

summary: Known namespace identifier types

text:
# nvme_ns_id_desc_nidt(2)

## NAME
enum nvme_ns_id_desc_nidt - Known namespace identifier types

## SYNOPSIS
enum nvme_ns_id_desc_nidt {

NVME_NIDT_EUI64 ,

NVME_NIDT_NGUID ,

NVME_NIDT_UUID ,

NVME_NIDT_CSI

};

## Constants
NVME_NIDT_EUI64

IEEE Extended Unique Identifier, the NID field contains a copy of the EUI64 field in the struct nvme_id_ns.eui64.

NVME_NIDT_NGUID

Namespace Globally Unique Identifier, the NID field contains a copy of the NGUID field in struct nvme_id_ns.nguid.

NVME_NIDT_UUID

The NID field contains a 128-bit Universally Unique Identifier (UUID) as specified in RFC 4122.

NVME_NIDT_CSI

The NID field contains the command set identifier.


title: nvme_ns_identify(2)

summary: Issue an 'identify namespace' command

text:
# nvme_ns_identify(2)

## NAME
nvme_ns_identify - Issue an 'identify namespace' command

## SYNOPSIS
int nvme_ns_identify (nvme_ns_t n , struct nvme_id_ns *ns );

## ARGUMENTS
n

Namespace instance

ns

nvme_id_ns buffer

## DESCRIPTION
Writes the data returned by the 'identify namespace' command into ns.

## RETURN
0 on success, -1 on error.


title: nvme_ns_identify_descs(2)

summary: Issue an 'identify descriptors' command

text:
# nvme_ns_identify_descs(2)

## NAME
nvme_ns_identify_descs - Issue an 'identify descriptors' command

## SYNOPSIS
int nvme_ns_identify_descs (nvme_ns_t n , struct nvme_ns_id_desc *descs );

## ARGUMENTS
n

Namespace instance

descs

List of identify descriptors

## DESCRIPTION
Writes the data returned by the 'identify descriptors' command into descs.

## RETURN
0 on success, -1 on error.


title: nvme_ns_list(2)

summary: Namespace List

text:
# nvme_ns_list(2)

## NAME
struct nvme_ns_list - Namespace List

## SYNOPSIS
struct nvme_ns_list {

__le32 ns[NVME_ID_NS_LIST_MAX];

};

## Members
ns

Namespace Identifier


title: nvme_ns_metadata_type(2)

summary: Namespace Metadata Element Types

text:
# nvme_ns_metadata_type(2)

## NAME
enum nvme_ns_metadata_type - Namespace Metadata Element Types

## SYNOPSIS
enum nvme_ns_metadata_type {

NVME_NS_METADATA_OS_NS_NAME ,

NVME_NS_METADATA_PRE_BOOT_NS_NAME ,

NVME_NS_METADATA_OS_NS_QUAL_1 ,

NVME_NS_METADATA_OS_NS_QUAL_2

};

## Constants
NVME_NS_METADATA_OS_NS_NAME

Name of the namespace in the operating system

NVME_NS_METADATA_PRE_BOOT_NS_NAME

Name of the namespace in the pre-boot environment.

NVME_NS_METADATA_OS_NS_QUAL_1

First qualifier of the Operating System Namespace Name.

NVME_NS_METADATA_OS_NS_QUAL_2

Second qualifier of the Operating System Namespace Name.


title: nvme_ns_mgmt(2)

summary: Issue a Namespace management command

text:
# nvme_ns_mgmt(2)

## NAME
nvme_ns_mgmt - Issue a Namespace management command

## SYNOPSIS
int nvme_ns_mgmt (struct nvme_ns_mgmt_args *args );

## ARGUMENTS
args

struct nvme_ns_mgmt_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_ns_mgmt_args(2)

text:
# nvme_ns_mgmt_args(2)

## NAME
struct nvme_ns_mgmt_args - Arguments for NVMe Namespace Management command

## SYNOPSIS
struct nvme_ns_mgmt_args {

__u32 *result;

struct nvme_id_ns *ns;

int args_size;

int fd;

__u32 timeout;

__u32 nsid;

enum nvme_ns_mgmt_sel sel;

__u8 csi;

__u8 rsvd1[3];

void *rsvd2;

struct nvme_ns_mgmt_host_sw_specified *data;

};

## Members
result

NVMe command result

ns

Namespace identification descriptors

args_size

Size of struct nvme_ns_mgmt_args

fd

File descriptor of nvme device

timeout

Timeout in ms

nsid

Namespace identifier

sel

Type of management operation to perform

csi

Command Set Identifier

rsvd1

Reserved

rsvd2

Reserved

data

Host Software Specified Fields


title: nvme_ns_mgmt_create(2)

summary: Create a non attached namespace

text:
# nvme_ns_mgmt_create(2)

## NAME
nvme_ns_mgmt_create - Create a non attached namespace

## SYNOPSIS
int nvme_ns_mgmt_create (int fd , struct nvme_id_ns *ns , __u32 *nsid , __u32 timeout , __u8 csi , struct nvme_ns_mgmt_host_sw_specified *data );

## ARGUMENTS
fd

File descriptor of nvme device

ns

Namespace identification that defines ns creation parameters

nsid

On success, set to the namespace id that was created

timeout

Override the default timeout to this value in milliseconds; set to 0 to use the system default.

csi

Command Set Identifier

data

Host Software Specified Fields that defines ns creation parameters

## DESCRIPTION
On successful creation, the namespace exists in the subsystem, but is not attached to any controller. Use the nvme_ns_attach_ctrls to assign the namespace to one or more controllers.

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


title: nvme_ns_mgmt_delete(2)

summary: Delete a non attached namespace

text:
# nvme_ns_mgmt_delete(2)

## NAME
nvme_ns_mgmt_delete - Delete a non attached namespace

## SYNOPSIS
int nvme_ns_mgmt_delete (int fd , __u32 nsid );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace identifier to delete

## DESCRIPTION
It is recommended that a namespace being deleted is not attached to any controller. Use the nvme_ns_detach_ctrls first if the namespace is still attached.

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


title: nvme_ns_mgmt_delete_timeout(2)

text:
# nvme_ns_mgmt_delete_timeout(2)

## NAME
nvme_ns_mgmt_delete_timeout - Delete a non attached namespace with timeout

## SYNOPSIS
int nvme_ns_mgmt_delete_timeout (int fd , __u32 nsid , __u32 timeout );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace identifier to delete

timeout

Override the default timeout to this value in milliseconds; set to 0 to use the system default.

## DESCRIPTION
It is recommended that a namespace being deleted is not attached to any controller. Use the nvme_ns_detach_ctrls first if the namespace is still attached.

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


title: nvme_ns_mgmt_host_sw_specified(2)

text:
# nvme_ns_mgmt_host_sw_specified(2)

## NAME
struct nvme_ns_mgmt_host_sw_specified - Namespace management Host Software Specified Fields.

## SYNOPSIS
struct nvme_ns_mgmt_host_sw_specified {

__le64 nsze;

__le64 ncap;

__u8 rsvd16[10];

__u8 flbas;

__u8 rsvd27[2];

__u8 dps;

__u8 nmic;

__u8 rsvd31[61];

__le32 anagrpid;

__u8 rsvd96[4];

__le16 nvmsetid;

__le16 endgid;

__u8 rsvd104[280];

__le64 lbstm;

__le16 nphndls;

__u8 rsvd394[105];

union {

__u8 rsvd499[13];

struct {

__u8 znsco;

__le32 rar;

__le32 ror;

__le32 rnumzrwa;

} zns;

};

__le16 phndl[128];

__u8 rsvd768[3328];

};

## Members
nsze

Namespace Size indicates the total size of the namespace in logical blocks. The number of logical blocks is based on the formatted LBA size.

ncap

Namespace Capacity indicates the maximum number of logical blocks that may be allocated in the namespace at any point in time. The number of logical blocks is based on the formatted LBA size.

rsvd16

Reserved

flbas

Formatted LBA Size, see enum nvme_id_ns_flbas.

rsvd27

Reserved

dps

End-to-end Data Protection Type Settings, see enum nvme_id_ns_dps.

nmic

Namespace Multi-path I/O and Namespace Sharing Capabilities, see enum nvme_id_ns_nmic.

rsvd31

Reserved

anagrpid

ANA Group Identifier indicates the ANA Group Identifier of the ANA group of which the namespace is a member.

rsvd96

Reserved

nvmsetid

NVM Set Identifier indicates the NVM Set with which this namespace is associated.

endgid

Endurance Group Identifier indicates the Endurance Group with which this namespace is associated.

rsvd104

Reserved

lbstm

Logical Block Storage Tag Mask Identifies the mask for the Storage Tag field for the protection information

nphndls

Number of Placement Handles specifies the number of Placement Handles included in the Placement Handle List

rsvd394

Reserved

{unnamed_union}

anonymous

rsvd499

Reserved for I/O Command Sets that extend this specification.

zns

rsvd499( Zoned Namespace Command Set specific field )

phndl

Placement Handle Associated RUH : This field specifies the Reclaim Unit Handle Identifier to be associated with the Placement Handle value. If the Flexible Data Placement capability is not supported or not enabled in specified Endurance Group, then the controller shall ignore this field.

rsvd768

Reserved


title: nvme_ns_mgmt_sel(2)

summary: Namespace Management - Select

text:
# nvme_ns_mgmt_sel(2)

## NAME
enum nvme_ns_mgmt_sel - Namespace Management - Select

## SYNOPSIS
enum nvme_ns_mgmt_sel {

NVME_NS_MGMT_SEL_CREATE ,

NVME_NS_MGMT_SEL_DELETE

};

## Constants
NVME_NS_MGMT_SEL_CREATE

Namespace Create selection

NVME_NS_MGMT_SEL_DELETE

Namespace Delete selection


title: nvme_ns_read(2)

summary: Read from a namespace

text:
# nvme_ns_read(2)

## NAME
nvme_ns_read - Read from a namespace

## SYNOPSIS
int nvme_ns_read (nvme_ns_t n , void *buf , off_t offset , size_t count );

## ARGUMENTS
n

Namespace instance

buf

Buffer into which the data will be transferred

offset

LBA offset of n

count

Number of sectors in buf

## RETURN
Number of sectors read or -1 on error.


title: nvme_ns_release_fd(2)

summary: Close fd and clear fd from ns object

text:
# nvme_ns_release_fd(2)

## NAME
nvme_ns_release_fd - Close fd and clear fd from ns object

## SYNOPSIS
void nvme_ns_release_fd (nvme_ns_t n );

## ARGUMENTS
n

Namespace instance


title: nvme_ns_rescan(2)

summary: Initiate a controller rescan

text:
# nvme_ns_rescan(2)

## NAME
nvme_ns_rescan - Initiate a controller rescan

## SYNOPSIS
int nvme_ns_rescan (int fd );

## ARGUMENTS
fd

File descriptor of nvme device

## DESCRIPTION
This should only be sent to controller handles, not to namespaces.

## RETURN
0 if a rescan was initiated or -1 with errno set otherwise.


title: nvme_ns_verify(2)

summary: Verify data on a namespace

text:
# nvme_ns_verify(2)

## NAME
nvme_ns_verify - Verify data on a namespace

## SYNOPSIS
int nvme_ns_verify (nvme_ns_t n , off_t offset , size_t count );

## ARGUMENTS
n

Namespace instance

offset

LBA offset of n

count

Number of sectors to be verified

## RETURN
Number of sectors verified


title: nvme_ns_write(2)

summary: Write to a namespace

text:
# nvme_ns_write(2)

## NAME
nvme_ns_write - Write to a namespace

## SYNOPSIS
int nvme_ns_write (nvme_ns_t n , void *buf , off_t offset , size_t count );

## ARGUMENTS
n

Namespace instance

buf

Buffer with data to be written

offset

LBA offset of n

count

Number of sectors in buf

## RETURN
Number of sectors written or -1 on error


title: nvme_ns_write_protect_cfg(2)

text:
# nvme_ns_write_protect_cfg(2)

## NAME
enum nvme_ns_write_protect_cfg - Write Protection - Write Protection State

## SYNOPSIS
enum nvme_ns_write_protect_cfg {

NVME_NS_WP_CFG_NONE ,

NVME_NS_WP_CFG_PROTECT ,

NVME_NS_WP_CFG_PROTECT_POWER_CYCLE ,

NVME_NS_WP_CFG_PROTECT_PERMANENT

};

## Constants
NVME_NS_WP_CFG_NONE

No Write Protect

NVME_NS_WP_CFG_PROTECT

Write Protect

NVME_NS_WP_CFG_PROTECT_POWER_CYCLE

Write Protect Until Power Cycle

NVME_NS_WP_CFG_PROTECT_PERMANENT

Permanent Write Protect


title: nvme_ns_write_uncorrectable(2)

summary: Issus a 'write uncorrectable' command

text:
# nvme_ns_write_uncorrectable(2)

## NAME
nvme_ns_write_uncorrectable - Issus a 'write uncorrectable' command

## SYNOPSIS
int nvme_ns_write_uncorrectable (nvme_ns_t n , off_t offset , size_t count );

## ARGUMENTS
n

Namespace instance

offset

LBA offset in n

count

Number of sectors to be written

## RETURN
Number of sectors written


title: nvme_ns_write_zeros(2)

summary: Write zeros to a namespace

text:
# nvme_ns_write_zeros(2)

## NAME
nvme_ns_write_zeros - Write zeros to a namespace

## SYNOPSIS
int nvme_ns_write_zeros (nvme_ns_t n , off_t offset , size_t count );

## ARGUMENTS
n

Namespace instance

offset

LBA offset in n

count

Number of sectors to be written

## RETURN
Number of sectors written


title: nvme_nss_hw_err_event(2)

summary: NVM Subsystem Hardware Error Event

text:
# nvme_nss_hw_err_event(2)

## NAME
struct nvme_nss_hw_err_event - NVM Subsystem Hardware Error Event

## SYNOPSIS
struct nvme_nss_hw_err_event {

__le16 nss_hw_err_event_code;

__u8 rsvd2[2];

__u8 *add_hw_err_info;

};

## Members
nss_hw_err_event_code

NVM Subsystem Hardware Error Event Code

rsvd2

Reserved

add_hw_err_info

Additional Hardware Error Information


title: nvme_nvm_id_ns(2)

text:
# nvme_nvm_id_ns(2)

## NAME
struct nvme_nvm_id_ns - NVME Command Set I/O Command Set Specific Identify Namespace Data Structure

## SYNOPSIS
struct nvme_nvm_id_ns {

__le64 lbstm;

__u8 pic;

__u8 pifa;

__u8 rsvd10[2];

__le32 elbaf[64];

__le32 npdgl;

__le32 nprg;

__le32 npra;

__le32 nors;

__le32 npdal;

__le32 lbapss;

__le32 tlbaag;

__u8 rsvd296[3800];

};

## Members
lbstm

Logical Block Storage Tag Mask

pic

Protection Information Capabilities

pifa

Protection Information Format Attribute

rsvd10

Reserved

elbaf

List of Extended LBA Format Support

npdgl

Namespace Preferred Deallocate Granularity Large

nprg

Namespace Preferred Read Granularity

npra

Namespace Preferred Read Alignment

nors

Namespace Optimal Read Size

npdal

Namespace Preferred Deallocate Alignment Large

lbapss

LBA Format Placement Shard Size

tlbaag

Tracked LBA Allocation Granularity

rsvd296

Reserved


title: nvme_nvm_id_ns_elbaf(2)

text:
# nvme_nvm_id_ns_elbaf(2)

## NAME
enum nvme_nvm_id_ns_elbaf - This field indicates the extended LBA format

## SYNOPSIS
enum nvme_nvm_id_ns_elbaf {

NVME_NVM_ELBAF_STS_MASK ,

NVME_NVM_ELBAF_PIF_MASK ,

NVME_NVM_ELBAF_QPIF_MASK

};

## Constants
NVME_NVM_ELBAF_STS_MASK

Mask to get the storage tag size used to determine the variable-sized storage tag/reference tag fields

NVME_NVM_ELBAF_PIF_MASK

Mask to get the protection information format for the extended LBA format.

NVME_NVM_ELBAF_QPIF_MASK

Mask to get the Qualified Protection Information Format.


title: nvme_nvm_id_ns_pif(2)

text:
# nvme_nvm_id_ns_pif(2)

## NAME
enum nvme_nvm_id_ns_pif - This field indicates the type of the Protection Information Format

## SYNOPSIS
enum nvme_nvm_id_ns_pif {

NVME_NVM_PIF_16B_GUARD ,

NVME_NVM_PIF_32B_GUARD ,

NVME_NVM_PIF_64B_GUARD ,

NVME_NVM_PIF_QTYPE

};

## Constants
NVME_NVM_PIF_16B_GUARD

16-bit Guard Protection Information Format

NVME_NVM_PIF_32B_GUARD

32-bit Guard Protection Information Format

NVME_NVM_PIF_64B_GUARD

64-bit Guard Protection Information Format

NVME_NVM_PIF_QTYPE

If Qualified Protection Information Format Supports and Protection Information Format is set to 3, then protection information format is taken from Qualified Protection Information Format field.


title: nvme_nvm_identify_ctrl(2)

summary: Identify controller data

text:
# nvme_nvm_identify_ctrl(2)

## NAME
nvme_nvm_identify_ctrl - Identify controller data

## SYNOPSIS
int nvme_nvm_identify_ctrl (int fd , struct nvme_id_ctrl_nvm *id );

## ARGUMENTS
fd

File descriptor of nvme device

id

User space destination address to transfer the data

## DESCRIPTION
Return an identify controller data structure to the host of processing controller.

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


title: nvme_nvmeset_pl_status(2)

text:
# nvme_nvmeset_pl_status(2)

## NAME
enum nvme_nvmeset_pl_status - Predictable Latency Per NVM Set Log - Status

## SYNOPSIS
enum nvme_nvmeset_pl_status {

NVME_NVMSET_PL_STATUS_DISABLED ,

NVME_NVMSET_PL_STATUS_DTWIN ,

NVME_NVMSET_PL_STATUS_NDWIN

};

## Constants
NVME_NVMSET_PL_STATUS_DISABLED

Not used (Predictable Latency Mode not enabled)

NVME_NVMSET_PL_STATUS_DTWIN

Deterministic Window (DTWIN)

NVME_NVMSET_PL_STATUS_NDWIN

Non-Deterministic Window (NDWIN)


title: nvme_nvmset_attr(2)

summary: NVM Set Attributes Entry

text:
# nvme_nvmset_attr(2)

## NAME
struct nvme_nvmset_attr - NVM Set Attributes Entry

## SYNOPSIS
struct nvme_nvmset_attr {

__le16 nvmsetid;

__le16 endgid;

__u8 rsvd4[4];

__le32 rr4kt;

__le32 ows;

__u8 tnvmsetcap[16];

__u8 unvmsetcap[16];

__u8 rsvd48[80];

};

## Members
nvmsetid

NVM Set Identifier

endgid

Endurance Group Identifier

rsvd4

Reserved

rr4kt

Random 4 KiB Read Typical indicates the typical time to complete a 4 KiB random read in 100 nanosecond units when the NVM Set is in a Predictable Latency Mode Deterministic Window and there is 1 outstanding command per NVM Set.

ows

Optimal Write Size

tnvmsetcap

Total NVM Set Capacity

unvmsetcap

Unallocated NVM Set Capacity

rsvd48

Reserved


title: nvme_nvmset_pl_events(2)

text:
# nvme_nvmset_pl_events(2)

## NAME
enum nvme_nvmset_pl_events - Predictable Latency Per NVM Set Log - Event Type

## SYNOPSIS
enum nvme_nvmset_pl_events {

NVME_NVMSET_PL_EVENT_DTWIN_READ_WARN ,

NVME_NVMSET_PL_EVENT_DTWIN_WRITE_WARN ,

NVME_NVMSET_PL_EVENT_DTWIN_TIME_WARN ,

NVME_NVMSET_PL_EVENT_DTWIN_EXCEEDED ,

NVME_NVMSET_PL_EVENT_DTWIN_EXCURSION

};

## Constants
NVME_NVMSET_PL_EVENT_DTWIN_READ_WARN

DTWIN Reads Warning

NVME_NVMSET_PL_EVENT_DTWIN_WRITE_WARN

DTWIN Writes Warning

NVME_NVMSET_PL_EVENT_DTWIN_TIME_WARN

DTWIN Time Warning

NVME_NVMSET_PL_EVENT_DTWIN_EXCEEDED

Autonomous transition from DTWIN to NDWIN due to typical or maximum value exceeded

NVME_NVMSET_PL_EVENT_DTWIN_EXCURSION

Autonomous transition from DTWIN to NDWIN due to Deterministic Excursion


title: nvme_nvmset_predictable_lat_log(2)

text:
# nvme_nvmset_predictable_lat_log(2)

## NAME
struct nvme_nvmset_predictable_lat_log - Predictable Latency Mode - Deterministic Threshold Configuration Data

## SYNOPSIS
struct nvme_nvmset_predictable_lat_log {

__u8 status;

__u8 rsvd1;

__le16 event_type;

__u8 rsvd4[28];

__le64 dtwin_rt;

__le64 dtwin_wt;

__le64 dtwin_tmax;

__le64 ndwin_tmin_hi;

__le64 ndwin_tmin_lo;

__u8 rsvd72[56];

__le64 dtwin_re;

__le64 dtwin_we;

__le64 dtwin_te;

__u8 rsvd152[360];

};

## Members
status

Status

rsvd1

Reserved

event_type

Event Type

rsvd4

Reserved

dtwin_rt

DTWIN Reads Typical

dtwin_wt

DTWIN Writes Typical

dtwin_tmax

DTWIN Time Maximum

ndwin_tmin_hi

NDWIN Time Minimum High

ndwin_tmin_lo

NDWIN Time Minimum Low

rsvd72

Reserved

dtwin_re

DTWIN Reads Estimate

dtwin_we

DTWIN Writes Estimate

dtwin_te

DTWIN Time Estimate

rsvd152

Reserved


title: nvme_open(2)

text:
# nvme_open(2)

## NAME
nvme_open - Open an nvme controller or namespace device

## SYNOPSIS
int nvme_open (const char *name );

## ARGUMENTS
name

The basename of the device to open

## DESCRIPTION
This will look for the handle in /dev/ and validate the name and filetype match linux conventions.

## RETURN
A file descriptor for the device on a successful open, or -1 with errno set otherwise.


title: nvme_parse_uri(2)

summary: Parse the URI string

text:
# nvme_parse_uri(2)

## NAME
nvme_parse_uri - Parse the URI string

## SYNOPSIS
struct nvme_fabrics_uri * nvme_parse_uri (const char *str );

## ARGUMENTS
str

URI string

## DESCRIPTION
Parse the URI string as defined in the NVM Express Boot Specification. Supported URI elements looks as follows:

nvme+tcp://userhost:port/subsys_nqn/nid?query=val#fragment

## RETURN
nvme_fabrics_uri structure on success; NULL on failure with errno set.


title: nvme_passthru_cmd(2)

summary: nvme passthrough command structure

text:
# nvme_passthru_cmd(2)

## NAME
struct nvme_passthru_cmd - nvme passthrough command structure

## SYNOPSIS
struct nvme_passthru_cmd {

__u8 opcode;

__u8 flags;

__u16 rsvd1;

__u32 nsid;

__u32 cdw2;

__u32 cdw3;

__u64 metadata;

__u64 addr;

__u32 metadata_len;

__u32 data_len;

__u32 cdw10;

__u32 cdw11;

__u32 cdw12;

__u32 cdw13;

__u32 cdw14;

__u32 cdw15;

__u32 timeout_ms;

__u32 result;

};

## Members
opcode

Operation code, see enum nvme_io_opcodes and enum nvme_admin_opcodes

flags

Not supported: intended for command flags (eg: SGL, FUSE)

rsvd1

Reserved for future use

nsid

Namespace Identifier, or Fabrics type

cdw2

Command Dword 2 (no spec defined use)

cdw3

Command Dword 3 (no spec defined use)

metadata

User space address to metadata buffer (NULL if not used)

addr

User space address to data buffer (NULL if not used)

metadata_len

Metadata buffer transfer length

data_len

Data buffer transfer length

cdw10

Command Dword 10 (command specific)

cdw11

Command Dword 11 (command specific)

cdw12

Command Dword 12 (command specific)

cdw13

Command Dword 13 (command specific)

cdw14

Command Dword 14 (command specific)

cdw15

Command Dword 15 (command specific)

timeout_ms

If non-zero, overrides system default timeout in milliseconds

result

Set on completion to the command's CQE DWORD 0 controller response


title: nvme_passthru_cmd64(2)

text:
# nvme_passthru_cmd64(2)

## NAME
struct nvme_passthru_cmd64 - 64-bit nvme passthrough command structure

## SYNOPSIS
struct nvme_passthru_cmd64 {

__u8 opcode;

__u8 flags;

__u16 rsvd1;

__u32 nsid;

__u32 cdw2;

__u32 cdw3;

__u64 metadata;

__u64 addr;

__u32 metadata_len;

__u32 data_len;

__u32 cdw10;

__u32 cdw11;

__u32 cdw12;

__u32 cdw13;

__u32 cdw14;

__u32 cdw15;

__u32 timeout_ms;

__u32 rsvd2;

__u64 result;

};

## Members
opcode

Operation code, see enum nvme_io_opcodes and enum nvme_admin_opcodes

flags

Not supported: intended for command flags (eg: SGL, FUSE)

rsvd1

Reserved for future use

nsid

Namespace Identifier, or Fabrics type

cdw2

Command Dword 2 (no spec defined use)

cdw3

Command Dword 3 (no spec defined use)

metadata

User space address to metadata buffer (NULL if not used)

addr

User space address to data buffer (NULL if not used)

metadata_len

Metadata buffer transfer length

data_len

Data buffer transfer length

cdw10

Command Dword 10 (command specific)

cdw11

Command Dword 11 (command specific)

cdw12

Command Dword 12 (command specific)

cdw13

Command Dword 13 (command specific)

cdw14

Command Dword 14 (command specific)

cdw15

Command Dword 15 (command specific)

timeout_ms

If non-zero, overrides system default timeout in milliseconds

rsvd2

Reserved for future use (and fills an implicit struct pad

result

Set on completion to the command's CQE DWORD 0-1 controller response


title: nvme_path_get_ana_state(2)

summary: ANA state of an nvme_path_t object

text:
# nvme_path_get_ana_state(2)

## NAME
nvme_path_get_ana_state - ANA state of an nvme_path_t object

## SYNOPSIS
const char * nvme_path_get_ana_state (nvme_path_t p );

## ARGUMENTS
p

nvme_path_t object

## RETURN
ANA (Asynchronous Namespace Access) state of p


title: nvme_path_get_ctrl(2)

text:
# nvme_path_get_ctrl(2)

## NAME
nvme_path_get_ctrl - Parent controller of an nvme_path_t object

## SYNOPSIS
nvme_ctrl_t nvme_path_get_ctrl (nvme_path_t p );

## ARGUMENTS
p

nvme_path_t object

## RETURN
Parent controller if present


title: nvme_path_get_name(2)

summary: sysfs name of an &nvme_path_t object

text:
# nvme_path_get_name(2)

## NAME
nvme_path_get_name - sysfs name of an &nvme_path_t object

## SYNOPSIS
const char * nvme_path_get_name (nvme_path_t p );

## ARGUMENTS
p

nvme_path_t object

## RETURN
sysfs name of p


title: nvme_path_get_ns(2)

text:
# nvme_path_get_ns(2)

## NAME
nvme_path_get_ns - Parent namespace of an nvme_path_t object

## SYNOPSIS
nvme_ns_t nvme_path_get_ns (nvme_path_t p );

## ARGUMENTS
p

nvme_path_t object

## RETURN
Parent namespace if present


title: nvme_path_get_numa_nodes(2)

summary: NUMA nodes of an nvme_path_t object

text:
# nvme_path_get_numa_nodes(2)

## NAME
nvme_path_get_numa_nodes - NUMA nodes of an nvme_path_t object

## SYNOPSIS
const char * nvme_path_get_numa_nodes (nvme_path_t p );

## ARGUMENTS
p

nvme_path_t object

## RETURN
NUMA nodes associated to p


title: nvme_path_get_queue_depth(2)

summary: Queue depth of an nvme_path_t object

text:
# nvme_path_get_queue_depth(2)

## NAME
nvme_path_get_queue_depth - Queue depth of an nvme_path_t object

## SYNOPSIS
int nvme_path_get_queue_depth (nvme_path_t p );

## ARGUMENTS
p

nvme_path_t object

## RETURN
Queue depth of p


title: nvme_path_get_sysfs_dir(2)

text:
# nvme_path_get_sysfs_dir(2)

## NAME
nvme_path_get_sysfs_dir - sysfs directory of an nvme_path_t object

## SYNOPSIS
const char * nvme_path_get_sysfs_dir (nvme_path_t p );

## ARGUMENTS
p

nvme_path_t object

## RETURN
sysfs directory of p


title: nvme_paths_filter(2)

summary: Filter for paths

text:
# nvme_paths_filter(2)

## NAME
nvme_paths_filter - Filter for paths

## SYNOPSIS
int nvme_paths_filter (const struct dirent *d );

## ARGUMENTS
d

dirent to check

## RETURN
1 if d matches, 0 otherwise


title: nvme_pel_ehai(2)

text:
# nvme_pel_ehai(2)

## NAME
enum nvme_pel_ehai - This field indicates the persistent event header additional information

## SYNOPSIS
enum nvme_pel_ehai {

NVME_PEL_EHAI_PIT_SHIFT ,

NVME_PEL_EHAI_RSVD_SHIFT ,

NVME_PEL_EHAI_PIT_MASK ,

NVME_PEL_EHAI_RSVD_MASK

};

## Constants
NVME_PEL_EHAI_PIT_SHIFT

Shift amount to get the reporting context port identifier from the struct nvme_persistent_event_log.rci field.

NVME_PEL_EHAI_RSVD_SHIFT

Shift amount to get the reserved reporting context from the struct nvme_persistent_event_log.rci field.

NVME_PEL_EHAI_PIT_MASK

Mask to get the reporting context port identifier from the struct nvme_st_result.dsts field.

NVME_PEL_EHAI_RSVD_MASK

Mask to get the reserved reporting context from the struct nvme_st_result.dsts field.


title: nvme_pel_ehai_pit(2)

text:
# nvme_pel_ehai_pit(2)

## NAME
enum nvme_pel_ehai_pit - Persistent Event Header Additional Information - Port Identifier Type

## SYNOPSIS
enum nvme_pel_ehai_pit {

NVME_PEL_EHAI_PIT_NOT_REPORTED ,

NVME_PEL_EHAI_PIT_NSS_PORT ,

NVME_PEL_EHAI_PIT_NMI_PORT ,

NVME_PEL_EHAI_PIT_NOT_ASSOCIATED

};

## Constants
NVME_PEL_EHAI_PIT_NOT_REPORTED

PIT not reported and PELPID does not apply

NVME_PEL_EHAI_PIT_NSS_PORT

NVM subsystem port

NVME_PEL_EHAI_PIT_NMI_PORT

NVMe-MI port

NVME_PEL_EHAI_PIT_NOT_ASSOCIATED

Event not associated with any port and PELPID does not apply


title: nvme_pel_rci(2)

text:
# nvme_pel_rci(2)

## NAME
enum nvme_pel_rci - This field indicates the persistent event log reporting context

## SYNOPSIS
enum nvme_pel_rci {

NVME_PEL_RCI_RCPID_SHIFT ,

NVME_PEL_RCI_RCPIT_SHIFT ,

NVME_PEL_RCI_RCE_SHIFT ,

NVME_PEL_RCI_RSVD_SHIFT ,

NVME_PEL_RCI_RCPID_MASK ,

NVME_PEL_RCI_RCPIT_MASK ,

NVME_PEL_RCI_RCE_MASK ,

NVME_PEL_RCI_RSVD_MASK

};

## Constants
NVME_PEL_RCI_RCPID_SHIFT

Shift amount to get the reporting context port identifier from the struct nvme_persistent_event_log.rci field.

NVME_PEL_RCI_RCPIT_SHIFT

Shift amount to get the reporting context port identifier type from the struct nvme_persistent_event_log.rci field.

NVME_PEL_RCI_RCE_SHIFT

Shift amount to get the reporting context exists from the struct nvme_persistent_event_log.rci field.

NVME_PEL_RCI_RSVD_SHIFT

Shift amount to get the reserved reporting context from the struct nvme_persistent_event_log.rci field.

NVME_PEL_RCI_RCPID_MASK

Mask to get the reporting context port identifier from the struct nvme_persistent_event_log.rci field.

NVME_PEL_RCI_RCPIT_MASK

Mask to get the reporting context port identifier type from the struct nvme_persistent_event_log.rci field.

NVME_PEL_RCI_RCE_MASK

Mask to get the reporting context exists from the struct nvme_persistent_event_log.rci field.

NVME_PEL_RCI_RSVD_MASK

Mask to get the reserved reporting context from the struct nvme_persistent_event_log.rci field.


title: nvme_pel_rci_rcpit(2)

text:
# nvme_pel_rci_rcpit(2)

## NAME
enum nvme_pel_rci_rcpit - Persistent Event Log Reporting Context - Port Identifier Type

## SYNOPSIS
enum nvme_pel_rci_rcpit {

NVME_PEL_RCI_RCPIT_NOT_EXIST ,

NVME_PEL_RCI_RCPIT_EST_PORT ,

NVME_PEL_RCI_RCPIT_EST_ME

};

## Constants
NVME_PEL_RCI_RCPIT_NOT_EXIST

Does not already exist

NVME_PEL_RCI_RCPIT_EST_PORT

Established by an NVM subsystem port

NVME_PEL_RCI_RCPIT_EST_ME

Established by a Management Endpoint


title: nvme_perf_attr_id(2)

text:
# nvme_perf_attr_id(2)

## NAME
struct nvme_perf_attr_id - Performance attribute identifier structure

## SYNOPSIS
struct nvme_perf_attr_id {

__u8 id[NVME_UUID_LEN];

};

## Members
id

Performance attribute identifier


title: nvme_perf_attr_id_list(2)

text:
# nvme_perf_attr_id_list(2)

## NAME
struct nvme_perf_attr_id_list - Performance attribute identifier list structure

## SYNOPSIS
struct nvme_perf_attr_id_list {

__u8 attrtyp;

__u8 msvspa;

__u8 usvspa;

__u8 rsvd3[13];

struct nvme_perf_attr_id id_list[63];

__u8 rsvd1024[3072];

};

## Members
attrtyp

Bits 7-3: Reserved Bits 2-0: Attribute type

msvspa

Maximum saveable vendor specific performance attributes

usvspa

Unused saveable vendor specific performance attributes

rsvd3

Reserved

id_list

Performance attribute identifier list

rsvd1024

Reserved


title: nvme_perf_characteristics(2)

summary: Performance attribute structure

text:
# nvme_perf_characteristics(2)

## NAME
struct nvme_perf_characteristics - Performance attribute structure

## SYNOPSIS
struct nvme_perf_characteristics {

union {

struct nvme_std_perf_attr std_perf[0];

struct nvme_perf_attr_id_list id_list[0];

struct nvme_vs_perf_attr vs_perf[0];

__u8 attr_buf[4096];

};

};

## Members
{unnamed_union}

anonymous

std_perf

Standard performance attribute

id_list

Performance attribute identifier list

vs_perf

Vendor specific performance attribute

attr_buf

Attribute buffer


title: nvme_persistent_event_entry(2)

summary: Persistent Event

text:
# nvme_persistent_event_entry(2)

## NAME
struct nvme_persistent_event_entry - Persistent Event

## SYNOPSIS
struct nvme_persistent_event_entry {

__u8 etype;

__u8 etype_rev;

__u8 ehl;

__u8 ehai;

__le16 cntlid;

__le64 ets;

__le16 pelpid;

__u8 rsvd16[4];

__le16 vsil;

__le16 el;

};

## Members
etype

Event Type

etype_rev

Event Type Revision

ehl

Event Header Length

ehai

Event Header Additional Info

cntlid

Controller Identifier

ets

Event Timestamp

pelpid

Port Identifier

rsvd16

Reserved

vsil

Vendor Specific Information Length

el

Event Length


title: nvme_persistent_event_log(2)

summary: Persistent Event Log

text:
# nvme_persistent_event_log(2)

## NAME
struct nvme_persistent_event_log - Persistent Event Log

## SYNOPSIS
struct nvme_persistent_event_log {

__u8 lid;

__u8 rsvd1[3];

__le32 tnev;

__le64 tll;

__u8 rv;

__u8 rsvd17;

__le16 lhl;

__le64 ts;

__u8 poh[16];

__le64 pcc;

__le16 vid;

__le16 ssvid;

char sn[20];

char mn[40];

char subnqn[NVME_NQN_LENGTH];

__le16 gen_number;

__le32 rci;

__u8 rsvd378[102];

__u8 seb[32];

};

## Members
lid

Log Identifier

rsvd1

Reserved

tnev

Total Number of Events

tll

Total Log Length

rv

Log Revision

rsvd17

Reserved

lhl

Log Header Length

ts

Timestamp

poh

Power on Hours

pcc

Power Cycle Count

vid

PCI Vendor ID

ssvid

PCI Subsystem Vendor ID

sn

Serial Number

mn

Model Number

subnqn

NVM Subsystem NVMe Qualified Name

gen_number

Generation Number

rci

Reporting Context Information

rsvd378

Reserved

seb

Supported Events Bitmap


title: nvme_persistent_event_types(2)

summary: Persistent event log events

text:
# nvme_persistent_event_types(2)

## NAME
enum nvme_persistent_event_types - Persistent event log events

## SYNOPSIS
enum nvme_persistent_event_types {

NVME_PEL_SMART_HEALTH_EVENT ,

NVME_PEL_FW_COMMIT_EVENT ,

NVME_PEL_TIMESTAMP_EVENT ,

NVME_PEL_POWER_ON_RESET_EVENT ,

NVME_PEL_NSS_HW_ERROR_EVENT ,

NVME_PEL_CHANGE_NS_EVENT ,

NVME_PEL_FORMAT_START_EVENT ,

NVME_PEL_FORMAT_COMPLETION_EVENT ,

NVME_PEL_SANITIZE_START_EVENT ,

NVME_PEL_SANITIZE_COMPLETION_EVENT ,

NVME_PEL_SET_FEATURE_EVENT ,

NVME_PEL_TELEMETRY_CRT ,

NVME_PEL_THERMAL_EXCURSION_EVENT ,

NVME_PEL_SANITIZE_MEDIA_VERIF_EVENT ,

NVME_PEL_VENDOR_SPECIFIC_EVENT ,

NVME_PEL_TCG_DEFINED_EVENT

};

## Constants
NVME_PEL_SMART_HEALTH_EVENT

SMART / Health Log Snapshot Event

NVME_PEL_FW_COMMIT_EVENT

Firmware Commit Event

NVME_PEL_TIMESTAMP_EVENT

Timestamp Change Event

NVME_PEL_POWER_ON_RESET_EVENT

Power-on or Reset Event

NVME_PEL_NSS_HW_ERROR_EVENT

NVM Subsystem Hardware Error Event

NVME_PEL_CHANGE_NS_EVENT

Change Namespace Event

NVME_PEL_FORMAT_START_EVENT

Format NVM Start Event

NVME_PEL_FORMAT_COMPLETION_EVENT

Format NVM Completion Event

NVME_PEL_SANITIZE_START_EVENT

Sanitize Start Event

NVME_PEL_SANITIZE_COMPLETION_EVENT

Sanitize Completion Event

NVME_PEL_SET_FEATURE_EVENT

Set Feature Event

NVME_PEL_TELEMETRY_CRT

Telemetry Log Create Event

NVME_PEL_THERMAL_EXCURSION_EVENT

Thermal Excursion Event

NVME_PEL_SANITIZE_MEDIA_VERIF_EVENT

Sanitize Media Verification Event

NVME_PEL_VENDOR_SPECIFIC_EVENT

Vendor Specific Event

NVME_PEL_TCG_DEFINED_EVENT

TCG Defined Event


title: nvme_pevent_log_action(2)

summary: Persistent Event Log - Action

text:
# nvme_pevent_log_action(2)

## NAME
enum nvme_pevent_log_action - Persistent Event Log - Action

## SYNOPSIS
enum nvme_pevent_log_action {

NVME_PEVENT_LOG_READ ,

NVME_PEVENT_LOG_EST_CTX_AND_READ ,

NVME_PEVENT_LOG_RELEASE_CTX

};

## Constants
NVME_PEVENT_LOG_READ

Read Log Data

NVME_PEVENT_LOG_EST_CTX_AND_READ

Establish Context and Read Log Data

NVME_PEVENT_LOG_RELEASE_CTX

Release Context


title: nvme_phy_rx_eom_log(2)

text:
# nvme_phy_rx_eom_log(2)

## NAME
struct nvme_phy_rx_eom_log - Physical Interface Receiver Eye Opening Measurement Log

## SYNOPSIS
struct nvme_phy_rx_eom_log {

__u8 lid;

__u8 eomip;

__le16 hsize;

__le32 rsize;

__u8 eomdgn;

__u8 lr;

__u8 odp;

__u8 lanes;

__u8 epl;

__u8 lspfc;

__u8 li;

__u8 rsvd15[3];

__le16 lsic;

__le32 dsize;

__le16 nd;

__le16 maxtb;

__le16 maxlr;

__le16 etgood;

__le16 etbetter;

__le16 etbest;

__u8 rsvd36[28];

struct nvme_eom_lane_desc descs[];

};

## Members
lid

Log Identifier

eomip

EOM In Progress

hsize

Header Size

rsize

Result Size

eomdgn

EOM Data Generation Number

lr

Log Revision

odp

Optional Data Present

lanes

Number of lanes configured for this port

epl

Eyes Per Lane

lspfc

Log Specific Parameter Field Copy

li

Link Information

rsvd15

Reserved

lsic

Log Specific Identifier Copy

dsize

Descriptor Size

nd

Number of Descriptors

maxtb

Maximum Top Bottom

maxlr

Maximum Left Right

etgood

Estimated Time for Good Quality

etbetter

Estimated Time for Better Quality

etbest

Estimated Time for Best Quality

rsvd36

Reserved

descs

EOM Lane Descriptors


title: nvme_phy_rx_eom_progress(2)

summary: EOM In Progress Values

text:
# nvme_phy_rx_eom_progress(2)

## NAME
enum nvme_phy_rx_eom_progress - EOM In Progress Values

## SYNOPSIS
enum nvme_phy_rx_eom_progress {

NVME_PHY_RX_EOM_NOT_STARTED ,

NVME_PHY_RX_EOM_IN_PROGRESS ,

NVME_PHY_RX_EOM_COMPLETED

};

## Constants
NVME_PHY_RX_EOM_NOT_STARTED

EOM Not Started

NVME_PHY_RX_EOM_IN_PROGRESS

EOM In Progress

NVME_PHY_RX_EOM_COMPLETED

EOM Completed


title: nvme_plm_config(2)

text:
# nvme_plm_config(2)

## NAME
struct nvme_plm_config - Predictable Latency Mode - Deterministic Threshold Configuration Data Structure

## SYNOPSIS
struct nvme_plm_config {

__le16 ee;

__u8 rsvd2[30];

__le64 dtwinrt;

__le64 dtwinwt;

__le64 dtwintt;

__u8 rsvd56[456];

};

## Members
ee

Enable Event

rsvd2

Reserved

dtwinrt

DTWIN Reads Threshold

dtwinwt

DTWIN Writes Threshold

dtwintt

DTWIN Time Threshold

rsvd56

Reserved


title: nvme_pmr_size(2)

text:
# nvme_pmr_size(2)

## NAME
nvme_pmr_size - Calculate size of persistent memory region elasticity buffer

## SYNOPSIS
__u64 nvme_pmr_size (__u32 pmrebs );

## ARGUMENTS
pmrebs

Value from controller register NVME_REG_PMREBS

## RETURN
size of controller persistent memory buffer in bytes


title: nvme_pmr_throughput(2)

text:
# nvme_pmr_throughput(2)

## NAME
nvme_pmr_throughput - Calculate throughput of persistent memory buffer

## SYNOPSIS
__u64 nvme_pmr_throughput (__u32 pmrswtp );

## ARGUMENTS
pmrswtp

Value from controller register NVME_REG_PMRSWTP

## RETURN
throughput of controller persistent memory buffer in bytes/second


title: nvme_pmrcap(2)

text:
# nvme_pmrcap(2)

## NAME
enum nvme_pmrcap - This field indicates the persistent memory region capabilities

## SYNOPSIS
enum nvme_pmrcap {

NVME_PMRCAP_RDS_SHIFT ,

NVME_PMRCAP_WDS_SHIFT ,

NVME_PMRCAP_BIR_SHIFT ,

NVME_PMRCAP_PMRTU_SHIFT ,

NVME_PMRCAP_PMRWBM_SHIFT ,

NVME_PMRCAP_PMRTO_SHIFT ,

NVME_PMRCAP_CMSS_SHIFT ,

NVME_PMRCAP_PMRWMB_SHIFT ,

NVME_PMRCAP_RDS_MASK ,

NVME_PMRCAP_WDS_MASK ,

NVME_PMRCAP_BIR_MASK ,

NVME_PMRCAP_PMRTU_MASK ,

NVME_PMRCAP_PMRWBM_MASK ,

NVME_PMRCAP_PMRTO_MASK ,

NVME_PMRCAP_CMSS_MASK ,

NVME_PMRCAP_PMRWMB_MASK ,

NVME_PMRCAP_PMRTU_500MS ,

NVME_PMRCAP_PMRTU_60S

};

## Constants
NVME_PMRCAP_RDS_SHIFT

Shift amount to get the read data support

NVME_PMRCAP_WDS_SHIFT

Shift amount to get the write data support

NVME_PMRCAP_BIR_SHIFT

Shift amount to get the base indicator register

NVME_PMRCAP_PMRTU_SHIFT

Shift amount to get the persistent memory region time units

NVME_PMRCAP_PMRWBM_SHIFT

Shift amount to get the persistent memory region write barrier mechanisms

NVME_PMRCAP_PMRTO_SHIFT

Shift amount to get the persistent memory region timeout

NVME_PMRCAP_CMSS_SHIFT

Shift amount to get the controller memory space supported

NVME_PMRCAP_PMRWMB_SHIFT

Deprecated shift amount to get the persistent memory region write barrier mechanisms

NVME_PMRCAP_RDS_MASK

Mask to get the read data support

NVME_PMRCAP_WDS_MASK

Mask to get the write data support

NVME_PMRCAP_BIR_MASK

Mask to get the base indicator register

NVME_PMRCAP_PMRTU_MASK

Mask to get the persistent memory region time units

NVME_PMRCAP_PMRWBM_MASK

Mask to get the persistent memory region write barrier mechanisms

NVME_PMRCAP_PMRTO_MASK

Mask to get the persistent memory region timeout

NVME_PMRCAP_CMSS_MASK

Mask to get the controller memory space supported

NVME_PMRCAP_PMRWMB_MASK

Deprecated mask to get the persistent memory region write barrier mechanisms

NVME_PMRCAP_PMRTU_500MS

500 milliseconds

NVME_PMRCAP_PMRTU_60S

minutes


title: nvme_pmrctl(2)

text:
# nvme_pmrctl(2)

## NAME
enum nvme_pmrctl - This field indicates the persistent memory region control

## SYNOPSIS
enum nvme_pmrctl {

NVME_PMRCTL_EN_SHIFT ,

NVME_PMRCTL_EN_MASK

};

## Constants
NVME_PMRCTL_EN_SHIFT

Shift amount to get the enable

NVME_PMRCTL_EN_MASK

Mask to get the enable


title: nvme_pmrebs(2)

text:
# nvme_pmrebs(2)

## NAME
enum nvme_pmrebs - This field indicates the persistent memory region elasticity buffer size

## SYNOPSIS
enum nvme_pmrebs {

NVME_PMREBS_PMRSZU_SHIFT ,

NVME_PMREBS_RBB_SHIFT ,

NVME_PMREBS_PMRWBZ_SHIFT ,

NVME_PMREBS_PMRSZU_MASK ,

NVME_PMREBS_RBB_MASK ,

NVME_PMREBS_PMRWBZ_MASK ,

NVME_PMREBS_PMRSZU_B ,

NVME_PMREBS_PMRSZU_1K ,

NVME_PMREBS_PMRSZU_1M ,

NVME_PMREBS_PMRSZU_1G

};

## Constants
NVME_PMREBS_PMRSZU_SHIFT

Shift amount to get the PMR elasticity buffer size units

NVME_PMREBS_RBB_SHIFT

Shift amount to get the read bypass behavior

NVME_PMREBS_PMRWBZ_SHIFT

Shift amount to get the PMR elasticity buffer size base

NVME_PMREBS_PMRSZU_MASK

Mask to get the PMR elasticity buffer size units

NVME_PMREBS_RBB_MASK

Mask to get the read bypass behavior

NVME_PMREBS_PMRWBZ_MASK

Mask to get the PMR elasticity buffer size base

NVME_PMREBS_PMRSZU_B

Bytes

NVME_PMREBS_PMRSZU_1K

1 KiB

NVME_PMREBS_PMRSZU_1M

1 MiB

NVME_PMREBS_PMRSZU_1G

1 GiB


title: nvme_pmrmsc(2)

text:
# nvme_pmrmsc(2)

## NAME
enum nvme_pmrmsc - This field indicates the persistent memory region memory space control

## SYNOPSIS
enum nvme_pmrmsc {

NVME_PMRMSC_CMSE_SHIFT ,

NVME_PMRMSC_CBA_SHIFT ,

NVME_PMRMSC_CMSE_MASK

};

## Constants
NVME_PMRMSC_CMSE_SHIFT

Shift amount to get the controller memory space enable

NVME_PMRMSC_CBA_SHIFT

Shift amount to get the controller base address

NVME_PMRMSC_CMSE_MASK

Mask to get the controller memory space enable


title: nvme_pmrsts(2)

text:
# nvme_pmrsts(2)

## NAME
enum nvme_pmrsts - This field indicates the persistent memory region status

## SYNOPSIS
enum nvme_pmrsts {

NVME_PMRSTS_ERR_SHIFT ,

NVME_PMRSTS_NRDY_SHIFT ,

NVME_PMRSTS_HSTS_SHIFT ,

NVME_PMRSTS_CBAI_SHIFT ,

NVME_PMRSTS_ERR_MASK ,

NVME_PMRSTS_NRDY_MASK ,

NVME_PMRSTS_HSTS_MASK ,

NVME_PMRSTS_CBAI_MASK

};

## Constants
NVME_PMRSTS_ERR_SHIFT

Shift amount to get the error

NVME_PMRSTS_NRDY_SHIFT

Shift amount to get the not ready

NVME_PMRSTS_HSTS_SHIFT

Shift amount to get the health status

NVME_PMRSTS_CBAI_SHIFT

Shift amount to get the controller base address invalid

NVME_PMRSTS_ERR_MASK

Mask to get the error

NVME_PMRSTS_NRDY_MASK

Mask to get the not ready

NVME_PMRSTS_HSTS_MASK

Mask to get the health status

NVME_PMRSTS_CBAI_MASK

Mask to get the controller base address invalid


title: nvme_pmrswtp(2)

text:
# nvme_pmrswtp(2)

## NAME
enum nvme_pmrswtp - This field indicates the persistent memory region sustained write throughput

## SYNOPSIS
enum nvme_pmrswtp {

NVME_PMRSWTP_PMRSWTU_SHIFT ,

NVME_PMRSWTP_PMRSWTV_SHIFT ,

NVME_PMRSWTP_PMRSWTU_MASK ,

NVME_PMRSWTP_PMRSWTV_MASK ,

NVME_PMRSWTP_PMRSWTU_BPS ,

NVME_PMRSWTP_PMRSWTU_KBPS ,

NVME_PMRSWTP_PMRSWTU_MBPS ,

NVME_PMRSWTP_PMRSWTU_GBPS

};

## Constants
NVME_PMRSWTP_PMRSWTU_SHIFT

Shift amount to get the PMR sustained write throughput units

NVME_PMRSWTP_PMRSWTV_SHIFT

Shift amount to get the PMR sustained write throughput

NVME_PMRSWTP_PMRSWTU_MASK

Mask to get the PMR sustained write throughput units

NVME_PMRSWTP_PMRSWTV_MASK

Mask to get the PMR sustained write throughput

NVME_PMRSWTP_PMRSWTU_BPS

Bytes per second

NVME_PMRSWTP_PMRSWTU_KBPS

1 KiB / s

NVME_PMRSWTP_PMRSWTU_MBPS

1 MiB / s

NVME_PMRSWTP_PMRSWTU_GBPS

1 GiB / s


title: nvme_power_on_reset_info_list(2)

summary: Controller Reset Information

text:
# nvme_power_on_reset_info_list(2)

## NAME
struct nvme_power_on_reset_info_list - Controller Reset Information

## SYNOPSIS
struct nvme_power_on_reset_info_list {

__le16 cid;

__u8 fw_act;

__u8 op_in_prog;

__u8 rsvd4[12];

__le32 ctrl_power_cycle;

__le64 power_on_ml_seconds;

__le64 ctrl_time_stamp;

};

## Members
cid

Controller ID

fw_act

Firmware Activation

op_in_prog

Operation in Progress

rsvd4

Reserved

ctrl_power_cycle

Controller Power Cycle

power_on_ml_seconds

Power on milliseconds

ctrl_time_stamp

Controller Timestamp


title: nvme_primary_ctrl_cap(2)

text:
# nvme_primary_ctrl_cap(2)

## NAME
struct nvme_primary_ctrl_cap - Identify - Controller Capabilities Structure

## SYNOPSIS
struct nvme_primary_ctrl_cap {

__le16 cntlid;

__le16 portid;

__u8 crt;

__u8 rsvd5[27];

__le32 vqfrt;

__le32 vqrfa;

__le16 vqrfap;

__le16 vqprt;

__le16 vqfrsm;

__le16 vqgran;

__u8 rsvd48[16];

__le32 vifrt;

__le32 virfa;

__le16 virfap;

__le16 viprt;

__le16 vifrsm;

__le16 vigran;

__u8 rsvd80[4016];

};

## Members
cntlid

Controller Identifier

portid

Port Identifier

crt

Controller Resource Types

rsvd5

reserved

vqfrt

VQ Resources Flexible Total

vqrfa

VQ Resources Flexible Assigned

vqrfap

VQ Resources Flexible Allocated to Primary

vqprt

VQ Resources Private Total

vqfrsm

VQ Resources Flexible Secondary Maximum

vqgran

VQ Flexible Resource Preferred Granularity

rsvd48

reserved

vifrt

VI Resources Flexible Total

virfa

VI Resources Flexible Assigned

virfap

VI Resources Flexible Allocated to Primary

viprt

VI Resources Private Total

vifrsm

VI Resources Flexible Secondary Maximum

vigran

VI Flexible Resource Preferred Granularity

rsvd80

reserved


title: nvme_psd_flags(2)

text:
# nvme_psd_flags(2)

## NAME
enum nvme_psd_flags - Possible flag values in nvme power state descriptor

## SYNOPSIS
enum nvme_psd_flags {

NVME_PSD_FLAGS_MXPS ,

NVME_PSD_FLAGS_NOPS

};

## Constants
NVME_PSD_FLAGS_MXPS

Indicates the scale for the Maximum Power field. If this bit is cleared, then the scale of the Maximum Power field is in 0.01 Watts. If this bit is set, then the scale of the Maximum Power field is in 0.0001 Watts.

NVME_PSD_FLAGS_NOPS

Indicates whether the controller processes I/O commands in this power state. If this bit is cleared, then the controller processes I/O commands in this power state. If this bit is set, then the controller does not process I/O commands in this power state.


title: nvme_psd_power_scale(2)

summary: power scale occupies the upper 3 bits

text:
# nvme_psd_power_scale(2)

## NAME
nvme_psd_power_scale - power scale occupies the upper 3 bits

## SYNOPSIS
unsigned int nvme_psd_power_scale (__u8 ps );

## ARGUMENTS
ps

power scale value

## RETURN
power scale value


title: nvme_psd_ps(2)

text:
# nvme_psd_ps(2)

## NAME
enum nvme_psd_ps - Known values for &struct nvme_psd %ips and %aps. Use with nvme_psd_power_scale() to extract the power scale field to match this enum.

## SYNOPSIS
enum nvme_psd_ps {

NVME_PSD_PS_NOT_REPORTED ,

NVME_PSD_PS_100_MICRO_WATT ,

NVME_PSD_PS_10_MILLI_WATT

};

## Constants
NVME_PSD_PS_NOT_REPORTED

Not reported

NVME_PSD_PS_100_MICRO_WATT

0.0001 watt scale

NVME_PSD_PS_10_MILLI_WATT

0.01 watt scale


title: nvme_psd_workload(2)

text:
# nvme_psd_workload(2)

## NAME
enum nvme_psd_workload - Specifies a workload hint in the Power Management Feature (see &struct nvme_psd.apw) to inform the NVM subsystem or indicate the conditions for the active power level.

## SYNOPSIS
enum nvme_psd_workload {

NVME_PSD_WORKLOAD_NP ,

NVME_PSD_WORKLOAD_1 ,

NVME_PSD_WORKLOAD_2

};

## Constants
NVME_PSD_WORKLOAD_NP

The workload is unknown or not provided.

NVME_PSD_WORKLOAD_1

Extended Idle Period with a Burst of Random Write consists of five minutes of idle followed by thirty-two random write commands of size 1 MiB submitted to a single controller while all other controllers in the NVM subsystem are idle, and then thirty (30) seconds of idle.

NVME_PSD_WORKLOAD_2

Heavy Sequential Writes consists of 80,000 sequential write commands of size 128 KiB submitted to a single controller while all other controllers in the NVM subsystem are idle. The submission queue(s) should be sufficiently large allowing the host to ensure there are multiple commands pending at all times during the workload.


title: nvme_pull_model_ddc_req_log(2)

summary: Pull Model DDC Request Log

text:
# nvme_pull_model_ddc_req_log(2)

## NAME
struct nvme_pull_model_ddc_req_log - Pull Model DDC Request Log

## SYNOPSIS
struct nvme_pull_model_ddc_req_log {

__u8 ori;

__u8 rsvd1[3];

__le32 tpdrpl;

__u8 osp[];

};

## Members
ori

Operation Request Identifier

rsvd1

Reserved

tpdrpl

Total Pull Model DDC Request Log Page Length

osp

Operation Specific Parameters


title: nvme_reachability_association_desc(2)

summary: Reachability Association Descriptor

text:
# nvme_reachability_association_desc(2)

## NAME
struct nvme_reachability_association_desc - Reachability Association Descriptor

## SYNOPSIS
struct nvme_reachability_association_desc {

__le32 rasid;

__le32 nrid;

__le64 chngc;

__u8 rac;

__u8 rsvd17[15];

__le32 rgid[];

};

## Members
rasid

Reachability Association ID

nrid

Number of RGID Values

chngc

Change Count

rac

Reachability Association Characteristics

rsvd17

Reserved

rgid

Reachability Group Identifier List


title: nvme_reachability_associations_log(2)

summary: Reachability Associations Log

text:
# nvme_reachability_associations_log(2)

## NAME
struct nvme_reachability_associations_log - Reachability Associations Log

## SYNOPSIS
struct nvme_reachability_associations_log {

__le64 chngc;

__le16 nrad;

__u8 rsvd10[6];

struct nvme_reachability_association_desc rad[];

};

## Members
chngc

Change Count

nrad

Number of Reachability Association Descriptors

rsvd10

Reserved

rad

Reachability Association Descriptor List


title: nvme_reachability_group_desc(2)

summary: Reachability Group Descriptor

text:
# nvme_reachability_group_desc(2)

## NAME
struct nvme_reachability_group_desc - Reachability Group Descriptor

## SYNOPSIS
struct nvme_reachability_group_desc {

__le32 rgid;

__le32 nnid;

__le64 chngc;

__u8 rsvd16[16];

__le32 nsid[];

};

## Members
rgid

Reachability Group ID

nnid

Number of NSID Values

chngc

Change Count

rsvd16

Reserved

nsid

Namespace Identifier List


title: nvme_reachability_groups_log(2)

summary: Reachability Groups Log

text:
# nvme_reachability_groups_log(2)

## NAME
struct nvme_reachability_groups_log - Reachability Groups Log

## SYNOPSIS
struct nvme_reachability_groups_log {

__le64 chngc;

__le16 nrgd;

__u8 rsvd10[6];

struct nvme_reachability_group_desc rgd[];

};

## Members
chngc

Change Count

nrgd

Number of Reachability Group Descriptors

rsvd10

Reserved

rgd

Reachability Group Descriptor List


title: nvme_read(2)

summary: Submit an nvme user read command

text:
# nvme_read(2)

## NAME
nvme_read - Submit an nvme user read command

## SYNOPSIS
int nvme_read (struct nvme_io_args *args );

## ARGUMENTS
args

struct nvme_io_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_read_config(2)

summary: Read NVMe JSON configuration file

text:
# nvme_read_config(2)

## NAME
nvme_read_config - Read NVMe JSON configuration file

## SYNOPSIS
int nvme_read_config (nvme_root_t r , const char *config_file );

## ARGUMENTS
r

nvme_root_t object

config_file

JSON configuration file

## DESCRIPTION
Read in the contents of config_file and merge them with the elements in r.

## RETURN
0 on success, -1 on failure with errno set.


title: nvme_read_key(2)

summary: Read key raw data

text:
# nvme_read_key(2)

## NAME
nvme_read_key - Read key raw data

## SYNOPSIS
unsigned char * nvme_read_key (long keyring_id , long key_id , int *len );

## ARGUMENTS
keyring_id

Id of the keyring holding key_id

key_id

Key id

len

Length of the returned data

## DESCRIPTION
Links the keyring specified by keyring_id into the session keyring and reads the payload of the key specified by key_id. len holds the size of the returned buffer. If keyring is 0 the default keyring '.nvme' is used.

## RETURN
Pointer to the payload on success, or NULL with errno set otherwise.