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 reading nmra when the record is actually a tmra, 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