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 to
  • opcode β€” the nvme admin command you're sending
  • flags β€” 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 her
  • nsid β€” namespace identifier
  • cdw2 β€” command dword 2
  • cdw3 β€” command dword 3
  • cdw10 β€” command dword 10
  • cdw11 β€” command dword 11
  • cdw12 β€” command dword 12
  • cdw13 β€” command dword 13
  • cdw14 β€” command dword 14
  • cdw15 β€” command dword 15
  • data_len β€” length of the data transferred in this command, in bytes
  • data β€” pointer to the user address of the data buffer
  • metadata_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 complete
  • result β€” optional field to return the result from the CQE dword 0
yes bestie, cdw4 through cdw9 did 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