NVME_MI_ADMIN_ADMIN_PASSTHRU(2)
π nvme_mi_admin_admin_passthru β the libnvme API manual, bestie edition π
okay so this page lives in the libnvme API manual, and it's about nvme_mi_admin_admin_passthru(2). yeah the name is a whole mouthful, we don't talk about it π
β¨ NAME β¨
nvme_mi_admin_admin_passthru β submit an nvme admin passthrough command π
πΈ SYNOPSIS πΈ
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 );
π¦ ARGUMENTS π¦
look at this list. it's giving "the whole alphabet walked in". but every single one matters, so let's go π«Ά
ctrlβ the controller you're sending this command toopcodeβ the nvme admin command you're sendingflagsβ NVMe command flags (not used, so likeβ¦ she's here but she's not doing anything π)rsvdβ reserved for future use, aka do not perceive hernsidβ namespace identifiercdw2β command dword 2cdw3β command dword 3cdw10β command dword 10cdw11β command dword 11cdw12β command dword 12cdw13β command dword 13cdw14β command dword 14cdw15β command dword 15data_lenβ length of the data transferred in this command, in bytesdataβ pointer to the user address of the data buffermetadata_lenβ length of metadata transferred in this command (not used)metadataβ pointer to the user address of the metadata buffer (not used)timeout_msβ how long to wait for the command to completeresultβ optional field to return the result from the CQE dword 0
yes bestie,cdw4throughcdw9did NOT get invited to this party. that's just how it is. π
π DESCRIPTION π
send a customized NVMe Admin command request message, then get the corresponding response message back. it's a whole conversation, and you're the one starting it β¨
this interface supports no data, host to controller, and controller to host β but it does NOT support bidirectional data transfer π so don't try it, she will not be doing that.
also, this interface only supports a data transfer size range of [0, 4096] (bytes), which means the & data_len parameter must be less than 4097. no cap. that's the rule π
π₯ RETURN π₯
you get the nvme command status if a response was received (peep enum nvme_status_field for that) β or -1 with errno set otherwise. simple as that π
and that's the whole page, bestie π§β¨ this was the libnvme API manual, dated July 2026, and honestly? iconic. go submit your passthrough, main character. ππ
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms