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

nvme_mi_admin_admin_passthru - Submit an nvme admin passthrough command

int nvme_mi_admin_admin_passthru (nvme_mi_ctrl_t ctrl , __u8 opcode , __u8 flags , __u16 rsvd , __u32 nsid , __u32 cdw2 , __u32 cdw3 , __u32 cdw10 , __u32 cdw11 , __u32 cdw12 , __u32 cdw13 , __u32 cdw14 , __u32 cdw15 , __u32 data_len , void *data , __u32 metadata_len , void *metadata , __u32 timeout_ms , __u32 *result );

Controller to send command to
The nvme admin command to send
NVMe command flags (not used)
Reserved for future use
Namespace identifier
Command dword 2
Command dword 3
Command dword 10
Command dword 11
Command dword 12
Command dword 13
Command dword 14
Command dword 15
Length of the data transferred in this command in bytes
Pointer to user address of the data buffer
Length of metadata transferred in this command(not used)
Pointer to user address of the metadata buffer(not used)
How long to wait for the command to complete
Optional field to return the result from the CQE dword 0

Send a customized NVMe Admin command request message and get the corresponding response message.

This interface supports no data, host to controller and controller to host but it doesn't support bidirectional data transfer. Also this interface only supports data transfer size range [0, 4096] (bytes) so the & data_len parameter must be less than 4097.

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

nvme_mi_admin_admin_passthru January 2023