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 (usingenum nvme_admin_opcode). this is the "which admin command are we even doing" field.flagsβ Command Flags, indicatingdlenanddoffvalidity; Only defined in NVMe-MI version 1.1, no fields defined in 1.2 (where thedlen/doffare 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 1cdw2β Submission Queue Entry doubleword 2cdw3β Submission Queue Entry doubleword 3cdw4β Submission Queue Entry doubleword 4cdw5β Submission Queue Entry doubleword 5doffβ 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 10cdw11β Submission Queue Entry doubleword 11cdw12β Submission Queue Entry doubleword 12cdw13β Submission Queue Entry doubleword 13cdw14β Submission Queue Entry doubleword 14cdw15β Submission Queue Entry doubleword 15
note bestie: yes, the doublewords jump fromcdw5straight tocdw10, 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
- 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