| 1 |
.TH "nvme_mi_admin_xfer" 9 "nvme_mi_admin_xfer" "November 2025" "libnvme API manual" LINUX |
| 2 |
.SH NAME |
| 3 |
nvme_mi_admin_xfer \- Raw admin transfer interface. |
| 4 |
.SH SYNOPSIS |
| 5 |
.B "int" nvme_mi_admin_xfer |
| 6 |
.BI "(nvme_mi_ctrl_t ctrl " "," |
| 7 |
.BI "struct nvme_mi_admin_req_hdr *admin_req " "," |
| 8 |
.BI "size_t req_data_size " "," |
| 9 |
.BI "struct nvme_mi_admin_resp_hdr *admin_resp " "," |
| 10 |
.BI "off_t resp_data_offset " "," |
| 11 |
.BI "size_t *resp_data_size " ");" |
| 12 |
.SH ARGUMENTS |
| 13 |
.IP "ctrl" 12 |
| 14 |
controller to send the admin command to |
| 15 |
.IP "admin_req" 12 |
| 16 |
request data |
| 17 |
.IP "req_data_size" 12 |
| 18 |
size of request data payload |
| 19 |
.IP "admin_resp" 12 |
| 20 |
buffer for response data |
| 21 |
.IP "resp_data_offset" 12 |
| 22 |
offset into request data to retrieve from controller |
| 23 |
.IP "resp_data_size" 12 |
| 24 |
size of response data buffer, updated to received size |
| 25 |
.SH "DESCRIPTION" |
| 26 |
Performs an arbitrary NVMe Admin command, using the provided request data, |
| 27 |
in \fIadmin_req\fP. The size of the request data *payload* is specified in |
| 28 |
\fIreq_data_size\fP - this does not include the standard header length (so a |
| 29 |
header-only request would have a size of 0). |
| 30 |
|
| 31 |
On success, response data is stored in \fIadmin_resp\fP, which has an optional |
| 32 |
appended payload buffer of \fIresp_data_size\fP bytes. The actual payload |
| 33 |
transferred will be stored in \fIresp_data_size\fP. These sizes do not include |
| 34 |
the Admin request header, so 0 represents no payload. |
| 35 |
|
| 36 |
As with all Admin commands, we can request partial data from the Admin |
| 37 |
Response payload, offset by \fIresp_data_offset\fP. |
| 38 |
|
| 39 |
See: \fIstruct nvme_mi_admin_req_hdr\fP and \fIstruct nvme_mi_admin_resp_hdr\fP. |
| 40 |
.SH "RETURN" |
| 41 |
The nvme command status if a response was received (see |
| 42 |
\fIenum nvme_status_field\fP) or -1 with errno set otherwise.. |