libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’– libnvme(9) β€” struct nvme_mi_admin_req_hdr πŸ’–

okay bestie, buckle up, because this is the libnvme API manual and today's main character is struct nvme_mi_admin_req_hdr β€” the Admin command request header. yes, the whole page is literally just this one struct and honestly? it ate. let's get into it 🫢


✨ NAME ✨

struct nvme_mi_admin_req_hdr β€” Admin command request header. that's it, that's the vibe πŸ’…


🌸 SYNOPSIS 🌸

bestie here's the whole thing, look at her:

struct nvme_mi_admin_req_hdr {
    struct nvme_mi_msg_hdr hdr;
    __u8 opcode;
    __u8 flags;
    __le16 ctrl_id;
    __le32 cdw1, cdw2, cdw3, cdw4, cdw5;
    __le32 doff;
    __le32 dlen;
    __le32 rsvd0, rsvd1;
    __le32 cdw10, cdw11, cdw12, cdw13, cdw14, cdw15;
 };

like, no cap, that's the entire struct. sixteen-ish fields of pure Admin command energy ⭐


πŸŽ€ Members πŸŽ€

time for the member-by-member vibe check, and yes we're doing all of them, i would never gatekeep πŸ™ˆ

  • hdr β€” the Generic MI message header. it's giving "generic but essential" πŸ’œ
  • opcode β€” Admin command opcode, and it's using enum nvme_admin_opcode. iconic, lowkey πŸ¦‹
  • flags β€” Command Flags, and what they do is indicate dlen and doff validity. but heads up bestie: this is Only defined in NVMe-MI version 1.1 πŸ’€ there are no fields defined in 1.2 (where the dlen/doff are always considered valid). so like, version check your vibes, fr fr
  • ctrl_id β€” Controller ID target of command. it's giving "who is this for" energy πŸ‘‘
  • cdw1 β€” Submission Queue Entry doubleword 1 ✨
  • cdw2 β€” Submission Queue Entry doubleword 2 ✨
  • cdw3 β€” Submission Queue Entry doubleword 3 ✨
  • cdw4 β€” Submission Queue Entry doubleword 4 ✨
  • cdw5 β€” Submission Queue Entry doubleword 5 ✨
  • doff β€” Offset of data to return from command. that's your little pointer to the good stuff πŸ“
  • dlen β€” Length of sent/returned data. size matters, periodt πŸ’…
  • rsvd0 β€” Reserved. not for you bestie, hands off πŸ™…
  • rsvd1 β€” Reserved. also not for you, also hands off πŸ™…
  • cdw10 β€” Submission Queue Entry doubleword 10 🌈
  • cdw11 β€” Submission Queue Entry doubleword 11 🌈
  • cdw12 β€” Submission Queue Entry doubleword 12 🌈
  • cdw13 β€” Submission Queue Entry doubleword 13 🌈
  • cdw14 β€” Submission Queue Entry doubleword 14 🌈
  • cdw15 β€” Submission Queue Entry doubleword 15 🌈
ok real talk for a sec: cdw1 through cdw5 and cdw10 through cdw15 are all Submission Queue Entry doublewords. notice how cdw6–cdw9 are just… not here? anyway, not my struct, not my problem 🧚

πŸ¦‹ Description πŸ¦‹

so what is this thing? it's the Wire format for Admin command message headers, defined in section 6 of NVMe-MI. and that's the whole description, bestie β€” short, mysterious, main character energy. genuinely obsessed with how it says so much by saying so little 😭πŸ”₯


and that's the page!! this gorgeous little slice of API manual is from libnvme(9), it covers struct nvme_mi_admin_req_hdr, and it's dated October 2026 β€” go forth and structure your admin requests, queen πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from