title: nvme_smart_log(2)

text:
# nvme_smart_log(2)

## NAME
struct nvme_smart_log - SMART / Health Information Log (Log Identifier 02h)

## SYNOPSIS
struct nvme_smart_log {

__u8 critical_warning;

__u8 temperature[2];

__u8 avail_spare;

__u8 spare_thresh;

__u8 percent_used;

__u8 endu_grp_crit_warn_sumry;

__u8 rsvd7[25];

__u8 data_units_read[16];

__u8 data_units_written[16];

__u8 host_reads[16];

__u8 host_writes[16];

__u8 ctrl_busy_time[16];

__u8 power_cycles[16];

__u8 power_on_hours[16];

__u8 unsafe_shutdowns[16];

__u8 media_errors[16];

__u8 num_err_log_entries[16];

__le32 warning_temp_time;

__le32 critical_comp_time;

__le16 temp_sensor[8];

__le32 thm_temp1_trans_count;

__le32 thm_temp2_trans_count;

__le32 thm_temp1_total_time;

__le32 thm_temp2_total_time;

__u8 rsvd232[280];

};

## Members
critical_warning

This field indicates critical warnings for the state of the controller. Critical warnings may result in an asynchronous event notification to the host. Bits in this field represent the current associated state and are not persistent (see enum nvme_smart_crit).

temperature

Composite Temperature: Contains a value corresponding to a temperature in Kelvins that represents the current composite temperature of the controller and namespace(s) associated with that controller. The manner in which this value is computed is implementation specific and may not represent the actual temperature of any physical point in the NVM subsystem. Warning and critical overheating composite temperature threshold values are reported by the WCTEMP and CCTEMP fields in the Identify Controller data structure.

avail_spare

Available Spare: Contains a normalized percentage (0% to 100%) of the remaining spare capacity available.

spare_thresh

Available Spare Threshold: When the Available Spare falls below the threshold indicated in this field, an asynchronous event completion may occur. The value is indicated as a normalized percentage (0% to 100%). The values 101 to 255 are reserved.

percent_used

Percentage Used: Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer's prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).

endu_grp_crit_warn_sumry

Endurance Group Critical Warning Summary: This field indicates critical warnings for the state of Endurance Groups. Bits in this field represent the current associated state and are not persistent (see enum nvme_smart_egcw).

rsvd7

Reserved

data_units_read

Data Units Read: Contains the number of 512 byte data units the host has read from the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes read) and is rounded up (e.g., one indicates the that number of 512 byte data units read is from 1 to 1000, three indicates that the number of 512 byte data units read is from 2001 to 3000). When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data read to 512 byte units. For the NVM command set, logical blocks read as part of Compare, Read, and Verify operations shall be included in this value. A value of 0h in this field indicates that the number of Data Units Read is not reported.

data_units_written

Data Units Written: Contains the number of 512 byte data units the host has written to the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes written) and is rounded up (e.g., one indicates that the number of 512 byte data units written is from 1 to 1,000, three indicates that the number of 512 byte data units written is from 2001 to 3000). When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data written to 512 byte units. For the NVM command set, logical blocks written as part of Write operations shall be included in this value. Write Uncorrectable commands and Write Zeroes commands shall not impact this value. A value of 0h in this field indicates that the number of Data Units Written is not reported.

host_reads

Host Read Commands: Contains the number of read commands completed by the controller. For the NVM command set, this value is the sum of the number of Compare commands and the number of Read commands.

host_writes

Host Write Commands: Contains the number of write commands completed by the controller. For the NVM command set, this is the number of Write commands.

ctrl_busy_time

Controller Busy Time: Contains the amount of time the controller is busy with I/O commands. The controller is busy when there is a command outstanding to an I/O Queue (specifically, a command was issued via an I/O Submission Queue Tail doorbell write and the corresponding completion queue entry has not been posted yet to the associated I/O Completion Queue). This value is reported in minutes.

power_cycles

Power Cycles: Contains the number of power cycles.

power_on_hours

Power On Hours: Contains the number of power-on hours. This may not include time that the controller was powered and in a non-operational power state.

unsafe_shutdowns

Unsafe Shutdowns: Contains the number of unsafe shutdowns. This count is incremented when a Shutdown Notification (CC.SHN) is not received prior to loss of power.

media_errors

Media and Data Integrity Errors: Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field. Errors introduced as a result of a Write Uncorrectable command may or may not be included in this field.

num_err_log_entries

Number of Error Information Log Entries: Contains the number of Error Information log entries over the life of the controller.

warning_temp_time

Warning Composite Temperature Time: Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Warning Composite Temperature Threshold (WCTEMP) field and less than the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure. If the value of the WCTEMP or CCTEMP field is 0h, then this field is always cleared to 0h regardless of the Composite Temperature value.

critical_comp_time

Critical Composite Temperature Time: Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure. If the value of the CCTEMP field is 0h, then this field is always cleared to 0h regardless of the Composite Temperature value.

temp_sensor

Temperature Sensor 1-8: Contains the current temperature in degrees Kelvin reported by temperature sensors 1-8. The physical point in the NVM subsystem whose temperature is reported by the temperature sensor and the temperature accuracy is implementation specific. An implementation that does not implement the temperature sensor reports a value of 0h.

thm_temp1_trans_count

Thermal Management Temperature 1 Transition Count: Contains the number of times the controller transitioned to lower power active power states or performed vendor specific thermal management actions while minimizing the impact on performance in order to attempt to reduce the Composite Temperature because of the host controlled thermal management feature (i.e., the Composite Temperature rose above the Thermal Management Temperature 1). This counter shall not wrap once the value FFFFFFFFh is reached. A value of 0h, indicates that this transition has never occurred or this field is not implemented.

thm_temp2_trans_count

Thermal Management Temperature 2 Transition Count

thm_temp1_total_time

Total Time For Thermal Management Temperature 1: Contains the number of seconds that the controller had transitioned to lower power active power states or performed vendor specific thermal management actions while minimizing the impact on performance in order to attempt to reduce the Composite Temperature because of the host controlled thermal management feature. This counter shall not wrap once the value FFFFFFFFh is reached. A value of 0h, indicates that this transition has never occurred or this field is not implemented.

thm_temp2_total_time

Total Time For Thermal Management Temperature 2

rsvd232

Reserved


package: libnvme-devel

title: nvme_st_code(2)

summary: Self-test Code value

text:
# nvme_st_code(2)

## NAME
enum nvme_st_code - Self-test Code value

## SYNOPSIS
enum nvme_st_code {

NVME_ST_CODE_RESERVED ,

NVME_ST_CODE_SHORT ,

NVME_ST_CODE_EXTENDED ,

NVME_ST_CODE_VS ,

NVME_ST_CODE_ABORT ,

NVME_ST_CODE_SHIFT

};

## Constants
NVME_ST_CODE_RESERVED

Reserved.

NVME_ST_CODE_SHORT

Short device self-test operation.

NVME_ST_CODE_EXTENDED

Extended device self-test operation.

NVME_ST_CODE_VS

Vendor specific.

NVME_ST_CODE_ABORT

Abort device self-test operation.

NVME_ST_CODE_SHIFT

Shift amount to get the code value from the struct nvme_st_result.dsts field.


title: nvme_st_curr_op(2)

summary: Current Device Self-Test Operation

text:
# nvme_st_curr_op(2)

## NAME
enum nvme_st_curr_op - Current Device Self-Test Operation

## SYNOPSIS
enum nvme_st_curr_op {

NVME_ST_CURR_OP_NOT_RUNNING ,

NVME_ST_CURR_OP_SHORT ,

NVME_ST_CURR_OP_EXTENDED ,

NVME_ST_CURR_OP_VS ,

NVME_ST_CURR_OP_RESERVED ,

NVME_ST_CURR_OP_MASK ,

NVME_ST_CURR_OP_CMPL_MASK

};

## Constants
NVME_ST_CURR_OP_NOT_RUNNING

No device self-test operation in progress.

NVME_ST_CURR_OP_SHORT

Short device self-test operation in progress.

NVME_ST_CURR_OP_EXTENDED

Extended device self-test operation in progress.

NVME_ST_CURR_OP_VS

Vendor specific.

NVME_ST_CURR_OP_RESERVED

Reserved.

NVME_ST_CURR_OP_MASK

Mask to get the current operation value from the struct nvme_self_test_log.current_operation field.

NVME_ST_CURR_OP_CMPL_MASK

Mask to get the current operation completion value from the struct nvme_self_test_log.completion field.


title: nvme_st_result(2)

summary: Self-test Result

text:
# nvme_st_result(2)

## NAME
struct nvme_st_result - Self-test Result

## SYNOPSIS
struct nvme_st_result {

__u8 dsts;

__u8 seg;

__u8 vdi;

__u8 rsvd;

__le64 poh;

__le32 nsid;

__le64 flba;

__u8 sct;

__u8 sc;

__u8 vs[2];

};

## Members
dsts

Device Self-test Status: Indicates the device self-test code and the status of the operation (see enum nvme_status_result and enum nvme_st_code).

seg

Segment Number: Iindicates the segment number where the first self-test failure occurred. If Device Self-test Status (dsts) is not set to #NVME_ST_RESULT_KNOWN_SEG_FAIL, then this field should be ignored.

vdi

Valid Diagnostic Information: Indicates the diagnostic failure information that is reported. See enum nvme_st_valid_diag_info.

rsvd

Reserved

poh

Power On Hours (POH): Indicates the number of power-on hours at the time the device self-test operation was completed or aborted. This does not include time that the controller was powered and in a low power state condition.

nsid

