libnvme(2)
π libnvme(2) β okay bestie, let's talk struct nvme_mi_vpd_mr_common π
NVMe MultiRecord Area β¨ no cap, this is the little header+payload combo that the VPD (Vital Product Data) world uses to smuggle NVMe info around π
It lives in the libnvme API manual β yes, that libnvme, section 2, the icon it is π
β¨ SYNOPSIS β¨
struct nvme_mi_vpd_mr_common {
__u8 type;
__u8 rf;
__u8 rlen;
__u8 rchksum;
__u8 hchksum;
union {
struct nvme_mi_vpd_mra nmra;
struct nvme_mi_vpd_ppmra ppmra;
struct nvme_mi_vpd_tra tmra;
};
};
copy that exactly, queen, the compiler does NOT forgive typos π
πΈ Members πΈ
typeβ the NVMe Record Type ID. like, which record are we even talking about, bestie? π·οΈrfβ the Record Format. the shape/vibe of the record π«Άrlenβ the Record Length. how much record you're getting, fr fr πrchksumβ the Record Checksum. integrity check on the payload, we love a queen who verifies βhchksumβ the Header Checksum. same energy but for the header instead π{unnamed_union}β anonymous π» (it's an unnamed union, so it's just... there. mysterious. main character energy tbh.)nmraβ the NVMe MultiRecord Area β¨ppmraβ the NVMe PCIe Port MultiRecord Area πtmraβ the Topology MultiRecord Area πΈοΈ
ngl bestie, those last three share one anonymous union, so it's one of them at a time β don't go readingnmrawhen the record is actually atmra, that's giving undefined vibes π
π¦ the vibe check
So basically: five little __u8 bytes of header (type, rf, rlen, rchksum, hchksum), and then one anonymous union holding whichever MultiRecord Area flavour applies β NVMe, NVMe PCIe Port, or Topology. That's the whole struct, periodt. π
okay that's the whole page, mwah π this was the struct nvme_mi_vpd_mr_common page from the API Manual, shipped with libnvme, dated July 2026 β section libnvme(2), and yes the manpage footer said exactly that. stan. π
π¦ 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