DOKK / manpages / debian 12 / libnvme-dev / nvme_mi_admin_xfer.2.en
nvme_mi_admin_xfer(2) libnvme API manual nvme_mi_admin_xfer(2)

nvme_mi_admin_xfer - Raw admin transfer interface.

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 );

controller to send the admin command to
request data
size of request data payload
buffer for response data
offset into request data to retrieve from controller
size of response data buffer, updated to received size

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

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

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

See: struct nvme_mi_admin_req_hdr and struct nvme_mi_admin_resp_hdr.

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

nvme_mi_admin_xfer January 2023