Adding upstream version 1.14.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
515eb29eee
commit
9ae445a706
1041 changed files with 6076 additions and 1170 deletions
|
@ -2888,6 +2888,39 @@ The nvme command status if a response was received (see
|
|||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
|
||||
|
||||
|
||||
.. c:function:: int nvme_set_features_temp_thresh2 (int fd, __u16 tmpth, __u8 tmpsel, enum nvme_feat_tmpthresh_thsel thsel, __u8 tmpthh, bool save, __u32 *result)
|
||||
|
||||
Set temperature threshold feature
|
||||
|
||||
**Parameters**
|
||||
|
||||
``int fd``
|
||||
File descriptor of nvme device
|
||||
|
||||
``__u16 tmpth``
|
||||
Temperature Threshold
|
||||
|
||||
``__u8 tmpsel``
|
||||
Threshold Temperature Select
|
||||
|
||||
``enum nvme_feat_tmpthresh_thsel thsel``
|
||||
Threshold Type Select
|
||||
|
||||
``__u8 tmpthh``
|
||||
Temperature Threshold Hysteresis
|
||||
|
||||
``bool save``
|
||||
Save value across power states
|
||||
|
||||
``__u32 *result``
|
||||
The command completion result from CQE dword0
|
||||
|
||||
**Return**
|
||||
|
||||
The nvme command status if a response was received (see
|
||||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
|
||||
|
||||
|
||||
.. c:function:: int nvme_set_features_err_recovery (int fd, __u32 nsid, __u16 tler, bool dulbe, bool save, __u32 *result)
|
||||
|
||||
Set error recovery feature
|
||||
|
@ -3755,6 +3788,33 @@ The nvme command status if a response was received (see
|
|||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
|
||||
|
||||
|
||||
.. c:function:: int nvme_get_features_temp_thresh2 (int fd, enum nvme_get_features_sel sel, __u8 tmpsel, enum nvme_feat_tmpthresh_thsel thsel, __u32 *result)
|
||||
|
||||
Get temperature threshold feature
|
||||
|
||||
**Parameters**
|
||||
|
||||
``int fd``
|
||||
File descriptor of nvme device
|
||||
|
||||
``enum nvme_get_features_sel sel``
|
||||
Select which type of attribute to return, see :c:type:`enum nvme_get_features_sel <nvme_get_features_sel>`
|
||||
|
||||
``__u8 tmpsel``
|
||||
Threshold Temperature Select
|
||||
|
||||
``enum nvme_feat_tmpthresh_thsel thsel``
|
||||
Threshold Type Select
|
||||
|
||||
``__u32 *result``
|
||||
The command completion result from CQE dword0
|
||||
|
||||
**Return**
|
||||
|
||||
The nvme command status if a response was received (see
|
||||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
|
||||
|
||||
|
||||
.. c:function:: int nvme_get_features_err_recovery (int fd, enum nvme_get_features_sel sel, __u32 *result)
|
||||
|
||||
Get error recovery feature
|
||||
|
|
823
doc/rst/mi.rst
823
doc/rst/mi.rst
|
@ -109,6 +109,9 @@ bit (0x80) set.
|
|||
``NVME_MI_MT_PCIE``
|
||||
PCIe command
|
||||
|
||||
``NVME_MI_MT_AE``
|
||||
Asynchronous Event
|
||||
|
||||
**Description**
|
||||
|
||||
Used as byte 1 of both request and response messages (NMIMT bits of NMP
|
||||
|
@ -414,9 +417,11 @@ indicate the particular structure to query from the endpoint.
|
|||
MCTP maximum transmission unit size of port
|
||||
specified in dw 0
|
||||
|
||||
**Description**
|
||||
``NVME_MI_CONFIG_AE``
|
||||
Asynchronous Events configuration
|
||||
Configuration parameters for the MI Get/Set Configuration commands.
|
||||
|
||||
Configuration parameters for the MI Get/Set Configuration commands.
|
||||
**Description**
|
||||
|
||||
See :c:type:`nvme_mi_mi_config_get`() and :c:type:`nvme_mi_config_set`().
|
||||
|
||||
|
@ -446,6 +451,455 @@ Values used in the SMBus Frequency device configuration. See
|
|||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_supported_list_header
|
||||
|
||||
Asynchronous Event Supported List Header.
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_supported_list_header {
|
||||
__u8 numaes;
|
||||
__u8 aeslver;
|
||||
__le16 aest;
|
||||
__u8 aeslhl;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``numaes``
|
||||
Number of AE supported data structures that follow the header
|
||||
|
||||
``aeslver``
|
||||
AE Supported List Version
|
||||
|
||||
``aest``
|
||||
AE Supported list length (including this header)
|
||||
|
||||
``aeslhl``
|
||||
AE Supported list header length
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
This header preceeds a number, (:c:type:`numaes`), of AE supported data structures
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_supported_item
|
||||
|
||||
AE Supported List Item
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_supported_item {
|
||||
__u8 aesl;
|
||||
__le16 aesi;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``aesl``
|
||||
AE supported list item length
|
||||
|
||||
``aesi``
|
||||
AE supported info
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
Following this header should be hdr.numaes entries of
|
||||
nvme_mi_aem_supported_item structures
|
||||
|
||||
|
||||
.. c:function:: bool nvme_mi_aem_aesi_get_aese (__le16 aesi)
|
||||
|
||||
return aese from aesi field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``__le16 aesi``
|
||||
aesi field from **nvme_mi_aem_supported_item**
|
||||
|
||||
**Return**
|
||||
|
||||
A bool representing the aese value
|
||||
|
||||
|
||||
.. c:function:: __u8 nvme_mi_aem_aesi_get_aesid (__le16 aesi)
|
||||
|
||||
return aesid from aesi field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``__le16 aesi``
|
||||
aesi field from **nvme_mi_aem_supported_item**
|
||||
|
||||
**Return**
|
||||
|
||||
aesid value
|
||||
|
||||
|
||||
.. c:function:: void nvme_mi_aem_aesi_set_aesid (struct nvme_mi_aem_supported_item *item, __u8 aesid)
|
||||
|
||||
set aesid in the aesi field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``struct nvme_mi_aem_supported_item *item``
|
||||
Pointer to **nvme_mi_aem_supported_item** to update the aesi field
|
||||
|
||||
``__u8 aesid``
|
||||
aesid value to use
|
||||
|
||||
|
||||
.. c:function:: void nvme_mi_aem_aesi_set_aee (struct nvme_mi_aem_supported_item *item, bool enabled)
|
||||
|
||||
set aee in the aesi field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``struct nvme_mi_aem_supported_item *item``
|
||||
Pointer to **nvme_mi_aem_supported_item** to update the aesi field
|
||||
|
||||
``bool enabled``
|
||||
aee value to use
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_supported_list
|
||||
|
||||
AE Supported List received with GET CONFIG Asynchronous Event
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_supported_list {
|
||||
struct nvme_mi_aem_supported_list_header hdr;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``hdr``
|
||||
AE supported list header
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
Following this header should be hdr.numaes entries of
|
||||
nvme_mi_aem_supported_item structures
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_enable_item
|
||||
|
||||
AE Enabled item entry
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_enable_item {
|
||||
__u8 aeel;
|
||||
__le16 aeei;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``aeel``
|
||||
AE Enable Length (length of this structure which is 3)
|
||||
|
||||
``aeei``
|
||||
AE Enable Info
|
||||
|
||||
|
||||
|
||||
.. c:function:: bool nvme_mi_aem_aeei_get_aee (__le16 aeei)
|
||||
|
||||
return aee from aeei field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``__le16 aeei``
|
||||
aeei field from **nvme_mi_aem_enable_item**
|
||||
|
||||
**Return**
|
||||
|
||||
aee value
|
||||
|
||||
|
||||
.. c:function:: __u8 nvme_mi_aem_aeei_get_aeeid (__le16 aeei)
|
||||
|
||||
return aeeid from aeei field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``__le16 aeei``
|
||||
aeei field from **nvme_mi_aem_enable_item**
|
||||
|
||||
**Return**
|
||||
|
||||
aeeid value
|
||||
|
||||
|
||||
.. c:function:: void nvme_mi_aem_aeei_set_aeeid (struct nvme_mi_aem_enable_item *item, __u8 aeeid)
|
||||
|
||||
set aeeid in the aeei field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``struct nvme_mi_aem_enable_item *item``
|
||||
Pointer to **nvme_mi_aem_enable_item** to update the aeei field
|
||||
|
||||
``__u8 aeeid``
|
||||
aeeid value to use
|
||||
|
||||
|
||||
.. c:function:: void nvme_mi_aem_aeei_set_aee (struct nvme_mi_aem_enable_item *item, bool enabled)
|
||||
|
||||
set aee in the aeei field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``struct nvme_mi_aem_enable_item *item``
|
||||
Pointer to **nvme_mi_aem_enable_item** to update the aee field
|
||||
|
||||
``bool enabled``
|
||||
aee value to use
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_enable_list_header
|
||||
|
||||
AE Enable list header
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_enable_list_header {
|
||||
__u8 numaee;
|
||||
__u8 aeelver;
|
||||
__le16 aeetl;
|
||||
__u8 aeelhl;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``numaee``
|
||||
Number of AE enable items following the header
|
||||
|
||||
``aeelver``
|
||||
Version of the AE enable list (zero)
|
||||
|
||||
``aeetl``
|
||||
Total length of the AE enable list including header and items
|
||||
|
||||
``aeelhl``
|
||||
Header length of this header (5)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_enable_list
|
||||
|
||||
AE enable list sent with SET CONFIG Asyncronous Event
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_enable_list {
|
||||
struct nvme_mi_aem_enable_list_header hdr;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``hdr``
|
||||
AE enable list header
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
Following this header should be hdr.numaee entries of nvme_mi_aem_enable_item structures
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_occ_data
|
||||
|
||||
AEM Message definition.
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_occ_data {
|
||||
__u8 aelhlen;
|
||||
__u8 aeosil;
|
||||
__u8 aeovsil;
|
||||
struct {
|
||||
__u8 aeoi;
|
||||
__le32 aeocidi;
|
||||
__u8 aessi;
|
||||
} aeoui;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``aelhlen``
|
||||
AE Occurrence Header Length
|
||||
|
||||
``aeosil``
|
||||
AE Occurrence Specific Info Length
|
||||
|
||||
``aeovsil``
|
||||
AE Occurrence Vendor Specific Info Length
|
||||
|
||||
``aeoui``
|
||||
AE Occurrence Unique ID made up of other subfields
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
A single entry of ae occurrence data that comes with an nvme_aem_msg.
|
||||
Following this structure is variable length AEOSI (occurrence specific
|
||||
info) and variable length AEVSI (vendor specific info). The length of
|
||||
AEOSI is specified by aeosil and the length of AEVSI is specified by
|
||||
AEVSI. Neither field is mandatory and shall be omitted if their length
|
||||
parameter is set to zero.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_occ_list_hdr
|
||||
|
||||
AE occurrence list header
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_occ_list_hdr {
|
||||
__u8 numaeo;
|
||||
__u8 aelver;
|
||||
__u8 aeolli[3];
|
||||
__u8 aeolhl;
|
||||
__u8 aemti;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``numaeo``
|
||||
Number of AE Occurrence Data Structures
|
||||
|
||||
``aelver``
|
||||
AE Occurrence List Version Number
|
||||
|
||||
``aeolli``
|
||||
AE Occurrence List Length Info (AEOLLI)
|
||||
|
||||
``aeolhl``
|
||||
AE Occurrence List Header Length (shall be set to 7)
|
||||
|
||||
``aemti``
|
||||
AEM Transmission Info
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
The header for the occurrence list. numaeo defines how many
|
||||
nvme_mi_aem_occ_data structures (including variable payaloads) are included.
|
||||
Following this header is each of the numaeo occurrence data structures.
|
||||
|
||||
|
||||
.. c:function:: __u8 nvme_mi_aem_aemti_get_aemgn (__u8 aemti)
|
||||
|
||||
return aemgn from aemti field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``__u8 aemti``
|
||||
aemti field from **nvme_mi_aem_occ_list_hdr**
|
||||
|
||||
**Return**
|
||||
|
||||
aemgn value
|
||||
|
||||
|
||||
.. c:function:: __u32 nvme_mi_aem_aeolli_get_aeoltl (__u8 *aeolli)
|
||||
|
||||
return aeoltl from aeolli field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``__u8 *aeolli``
|
||||
Pointer to 3 byte aeolli field from **nvme_mi_aem_occ_list_hdr**
|
||||
|
||||
**Return**
|
||||
|
||||
aeoltl value
|
||||
|
||||
|
||||
.. c:function:: void nvme_mi_aem_aeolli_set_aeoltl (struct nvme_mi_aem_occ_list_hdr *hdr, __u32 aeoltl)
|
||||
|
||||
set aeoltl in the aeolli field
|
||||
|
||||
**Parameters**
|
||||
|
||||
``struct nvme_mi_aem_occ_list_hdr *hdr``
|
||||
Pointer to **nvme_mi_aem_occ_list_hdr** to set the aeolli field
|
||||
|
||||
``__u32 aeoltl``
|
||||
aeoltl value to use
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_msg
|
||||
|
||||
AEM Message definition.
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_msg {
|
||||
struct nvme_mi_msg_hdr hdr;
|
||||
struct nvme_mi_aem_occ_list_hdr occ_list_hdr;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``hdr``
|
||||
the general response message header
|
||||
|
||||
``occ_list_hdr``
|
||||
ae occurrence list header.
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
Every ae message will start with one of these. The occ_list_hder wil define
|
||||
information about how many ae occ data entries are included. Each entry is
|
||||
defined by the nvme_mi_aem_occ_data structure which will follow the
|
||||
occ_list_hdr. Each nvme_mi_aem_occ_data structure has a fixed length header
|
||||
but a variable length payload ude to occurrence specific and vendor specific
|
||||
info. For this reason, do not index the nvme_mi_ae_occ data structures by
|
||||
array or fixed offset.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_admin_req_hdr
|
||||
|
||||
Admin command request header.
|
||||
|
@ -731,6 +1185,23 @@ Subsequent operations on the endpoint (and related controllers) are
|
|||
transport-independent.
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_set_csi (nvme_mi_ep_t ep, uint8_t csi)
|
||||
|
||||
Assign a CSI to an endpoint.
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
Endpoint
|
||||
|
||||
``uint8_t csi``
|
||||
value to use for CSI bit in NMP (0 or 1) for this endpoint
|
||||
|
||||
**Return**
|
||||
|
||||
0 if successful, -1 otherwise (some endpoints may not support)
|
||||
|
||||
|
||||
.. c:function:: nvme_mi_ep_t nvme_mi_first_endpoint (nvme_root_t m)
|
||||
|
||||
Start endpoint iterator
|
||||
|
@ -987,6 +1458,20 @@ See :c:type:`nvme_mi_close`
|
|||
New endpoint object for **netid** & **eid**, or NULL on failure.
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_aem_open (nvme_mi_ep_t ep)
|
||||
|
||||
Prepare an existing endpoint to receive AEMs
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
Endpoint to configure for AEMs
|
||||
|
||||
**Return**
|
||||
|
||||
0 if success, -1 otherwise
|
||||
|
||||
|
||||
.. c:function:: void nvme_mi_close (nvme_mi_ep_t ep)
|
||||
|
||||
Close an endpoint connection and release resources, including controller objects.
|
||||
|
@ -1519,6 +2004,90 @@ The nvme command status if a response was received (see
|
|||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise..
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_mi_config_get_async_event (nvme_mi_ep_t ep, __u8 *aeelver, struct nvme_mi_aem_supported_list *list, size_t *list_num_bytes)
|
||||
|
||||
get configuration: Asynchronous Event
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
endpoint for MI communication
|
||||
|
||||
``__u8 *aeelver``
|
||||
Asynchronous Event Enable List Version Number
|
||||
|
||||
``struct nvme_mi_aem_supported_list *list``
|
||||
AE Supported list header and list contents
|
||||
|
||||
``size_t *list_num_bytes``
|
||||
number of bytes in the list header and contents buffer.
|
||||
This will be populated with returned size of list and contents if successful.
|
||||
|
||||
**Description**
|
||||
|
||||
Performs a MI Configuration Get, to query the current enable Asynchronous
|
||||
Events. On success, populates **aeelver** and the **list** with current info,
|
||||
|
||||
**Return**
|
||||
|
||||
The nvme command status if a response was received (see
|
||||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise..
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_mi_config_set_async_event (nvme_mi_ep_t ep, bool envfa, bool empfa, bool encfa, __u8 aemd, __u8 aerd, struct nvme_mi_aem_enable_list *enable_list, size_t enable_list_size, struct nvme_mi_aem_occ_list_hdr *occ_list, size_t *occ_list_size)
|
||||
|
||||
set configuration: Asynchronous Event
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
endpoint for MI communication
|
||||
|
||||
``bool envfa``
|
||||
Enable SR-IOV Virtual Functions AE
|
||||
|
||||
``bool empfa``
|
||||
Enable SR-IOV Physical Functions AE
|
||||
|
||||
``bool encfa``
|
||||
Enable PCI Functions AE.
|
||||
|
||||
``__u8 aemd``
|
||||
AEM Delay Interval (for Sync only)
|
||||
|
||||
``__u8 aerd``
|
||||
AEM Retry Delay (for Sync only; time in 100s of ms)
|
||||
|
||||
``struct nvme_mi_aem_enable_list *enable_list``
|
||||
nvme_mi_aem_enable_listucture containing header and items
|
||||
of events to be enabled or disabled. This is taken as a delta change
|
||||
from the current configuration.
|
||||
|
||||
``size_t enable_list_size``
|
||||
Size of the enable_list including header and data.
|
||||
Meant to catch overrun issues.
|
||||
|
||||
``struct nvme_mi_aem_occ_list_hdr *occ_list``
|
||||
Pointer to populate with the occurrence list (header and data)
|
||||
|
||||
``size_t *occ_list_size``
|
||||
Total size of provided occ_list buffer. Will be updated
|
||||
with received size if successful
|
||||
|
||||
**Description**
|
||||
|
||||
Performs a MI Configuration Set, to ACK (sent after an AEM) or Sync (at anytime to enable
|
||||
or disable Asynchronous Events).
|
||||
|
||||
On success, populates **occ_list**. See TP6035a for details on how occ_list is populated in
|
||||
ACK versus Sync conditions
|
||||
|
||||
**Return**
|
||||
|
||||
The nvme command status if a response was received (see
|
||||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise..
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_admin_xfer (nvme_mi_ctrl_t ctrl, struct nvme_mi_admin_req_hdr *admin_req, size_t req_data_size, struct nvme_mi_admin_resp_hdr *admin_resp, off_t resp_data_offset, size_t *resp_data_size)
|
||||
|
||||
Raw admin transfer interface.
|
||||
|
@ -3707,3 +4276,253 @@ The nvme command status if a response was received (see
|
|||
:c:type:`enum nvme_status_field <nvme_status_field>`) or -1 with errno set otherwise.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:enum:: nvme_mi_aem_handler_next_action
|
||||
|
||||
Next action for the AEM state machine handler
|
||||
|
||||
**Constants**
|
||||
|
||||
``NVME_MI_AEM_HNA_ACK``
|
||||
Send an ack for the AEM
|
||||
|
||||
``NVME_MI_AEM_HNA_NONE``
|
||||
No further action
|
||||
|
||||
**Description**
|
||||
|
||||
Used as return value for the AE callback generated when calling nvme_mi_aem_process
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_event
|
||||
|
||||
AE event information structure
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_event {
|
||||
uint8_t aeoi;
|
||||
uint8_t aessi;
|
||||
uint32_t aeocidi;
|
||||
void *spec_info;
|
||||
size_t spec_info_len;
|
||||
void *vend_spec_info;
|
||||
size_t vend_spec_info_len;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``aeoi``
|
||||
Event identifier
|
||||
|
||||
``aessi``
|
||||
Event occurrence scope info
|
||||
|
||||
``aeocidi``
|
||||
Event occurrence scope ID info
|
||||
|
||||
``spec_info``
|
||||
Specific info buffer
|
||||
|
||||
``spec_info_len``
|
||||
Length of specific info buffer
|
||||
|
||||
``vend_spec_info``
|
||||
Vendor specific info buffer
|
||||
|
||||
``vend_spec_info_len``
|
||||
Length of vendor specific info buffer
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
Application callbacks for nvme_mi_aem_process will be able to call
|
||||
nvme_mi_aem_get_next_event which will return a pointer to such an identifier
|
||||
for the next event the application should parse
|
||||
|
||||
|
||||
.. c:function:: struct nvme_mi_event * nvme_mi_aem_get_next_event (nvme_mi_ep_t ep)
|
||||
|
||||
Get details for the next event to parse
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
The endpoint with the event
|
||||
|
||||
**Description**
|
||||
|
||||
When inside a aem_handler, call this and a returned struct pointer
|
||||
will provide details of event information. Will return NULL when end of parsing is occurred.
|
||||
spec_info and vend_spec_info must be copied to persist as they will not be valid
|
||||
after the handler_next_action has returned.
|
||||
|
||||
**Return**
|
||||
|
||||
Pointer no next nvme_mi_event or NULL if this is the last one
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:struct:: nvme_mi_aem_config
|
||||
|
||||
Provided for nvme_mi_aem_enable
|
||||
|
||||
**Definition**
|
||||
|
||||
::
|
||||
|
||||
struct nvme_mi_aem_config {
|
||||
enum nvme_mi_aem_handler_next_action (*aem_handler)(nvme_mi_ep_t ep,size_t num_events, void *userdata);
|
||||
struct nvme_mi_aem_enabled_map enabled_map;
|
||||
bool envfa;
|
||||
bool empfa;
|
||||
bool encfa;
|
||||
__u8 aemd;
|
||||
__u8 aerd;
|
||||
};
|
||||
|
||||
**Members**
|
||||
|
||||
``aem_handler``
|
||||
Callback function for application processing of events
|
||||
|
||||
``enabled_map``
|
||||
Map indicating which AE should be enabled on the endpoint
|
||||
|
||||
``envfa``
|
||||
Enable SR-IOV virtual functions AE
|
||||
|
||||
``empfa``
|
||||
Enable SR-IOV physical functions AE
|
||||
|
||||
``encfa``
|
||||
Enable PCIe functions AE
|
||||
|
||||
``aemd``
|
||||
AEM Delay (time in seconds from when event happens to AEM being batched and sent)
|
||||
|
||||
``aerd``
|
||||
AEM Retry Delay (time in 100s of ms between AEM retries from the endpoint)
|
||||
|
||||
|
||||
**Description**
|
||||
|
||||
Application callbacks for nvme_mi_aem_process will be able to call
|
||||
nvme_mi_aem_get_next_event which will return a pointer to such an identifier
|
||||
for the next event the application should parse
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_aem_get_fd (nvme_mi_ep_t ep)
|
||||
|
||||
Returns the pollable fd for AEM data available
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
The endpoint being monitored for asynchronous data
|
||||
|
||||
**Description**
|
||||
|
||||
This populated structure can be polled from the application to understand if
|
||||
a call to nvme_mi_aem_process() is required (when a poll returns > 0).
|
||||
|
||||
**Return**
|
||||
|
||||
The fd value or -1 if error
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_aem_enable (nvme_mi_ep_t ep, struct nvme_mi_aem_config *config, void *userdata)
|
||||
|
||||
Enable AE on the provided endpoint
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
Endpoint to enable AEs
|
||||
|
||||
``struct nvme_mi_aem_config *config``
|
||||
AE configuraiton including which events are enabled and the callback function
|
||||
|
||||
``void *userdata``
|
||||
Application provided context pointer for callback function
|
||||
|
||||
**Description**
|
||||
|
||||
This function is called to enable AE on the endpoint. Endpoint will provide initial state
|
||||
(if any) of enabled AEs and application can parse those via the aem_handler fn pointer in
|
||||
callbacks. Thes can be obtained in the callback by calling nvme_mi_aem_get_next_event().
|
||||
|
||||
Application should poll the fd that can be obtained from nvme_mi_aem_get_fd and then call
|
||||
nvme_mi_aem_process() when poll() indicates data available.
|
||||
|
||||
A call to nvme_mi_aem_process() will grab AEM data and call the aem_handler fn pointer.
|
||||
At this point the application can call nvme_mi_aem_get_next_event() to get information for
|
||||
each triggered event.
|
||||
|
||||
**Return**
|
||||
|
||||
0 is a success, nonzero is an error and errno may be read for further details
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_aem_get_enabled (nvme_mi_ep_t ep, struct nvme_mi_aem_enabled_map *enabled)
|
||||
|
||||
Return information on which AEs are enabled
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
Endpoint to check enabled status
|
||||
|
||||
``struct nvme_mi_aem_enabled_map *enabled``
|
||||
nvme_mi_aem_enabled_map indexed by AE event ID of enabled state
|
||||
|
||||
**Return**
|
||||
|
||||
0 is a success, nonzero is an error and errno may be read for further details
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_aem_disable (nvme_mi_ep_t ep)
|
||||
|
||||
Disable AE on the provided endpoint
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
Endpoint to disable AEs
|
||||
|
||||
**Return**
|
||||
|
||||
0 is a success, nonzero is an error and errno may be read for further details
|
||||
|
||||
|
||||
.. c:function:: int nvme_mi_aem_process (nvme_mi_ep_t ep, void *userdata)
|
||||
|
||||
Process AEM on the provided endpoint
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_mi_ep_t ep``
|
||||
Endpoint to process
|
||||
|
||||
``void *userdata``
|
||||
Application provided context pointer for callback function
|
||||
|
||||
**Description**
|
||||
|
||||
Call this if poll() indicates data is available on the fd provided by nvme_mi_aem_get_fd()
|
||||
|
||||
This will call the fn pointer, aem_handler, provided with nvme_mi_aem_config and the
|
||||
application can call nvme_mi_aem_get_next_event() from within this callback to get
|
||||
aem event data. The callback function should return NVME_MI_AEM_HNA_ACK for normal operation.
|
||||
|
||||
**Return**
|
||||
|
||||
0 is a success, nonzero is an error and errno may be read for further details
|
||||
|
||||
|
||||
|
|
|
@ -2301,6 +2301,20 @@ IO policy used by current subsystem
|
|||
Model of the current subsystem
|
||||
|
||||
|
||||
.. c:function:: const char * nvme_subsystem_get_serial (nvme_subsystem_t s)
|
||||
|
||||
Return the serial number of subsystem
|
||||
|
||||
**Parameters**
|
||||
|
||||
``nvme_subsystem_t s``
|
||||
nvme_subsystem_t object
|
||||
|
||||
**Return**
|
||||
|
||||
Serial number of the current subsystem
|
||||
|
||||
|
||||
.. c:function:: const char * nvme_subsystem_get_fw_rev (nvme_subsystem_t s)
|
||||
|
||||
Return the firmware rev of subsystem
|
||||
|
|
|
@ -14192,6 +14192,10 @@ true if **status** is of the specified type and value
|
|||
|
||||
``NVME_FEAT_TT_THSEL_MASK``
|
||||
|
||||
``NVME_FEAT_TT_TMPTHH_SHIFT``
|
||||
|
||||
``NVME_FEAT_TT_TMPTHH_MASK``
|
||||
|
||||
``NVME_FEAT_ERROR_RECOVERY_TLER_SHIFT``
|
||||
|
||||
``NVME_FEAT_ERROR_RECOVERY_TLER_MASK``
|
||||
|
@ -14428,6 +14432,14 @@ true if **status** is of the specified type and value
|
|||
|
||||
``NVME_FEAT_FDP_EVENTS_ENABLE_MASK``
|
||||
|
||||
``NVME_FEAT_BPWPC_BP0WPS_SHIFT``
|
||||
|
||||
``NVME_FEAT_BPWPC_BP0WPS_MASK``
|
||||
|
||||
``NVME_FEAT_BPWPC_BP1WPS_SHIFT``
|
||||
|
||||
``NVME_FEAT_BPWPC_BP1WPS_MASK``
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -14947,6 +14959,132 @@ true if **status** is of the specified type and value
|
|||
|
||||
|
||||
|
||||
.. c:enum:: nvme_feat_perfc_attri
|
||||
|
||||
performance characteristics attribute index
|
||||
|
||||
**Constants**
|
||||
|
||||
``NVME_FEAT_PERFC_ATTRI_STD``
|
||||
standard performance attribute
|
||||
|
||||
``NVME_FEAT_PERFC_ATTRI_ID_LIST``
|
||||
performance attribute identifier list
|
||||
|
||||
``NVME_FEAT_PERFC_ATTRI_VS_MIN``
|
||||
vendor specific performance attribute minimum index
|
||||
|
||||
``NVME_FEAT_PERFC_ATTRI_VS_MAX``
|
||||
vendor specific performance attribute maximum index
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:enum:: nvme_feat_perfc_r4karl
|
||||
|
||||
standard performance attribute random 4 kib average latency
|
||||
|
||||
**Constants**
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_NO_REPORT``
|
||||
not reported
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_100_SEC``
|
||||
greater than or equal to 100 secs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_50_SEC``
|
||||
greater than or equal to 50 secs and less than 100 secs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_10_SEC``
|
||||
greater than or equal to 10 secs and less than 50 secs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_5_SEC``
|
||||
greater than or equal to 5 secs and less than 10 secs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_1_SEC``
|
||||
greater than or equal to 1 sec and less than 5 secs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_500_MS``
|
||||
greater than or equal to 500 msecs and less than 1 sec
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_100_MS``
|
||||
greater than or equal to 100 msecs and less than 500 msecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_50_MS``
|
||||
greater than or equal to 50 msecs and less than 100 msecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_10_MS``
|
||||
greater than or equal to 10 msecs and less than 50 msecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_5_MS``
|
||||
greater than or equal to 5 msecs and less than 10 msecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_1_MS``
|
||||
greater than or equal to 1 msec and less than 5 msecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_500_US``
|
||||
greater than or equal to 500 usecs and less than 1 msec
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_100_US``
|
||||
greater than or equal to 100 usecs and less than 500 usecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_50_US``
|
||||
greater than or equal to 50 usecs and less than 100 usecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_10_US``
|
||||
greater than or equal to 10 usecs and less than 50 usecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_5_US``
|
||||
greater than or equal to 5 usecs and less than 10 usecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_1_US``
|
||||
greater than or equal to 1 usec and less than 5 usecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_500_NS``
|
||||
greater than or equal to 500 nsecs and less than 1 usec
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_100_NS``
|
||||
greater than or equal to 100 nsecs and less than 500 nsecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_50_NS``
|
||||
greater than or equal to 50 nsecs and less than 100 nsecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_10_NS``
|
||||
greater than or equal to 10 nsecs and less than 50 nsecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_5_NS``
|
||||
greater than or equal to 5 nsecs and less than 10 nsecs
|
||||
|
||||
``NVME_FEAT_PERFC_R4KARL_GE_1_NS``
|
||||
greater than or equal to 1 nsec and less than 5 nsecs
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:enum:: nvme_feat_bpwp_state
|
||||
|
||||
Boot Partition Write Protection State
|
||||
|
||||
**Constants**
|
||||
|
||||
``NVME_FEAT_BPWPS_CHANGE_NOT_REQUESTED``
|
||||
Change in state not requested
|
||||
|
||||
``NVME_FEAT_BPWPS_WRITE_UNLOCKED``
|
||||
Write Unlocked
|
||||
|
||||
``NVME_FEAT_BPWPS_WRITE_LOCKED``
|
||||
Write Locked
|
||||
|
||||
``NVME_FEAT_BPWPS_WRITE_LOCKED_PWR_CYCLE``
|
||||
Write Locked Until Power Cycle
|
||||
|
||||
``NVME_FEAT_BPWPS_WRITE_PROTECTION_RPMB``
|
||||
Write Protection controlled by RPMB
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:enum:: nvme_fctype
|
||||
|
||||
Fabrics Command Types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue