libnvme(2)

πŸ’– struct nvme_mi_admin_req_hdr β€” the admin command request header πŸ’–

okay bestie, so this is a page from the libnvme(2) API manual, and today's main character is struct nvme_mi_admin_req_hdr, which is literally the admin command request header. that's it, that's the vibe. it's giving wire format. it's giving struct energy. let's get into it 🫢


✨ NAME ✨

struct nvme_mi_admin_req_hdr β€” Admin command request header. no cap, that's what it is. πŸ‘‘


🌸 SYNOPSIS 🌸

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 look at her. every field exactly where it's supposed to be. immaculate layout. no notes. πŸ’…


πŸ¦‹ Members πŸ¦‹

okay so let's go field by field because every single one of these is doing something, and we do NOT skip fields in this house.

  • hdr β€” Generic MI message header. the little base she stands on, iconic, foundational, main character origin story. ✨
  • opcode β€” Admin command opcode (using enum nvme_admin_opcode). this is the "which admin command are we even doing" field.
  • flags β€” Command Flags, indicating dlen and doff validity; Only defined in NVMe-MI version 1.1, no fields defined in 1.2 (where the dlen/doff are always considered valid). so like, version-dependent behaviour, we love a conditional queen.
  • ctrl_id β€” Controller ID target of command. who is this command for? her. exactly. πŸ’–
  • 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. where in the data do we start? there, bestie. πŸŽ€
  • dlen β€” Length of sent/returned data. how much data are we sending or getting back? this many.
  • rsvd0 β€” Reserved. don't touch. do not perceive her. πŸ™ˆ
  • rsvd1 β€” Reserved. also don't touch. also do not perceive. 🌸
  • 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
note bestie: yes, the doublewords jump from cdw5 straight to cdw10, and yeah the reserved fields are just vibing in between. that's not a typo, that's just how the struct is built. periodt. πŸ’€

🌈 Description 🌈

Wire format for Admin command message headers, defined in section 6 of NVMe-MI. that's the whole thing. she's a wire format. she shows up on the wire. section 6 said so. iykyk. ⭐


and that's the page bestie, we ate, no crumbs left πŸ’…

signing off from the libnvme(2) manual, dated July 2026 β€” this was struct nvme_mi_admin_req_hdr, brought to you by libnvme, and she slayed. πŸŽ€βœ¨

πŸ“¦ where this page comes from