libnvme(2)
π libnvme β the struct nvme_mi_read_ctrl_info era π
okay bestie, so this is a page from the libnvme API Manual (yes, libnvme(2), that's the manual name, we're fancy like that β¨), and today's main character is a lil struct that carries Controller Information Data Structure energy. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
struct nvme_mi_read_ctrl_info β the Controller Information Data Structure. it's giving "here's everything you need to know about this controller, no cap" π
πΈ SYNOPSIS πΈ
struct nvme_mi_read_ctrl_info {
__u8 portid;
__u8 rsvd1[4];
__u8 prii;
__le16 pri;
__le16 vid;
__le16 did;
__le16 ssvid;
__le16 ssid;
__u8 rsvd16[16];
};
look at her. iconic. not a single byte out of place π note that all the multibyte fields are __le16 β little-endian, always, don't play with endianness, that's not the vibe π₯
π Members π
okay this is the part where we go field by field, and trust, you're gonna want to know all of them π
portidβ Port Identifier. literally the port's id. that's it, that's the job π«rsvd1β Reserved. do NOT touch. it's just sitting there, minding its business, holding space (4 bytes of space, to be exact) πpriiβ PCIe Routing ID Information. the info about the routing id. the little pre-game before the actual routing id shows up π¦priβ PCIe Routing ID. the routing id itself, in all its__le16glory β¨vidβ PCI Vendor ID. who made this thing πdidβ PCI Device ID. which thing is this thing πssvidβ PCI Subsystem Vendor ID. the vendor of the subsystem, not the vendor of the device. yes they can be different. yes that's on purpose πssidβ PCI Subsystem Device ID. the device id of the subsystem. the matching half of the ssvid situation πrsvd16β Reserved. again. 16 whole bytes of reserved. not me spiralling over how much reserved space this struct is holding π it's fine. it's fine. leave it ALONE πΈ
β οΈ quick β¨vibe checkβ¨ for the reserved fields:rsvd1andrsvd16are Reserved, meaning you do not read meaning into them and you do not write your own little secrets in there. hands off, bestie π«Ά
π the sign-off π
and that's the page, fr fr π this one came from the libnvm source/version, dated July 2026, and it answers to the name struct nvme_mi_read_ctrl_info under the libnvme(2) manual π
go forth and read your controller info correctly, you absolute legend ππ
π¦ 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