Namespace Identifier (NSID): Indicates the namespace that the Failing LBA occurred on. Valid only when the NSID Valid bit (#NVME_ST_VALID_DIAG_INFO_NSID) is set in the Valid Diagnostic Information (vdi) field.

flba

Failing LBA: indicates the LBA of the logical block that caused the test to fail. If the device encountered more than one failed logical block during the test, then this field only indicates one of those failed logical blocks. Valid only when the NSID Valid bit (#NVME_ST_VALID_DIAG_INFO_FLBA) is set in the Valid Diagnostic Information (vdi) field.

sct

Status Code Type: This field may contain additional information related to errors or conditions. Bits 2:0 may contain additional information relating to errors or conditions that occurred during the device self-test operation represented in the same format used in the Status Code Type field of the completion queue entry (refer to enum nvme_status_field). Valid only when the NSID Valid bit (#NVME_ST_VALID_DIAG_INFO_SCT) is set in the Valid Diagnostic Information (vdi) field.

sc

Status Code: This field may contain additional information relating to errors or conditions that occurred during the device self-test operation represented in the same format used in the Status Code field of the completion queue entry. Valid only when the SCT Valid bit (#NVME_ST_VALID_DIAG_INFO_SC) is set in the Valid Diagnostic Information (vdi) field.

vs

Vendor Specific.


title: nvme_st_valid_diag_info(2)

summary: Valid Diagnostic Information

text:
# nvme_st_valid_diag_info(2)

## NAME
enum nvme_st_valid_diag_info - Valid Diagnostic Information

## SYNOPSIS
enum nvme_st_valid_diag_info {

NVME_ST_VALID_DIAG_INFO_NSID ,

NVME_ST_VALID_DIAG_INFO_FLBA ,

NVME_ST_VALID_DIAG_INFO_SCT ,

NVME_ST_VALID_DIAG_INFO_SC

};

## Constants
NVME_ST_VALID_DIAG_INFO_NSID

NSID Valid: if set, then the contents of the Namespace Identifier field are valid.

NVME_ST_VALID_DIAG_INFO_FLBA

FLBA Valid: if set, then the contents of the Failing LBA field are valid.

NVME_ST_VALID_DIAG_INFO_SCT

SCT Valid: if set, then the contents of the Status Code Type field are valid.

NVME_ST_VALID_DIAG_INFO_SC

SC Valid: if set, then the contents of the Status Code field are valid.


title: nvme_status_code(2)

summary: Returns the NVMe Status Code

text:
# nvme_status_code(2)

## NAME
nvme_status_code - Returns the NVMe Status Code

## SYNOPSIS
__u16 nvme_status_code (__u16 status_field );

## ARGUMENTS
status_field

The NVMe Completion Queue Entry's Status Field See enum nvme_status_field

## RETURN
status code


title: nvme_status_code_type(2)

summary: Returns the NVMe Status Code Type

text:
# nvme_status_code_type(2)

## NAME
nvme_status_code_type - Returns the NVMe Status Code Type

## SYNOPSIS
__u16 nvme_status_code_type (__u16 status_field );

## ARGUMENTS
status_field

The NVMe Completion Queue Entry's Status Field See enum nvme_status_field

## RETURN
status code type


title: nvme_status_equals(2)

text:
# nvme_status_equals(2)

## NAME
nvme_status_equals - helper to check a status against a type and value

## SYNOPSIS
__u32 nvme_status_equals (int status , enum nvme_status_type type , unsigned int value );

## ARGUMENTS
status

the (non-negative) return value from the NVMe API

type

the status type

value

the status value

## RETURN
true if status is of the specified type and value


title: nvme_status_field(2)

text:
# nvme_status_field(2)

## NAME
enum nvme_status_field - Defines all parts of the nvme status field: status code, status code type, and additional flags.

## SYNOPSIS
enum nvme_status_field {

NVME_SCT_GENERIC ,

NVME_SCT_CMD_SPECIFIC ,

NVME_SCT_MEDIA ,

NVME_SCT_PATH ,

NVME_SCT_VS ,

NVME_SCT_MASK ,

NVME_SCT_SHIFT ,

NVME_SC_MASK ,

NVME_SC_SHIFT ,

NVME_SC_SUCCESS ,

NVME_SC_INVALID_OPCODE ,

NVME_SC_INVALID_FIELD ,

NVME_SC_CMDID_CONFLICT ,

NVME_SC_DATA_XFER_ERROR ,

NVME_SC_POWER_LOSS ,

NVME_SC_INTERNAL ,

NVME_SC_ABORT_REQ ,

NVME_SC_ABORT_QUEUE ,

NVME_SC_FUSED_FAIL ,

NVME_SC_FUSED_MISSING ,

NVME_SC_INVALID_NS ,

NVME_SC_CMD_SEQ_ERROR ,

NVME_SC_SGL_INVALID_LAST ,

NVME_SC_SGL_INVALID_COUNT ,

NVME_SC_SGL_INVALID_DATA ,

NVME_SC_SGL_INVALID_METADATA ,

NVME_SC_SGL_INVALID_TYPE ,

NVME_SC_CMB_INVALID_USE ,

NVME_SC_PRP_INVALID_OFFSET ,

NVME_SC_AWU_EXCEEDED ,

NVME_SC_OP_DENIED ,

NVME_SC_SGL_INVALID_OFFSET ,

NVME_SC_HOSTID_FORMAT ,

NVME_SC_KAT_EXPIRED ,

NVME_SC_KAT_INVALID ,

NVME_SC_CMD_ABORTED_PREMEPT ,

NVME_SC_SANITIZE_FAILED ,

NVME_SC_SANITIZE_IN_PROGRESS ,

NVME_SC_SGL_INVALID_GRANULARITY ,

NVME_SC_CMD_IN_CMBQ_NOT_SUPP ,

NVME_SC_NS_WRITE_PROTECTED ,

NVME_SC_CMD_INTERRUPTED ,

NVME_SC_TRAN_TPORT_ERROR ,

NVME_SC_PROHIBITED_BY_CMD_AND_FEAT ,

NVME_SC_ADMIN_CMD_MEDIA_NOT_READY ,

NVME_SC_FDP_DISABLED ,

NVME_SC_INVALID_PLACEMENT_HANDLE_LIST ,

NVME_SC_LBA_RANGE ,

NVME_SC_CAP_EXCEEDED ,

NVME_SC_NS_NOT_READY ,

NVME_SC_RESERVATION_CONFLICT ,

NVME_SC_FORMAT_IN_PROGRESS ,

NVME_SC_CQ_INVALID ,

NVME_SC_QID_INVALID ,

NVME_SC_QUEUE_SIZE ,

NVME_SC_ABORT_LIMIT ,

NVME_SC_ABORT_MISSING ,

NVME_SC_ASYNC_LIMIT ,

NVME_SC_FIRMWARE_SLOT ,

NVME_SC_FIRMWARE_IMAGE ,

NVME_SC_INVALID_VECTOR ,

NVME_SC_INVALID_LOG_PAGE ,

NVME_SC_INVALID_FORMAT ,

NVME_SC_FW_NEEDS_CONV_RESET ,

NVME_SC_INVALID_QUEUE ,

NVME_SC_FEATURE_NOT_SAVEABLE ,

NVME_SC_FEATURE_NOT_CHANGEABLE ,

NVME_SC_FEATURE_NOT_PER_NS ,

NVME_SC_FW_NEEDS_SUBSYS_RESET ,

NVME_SC_FW_NEEDS_RESET ,

NVME_SC_FW_NEEDS_MAX_TIME ,

NVME_SC_FW_ACTIVATE_PROHIBITED ,

NVME_SC_OVERLAPPING_RANGE ,

NVME_SC_NS_INSUFFICIENT_CAP ,

NVME_SC_NS_ID_UNAVAILABLE ,

NVME_SC_NS_ALREADY_ATTACHED ,

NVME_SC_NS_IS_PRIVATE ,

NVME_SC_NS_NOT_ATTACHED ,

NVME_SC_THIN_PROV_NOT_SUPP ,

NVME_SC_CTRL_LIST_INVALID ,

NVME_SC_SELF_TEST_IN_PROGRESS ,

NVME_SC_BP_WRITE_PROHIBITED ,

NVME_SC_INVALID_CTRL_ID ,

NVME_SC_INVALID_SEC_CTRL_STATE ,

NVME_SC_INVALID_CTRL_RESOURCES ,

NVME_SC_INVALID_RESOURCE_ID ,

NVME_SC_PMR_SAN_PROHIBITED ,

NVME_SC_ANA_GROUP_ID_INVALID ,

NVME_SC_ANA_ATTACH_FAILED ,

NVME_SC_INSUFFICIENT_CAP ,

NVME_SC_NS_ATTACHMENT_LIMIT_EXCEEDED ,

NVME_SC_PROHIBIT_CMD_EXEC_NOT_SUPPORTED ,

NVME_SC_IOCS_NOT_SUPPORTED ,

NVME_SC_IOCS_NOT_ENABLED ,

NVME_SC_IOCS_COMBINATION_REJECTED ,

NVME_SC_INVALID_IOCS ,

NVME_SC_ID_UNAVAILABLE ,

NVME_SC_INVALID_DISCOVERY_INFO ,

NVME_SC_ZONING_DATA_STRUCT_LOCKED ,

NVME_SC_ZONING_DATA_STRUCT_NOTFND ,

NVME_SC_INSUFFICIENT_DISC_RES ,

NVME_SC_REQSTD_FUNCTION_DISABLED ,

NVME_SC_ZONEGRP_ORIGINATOR_INVLD ,

NVME_SC_BAD_ATTRIBUTES ,

NVME_SC_INVALID_PI ,

NVME_SC_READ_ONLY ,

NVME_SC_CMD_SIZE_LIMIT_EXCEEDED ,

NVME_SC_CONNECT_FORMAT ,

NVME_SC_CONNECT_CTRL_BUSY ,

NVME_SC_CONNECT_INVALID_PARAM ,

NVME_SC_CONNECT_RESTART_DISC ,

NVME_SC_CONNECT_INVALID_HOST ,

NVME_SC_DISCONNECT_INVALID_QTYPE ,

NVME_SC_DISCOVERY_RESTART ,

NVME_SC_AUTH_REQUIRED ,

NVME_SC_ZNS_INVALID_OP_REQUEST ,

NVME_SC_ZNS_ZRWA_RESOURCES_UNAVAILABLE ,

NVME_SC_ZNS_BOUNDARY_ERROR ,

NVME_SC_ZNS_FULL ,

NVME_SC_ZNS_READ_ONLY ,

NVME_SC_ZNS_OFFLINE ,

NVME_SC_ZNS_INVALID_WRITE ,

NVME_SC_ZNS_TOO_MANY_ACTIVE ,

NVME_SC_ZNS_TOO_MANY_OPENS ,

NVME_SC_ZNS_INVAL_TRANSITION ,

NVME_SC_WRITE_FAULT ,

NVME_SC_READ_ERROR ,

NVME_SC_GUARD_CHECK ,

NVME_SC_APPTAG_CHECK ,

NVME_SC_REFTAG_CHECK ,

NVME_SC_COMPARE_FAILED ,

NVME_SC_ACCESS_DENIED ,

NVME_SC_UNWRITTEN_BLOCK ,

NVME_SC_STORAGE_TAG_CHECK ,

NVME_SC_ANA_INTERNAL_PATH_ERROR ,

NVME_SC_ANA_PERSISTENT_LOSS ,

NVME_SC_ANA_INACCESSIBLE ,

NVME_SC_ANA_TRANSITION ,

NVME_SC_CTRL_PATH_ERROR ,

NVME_SC_HOST_PATH_ERROR ,

NVME_SC_CMD_ABORTED_BY_HOST ,

NVME_SC_CRD ,

NVME_SC_MORE ,

NVME_SC_DNR

};

## Constants
NVME_SCT_GENERIC

Generic errors applicable to multiple opcodes

NVME_SCT_CMD_SPECIFIC

Errors associated to a specific opcode

NVME_SCT_MEDIA

Errors associated with media and data integrity

NVME_SCT_PATH

Errors associated with the paths connection

NVME_SCT_VS

Vendor specific errors

NVME_SCT_MASK

Mask to get the value of the Status Code Type

NVME_SCT_SHIFT

Shift value to get the value of the Status Code Type

NVME_SC_MASK

Mask to get the value of the status code.

NVME_SC_SHIFT

Shift value to get the value of the status code.

NVME_SC_SUCCESS

Successful Completion: The command completed without error.

NVME_SC_INVALID_OPCODE

Invalid Command Opcode: A reserved coded value or an unsupported value in the command opcode field.

NVME_SC_INVALID_FIELD

Invalid Field in Command: A reserved coded value or an unsupported value in a defined field.

NVME_SC_CMDID_CONFLICT

Command ID Conflict: The command identifier is already in use.

NVME_SC_DATA_XFER_ERROR

Data Transfer Error: Transferring the data or metadata associated with a command experienced an error.

NVME_SC_POWER_LOSS

Commands Aborted due to Power Loss Notification: Indicates that the command was aborted due to a power loss notification.

NVME_SC_INTERNAL

Internal Error: The command was not completed successfully due to an internal error.

NVME_SC_ABORT_REQ

Command Abort Requested: The command was aborted due to an Abort command being received that specified the Submission Queue Identifier and Command Identifier of this command.

NVME_SC_ABORT_QUEUE

Command Aborted due to SQ Deletion: The command was aborted due to a Delete I/O Submission Queue request received for the Submission Queue to which the command was submitted.

NVME_SC_FUSED_FAIL

Command Aborted due to Failed Fused Command: The command was aborted due to the other command in a fused operation failing.

NVME_SC_FUSED_MISSING

Aborted due to Missing Fused Command: The fused command was aborted due to the adjacent submission queue entry not containing a fused command that is the other command.

NVME_SC_INVALID_NS

Invalid Namespace or Format: The namespace or the format of that namespace is invalid.

NVME_SC_CMD_SEQ_ERROR

Command Sequence Error: The command was aborted due to a protocol violation in a multi-command sequence.

NVME_SC_SGL_INVALID_LAST

Invalid SGL Segment Descriptor: The command includes an invalid SGL Last Segment or SGL Segment descriptor.

NVME_SC_SGL_INVALID_COUNT

Invalid Number of SGL Descriptors: There is an SGL Last Segment descriptor or an SGL Segment descriptor in a location other than the last descriptor of a segment based on the length indicated.

NVME_SC_SGL_INVALID_DATA

Data SGL Length Invalid: This may occur if the length of a Data SGL is too short. This may occur if the length of a Data SGL is too long and the controller does not support SGL transfers longer than the amount of data to be transferred as indicated in the SGL Support field of the Identify Controller data structure.

NVME_SC_SGL_INVALID_METADATA

Metadata SGL Length Invalid: This may occur if the length of a Metadata SGL is too short. This may occur if the length of a Metadata SGL is too long and the controller does not support SGL transfers longer than the amount of data to be transferred as indicated in the SGL Support field of the Identify Controller data structure.

NVME_SC_SGL_INVALID_TYPE

SGL Descriptor Type Invalid: The type of an SGL Descriptor is a type that is not supported by the controller.

NVME_SC_CMB_INVALID_USE

Invalid Use of Controller Memory Buffer: The attempted use of the Controller Memory Buffer is not supported by the controller.

NVME_SC_PRP_INVALID_OFFSET

PRP Offset Invalid: The Offset field for a PRP entry is invalid.

NVME_SC_AWU_EXCEEDED

Atomic Write Unit Exceeded: The length specified exceeds the atomic write unit size.

NVME_SC_OP_DENIED

Operation Denied: The command was denied due to lack of access rights. Refer to the appropriate security specification.

NVME_SC_SGL_INVALID_OFFSET

SGL Offset Invalid: The offset specified in a descriptor is invalid. This may occur when using capsules for data transfers in NVMe over Fabrics implementations and an invalid offset in the capsule is specified.

NVME_SC_HOSTID_FORMAT

Host Identifier Inconsistent Format: The NVM subsystem detected the simultaneous use of 64- bit and 128-bit Host Identifier values on different controllers.

NVME_SC_KAT_EXPIRED

Keep Alive Timer Expired: The Keep Alive Timer expired.

NVME_SC_KAT_INVALID

Keep Alive Timeout Invalid: The Keep Alive Timeout value specified is invalid.

NVME_SC_CMD_ABORTED_PREMEPT

Command Aborted due to Preempt and Abort: The command was aborted due to a Reservation Acquire command.

NVME_SC_SANITIZE_FAILED

Sanitize Failed: The most recent sanitize operation failed and no recovery action has been successfully completed.

NVME_SC_SANITIZE_IN_PROGRESS

Sanitize In Progress: The requested function (e.g., command) is prohibited while a sanitize operation is in progress.

NVME_SC_SGL_INVALID_GRANULARITY

SGL Data Block Granularity Invalid: The Address alignment or Length granularity for an SGL Data Block descriptor is invalid.

NVME_SC_CMD_IN_CMBQ_NOT_SUPP

Command Not Supported for Queue in CMB: The implementation does not support submission of the command to a Submission Queue in the Controller Memory Buffer or command completion to a Completion Queue in the Controller Memory Buffer.

NVME_SC_NS_WRITE_PROTECTED

Namespace is Write Protected: The command is prohibited while the namespace is write protected as a result of a change in the namespace write protection state as defined by the Namespace Write Protection State Machine.

NVME_SC_CMD_INTERRUPTED

Command Interrupted: Command processing was interrupted and the controller is unable to successfully complete the command. The host should retry the command.

NVME_SC_TRAN_TPORT_ERROR

Transient Transport Error: A transient transport error was detected. If the command is retried on the same controller, the command is likely to succeed. A command that fails with a transient transport error four or more times should be treated as a persistent transport error that is not likely to succeed if retried on the same controller.

NVME_SC_PROHIBITED_BY_CMD_AND_FEAT

Command Prohibited by Command and Feature Lockdown: The command was aborted due to command execution being prohibited by the Command and Feature Lockdown.

NVME_SC_ADMIN_CMD_MEDIA_NOT_READY

Admin Command Media Not Ready: The Admin command requires access to media and the media is not ready.

NVME_SC_FDP_DISABLED

Command is not allowed when Flexible Data Placement is disabled.

NVME_SC_INVALID_PLACEMENT_HANDLE_LIST

The Placement Handle List is invalid due to invalid Reclaim Unit Handle Identifier or valid Reclaim Unit Handle Identifier but restricted or the Placement Handle List number of entries exceeded the maximum number allowed.

NVME_SC_LBA_RANGE

LBA Out of Range: The command references an LBA that exceeds the size of the namespace.

NVME_SC_CAP_EXCEEDED

Capacity Exceeded: Execution of the command has caused the capacity of the namespace to be exceeded.

NVME_SC_NS_NOT_READY

Namespace Not Ready: The namespace is not ready to be accessed as a result of a condition other than a condition that is reported as an Asymmetric Namespace Access condition.

NVME_SC_RESERVATION_CONFLICT

Reservation Conflict: The command was aborted due to a conflict with a reservation held on the accessed namespace.

NVME_SC_FORMAT_IN_PROGRESS

Format In Progress: A Format NVM command is in progress on the namespace.

NVME_SC_CQ_INVALID

Completion Queue Invalid: The Completion Queue identifier specified in the command does not exist.

NVME_SC_QID_INVALID

Invalid Queue Identifier: The creation of the I/O Completion Queue failed due to an invalid queue identifier specified as part of the command. An invalid queue identifier is one that is currently in use or one that is outside the range supported by the controller.

NVME_SC_QUEUE_SIZE

Invalid Queue Size: The host attempted to create an I/O Completion Queue with an invalid number of entries.

NVME_SC_ABORT_LIMIT

Abort Command Limit Exceeded: The number of concurrently outstanding Abort commands has exceeded the limit indicated in the Identify Controller data structure.

NVME_SC_ABORT_MISSING

Abort Command is missing: The abort command is missing.

NVME_SC_ASYNC_LIMIT

Asynchronous Event Request Limit Exceeded: The number of concurrently outstanding Asynchronous Event Request commands has been exceeded.

NVME_SC_FIRMWARE_SLOT

Invalid Firmware Slot: The firmware slot indicated is invalid or read only. This error is indicated if the firmware slot exceeds the number supported.

NVME_SC_FIRMWARE_IMAGE

Invalid Firmware Image: The firmware image specified for activation is invalid and not loaded by the controller.

NVME_SC_INVALID_VECTOR

Invalid Interrupt Vector: The creation of the I/O Completion Queue failed due to an invalid interrupt vector specified as part of the command.

NVME_SC_INVALID_LOG_PAGE

Invalid Log Page: The log page indicated is invalid. This error condition is also returned if a reserved log page is requested.

NVME_SC_INVALID_FORMAT

Invalid Format: The LBA Format specified is not supported.

NVME_SC_FW_NEEDS_CONV_RESET

Firmware Activation Requires Conventional Reset: The firmware commit was successful, however, activation of the firmware image requires a conventional reset.

NVME_SC_INVALID_QUEUE

Invalid Queue Deletion: Invalid I/O Completion Queue specified to delete.

NVME_SC_FEATURE_NOT_SAVEABLE

Feature Identifier Not Saveable: The Feature Identifier specified does not support a saveable value.

NVME_SC_FEATURE_NOT_CHANGEABLE

Feature Not Changeable: The Feature Identifier is not able to be changed.

NVME_SC_FEATURE_NOT_PER_NS

Feature Not Namespace Specific: The Feature Identifier specified is not namespace specific. The Feature Identifier settings apply across all namespaces.

NVME_SC_FW_NEEDS_SUBSYS_RESET

Firmware Activation Requires NVM Subsystem Reset: The firmware commit was successful, however, activation of the firmware image requires an NVM Subsystem.

NVME_SC_FW_NEEDS_RESET

Firmware Activation Requires Controller Level Reset: The firmware commit was successful; however, the image specified does not support being activated without a reset.

NVME_SC_FW_NEEDS_MAX_TIME

Firmware Activation Requires Maximum Time Violation: The image specified if activated immediately would exceed the Maximum Time for Firmware Activation (MTFA) value reported in Identify Controller.

NVME_SC_FW_ACTIVATE_PROHIBITED

Firmware Activation Prohibited: The image specified is being prohibited from activation by the controller for vendor specific reasons.

NVME_SC_OVERLAPPING_RANGE

Overlapping Range: The downloaded firmware image has overlapping ranges.

NVME_SC_NS_INSUFFICIENT_CAP

Namespace Insufficient Capacity: Creating the namespace requires more free space than is currently available.

NVME_SC_NS_ID_UNAVAILABLE

Namespace Identifier Unavailable: The number of namespaces supported has been exceeded.

NVME_SC_NS_ALREADY_ATTACHED

Namespace Already Attached: The controller is already attached to the namespace specified.

NVME_SC_NS_IS_PRIVATE

Namespace Is Private: The namespace is private and is already attached to one controller.

NVME_SC_NS_NOT_ATTACHED

Namespace Not Attached: The request to detach the controller could not be completed because the controller is not attached to the namespace.

NVME_SC_THIN_PROV_NOT_SUPP

Thin Provisioning Not Supported: Thin provisioning is not supported by the controller.

NVME_SC_CTRL_LIST_INVALID

Controller List Invalid: The controller list provided contains invalid controller ids.

NVME_SC_SELF_TEST_IN_PROGRESS

Device Self-test In Progress: The controller or NVM subsystem already has a device self-test operation in process.

NVME_SC_BP_WRITE_PROHIBITED

Boot Partition Write Prohibited: The command is trying to modify a locked Boot Partition.

NVME_SC_INVALID_CTRL_ID

Invalid Controller Identifier:

NVME_SC_INVALID_SEC_CTRL_STATE

Invalid Secondary Controller State

NVME_SC_INVALID_CTRL_RESOURCES

Invalid Number of Controller Resources

NVME_SC_INVALID_RESOURCE_ID

Invalid Resource Identifier

NVME_SC_PMR_SAN_PROHIBITED

Sanitize Prohibited While Persistent Memory Region is Enabled

NVME_SC_ANA_GROUP_ID_INVALID

ANA Group Identifier Invalid: The specified ANA Group Identifier (ANAGRPID) is not supported in the submitted command.

NVME_SC_ANA_ATTACH_FAILED

ANA Attach Failed: The controller is not attached to the namespace as a result of an ANA condition.

NVME_SC_INSUFFICIENT_CAP

Insufficient Capacity: Requested operation requires more free space than is currently available.

NVME_SC_NS_ATTACHMENT_LIMIT_EXCEEDED

Namespace Attachment Limit Exceeded: Attaching the ns to a controller causes max number of ns attachments allowed to be exceeded.

NVME_SC_PROHIBIT_CMD_EXEC_NOT_SUPPORTED

Prohibition of Command Execution Not Supported

NVME_SC_IOCS_NOT_SUPPORTED

I/O Command Set Not Supported

NVME_SC_IOCS_NOT_ENABLED

I/O Command Set Not Enabled

NVME_SC_IOCS_COMBINATION_REJECTED

I/O Command Set Combination Rejected

NVME_SC_INVALID_IOCS

Invalid I/O Command Set

NVME_SC_ID_UNAVAILABLE

Identifier Unavailable

NVME_SC_INVALID_DISCOVERY_INFO

The discovery information provided in one or more extended discovery information entries is not applicable for the type of entity selected in the Entity Type (ETYPE) field of the Discovery Information Management command data portion’s header.

NVME_SC_ZONING_DATA_STRUCT_LOCKED

The requested Zoning data structure is locked on the CDC.

NVME_SC_ZONING_DATA_STRUCT_NOTFND

The requested Zoning data structure does not exist on the CDC.

NVME_SC_INSUFFICIENT_DISC_RES

The number of discover information entries provided in the data portion of the Discovery Information Management command for a registration task (i.e., TAS field cleared to 0h) exceeds the available capacity for new discovery information entries on the CDC or DDC. This may be a transient condition.

NVME_SC_REQSTD_FUNCTION_DISABLED

Fabric Zoning is not enabled on the CDC

NVME_SC_ZONEGRP_ORIGINATOR_INVLD

The NQN contained in the ZoneGroup Originator field does not match the Host NQN used by the DDC to connect to the CDC.

NVME_SC_BAD_ATTRIBUTES

Conflicting Dataset Management Attributes

NVME_SC_INVALID_PI

Invalid Protection Information

NVME_SC_READ_ONLY

Attempted Write to Read Only Range

NVME_SC_CMD_SIZE_LIMIT_EXCEEDED

Command Size Limit Exceeded

NVME_SC_CONNECT_FORMAT

Incompatible Format: The NVM subsystem does not support the record format specified by the host.

NVME_SC_CONNECT_CTRL_BUSY

Controller Busy: The controller is already associated with a host.

NVME_SC_CONNECT_INVALID_PARAM

Connect Invalid Parameters: One or more of the command parameters.

NVME_SC_CONNECT_RESTART_DISC

Connect Restart Discovery: The NVM subsystem requested is not available.

NVME_SC_CONNECT_INVALID_HOST

Connect Invalid Host: The host is either not allowed to establish an association to any controller in the NVM subsystem or the host is not allowed to establish an association to the specified controller

NVME_SC_DISCONNECT_INVALID_QTYPE

Invalid Queue Type: The command was sent on the wrong queue type.

NVME_SC_DISCOVERY_RESTART

Discover Restart: The snapshot of the records is now invalid or out of date.

NVME_SC_AUTH_REQUIRED

Authentication Required: NVMe in-band authentication is required and the queue has not yet been authenticated.

NVME_SC_ZNS_INVALID_OP_REQUEST

Invalid Zone Operation Request: The operation requested is invalid. This may be due to various conditions, including: attempting to allocate a ZRWA when a zone is not in the ZSE:Empty state; or invalid Flush Explicit ZRWA Range Send Zone Action operation.

NVME_SC_ZNS_ZRWA_RESOURCES_UNAVAILABLE

ZRWA Resources Unavailable: No ZRWAs are available.

NVME_SC_ZNS_BOUNDARY_ERROR

Zone Boundary Error: The command specifies logical blocks in more than one zone.

NVME_SC_ZNS_FULL

Zone Is Full: The accessed zone is in the ZSF:Full state.

NVME_SC_ZNS_READ_ONLY

Zone Is Read Only: The accessed zone is in the ZSRO:Read Only state.

NVME_SC_ZNS_OFFLINE

Zone Is Offline: The accessed zone is in the ZSO:Offline state.

NVME_SC_ZNS_INVALID_WRITE

Zone Invalid Write: The write to a zone was not at the write pointer.

NVME_SC_ZNS_TOO_MANY_ACTIVE

Too Many Active Zones: The controller does not allow additional active zones.

NVME_SC_ZNS_TOO_MANY_OPENS

Too Many Open Zones: The controller does not allow additional open zones.

NVME_SC_ZNS_INVAL_TRANSITION

Invalid Zone State Transition: The request is not a valid zone state transition.

NVME_SC_WRITE_FAULT

Write Fault: The write data could not be committed to the media.

NVME_SC_READ_ERROR

Unrecovered Read Error: The read data could not be recovered from the media.

NVME_SC_GUARD_CHECK

End-to-end Guard Check Error: The command was aborted due to an end-to-end guard check failure.

NVME_SC_APPTAG_CHECK

End-to-end Application Tag Check Error: The command was aborted due to an end-to-end application tag check failure.

NVME_SC_REFTAG_CHECK

End-to-end Reference Tag Check Error: The command was aborted due to an end-to-end reference tag check failure.

NVME_SC_COMPARE_FAILED

Compare Failure: The command failed due to a miscompare during a Compare command.

NVME_SC_ACCESS_DENIED

Access Denied: Access to the namespace and/or LBA range is denied due to lack of access rights.

NVME_SC_UNWRITTEN_BLOCK

Deallocated or Unwritten Logical Block: The command failed due to an attempt to read from or verify an LBA range containing a deallocated or unwritten logical block.

NVME_SC_STORAGE_TAG_CHECK

End-to-End Storage Tag Check Error: The command was aborted due to an end-to-end storage tag check failure.

NVME_SC_ANA_INTERNAL_PATH_ERROR

Internal Path Error: The command was not completed as the result of a controller internal error that is specific to the controller processing the command.

NVME_SC_ANA_PERSISTENT_LOSS

Asymmetric Access Persistent Loss: The requested function (e.g., command) is not able to be performed as a result of the relationship between the controller and the namespace being in the ANA Persistent Loss state.

NVME_SC_ANA_INACCESSIBLE

Asymmetric Access Inaccessible: The requested function (e.g., command) is not able to be performed as a result of the relationship between the controller and the namespace being in the ANA Inaccessible state.

NVME_SC_ANA_TRANSITION

Asymmetric Access Transition: The requested function (e.g., command) is not able to be performed as a result of the relationship between the controller and the namespace transitioning between Asymmetric Namespace Access states.

NVME_SC_CTRL_PATH_ERROR

Controller Pathing Error: A pathing error was detected by the controller.

NVME_SC_HOST_PATH_ERROR

Host Pathing Error: A pathing error was detected by the host.

NVME_SC_CMD_ABORTED_BY_HOST

Command Aborted By Host: The command was aborted as a result of host action.

NVME_SC_CRD

Mask to get value of Command Retry Delay index

NVME_SC_MORE

More bit. If set, more status information for this command as part of the Error Information log that may be retrieved with the Get Log Page command.

NVME_SC_DNR

Do Not Retry bit. If set, if the same command is re-submitted to any controller in the NVM subsystem, then that re-submitted command is expected to fail.


title: nvme_status_get_type(2)

text:
# nvme_status_get_type(2)

## NAME
nvme_status_get_type - extract the type from a nvme_* return value

## SYNOPSIS
__u32 nvme_status_get_type (int status );

## ARGUMENTS
status

the (non-negative) return value from the NVMe API

## RETURN
the type component of the status.


title: nvme_status_get_value(2)

text:
# nvme_status_get_value(2)

## NAME
nvme_status_get_value - extract the status value from a nvme_* return value

## SYNOPSIS
__u32 nvme_status_get_value (int status );

## ARGUMENTS
status

the (non-negative) return value from the NVMe API

## RETURN
the value component of the status; the set of values will depend on the status type.


title: nvme_status_result(2)

text:
# nvme_status_result(2)

## NAME
enum nvme_status_result - Result of the device self-test operation

## SYNOPSIS
enum nvme_status_result {

NVME_ST_RESULT_NO_ERR ,

NVME_ST_RESULT_ABORTED ,

NVME_ST_RESULT_CLR ,

NVME_ST_RESULT_NS_REMOVED ,

NVME_ST_RESULT_ABORTED_FORMAT ,

NVME_ST_RESULT_FATAL_ERR ,

NVME_ST_RESULT_UNKNOWN_SEG_FAIL ,

NVME_ST_RESULT_KNOWN_SEG_FAIL ,

NVME_ST_RESULT_ABORTED_UNKNOWN ,

NVME_ST_RESULT_ABORTED_SANITIZE ,

NVME_ST_RESULT_NOT_USED ,

NVME_ST_RESULT_MASK

};

## Constants
NVME_ST_RESULT_NO_ERR

Operation completed without error.

NVME_ST_RESULT_ABORTED

Operation was aborted by a Device Self-test command.

NVME_ST_RESULT_CLR

Operation was aborted by a Controller Level Reset.

NVME_ST_RESULT_NS_REMOVED

Operation was aborted due to a removal of a namespace from the namespace inventory.

NVME_ST_RESULT_ABORTED_FORMAT

Operation was aborted due to the processing of a Format NVM command.

NVME_ST_RESULT_FATAL_ERR

A fatal error or unknown test error occurred while the controller was executing the device self-test operation and the operation did not complete.

NVME_ST_RESULT_UNKNOWN_SEG_FAIL

Operation completed with a segment that failed and the segment that failed is not known.

NVME_ST_RESULT_KNOWN_SEG_FAIL

Operation completed with one or more failed segments and the first segment that failed is indicated in the Segment Number field.

NVME_ST_RESULT_ABORTED_UNKNOWN

Operation was aborted for unknown reason.

NVME_ST_RESULT_ABORTED_SANITIZE

Operation was aborted due to a sanitize operation.

NVME_ST_RESULT_NOT_USED

Entry not used (does not contain a test result).

NVME_ST_RESULT_MASK

Mask to get the status result value from the struct nvme_st_result.dsts field.


title: nvme_status_to_errno(2)

summary: Converts nvme return status to errno

text:
# nvme_status_to_errno(2)

## NAME
nvme_status_to_errno - Converts nvme return status to errno

## SYNOPSIS
__u8 nvme_status_to_errno (int status , bool fabrics );

## ARGUMENTS
status

Return status from an nvme passthrough command

fabrics

Set to true if status is to a fabrics target.

## RETURN
An errno representing the nvme status if it is an nvme status field, or unchanged status is < 0 since errno is already set.


title: nvme_status_to_string(2)

text:
# nvme_status_to_string(2)

## NAME
nvme_status_to_string - Returns string describing nvme return status.

## SYNOPSIS
const char * nvme_status_to_string (int status , bool fabrics );

## ARGUMENTS
status

Return status from an nvme passthrough command

fabrics

Set to true if status is to a fabrics target.

## RETURN
String representation of the nvme status if it is an nvme status field, or a standard errno string if status is < 0.


title: nvme_status_type(2)

text:
# nvme_status_type(2)

## NAME
enum nvme_status_type - type encoding for NVMe return values, when represented as an int.

## SYNOPSIS
enum nvme_status_type {

NVME_STATUS_TYPE_SHIFT ,

NVME_STATUS_TYPE_MASK ,

NVME_STATUS_TYPE_NVME ,

NVME_STATUS_TYPE_MI

};

## Constants
NVME_STATUS_TYPE_SHIFT

shift value for status bits

NVME_STATUS_TYPE_MASK

mask value for status bits

NVME_STATUS_TYPE_NVME

NVMe command status value, typically from CDW3

NVME_STATUS_TYPE_MI

NVMe-MI header status

## Description
The nvme_* api returns an int, with negative values indicating an internal or syscall error, zero signifying success, positive values representing the NVMe status.

That latter case (the NVMe status) may represent status values from different parts of the transport/controller/etc, and are at most 16 bits of data. So, we use the most-significant 3 bits of the signed int to indicate which type of status this is.


title: nvme_streams_directive_params(2)

text:
# nvme_streams_directive_params(2)

## NAME
struct nvme_streams_directive_params - Streams Directive - Return Parameters Data Structure

## SYNOPSIS
struct nvme_streams_directive_params {

__le16 msl;

__le16 nssa;

__le16 nsso;

__u8 nssc;

__u8 rsvd[9];

__le32 sws;

__le16 sgs;

__le16 nsa;

__le16 nso;

__u8 rsvd2[6];

};

## Members
msl

Max Streams Limit

nssa

NVM Subsystem Streams Available

nsso

NVM Subsystem Streams Open

nssc

NVM Subsystem Stream Capability

rsvd

Reserved

sws

Stream Write Size

sgs

Stream Granularity Size

nsa

Namespace Streams Allocated

nso

Namespace Streams Open

rsvd2

Reserved


title: nvme_streams_directive_status(2)

text:
# nvme_streams_directive_status(2)

## NAME
struct nvme_streams_directive_status - Streams Directive - Get Status Data Structure

## SYNOPSIS
struct nvme_streams_directive_status {

__le16 osc;

__le16 sid[];

};

## Members
osc

Open Stream Count

sid

Stream Identifier


title: nvme_submit_admin_passthru(2)

text:
# nvme_submit_admin_passthru(2)

## NAME
nvme_submit_admin_passthru - Submit an nvme passthrough admin command

## SYNOPSIS
int nvme_submit_admin_passthru (int fd , struct nvme_passthru_cmd *cmd , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

cmd

The nvme admin command to send

result

Optional field to return the result from the CQE DW0

## DESCRIPTION
Uses NVME_IOCTL_ADMIN_CMD for the ioctl request.

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


title: nvme_submit_admin_passthru64(2)

text:
# nvme_submit_admin_passthru64(2)

## NAME
nvme_submit_admin_passthru64 - Submit a 64-bit nvme passthrough admin command

## SYNOPSIS
int nvme_submit_admin_passthru64 (int fd , struct nvme_passthru_cmd64 *cmd , __u64 *result );

## ARGUMENTS
fd

File descriptor of nvme device

cmd

The nvme admin command to send

result

Optional field to return the result from the CQE DW0-1

## DESCRIPTION
Uses NVME_IOCTL_ADMIN64_CMD for the ioctl request.

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


title: nvme_submit_io_passthru(2)

summary: Submit an nvme passthrough command

text:
# nvme_submit_io_passthru(2)

## NAME
nvme_submit_io_passthru - Submit an nvme passthrough command

## SYNOPSIS
int nvme_submit_io_passthru (int fd , struct nvme_passthru_cmd *cmd , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

cmd

The nvme io command to send

result

Optional field to return the result from the CQE DW0

## DESCRIPTION
Uses NVME_IOCTL_IO_CMD for the ioctl request.

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


title: nvme_submit_io_passthru64(2)

text:
# nvme_submit_io_passthru64(2)

## NAME
nvme_submit_io_passthru64 - Submit a 64-bit nvme passthrough command

## SYNOPSIS
int nvme_submit_io_passthru64 (int fd , struct nvme_passthru_cmd64 *cmd , __u64 *result );

## ARGUMENTS
fd

File descriptor of nvme device

cmd

The nvme io command to send

result

Optional field to return the result from the CQE DW0-1

## DESCRIPTION
Uses NVME_IOCTL_IO64_CMD for the ioctl request.

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


title: nvme_subsys_filter(2)

summary: Filter for subsystems

text:
# nvme_subsys_filter(2)

## NAME
nvme_subsys_filter - Filter for subsystems

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

## ARGUMENTS
d

dirent to check

## RETURN
1 if d matches, 0 otherwise


title: nvme_subsys_type(2)

summary: Type of the NVM subsystem.

text:
# nvme_subsys_type(2)

## NAME
enum nvme_subsys_type - Type of the NVM subsystem.

## SYNOPSIS
enum nvme_subsys_type {

NVME_NQN_DISC ,

NVME_NQN_NVME ,

NVME_NQN_CURR

};

## Constants
NVME_NQN_DISC

Discovery type target subsystem. Describes a referral to another Discovery Service composed of Discovery controllers that provide additional discovery records. Multiple Referral entries may be reported for each Discovery Service (if that Discovery Service has multiple NVM subsystem ports or supports multiple protocols).

NVME_NQN_NVME

NVME type target subsystem. Describes an NVM subsystem whose controllers may have attached namespaces (an NVM subsystem that is not composed of Discovery controllers). Multiple NVM Subsystem entries may be reported for each NVM subsystem if that NVM subsystem has multiple NVM subsystem ports.

NVME_NQN_CURR

Current Discovery type target subsystem. Describes this Discovery subsystem (the Discovery Service that contains the controller processing the Get Log Page command). Multiple Current Discovery Subsystem entries may be reported for this Discovery subsystem if the current Discovery subsystem has multiple NVM subsystem ports.


title: nvme_subsystem_first_ctrl(2)

summary: First ctrl iterator

text:
# nvme_subsystem_first_ctrl(2)

## NAME
nvme_subsystem_first_ctrl - First ctrl iterator

## SYNOPSIS
nvme_ctrl_t nvme_subsystem_first_ctrl (nvme_subsystem_t s );

## ARGUMENTS
s

nvme_subsystem_t object

## RETURN
First controller of an s iterator


title: nvme_subsystem_first_ns(2)

summary: Start namespace iterator

text:
# nvme_subsystem_first_ns(2)

## NAME
nvme_subsystem_first_ns - Start namespace iterator

## SYNOPSIS
nvme_ns_t nvme_subsystem_first_ns (nvme_subsystem_t s );

## ARGUMENTS
s

nvme_subsystem_t object

## RETURN
First nvme_ns_t object of an s iterator


title: nvme_subsystem_for_each_ctrl(2)

summary: Traverse controllers

text:
# nvme_subsystem_for_each_ctrl(2)

## NAME
nvme_subsystem_for_each_ctrl - Traverse controllers

## SYNOPSIS
nvme_subsystem_for_each_ctrl (s , c );

## ARGUMENTS
s

nvme_subsystem_t object

c

Controller instance


title: nvme_subsystem_for_each_ctrl_safe(2)

summary: Traverse controllers

text:
# nvme_subsystem_for_each_ctrl_safe(2)

## NAME
nvme_subsystem_for_each_ctrl_safe - Traverse controllers

## SYNOPSIS
nvme_subsystem_for_each_ctrl_safe (s , c , _c );

## ARGUMENTS
s

nvme_subsystem_t object

c

Controller instance

_c

A nvme_ctrl_t_node to use as temporary storage


title: nvme_subsystem_for_each_ns(2)

summary: Traverse namespaces

text:
# nvme_subsystem_for_each_ns(2)

## NAME
nvme_subsystem_for_each_ns - Traverse namespaces

## SYNOPSIS
nvme_subsystem_for_each_ns (s , n );

## ARGUMENTS
s

nvme_subsystem_t object

n

nvme_ns_t object


title: nvme_subsystem_for_each_ns_safe(2)

summary: Traverse namespaces

text:
# nvme_subsystem_for_each_ns_safe(2)

## NAME
nvme_subsystem_for_each_ns_safe - Traverse namespaces

## SYNOPSIS
nvme_subsystem_for_each_ns_safe (s , n , _n );

## ARGUMENTS
s

nvme_subsystem_t object

n

nvme_ns_t object

_n

A nvme_ns_t_node to use as temporary storage


title: nvme_subsystem_get_application(2)

summary: Return the application string

text:
# nvme_subsystem_get_application(2)

## NAME
nvme_subsystem_get_application - Return the application string

## SYNOPSIS
const char * nvme_subsystem_get_application (nvme_subsystem_t s );

## ARGUMENTS
s

nvme_subsystem_t object

## RETURN
Managing application string or NULL if not set.


title: nvme_subsystem_get_host(2)

summary: Returns nvme_host_t object

text:
# nvme_subsystem_get_host(2)

## NAME
nvme_subsystem_get_host - Returns nvme_host_t object

## SYNOPSIS
nvme_host_t nvme_subsystem_get_host (nvme_subsystem_t s );

## ARGUMENTS
s

subsystem

## RETURN
nvme_host_t object from s


title: nvme_subsystem_get_name(2)

text:
# nvme_subsystem_get_name(2)

## NAME
nvme_subsystem_get_name - sysfs name of an nvme_subsystem_t object

## SYNOPSIS
const char * nvme_subsystem_get_name (nvme_subsystem_t s );

## ARGUMENTS
s

nvme_subsystem_t object

## RETURN
sysfs name of s


title: nvme_subsystem_get_nqn(2)

summary: Retrieve NQN from subsystem

text:
# nvme_subsystem_get_nqn(2)

## NAME
nvme_subsystem_get_nqn - Retrieve NQN from subsystem

## SYNOPSIS
const char * nvme_subsystem_get_nqn (nvme_subsystem_t s );

## ARGUMENTS
s

nvme_subsystem_t object

## RETURN
NQN of subsystem


title: nvme_subsystem_get_sysfs_dir(2)

text:
# nvme_subsystem_get_sysfs_dir(2)

## NAME
nvme_subsystem_get_sysfs_dir - sysfs directory of an nvme_subsystem_t object

## SYNOPSIS
const char * nvme_subsystem_get_sysfs_dir (nvme_subsystem_t s );

## ARGUMENTS
s

nvme_subsystem_t object

## RETURN
sysfs directory name of s


title: nvme_subsystem_get_type(2)

summary: Returns the type of a subsystem

text:
# nvme_subsystem_get_type(2)

## NAME
nvme_subsystem_get_type - Returns the type of a subsystem

## SYNOPSIS
const char * nvme_subsystem_get_type (nvme_subsystem_t s );

## ARGUMENTS
s

nvme_subsystem_t object

## DESCRIPTION
Returns the subsystem type of s.


title: nvme_subsystem_lookup_namespace(2)

summary: lookup namespace by NSID

text:
# nvme_subsystem_lookup_namespace(2)

## NAME
nvme_subsystem_lookup_namespace - lookup namespace by NSID

## SYNOPSIS
nvme_ns_t nvme_subsystem_lookup_namespace (struct nvme_subsystem *s , __u32 nsid );

## ARGUMENTS
s

nvme_subsystem_t object

nsid

Namespace id

## RETURN
nvme_ns_t of the namespace with id nsid in subsystem s


title: nvme_subsystem_next_ctrl(2)

summary: Next ctrl iterator

text:
# nvme_subsystem_next_ctrl(2)

## NAME
nvme_subsystem_next_ctrl - Next ctrl iterator

## SYNOPSIS
nvme_ctrl_t nvme_subsystem_next_ctrl (nvme_subsystem_t s , nvme_ctrl_t c );

## ARGUMENTS
s

nvme_subsystem_t object

c

Previous controller instance of an s iterator

## RETURN
Next controller of an s iterator


title: nvme_subsystem_next_ns(2)

summary: Next namespace iterator

text:
# nvme_subsystem_next_ns(2)

## NAME
nvme_subsystem_next_ns - Next namespace iterator

## SYNOPSIS
nvme_ns_t nvme_subsystem_next_ns (nvme_subsystem_t s , nvme_ns_t n );

## ARGUMENTS
s

nvme_subsystem_t object

n

Previous nvme_ns_t iterator

## RETURN
Next nvme_ns_t object of an s iterator


title: nvme_subsystem_reset(2)

summary: Initiate a subsystem reset

text:
# nvme_subsystem_reset(2)

## NAME
nvme_subsystem_reset - Initiate a subsystem reset

## SYNOPSIS
int nvme_subsystem_reset (int fd );

## ARGUMENTS
fd

File descriptor of nvme device

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

## RETURN
Zero if a subsystem reset was initiated or -1 with errno set otherwise.


title: nvme_subsystem_set_application(2)

summary: Set the application string

text:
# nvme_subsystem_set_application(2)

## NAME
nvme_subsystem_set_application - Set the application string

## SYNOPSIS
void nvme_subsystem_set_application (nvme_subsystem_t s , const char *a );

## ARGUMENTS
s

nvme_subsystem_t object

a

application string

## DESCRIPTION
Sets the managing application string for s.


title: nvme_supported_cap_config_list_log(2)

text:
# nvme_supported_cap_config_list_log(2)

## NAME
struct nvme_supported_cap_config_list_log - Supported Capacity Configuration list log page

## SYNOPSIS
struct nvme_supported_cap_config_list_log {

__u8 sccn;

__u8 rsvd1[15];

struct nvme_capacity_config_desc cap_config_desc[];

};

## Members
sccn

Number of capacity configuration

rsvd1

Reserved

cap_config_desc

Capacity configuration descriptor. See struct nvme_capacity_config_desc


title: nvme_supported_log_pages(2)

summary: Supported Log Pages - Log

text:
# nvme_supported_log_pages(2)

## NAME
struct nvme_supported_log_pages - Supported Log Pages - Log

## SYNOPSIS
struct nvme_supported_log_pages {

__le32 lid_support[NVME_LOG_SUPPORTED_LOG_PAGES_MAX];

};

## Members
lid_support

Log Page Identifier Supported

## Description
Supported Log Pages (Log Identifier 00h)


title: nvme_telemetry_da(2)

summary: Telemetry Log Data Area

text:
# nvme_telemetry_da(2)

## NAME
enum nvme_telemetry_da - Telemetry Log Data Area

## SYNOPSIS
enum nvme_telemetry_da {

NVME_TELEMETRY_DA_1 ,

NVME_TELEMETRY_DA_2 ,

NVME_TELEMETRY_DA_3 ,

NVME_TELEMETRY_DA_4

};

## Constants
NVME_TELEMETRY_DA_1

Data Area 1

NVME_TELEMETRY_DA_2

Data Area 2

NVME_TELEMETRY_DA_3

Data Area 3

NVME_TELEMETRY_DA_4

Data Area 4


title: nvme_telemetry_log(2)

text:
# nvme_telemetry_log(2)

## NAME
struct nvme_telemetry_log - Retrieve internal data specific to the manufacturer.

## SYNOPSIS
struct nvme_telemetry_log {

__u8 lpi;

__u8 rsvd1[4];

__u8 ieee[3];

__le16 dalb1;

__le16 dalb2;

__le16 dalb3;

__u8 rsvd14[2];

__le32 dalb4;

__u8 rsvd20[361];

__u8 hostdgn;

__u8 ctrlavail;

__u8 ctrldgn;

__u8 rsnident[128];

__u8 data_area[];

};

## Members
lpi

Log Identifier, either NVME_LOG_LID_TELEMETRY_HOST or NVME_LOG_LID_TELEMETRY_CTRL

rsvd1

Reserved

ieee

IEEE OUI Identifier is the Organization Unique Identifier (OUI) for the controller vendor that is able to interpret the data.

dalb1

Telemetry Controller-Initiated Data Area 1 Last Block is the value of the last block in this area.

dalb2

Telemetry Controller-Initiated Data Area 1 Last Block is the value of the last block in this area.

dalb3

Telemetry Controller-Initiated Data Area 1 Last Block is the value of the last block in this area.

rsvd14

Reserved

dalb4

Telemetry Controller-Initiated Data Area 4 Last Block is the value of the last block in this area.

rsvd20

Reserved

hostdgn

Telemetry Host-Initiated Data Generation Number is a value that is incremented each time the host initiates a capture of its internal controller state in the controller .

ctrlavail

Telemetry Controller-Initiated Data Available, if cleared, then the controller telemetry log does not contain saved internal controller state. If this field is set to 1h, the controller log contains saved internal controller state. If this field is set to 1h, the data will be latched until the host releases it by reading the log with RAE cleared.

ctrldgn

Telemetry Controller-Initiated Data Generation Number is a value that is incremented each time the controller initiates a capture of its internal controller state in the controller .

rsnident

Reason Identifiers a vendor specific identifier that describes the operating conditions of the controller at the time of capture.

data_area

Telemetry data blocks, vendor specific information data.

## Description
This log consists of a header describing the log and zero or more Telemetry Data Blocks. All Telemetry Data Blocks are NVME_LOG_TELEM_BLOCK_SIZE, 512 bytes, in size. This log captures the controller’s internal state.


title: nvme_thermal_exc_event(2)

summary: Thermal Excursion Event Data

text:
# nvme_thermal_exc_event(2)

## NAME
struct nvme_thermal_exc_event - Thermal Excursion Event Data

## SYNOPSIS
struct nvme_thermal_exc_event {

__u8 over_temp;

__u8 threshold;

};

## Members
over_temp

Over Temperature

threshold

temperature threshold


title: nvme_time_stamp_change_event(2)

summary: Timestamp Change Event

text:
# nvme_time_stamp_change_event(2)

## NAME
struct nvme_time_stamp_change_event - Timestamp Change Event

## SYNOPSIS
struct nvme_time_stamp_change_event {

__le64 previous_timestamp;

__le64 ml_secs_since_reset;

};

## Members
previous_timestamp

Previous Timestamp

ml_secs_since_reset

Milliseconds Since Reset


title: nvme_timestamp(2)

text:
# nvme_timestamp(2)

## NAME
struct nvme_timestamp - Timestamp - Data Structure for Get Features

## SYNOPSIS
struct nvme_timestamp {

__u8 timestamp[6];

__u8 attr;

__u8 rsvd;

};

## Members
timestamp

Timestamp value based on origin and synch field

attr

Attribute

rsvd

Reserved


title: nvme_unlink_ctrl(2)

summary: Unlink controller

text:
# nvme_unlink_ctrl(2)

## NAME
nvme_unlink_ctrl - Unlink controller

## SYNOPSIS
void nvme_unlink_ctrl (struct nvme_ctrl *c );

## ARGUMENTS
c

Controller instance


title: nvme_update_config(2)

summary: Update JSON configuration

text:
# nvme_update_config(2)

## NAME
nvme_update_config - Update JSON configuration

## SYNOPSIS
int nvme_update_config (nvme_root_t r );

## ARGUMENTS
r

nvme_root_t object

## DESCRIPTION
Updates the JSON configuration file with the contents of r.

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


title: nvme_uring_cmd(2)

summary: nvme uring command structure

text:
# nvme_uring_cmd(2)

## NAME
struct nvme_uring_cmd - nvme uring command structure

## SYNOPSIS
struct nvme_uring_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 rsvd2;

};

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


title: nvme_verify(2)

summary: Send an nvme verify command

text:
# nvme_verify(2)

## NAME
nvme_verify - Send an nvme verify command

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

## ARGUMENTS
args

struct nvme_io_args argument structure

## DESCRIPTION
The Verify command verifies integrity of stored information by reading data and metadata, if applicable, for the LBAs indicated without transferring any data or metadata to the host.

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


title: nvme_version(2)

text:
# nvme_version(2)

## NAME
enum nvme_version - Selector for version to be returned by @nvme_get_version

## SYNOPSIS
enum nvme_version {

NVME_VERSION_PROJECT ,

NVME_VERSION_GIT

};

## Constants
NVME_VERSION_PROJECT

Project release version

NVME_VERSION_GIT

Git reference


title: nvme_virt_mgmt_act(2)

summary: Virtualization Management - Action

text:
# nvme_virt_mgmt_act(2)

## NAME
enum nvme_virt_mgmt_act - Virtualization Management - Action

## SYNOPSIS
enum nvme_virt_mgmt_act {

NVME_VIRT_MGMT_ACT_PRIM_CTRL_FLEX_ALLOC ,

NVME_VIRT_MGMT_ACT_OFFLINE_SEC_CTRL ,

NVME_VIRT_MGMT_ACT_ASSIGN_SEC_CTRL ,

NVME_VIRT_MGMT_ACT_ONLINE_SEC_CTRL

};

## Constants
NVME_VIRT_MGMT_ACT_PRIM_CTRL_FLEX_ALLOC

Primary Controller Flexible Allocation

NVME_VIRT_MGMT_ACT_OFFLINE_SEC_CTRL

Secondary Controller Offline

NVME_VIRT_MGMT_ACT_ASSIGN_SEC_CTRL

Secondary Controller Assign

NVME_VIRT_MGMT_ACT_ONLINE_SEC_CTRL

Secondary Controller Online


title: nvme_virt_mgmt_rt(2)

text:
# nvme_virt_mgmt_rt(2)

## NAME
enum nvme_virt_mgmt_rt - Virtualization Management - Resource Type

## SYNOPSIS
enum nvme_virt_mgmt_rt {

NVME_VIRT_MGMT_RT_VQ_RESOURCE ,

NVME_VIRT_MGMT_RT_VI_RESOURCE

};

## Constants
NVME_VIRT_MGMT_RT_VQ_RESOURCE

VQ Resources

NVME_VIRT_MGMT_RT_VI_RESOURCE

VI Resources


title: nvme_virtual_mgmt(2)

summary: Virtualization resource management

text:
# nvme_virtual_mgmt(2)

## NAME
nvme_virtual_mgmt - Virtualization resource management

## SYNOPSIS
int nvme_virtual_mgmt (struct nvme_virtual_mgmt_args *args );

## ARGUMENTS
args

struct nvme_virtual_mgmt_args argument structure

## DESCRIPTION
The Virtualization Management command is supported by primary controllers that support the Virtualization Enhancements capability. This command is used for several functions:

- Modifying Flexible Resource allocation for the primary controller - Assigning Flexible Resources for secondary controllers - Setting the Online and Offline state for secondary controllers

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


title: nvme_write(2)

summary: Submit an nvme user write command

text:
# nvme_write(2)

## NAME
nvme_write - Submit an nvme user write command

## SYNOPSIS
int nvme_write (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_write_uncorrectable(2)

text:
# nvme_write_uncorrectable(2)

## NAME
nvme_write_uncorrectable - Submit an nvme write uncorrectable command

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

## ARGUMENTS
args

struct nvme_io_args argument structure

## DESCRIPTION
The Write Uncorrectable command marks a range of logical blocks as invalid. When the specified logical block(s) are read after this operation, a failure is returned with Unrecovered Read Error status. To clear the invalid logical block status, a write operation on those logical blocks is required.

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


title: nvme_write_zeros(2)

summary: Submit an nvme write zeroes command

text:
# nvme_write_zeros(2)

## NAME
nvme_write_zeros - Submit an nvme write zeroes command

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

## ARGUMENTS
args

struct nvme_io_args argument structure

## DESCRIPTION
The Write Zeroes command sets a range of logical blocks to zero. After successful completion of this command, the value returned by subsequent reads of logical blocks in this range shall be all bytes cleared to 0h until a write occurs to this LBA range.

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


title: nvme_zns_append(2)

summary: Append data to a zone

text:
# nvme_zns_append(2)

## NAME
nvme_zns_append - Append data to a zone

## SYNOPSIS
int nvme_zns_append (struct nvme_zns_append_args *args );

## ARGUMENTS
args

struct nvme_zns_append_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_zns_changed_zone_log(2)

summary: ZNS Changed Zone List log

text:
# nvme_zns_changed_zone_log(2)

## NAME
struct nvme_zns_changed_zone_log - ZNS Changed Zone List log

## SYNOPSIS
struct nvme_zns_changed_zone_log {

__le16 nrzid;

__u8 rsvd2[6];

__le64 zid[NVME_ZNS_CHANGED_ZONES_MAX];

};

## Members
nrzid

Number of Zone Identifiers

rsvd2

Reserved

zid

Zone Identifier


title: nvme_zns_desc(2)

summary: Zone Descriptor Data Structure

text:
# nvme_zns_desc(2)

## NAME
struct nvme_zns_desc - Zone Descriptor Data Structure

## SYNOPSIS
struct nvme_zns_desc {

__u8 zt;

__u8 zs;

__u8 za;

__u8 zai;

__u8 rsvd4[4];

__le64 zcap;

__le64 zslba;

__le64 wp;

__u8 rsvd32[32];

};

## Members
zt

Zone Type

zs

Zone State

za

Zone Attributes

zai

Zone Attributes Information

rsvd4

Reserved

zcap

Zone Capacity

zslba

Zone Start Logical Block Address

wp

Write Pointer

rsvd32

Reserved


title: nvme_zns_id_ctrl(2)

text:
# nvme_zns_id_ctrl(2)

## NAME
struct nvme_zns_id_ctrl - I/O Command Set Specific Identify Controller Data Structure for the Zoned Namespace Command Set

## SYNOPSIS
struct nvme_zns_id_ctrl {

__u8 zasl;

__u8 rsvd1[4095];

};

## Members
zasl

Zone Append Size Limit

rsvd1

Reserved


title: nvme_zns_id_ns(2)

text:
# nvme_zns_id_ns(2)

## NAME
struct nvme_zns_id_ns - Zoned Namespace Command Set Specific Identify Namespace Data Structure

## SYNOPSIS
struct nvme_zns_id_ns {

__le16 zoc;

__le16 ozcs;

__le32 mar;

__le32 mor;

__le32 rrl;

__le32 frl;

__le32 rrl1;

__le32 rrl2;

__le32 rrl3;

__le32 frl1;

__le32 frl2;

__le32 frl3;

__le32 numzrwa;

__le16 zrwafg;

__le16 zrwasz;

__u8 zrwacap;

__u8 rsvd53[2763];

struct nvme_zns_lbafe lbafe[64];

__u8 vs[256];

};

## Members
zoc

Zone Operation Characteristics

ozcs

Optional Zoned Command Support

mar

Maximum Active Resources

mor

Maximum Open Resources

rrl

Reset Recommended Limit

frl

Finish Recommended Limit

rrl1

Reset Recommended Limit 1

rrl2

Reset Recommended Limit 2

rrl3

Reset Recommended Limit 3

frl1

Finish Recommended Limit 1

frl2

Finish Recommended Limit 2

frl3

Finish Recommended Limit 3

numzrwa

Number of ZRWA Resources

zrwafg

ZRWA Flush Granularity

zrwasz

ZRWA Size

zrwacap

ZRWA Capability

rsvd53

Reserved

lbafe

LBA Format Extension

vs

Vendor Specific


title: nvme_zns_identify_ctrl(2)

summary: ZNS identify controller data

text:
# nvme_zns_identify_ctrl(2)

## NAME
nvme_zns_identify_ctrl - ZNS identify controller data

## SYNOPSIS
int nvme_zns_identify_ctrl (int fd , struct nvme_zns_id_ctrl *id );

## ARGUMENTS
fd

File descriptor of nvme device

id

User space destination address to transfer the data

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


title: nvme_zns_identify_ns(2)

summary: ZNS identify namespace data

text:
# nvme_zns_identify_ns(2)

## NAME
nvme_zns_identify_ns - ZNS identify namespace data

## SYNOPSIS
int nvme_zns_identify_ns (int fd , __u32 nsid , struct nvme_zns_id_ns *data );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace to identify

data

User space destination address to transfer the data

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


title: nvme_zns_lbafe(2)

summary: LBA Format Extension Data Structure

text:
# nvme_zns_lbafe(2)

## NAME
struct nvme_zns_lbafe - LBA Format Extension Data Structure

## SYNOPSIS
struct nvme_zns_lbafe {

__le64 zsze;

__u8 zdes;

__u8 rsvd9[7];

};

## Members
zsze

Zone Size

zdes

Zone Descriptor Extension Size

rsvd9

reserved


title: nvme_zns_mgmt_recv(2)

summary: ZNS management receive command

text:
# nvme_zns_mgmt_recv(2)

## NAME
nvme_zns_mgmt_recv - ZNS management receive command

## SYNOPSIS
int nvme_zns_mgmt_recv (struct nvme_zns_mgmt_recv_args *args );

## ARGUMENTS
args

struct nvme_zns_mgmt_recv_args argument structure

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


title: nvme_zns_mgmt_send(2)

summary: ZNS management send command

text:
# nvme_zns_mgmt_send(2)

## NAME
nvme_zns_mgmt_send - ZNS management send command

## SYNOPSIS
int nvme_zns_mgmt_send (struct nvme_zns_mgmt_send_args *args );

## ARGUMENTS
args

struct nvme_zns_mgmt_send_args argument structure

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


title: nvme_zns_recv_action(2)

text:
# nvme_zns_recv_action(2)

## NAME
enum nvme_zns_recv_action - Zone Management Receive - Zone Receive Action Specific Features

## SYNOPSIS
enum nvme_zns_recv_action {

NVME_ZNS_ZRA_REPORT_ZONES ,

NVME_ZNS_ZRA_EXTENDED_REPORT_ZONES

};

## Constants
NVME_ZNS_ZRA_REPORT_ZONES

Report Zones

NVME_ZNS_ZRA_EXTENDED_REPORT_ZONES

Extended Report Zones


title: nvme_zns_report_options(2)

text:
# nvme_zns_report_options(2)

## NAME
enum nvme_zns_report_options - Zone Management Receive - Zone Receive Action Specific Field

## SYNOPSIS
enum nvme_zns_report_options {

NVME_ZNS_ZRAS_REPORT_ALL ,

NVME_ZNS_ZRAS_REPORT_EMPTY ,

NVME_ZNS_ZRAS_REPORT_IMPL_OPENED ,

NVME_ZNS_ZRAS_REPORT_EXPL_OPENED ,

NVME_ZNS_ZRAS_REPORT_CLOSED ,

NVME_ZNS_ZRAS_REPORT_FULL ,

NVME_ZNS_ZRAS_REPORT_READ_ONLY ,

NVME_ZNS_ZRAS_REPORT_OFFLINE

};

## Constants
NVME_ZNS_ZRAS_REPORT_ALL

List all zones

NVME_ZNS_ZRAS_REPORT_EMPTY

List the zones in the ZSE:Empty state

NVME_ZNS_ZRAS_REPORT_IMPL_OPENED

List the zones in the ZSIO:Implicitly Opened state

NVME_ZNS_ZRAS_REPORT_EXPL_OPENED

List the zones in the ZSEO:Explicitly Opened state

NVME_ZNS_ZRAS_REPORT_CLOSED

List the zones in the ZSC:Closed state

NVME_ZNS_ZRAS_REPORT_FULL

List the zones in the ZSF:Full state

NVME_ZNS_ZRAS_REPORT_READ_ONLY

List the zones in the ZSRO:Read Only state

NVME_ZNS_ZRAS_REPORT_OFFLINE

List the zones in the ZSO:Offline state


title: nvme_zns_report_zones(2)

summary: Return the list of zones

text:
# nvme_zns_report_zones(2)

## NAME
nvme_zns_report_zones - Return the list of zones

## SYNOPSIS
int nvme_zns_report_zones (int fd , __u32 nsid , __u64 slba , enum nvme_zns_report_options opts , bool extended , bool partial , __u32 data_len , void *data , __u32 timeout , __u32 *result );

## ARGUMENTS
fd

File descriptor of nvme device

nsid

Namespace ID

slba

Starting LBA

opts

Reporting options

extended

Extended report

partial

Partial report requested

data_len

Length of the data buffer

data

Userspace address of the report zones data

timeout

timeout in ms

result

The command completion result from CQE dword0

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


title: nvme_zns_send_action(2)

summary: Zone Management Send - Zone Send Action

text:
# nvme_zns_send_action(2)

## NAME
enum nvme_zns_send_action - Zone Management Send - Zone Send Action

## SYNOPSIS
enum nvme_zns_send_action {

NVME_ZNS_ZSA_CLOSE ,

NVME_ZNS_ZSA_FINISH ,

NVME_ZNS_ZSA_OPEN ,

NVME_ZNS_ZSA_RESET ,

NVME_ZNS_ZSA_OFFLINE ,

NVME_ZNS_ZSA_SET_DESC_EXT ,

NVME_ZNS_ZSA_ZRWA_FLUSH

};

## Constants
NVME_ZNS_ZSA_CLOSE

Close Zone

NVME_ZNS_ZSA_FINISH

Finish Zone

NVME_ZNS_ZSA_OPEN

Open Zone

NVME_ZNS_ZSA_RESET

Reset Zone

NVME_ZNS_ZSA_OFFLINE

Offline Zone

NVME_ZNS_ZSA_SET_DESC_EXT

Set Zone Descriptor Extension

NVME_ZNS_ZSA_ZRWA_FLUSH

Flush


title: nvme_zns_za(2)

summary: Zone Descriptor Data Structure

text:
# nvme_zns_za(2)

## NAME
enum nvme_zns_za - Zone Descriptor Data Structure

## SYNOPSIS
enum nvme_zns_za {

NVME_ZNS_ZA_ZFC ,

NVME_ZNS_ZA_FZR ,

NVME_ZNS_ZA_RZR ,

NVME_ZNS_ZA_ZRWAV ,

NVME_ZNS_ZA_ZDEV

};

## Constants
NVME_ZNS_ZA_ZFC

Zone Finished by Controller

NVME_ZNS_ZA_FZR

Finish Zone Recommended

NVME_ZNS_ZA_RZR

Reset Zone Recommended

NVME_ZNS_ZA_ZRWAV

NVME_ZNS_ZA_ZDEV

Zone Descriptor Extension Valid


title: nvme_zns_zs(2)

text:
# nvme_zns_zs(2)

## NAME
enum nvme_zns_zs - Zone Descriptor Data Structure - Zone State

## SYNOPSIS
enum nvme_zns_zs {

NVME_ZNS_ZS_EMPTY ,

NVME_ZNS_ZS_IMPL_OPEN ,

NVME_ZNS_ZS_EXPL_OPEN ,

NVME_ZNS_ZS_CLOSED ,

NVME_ZNS_ZS_READ_ONLY ,

NVME_ZNS_ZS_FULL ,

NVME_ZNS_ZS_OFFLINE

};

## Constants
NVME_ZNS_ZS_EMPTY

Empty state

NVME_ZNS_ZS_IMPL_OPEN

Implicitly open state

NVME_ZNS_ZS_EXPL_OPEN

Explicitly open state

NVME_ZNS_ZS_CLOSED

Closed state

NVME_ZNS_ZS_READ_ONLY

Read only state

NVME_ZNS_ZS_FULL

Full state

NVME_ZNS_ZS_OFFLINE

Offline state


title: nvme_zns_zt(2)

text:
# nvme_zns_zt(2)

## NAME
enum nvme_zns_zt - Zone Descriptor Data Structure - Zone Type

## SYNOPSIS
enum nvme_zns_zt {

NVME_ZONE_TYPE_SEQWRITE_REQ

};

## Constants
NVME_ZONE_TYPE_SEQWRITE_REQ

Sequential Write Required


title: nvme_zone_report(2)

summary: Report Zones Data Structure

text:
# nvme_zone_report(2)

## NAME
struct nvme_zone_report - Report Zones Data Structure

## SYNOPSIS
struct nvme_zone_report {

__le64 nr_zones;

__u8 rsvd8[56];

struct nvme_zns_desc entries[];

};

## Members
nr_zones

Number of descriptors in entries

rsvd8

Reserved

entries

Zoned namespace descriptors


title: nvmf_add_ctrl(2)

text:
# nvmf_add_ctrl(2)

## NAME
nvmf_add_ctrl - Connect a controller and update topology

## SYNOPSIS
int nvmf_add_ctrl (nvme_host_t h , nvme_ctrl_t c , const struct nvme_fabrics_config *cfg );

## ARGUMENTS
h

Host to which the controller should be attached

c

Controller to be connected

cfg

Default configuration for the controller

## DESCRIPTION
Issues a 'connect' command to the NVMe-oF controller and inserts c into the topology using h as parent. c must be initialized and not connected to the topology.

## RETURN
0 on success; on failure errno is set and -1 is returned.


title: nvmf_addr_family(2)

text:
# nvmf_addr_family(2)

## NAME
enum nvmf_addr_family - Address Family codes for Discovery Log Page entry ADRFAM field

## SYNOPSIS
enum nvmf_addr_family {

NVMF_ADDR_FAMILY_PCI ,

NVMF_ADDR_FAMILY_IP4 ,

NVMF_ADDR_FAMILY_IP6 ,

NVMF_ADDR_FAMILY_IB ,

NVMF_ADDR_FAMILY_FC ,

NVMF_ADDR_FAMILY_LOOP

};

## Constants
NVMF_ADDR_FAMILY_PCI

PCIe

NVMF_ADDR_FAMILY_IP4

AF_INET: IPv4 address family.

NVMF_ADDR_FAMILY_IP6

AF_INET6: IPv6 address family.

NVMF_ADDR_FAMILY_IB

AF_IB: InfiniBand address family.

NVMF_ADDR_FAMILY_FC

Fibre Channel address family.

NVMF_ADDR_FAMILY_LOOP

Intra-host Transport (i.e., loopback), reserved for host usage.


title: nvmf_adrfam_str(2)

summary: Decode ADRFAM field

text:
# nvmf_adrfam_str(2)

## NAME
nvmf_adrfam_str - Decode ADRFAM field

## SYNOPSIS
const char * nvmf_adrfam_str (__u8 adrfam );

## ARGUMENTS
adrfam

value to be decoded

## DESCRIPTION
Decode the address family field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_cms_str(2)

text:
# nvmf_cms_str(2)

## NAME
nvmf_cms_str - Decode RDMA connection management service field

## SYNOPSIS
const char * nvmf_cms_str (__u8 cms );

## ARGUMENTS
cms

value to be decoded

## DESCRIPTION
Decode the RDMA connection management service field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_connect_data(2)

summary: Data payload for the 'connect' command

text:
# nvmf_connect_data(2)

## NAME
struct nvmf_connect_data - Data payload for the 'connect' command

## SYNOPSIS
struct nvmf_connect_data {

__u8 hostid[16];

__le16 cntlid;

char rsvd4[238];

char subsysnqn[NVME_NQN_LENGTH];

char hostnqn[NVME_NQN_LENGTH];

char rsvd5[256];

};

## Members
hostid

Host ID of the connecting host

cntlid

Requested controller ID

rsvd4

Reserved

subsysnqn

Subsystem NQN to connect to

hostnqn

Host NQN of the connecting host

rsvd5

Reserved


title: nvmf_connect_disc_entry(2)

text:
# nvmf_connect_disc_entry(2)

## NAME
nvmf_connect_disc_entry - Connect controller based on the discovery log page entry

## SYNOPSIS
nvme_ctrl_t nvmf_connect_disc_entry (nvme_host_t h , struct nvmf_disc_log_entry *e , const struct nvme_fabrics_config *defcfg , bool *discover );

## ARGUMENTS
h

Host to which the controller should be connected

e

Discovery log page entry

defcfg

Default configuration to be used for the new controller

discover

Set to 'true' if the new controller is a discovery controller

## RETURN
Pointer to the new controller


title: nvmf_default_config(2)

text:
# nvmf_default_config(2)

## NAME
nvmf_default_config - Default values for fabrics configuration

## SYNOPSIS
void nvmf_default_config (struct nvme_fabrics_config *cfg );

## ARGUMENTS
cfg

config values to set

## DESCRIPTION
Initializes cfg with default values.


title: nvmf_dim_data(2)

text:
# nvmf_dim_data(2)

## NAME
struct nvmf_dim_data - Discovery Information Management (DIM) - Data

## SYNOPSIS
struct nvmf_dim_data {

__le32 tdl;

__u8 rsvd4[4];

__le64 nument;

__le16 entfmt;

__le16 etype;

__u8 portlcl;

__u8 rsvd21;

__le16 ektype;

char eid[NVME_NQN_LENGTH];

char ename[NVMF_ENAME_LEN];

char ever[NVMF_EVER_LEN];

__u8 rsvd600[424];

union nvmf_die die[];

};

## Members
tdl

Total Data Length

rsvd4

Reserved

nument

Number of entries

entfmt

Entry Format (enum nvmf_dim_entfmt)

etype

Entity Type (enum nvmf_dim_etype)

portlcl

Port Local

rsvd21

Reserved

ektype

Entry Key Type

eid

Entity Identifier (e.g. Host NQN)

ename

Entity Name (e.g. hostname)

ever

Entity Version (e.g. OS Name/Version)

rsvd600

Reserved

die

Discovery Information Entry (see nument above)


title: nvmf_dim_entfmt(2)

text:
# nvmf_dim_entfmt(2)

## NAME
enum nvmf_dim_entfmt - Discovery Information Management Entry Format

## SYNOPSIS
enum nvmf_dim_entfmt {

NVMF_DIM_ENTFMT_BASIC ,

NVMF_DIM_ENTFMT_EXTENDED

};

## Constants
NVMF_DIM_ENTFMT_BASIC

Basic discovery information entry

NVMF_DIM_ENTFMT_EXTENDED

Extended discovery information entry


title: nvmf_dim_etype(2)

text:
# nvmf_dim_etype(2)

## NAME
enum nvmf_dim_etype - Discovery Information Management Entity Type

## SYNOPSIS
enum nvmf_dim_etype {

NVMF_DIM_ETYPE_HOST ,

NVMF_DIM_ETYPE_DDC ,

NVMF_DIM_ETYPE_CDC

};

## Constants
NVMF_DIM_ETYPE_HOST

Host

NVMF_DIM_ETYPE_DDC

Direct Discovery controller

NVMF_DIM_ETYPE_CDC

Centralized Discovery controller


title: nvmf_dim_tas(2)

summary: Discovery Information Management Task

text:
# nvmf_dim_tas(2)

## NAME
enum nvmf_dim_tas - Discovery Information Management Task

## SYNOPSIS
enum nvmf_dim_tas {

NVMF_DIM_TAS_REGISTER ,

NVMF_DIM_TAS_DEREGISTER ,

NVMF_DIM_TAS_UPDATE

};

## Constants
NVMF_DIM_TAS_REGISTER

Register

NVMF_DIM_TAS_DEREGISTER

Deregister

NVMF_DIM_TAS_UPDATE

Update


title: nvmf_disc_eflags(2)

summary: Discovery Log Page entry flags.

text:
# nvmf_disc_eflags(2)

## NAME
enum nvmf_disc_eflags - Discovery Log Page entry flags.

## SYNOPSIS
enum nvmf_disc_eflags {

NVMF_DISC_EFLAGS_NONE ,

NVMF_DISC_EFLAGS_DUPRETINFO ,

NVMF_DISC_EFLAGS_EPCSD ,

NVMF_DISC_EFLAGS_NCC

};

## Constants
NVMF_DISC_EFLAGS_NONE

Indicates that none of the DUPRETINFO or EPCSD features are supported.

NVMF_DISC_EFLAGS_DUPRETINFO

Duplicate Returned Information (DUPRETINFO): Indicates that using the content of this entry to access this Discovery Service returns the same information that is returned by using the content of other entries in this log page that also have this flag set.

NVMF_DISC_EFLAGS_EPCSD

Explicit Persistent Connection Support for Discovery (EPCSD): Indicates that Explicit Persistent Connections are supported for the Discovery controller.

NVMF_DISC_EFLAGS_NCC

No CDC Connectivity (NCC): If set to is currently connected to the CDC. If cleared to '0', then at least one DDC that describes this entry is currently connected to the CDC. If the Discovery controller returning this log page is not a CDC, then this bit shall be cleared to


title: nvmf_disc_log_entry(2)

summary: Discovery Log Page entry

text:
# nvmf_disc_log_entry(2)

## NAME
struct nvmf_disc_log_entry - Discovery Log Page entry

## SYNOPSIS
struct nvmf_disc_log_entry {

__u8 trtype;

__u8 adrfam;

__u8 subtype;

__u8 treq;

__le16 portid;

__le16 cntlid;

__le16 asqsz;

__le16 eflags;

__u8 rsvd12[20];

char trsvcid[NVMF_TRSVCID_SIZE];

__u8 rsvd64[192];

char subnqn[NVME_NQN_LENGTH];

char traddr[NVMF_TRADDR_SIZE];

union nvmf_tsas tsas;

};

## Members
trtype

Transport Type (TRTYPE): Specifies the NVMe Transport type. See enum nvmf_trtype.

adrfam

Address Family (ADRFAM): Specifies the address family. See enum nvmf_addr_family.

subtype

Subsystem Type (SUBTYPE): Specifies the type of the NVM subsystem that is indicated in this entry. See enum nvme_subsys_type.

treq

Transport Requirements (TREQ): Indicates requirements for the NVMe Transport. See enum nvmf_treq.

portid

Port ID (PORTID): Specifies a particular NVM subsystem port. Different NVMe Transports or address families may utilize the same Port ID value (e.g. a Port ID may support both iWARP and RoCE).

cntlid

Controller ID (CNTLID): Specifies the controller ID. If the NVM subsystem uses a dynamic controller model, then this field shall be set to FFFFh. If the NVM subsystem uses a static controller model, then this field may be set to a specific controller ID (values 0h to FFEFh are valid). If the NVM subsystem uses a static controller model and the value indicated is FFFEh, then the host should remember the Controller ID returned as part of the Fabrics Connect command in order to re-establish an association in the future with the same controller.

asqsz

Admin Max SQ Size (ASQSZ): Specifies the maximum size of an Admin Submission Queue. This applies to all controllers in the NVM subsystem. The value shall be a minimum of 32 entries.

eflags

Entry Flags (EFLAGS): Indicates additional information related to the current entry. See enum nvmf_disc_eflags.

rsvd12

Reserved

trsvcid

Transport Service Identifier (TRSVCID): Specifies the NVMe Transport service identifier as an ASCII string. The NVMe Transport service identifier is specified by the associated NVMe Transport binding specification.

rsvd64

Reserved

subnqn

NVM Subsystem Qualified Name (SUBNQN): NVMe Qualified Name (NQN) that uniquely identifies the NVM subsystem. For a subsystem, if that Discovery subsystem has a unique NQN (i.e., the NVM Subsystem NVMe Qualified Name (SUBNQN) field in that Discovery subsystem's Identify Controller data structure contains a unique NQN value), then the value returned shall be that unique NQN. If the Discovery subsystem does not have a unique NQN, then the value returned shall be the well-known Discovery Service NQN (nqn.2014-08.org.nvmexpress.discovery).

traddr

Transport Address (TRADDR): Specifies the address of the NVM subsystem that may be used for a Connect command as an ASCII string. The Address Family field describes the reference for parsing this field.

tsas

Transport specific attribute settings


title: nvmf_discovery_log(2)

summary: Discovery Log Page (Log Identifier 70h)

text:
# nvmf_discovery_log(2)

## NAME
struct nvmf_discovery_log - Discovery Log Page (Log Identifier 70h)

## SYNOPSIS
struct nvmf_discovery_log {

__le64 genctr;

__le64 numrec;

__le16 recfmt;

__u8 rsvd14[1006];

struct nvmf_disc_log_entry entries[];

};

## Members
genctr

Generation Counter (GENCTR): Indicates the version of the discovery information, starting at a value of 0h. For each change in the Discovery Log Page, this counter is incremented by one. If the value of this field is FFFFFFFF_FFFFFFFFh, then the field shall be cleared to 0h when incremented (i.e., rolls over to 0h).

numrec

Number of Records (NUMREC): Indicates the number of records contained in the log.

recfmt

Record Format (RECFMT): Specifies the format of the Discovery Log Page. If a new format is defined, this value is incremented by one. The format of the record specified in this definition shall be 0h.

rsvd14

Reserved

entries

Discovery Log Page Entries - see struct nvmf_disc_log_entry.


title: nvmf_eflags_str(2)

summary: Decode EFLAGS field

text:
# nvmf_eflags_str(2)

## NAME
nvmf_eflags_str - Decode EFLAGS field

## SYNOPSIS
const char * nvmf_eflags_str (__u16 eflags );

## ARGUMENTS
eflags

value to be decoded

## DESCRIPTION
Decode the EFLAGS field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_exat_len(2)

summary: Return length rounded up by 4

text:
# nvmf_exat_len(2)

## NAME
nvmf_exat_len - Return length rounded up by 4

## SYNOPSIS
__u16 nvmf_exat_len (size_t val_len );

## ARGUMENTS
val_len

Value length

## DESCRIPTION
Return the size in bytes, rounded to a multiple of 4 (e.g., size of __u32), of the buffer needed to hold the exat value of size val_len.

## RETURN
Length rounded up by 4


title: nvmf_exattype(2)

summary: Extended Attribute Type

text:
# nvmf_exattype(2)

## NAME
enum nvmf_exattype - Extended Attribute Type

## SYNOPSIS
enum nvmf_exattype {

NVMF_EXATTYPE_HOSTID ,

NVMF_EXATTYPE_SYMNAME

};

## Constants
NVMF_EXATTYPE_HOSTID

Host Identifier

NVMF_EXATTYPE_SYMNAME

Symblic Name


title: nvmf_ext_attr(2)

summary: Extended Attribute (EXAT)

text:
# nvmf_ext_attr(2)

## NAME
struct nvmf_ext_attr - Extended Attribute (EXAT)

## SYNOPSIS
struct nvmf_ext_attr {

__le16 exattype;

__le16 exatlen;

__u8 exatval[];

};

## Members
exattype

Extended Attribute Type (EXATTYPE) - see enum nvmf_exattype

exatlen

Extended Attribute Length (EXATLEN)

exatval

Extended Attribute Value (EXATVAL) - size allocated for array must be a multiple of 4 bytes


title: nvmf_ext_die(2)

text:
# nvmf_ext_die(2)

## NAME
struct nvmf_ext_die - Extended Discovery Information Entry (DIE)

## SYNOPSIS
struct nvmf_ext_die {

__u8 trtype;

__u8 adrfam;

__u8 subtype;

__u8 treq;

__le16 portid;

__le16 cntlid;

__le16 asqsz;

__u8 rsvd10[22];

char trsvcid[NVMF_TRSVCID_SIZE];

__u8 resv64[192];

char nqn[NVME_NQN_LENGTH];

char traddr[NVMF_TRADDR_SIZE];

union nvmf_tsas tsas;

__le32 tel;

__le16 numexat;

__u8 resv1030[2];

struct nvmf_ext_attr exat[];

};

## Members
trtype

Transport Type (enum nvmf_trtype)

adrfam

Address Family (enum nvmf_addr_family)

subtype

Subsystem Type (enum nvme_subsys_type)

treq

Transport Requirements (enum nvmf_treq)

portid

Port ID

cntlid

Controller ID

asqsz

Admin Max SQ Size

rsvd10

Reserved

trsvcid

Transport Service Identifier

resv64

Reserved

nqn

NVM Qualified Name

traddr

Transport Address

tsas

Transport Specific Address Subtype (union nvmf_tsas)

tel

Total Entry Length

numexat

Number of Extended Attributes

resv1030

Reserved

exat

Extended Attributes 0 (struct nvmf_ext_attr)


title: nvmf_get_discovery_log(2)

summary: Return the discovery log page

text:
# nvmf_get_discovery_log(2)

## NAME
nvmf_get_discovery_log - Return the discovery log page

## SYNOPSIS
int nvmf_get_discovery_log (nvme_ctrl_t c , struct nvmf_discovery_log **logp , int max_retries );

## ARGUMENTS
c

Discovery controller to use

logp

Pointer to the log page to be returned

max_retries

Number of retries in case of failure

## DESCRIPTION
The memory allocated for the log page and returned in logp must be freed by the caller using free.

## NOTE
Consider using nvmf_get_discovery_wargs instead.

## RETURN
0 on success; on failure -1 is returned and errno is set


title: nvmf_get_discovery_wargs(2)

summary: Get the discovery log page with args

text:
# nvmf_get_discovery_wargs(2)

## NAME
nvmf_get_discovery_wargs - Get the discovery log page with args

## SYNOPSIS
struct nvmf_discovery_log * nvmf_get_discovery_wargs (struct nvme_get_discovery_args *args );

## ARGUMENTS
args

Argument structure

## DESCRIPTION
This function is similar to nvmf_get_discovery_log, but takes an extensible args parameter. args provides more options than nvmf_get_discovery_log.

This function performs a get discovery log page (DLP) command and returns the DLP. The memory allocated for the returned DLP must be freed by the caller using free.

## RETURN
Pointer to the discovery log page (to be freed). NULL on failure and errno is set.


title: nvmf_hostid_from_file(2)

text:
# nvmf_hostid_from_file(2)

## NAME
nvmf_hostid_from_file - Reads the host identifier from the config default location

## SYNOPSIS
char * nvmf_hostid_from_file

## DESCRIPTION
Retrieve the host idenditifer from the config file located in $SYSCONFDIR/nvme/. $SYSCONFDIR is usually /etc.

## RETURN
The host identifier, or NULL if unsuccessful. If found, the caller is responsible to free the string.


title: nvmf_hostnqn_from_file(2)

text:
# nvmf_hostnqn_from_file(2)

## NAME
nvmf_hostnqn_from_file - Reads the host nvm qualified name from the config default location

## SYNOPSIS
char * nvmf_hostnqn_from_file

## DESCRIPTION
Retrieve the qualified name from the config file located in $SYSCONFIDR/nvme. $SYSCONFDIR is usually /etc.

## RETURN
The host nqn, or NULL if unsuccessful. If found, the caller is responsible to free the string.


title: nvmf_hostnqn_generate(2)

summary: Generate a machine specific host nqn

text:
# nvmf_hostnqn_generate(2)

## NAME
nvmf_hostnqn_generate - Generate a machine specific host nqn

## SYNOPSIS
char * nvmf_hostnqn_generate

## RETURN
An nvm namespace qualified name string based on the machine identifier, or NULL if not successful.


title: nvmf_log_discovery_lid_support(2)

summary: Discovery log specific support

text:
# nvmf_log_discovery_lid_support(2)

## NAME
enum nvmf_log_discovery_lid_support - Discovery log specific support

## SYNOPSIS
enum nvmf_log_discovery_lid_support {

NVMF_LOG_DISC_LID_NONE ,

NVMF_LOG_DISC_LID_EXTDLPES ,

NVMF_LOG_DISC_LID_PLEOS ,

NVMF_LOG_DISC_LID_ALLSUBES

};

## Constants
NVMF_LOG_DISC_LID_NONE

None

NVMF_LOG_DISC_LID_EXTDLPES

Extended Discovery Log Page Entries Supported

NVMF_LOG_DISC_LID_PLEOS

Port Local Entries Only Supported

NVMF_LOG_DISC_LID_ALLSUBES

All NVM Subsystem Entries Supported


title: nvmf_log_discovery_lsp(2)

summary: Discovery log specific field

text:
# nvmf_log_discovery_lsp(2)

## NAME
enum nvmf_log_discovery_lsp - Discovery log specific field

## SYNOPSIS
enum nvmf_log_discovery_lsp {

NVMF_LOG_DISC_LSP_NONE ,

NVMF_LOG_DISC_LSP_EXTDLPE ,

NVMF_LOG_DISC_LSP_PLEO ,

NVMF_LOG_DISC_LSP_ALLSUBE

};

## Constants
NVMF_LOG_DISC_LSP_NONE

None

NVMF_LOG_DISC_LSP_EXTDLPE

Extended Discovery Log Page Entries

NVMF_LOG_DISC_LSP_PLEO

Port Local Entries Only

NVMF_LOG_DISC_LSP_ALLSUBE

All NVM Subsystem Entries


title: nvmf_prtype_str(2)

summary: Decode RDMA Provider type field

text:
# nvmf_prtype_str(2)

## NAME
nvmf_prtype_str - Decode RDMA Provider type field

## SYNOPSIS
const char * nvmf_prtype_str (__u8 prtype );

## ARGUMENTS
prtype

value to be decoded

## DESCRIPTION
Decode the RDMA Provider type field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_qptype_str(2)

summary: Decode RDMA QP Service type field

text:
# nvmf_qptype_str(2)

## NAME
nvmf_qptype_str - Decode RDMA QP Service type field

## SYNOPSIS
const char * nvmf_qptype_str (__u8 qptype );

## ARGUMENTS
qptype

value to be decoded

## DESCRIPTION
Decode the RDMA QP Service type field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_rdma_cms(2)

text:
# nvmf_rdma_cms(2)

## NAME
enum nvmf_rdma_cms - RDMA Connection Management Service Type codes for Discovery Log Page entry TSAS RDMA_CMS field

## SYNOPSIS
enum nvmf_rdma_cms {

NVMF_RDMA_CMS_RDMA_CM

};

## Constants
NVMF_RDMA_CMS_RDMA_CM

Sockets based endpoint addressing


title: nvmf_rdma_prtype(2)

text:
# nvmf_rdma_prtype(2)

## NAME
enum nvmf_rdma_prtype - RDMA Provider Type codes for Discovery Log Page entry TSAS RDMA_PRTYPE field

## SYNOPSIS
enum nvmf_rdma_prtype {

NVMF_RDMA_PRTYPE_NOT_SPECIFIED ,

NVMF_RDMA_PRTYPE_IB ,

NVMF_RDMA_PRTYPE_ROCE ,

NVMF_RDMA_PRTYPE_ROCEV2 ,

NVMF_RDMA_PRTYPE_IWARP

};

## Constants
NVMF_RDMA_PRTYPE_NOT_SPECIFIED

No Provider Specified

NVMF_RDMA_PRTYPE_IB

InfiniBand

NVMF_RDMA_PRTYPE_ROCE

InfiniBand RoCE

NVMF_RDMA_PRTYPE_ROCEV2

InfiniBand RoCEV2

NVMF_RDMA_PRTYPE_IWARP

iWARP


title: nvmf_rdma_qptype(2)

text:
# nvmf_rdma_qptype(2)

## NAME
enum nvmf_rdma_qptype - RDMA QP Service Type codes for Discovery Log Page entry TSAS RDMA_QPTYPE field

## SYNOPSIS
enum nvmf_rdma_qptype {

NVMF_RDMA_QPTYPE_CONNECTED ,

NVMF_RDMA_QPTYPE_DATAGRAM

};

## Constants
NVMF_RDMA_QPTYPE_CONNECTED

Reliable Connected

NVMF_RDMA_QPTYPE_DATAGRAM

Reliable Datagram


title: nvmf_register_ctrl(2)

summary: Perform registration task with a DC

text:
# nvmf_register_ctrl(2)

## NAME
nvmf_register_ctrl - Perform registration task with a DC

## SYNOPSIS
int nvmf_register_ctrl (nvme_ctrl_t c , enum nvmf_dim_tas tas , __u32 *result );

## ARGUMENTS
c

Controller instance

tas

Task field of the Command Dword 10 (cdw10). Indicates whether to perform a Registration, Deregistration, or Registration-update.

result

The command-specific result returned by the DC upon command completion.

## DESCRIPTION
Perform registration task with a Discovery Controller (DC). Three tasks are supported: register, deregister, and registration update.

## RETURN
0 on success; on failure -1 is returned and errno is set


title: nvmf_sectype_str(2)

summary: Decode SECTYPE field

text:
# nvmf_sectype_str(2)

## NAME
nvmf_sectype_str - Decode SECTYPE field

## SYNOPSIS
const char * nvmf_sectype_str (__u8 sectype );

## ARGUMENTS
sectype

value to be decoded

## DESCRIPTION
Decode the SECTYPE field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_subtype_str(2)

summary: Decode SUBTYPE field

text:
# nvmf_subtype_str(2)

## NAME
nvmf_subtype_str - Decode SUBTYPE field

## SYNOPSIS
const char * nvmf_subtype_str (__u8 subtype );

## ARGUMENTS
subtype

value to be decoded

## DESCRIPTION
Decode the subsystem type field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_tcp_sectype(2)

text:
# nvmf_tcp_sectype(2)

## NAME
enum nvmf_tcp_sectype - Transport Specific Address Subtype Definition for NVMe/TCP Transport

## SYNOPSIS
enum nvmf_tcp_sectype {

NVMF_TCP_SECTYPE_NONE ,

NVMF_TCP_SECTYPE_TLS ,

NVMF_TCP_SECTYPE_TLS13

};

## Constants
NVMF_TCP_SECTYPE_NONE

No Security

NVMF_TCP_SECTYPE_TLS

Transport Layer Security version 1.2

NVMF_TCP_SECTYPE_TLS13

Transport Layer Security version 1.3 or a subsequent version. The TLS protocol negotiates the version and cipher suite for each TCP connection.


title: nvmf_treq(2)

text:
# nvmf_treq(2)

## NAME
enum nvmf_treq - Transport Requirements codes for Discovery Log Page entry TREQ field

## SYNOPSIS
enum nvmf_treq {

NVMF_TREQ_NOT_SPECIFIED ,

NVMF_TREQ_REQUIRED ,

NVMF_TREQ_NOT_REQUIRED ,

NVMF_TREQ_DISABLE_SQFLOW

};

## Constants
NVMF_TREQ_NOT_SPECIFIED

Not specified

NVMF_TREQ_REQUIRED

Required

NVMF_TREQ_NOT_REQUIRED

Not Required

NVMF_TREQ_DISABLE_SQFLOW

SQ flow control disable supported


title: nvmf_treq_str(2)

summary: Decode TREQ field

text:
# nvmf_treq_str(2)

## NAME
nvmf_treq_str - Decode TREQ field

## SYNOPSIS
const char * nvmf_treq_str (__u8 treq );

## ARGUMENTS
treq

value to be decoded

## DESCRIPTION
Decode the transport requirements field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_trtype(2)

text:
# nvmf_trtype(2)

## NAME
enum nvmf_trtype - Transport Type codes for Discovery Log Page entry TRTYPE field

## SYNOPSIS
enum nvmf_trtype {

NVMF_TRTYPE_UNSPECIFIED ,

NVMF_TRTYPE_RDMA ,

NVMF_TRTYPE_FC ,

NVMF_TRTYPE_TCP ,

NVMF_TRTYPE_LOOP ,

NVMF_TRTYPE_MAX

};

## Constants
NVMF_TRTYPE_UNSPECIFIED

Not indicated

NVMF_TRTYPE_RDMA

RDMA

NVMF_TRTYPE_FC

Fibre Channel

NVMF_TRTYPE_TCP

TCP

NVMF_TRTYPE_LOOP

Intra-host Transport (i.e., loopback), reserved for host usage.

NVMF_TRTYPE_MAX

Maximum value for enum nvmf_trtype


title: nvmf_trtype_str(2)

summary: Decode TRTYPE field

text:
# nvmf_trtype_str(2)

## NAME
nvmf_trtype_str - Decode TRTYPE field

## SYNOPSIS
const char * nvmf_trtype_str (__u8 trtype );

## ARGUMENTS
trtype

value to be decoded

## DESCRIPTION
Decode the transport type field in the discovery log page entry.

## RETURN
decoded string


title: nvmf_update_config(2)

summary: Update fabrics configuration values

text:
# nvmf_update_config(2)

## NAME
nvmf_update_config - Update fabrics configuration values

## SYNOPSIS
void nvmf_update_config (nvme_ctrl_t c , const struct nvme_fabrics_config *cfg );

## ARGUMENTS
c

Controller to be modified

cfg

Updated configuration values

## DESCRIPTION
Updates the values from c with the configuration values from cfg; all non-default values from cfg will overwrite the values in c.