libnvme(9)

๐Ÿ“ฆ version 3.2, in arch rolling

okay bestie, this is libnvme(9) from the API Manual, and todayโ€™s main character is struct nvme_id_ctrl โ€” the Identify Controller data structure. buckle up, itโ€™s giving big struct energy ๐Ÿ’…

โœจ NAME โœจ

struct nvme_id_ctrl โ€” Identify Controller data structure

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

okay so hereโ€™s the whole struct, no cap, copy it exactly:

struct nvme_id_ctrl {
    __le16 vid;
    __le16 ssvid;
    char sn[20];
    char mn[40];
    char fr[8];
    __u8 rab;
    __u8 ieee[3];
    __u8 cmic;
    __u8 mdts;
    __le16 cntlid;
    __le32 ver;
    __le32 rtd3r;
    __le32 rtd3e;
    __le32 oaes;
    __le32 ctratt;
    __le16 rrls;
    __u8 bpcap;
    __u8 chsi;
    __le32 nssl;
    __u8 rsvd108[2];
    __u8 plsi;
    __u8 cntrltype;
    __u8 fguid[16];
    __le16 crdt1;
    __le16 crdt2;
    __le16 crdt3;
    __u8 crcap;
    __u8 ciu;
    __u8 cirn[8];
    __u8 rsvd144[96];
    __u8 rsvd240[13];
    __u8 nvmsr;
    __u8 vwci;
    __u8 mec;
    __le16 oacs;
    __u8 acl;
    __u8 aerl;
    __u8 frmw;
    __u8 lpa;
    __u8 elpe;
    __u8 npss;
    __u8 avscc;
    __u8 apsta;
    __le16 wctemp;
    __le16 cctemp;
    __le16 mtfa;
    __le32 hmpre;
    __le32 hmmin;
    __u8 tnvmcap[16];
    __u8 unvmcap[16];
    __le32 rpmbs;
    __le16 edstt;
    __u8 dsto;
    __u8 fwug;
    __le16 kas;
    __le16 hctma;
    __le16 mntmt;
    __le16 mxtmt;
    __le32 sanicap;
    __le32 hmminds;
    __le16 hmmaxd;
    __le16 nsetidmax;
    __le16 endgidmax;
    __u8 anatt;
    __u8 anacap;
    __le32 anagrpmax;
    __le32 nanagrpid;
    __le32 pels;
    __le16 domainid;
    __u8 kpioc;
    __u8 rsvd359;
    __le16 mptfawr;
    __u8 rmdca;
    __u8 rsvd363[5];
    __u8 megcap[16];
    __u8 tmpthha;
    __u8 mupa;
    __le16 cqt;
    __le16 cdpa;
    __le16 mup;
    __le16 ipmsr;
    __le16 msmt;
    __le16 mnens;
    __le16 mnecpens;
    __le32 mensnn;
    __u8 ensa;
    __u8 endsfs;
    __le32 vsen1 ;
    __le32 vsen2 ;
    __le32 vsen3 ;
    __le32 vsen4 ;
    __le16 msvmt;
    __u8 rsvd424[88];
    __u8 sqes;
    __u8 cqes;
    __le16 maxcmd;
    __le32 nn;
    __le16 oncs;
    __le16 fuses;
    __u8 fna;
    __u8 vwc;
    __le16 awun;
    __le16 awupf;
    __u8 icsvscc;
    __u8 nwpc;
    __le16 acwu;
    __le16 ocfs;
    __le32 sgls;
    __le32 mnan;
    __u8 maxdna[16];
    __le32 maxcna;
    __le32 oaqd;
    __u8 rhiri;
    __u8 hirt;
    __le16 cmmrtd;
    __le16 nmmrtd;
    __u8 minmrtg;
    __u8 maxmrtg;
    __u8 trattr;
    __u8 rsvd577;
    __le16 mcudmq;
    __le16 mnsudmq;
    __le16 mcmr;
    __le16 nmcmr;
    __le16 mcdqpc;
    __u8 rsvd588[180];
    char subnqn[NVME_NQN_LENGTH];
    __u8 rsvd1024[768];
    __le32 ioccsz;
    __le32 iorcsz;
    __le16 icdoff;
    __u8 fcatt;
    __u8 msdbd;
    __le16 ofcs;
    __u8 dctype;
    __u8 ccrl;
    __u8 rsvd1808[240];
    struct nvme_id_psd      psd[32];
    __u8 vs[1024];
};

๐Ÿ’– Members ๐Ÿ’–

okay so every field is a little main character, and weโ€™re doing them in order, periodt:

  • vid โ€” PCI Vendor ID, the company vendor identifier that is assigned by the PCI SIG.
  • ssvid โ€” PCI Subsystem Vendor ID, the company vendor identifier that is assigned by the PCI SIG for the subsystem.
  • sn โ€” Serial Number in ASCII.
  • mn โ€” Model Number in ASCII.
  • fr โ€” Firmware Revision in ASCII, the currently active firmware revision for the NVM subsystem.
  • rab โ€” Recommended Arbitration Burst, reported as a power of two.
  • ieee โ€” IEEE assigned Organization Unique Identifier.
  • cmic โ€” Controller Multipath IO and Namespace Sharing Capabilities of the controller and NVM subsystem. See enum nvme_id_ctrl_cmic.
  • mdts โ€” Max Data Transfer Size is the largest data transfer size. The host should not submit a command that exceeds this maximum data transfer size. The value is in units of the minimum memory page size (CAP.MPSMIN) and is reported as a power of two.
  • cntlid โ€” Controller ID, the NVM subsystem unique controller identifier associated with the controller.
  • ver โ€” Version, this field contains the value reported in the Version register, or property (see enum nvme_registers NVME_REG_VS).
  • rtd3r โ€” RTD3 Resume Latency, the expected latency in microseconds to resume from Runtime D3.
  • rtd3e โ€” RTD3 Exit Latency, the typical latency in microseconds to enter Runtime D3.
  • oaes โ€” Optional Async Events Supported, see enum nvme_id_ctrl_oaes.
  • ctratt โ€” Controller Attributes, see enum nvme_id_ctrl_ctratt.
  • rrls โ€” Read Recovery Levels. If a bit is set, then the corresponding Read Recovery Level is supported. If a bit is cleared, then the corresponding Read Recovery Level is not supported.
  • bpcap โ€” Boot Partition Capabilities, see enum nvme_id_ctrl_bpcap.
  • chsi โ€” CXL HDM Support Information, see enum nvme_id_ctrl_chsi.
  • nssl โ€” NVM Subsystem Shutdown Latency (NSSL). This field indicates the typical latency in microseconds for an NVM Subsystem Shutdown to complete.
  • rsvd108 โ€” Reserved.
  • plsi โ€” Power Loss Signaling Information (PLSI), see enum nvme_id_ctrl_plsi.
  • cntrltype โ€” Controller Type, see enum nvme_id_ctrl_cntrltype.
  • fguid โ€” FRU GUID, a 128-bit value that is globally unique for a given Field Replaceable Unit.
  • crdt1 โ€” Controller Retry Delay time in 100 millisecond units if CQE CRD field is 1.
  • crdt2 โ€” Controller Retry Delay time in 100 millisecond units if CQE CRD field is 2.
  • crdt3 โ€” Controller Retry Delay time in 100 millisecond units if CQE CRD field is 3.
  • crcap โ€” Controller Reachability Capabilities (CRCAP), see enum nvme_id_ctrl_crcap.
  • ciu โ€” Controller Instance Uniquifier (CIU).
  • cirn โ€” Controller Instance Random Number (CIRN).
  • rsvd144 โ€” Reserved.
  • rsvd240 โ€” Reserved for the NVMe Management Interface specification.
  • nvmsr โ€” NVM Subsystem Report, see enum nvme_id_ctrl_nvmsr.
  • vwci โ€” VPD Write Cycle Information, see enum nvme_id_ctrl_vwci.
  • mec โ€” Management Endpoint Capabilities, see enum nvme_id_ctrl_mec.
  • oacs โ€” Optional Admin Command Support, the optional Admin commands and features supported by the controller, see enum nvme_id_ctrl_oacs.
  • acl โ€” Abort Command Limit, the maximum number of concurrently executing Abort commands supported by the controller. This is a 0โ€™s based value.
  • aerl โ€” Async Event Request Limit, the maximum number of concurrently outstanding Asynchronous Event Request commands supported by the controller. This is a 0โ€™s based value.
  • frmw โ€” Firmware Updates indicates capabilities regarding firmware updates. See enum nvme_id_ctrl_frmw.
  • lpa โ€” Log Page Attributes, see enum nvme_id_ctrl_lpa.
  • elpe โ€” Error Log Page Entries, the maximum number of Error Information log entries that are stored by the controller. This field is a 0โ€™s based value.
  • npss โ€” Number of Power States Supported, the number of NVM Express power states supported by the controller, indicating the number of valid entries in struct nvme_id_ctrl.psd. This is a 0โ€™s based value.
  • avscc โ€” Admin Vendor Specific Command Configuration, see enum nvme_id_ctrl_avscc.
  • apsta โ€” Autonomous Power State Transition Attributes, see enum nvme_id_ctrl_apsta.
  • wctemp โ€” Warning Composite Temperature Threshold indicates the minimum Composite Temperature field value (see struct nvme_smart_log.critical_comp_time) that indicates an overheating condition during which controller operation continues.
  • cctemp โ€” Critical Composite Temperature Threshold, field indicates the minimum Composite Temperature field value (see struct nvme_smart_log.critical_comp_time) that indicates a critical overheating condition.
  • mtfa โ€” Maximum Time for Firmware Activation indicates the maximum time the controller temporarily stops processing commands to activate the firmware image, specified in 100 millisecond units. This field is always valid if the controller supports firmware activation without a reset.
  • hmpre โ€” Host Memory Buffer Preferred Size indicates the preferred size that the host is requested to allocate for the Host Memory Buffer feature in 4 KiB units.
  • hmmin โ€” Host Memory Buffer Minimum Size indicates the minimum size that the host is requested to allocate for the Host Memory Buffer feature in 4 KiB units.
  • tnvmcap โ€” Total NVM Capacity, the total NVM capacity in the NVM subsystem. The value is in bytes.
  • unvmcap โ€” Unallocated NVM Capacity, the unallocated NVM capacity in the NVM subsystem. The value is in bytes.
  • rpmbs โ€” Replay Protected Memory Block Support, see enum nvme_id_ctrl_rpmbs.
  • edstt โ€” Extended Device Self-test Time, if Device Self-test command is supported (see struct nvme_id_ctrl.oacs, NVME_CTRL_OACS_DSTS), then this field indicates the nominal amount of time in one minute units that the controller takes to complete an extended device self-test operation when in power state 0.
  • dsto โ€” Device Self-test Options, see enum nvme_id_ctrl_dsto.
  • fwug โ€” Firmware Update Granularity indicates the granularity and alignment requirement of the firmware image being updated by the Firmware Image Download command. The value is reported in 4 KiB units. A value of 0h indicates no information on granularity is provided. A value of FFh indicates no restriction.
  • kas โ€” Keep Alive Support indicates the granularity of the Keep Alive Timer in 100 millisecond units.
  • hctma โ€” Host Controlled Thermal Management Attributes, see enum nvme_id_ctrl_hctm.
  • mntmt โ€” Minimum Thermal Management Temperature, i.e. the lowest temp (in degrees Kelvin) that the host is allowed to ask for in the Thermal Management Temperature 1 field and Thermal Management Temperature 2 field of a Set Features command where the Feature Identifier field is set to NVME_FEAT_FID_HCTM. ๐ŸŒก๏ธ
  • mxtmt โ€” Maximum Thermal Management Temperature, the flip side: the highest temp in degrees Kelvin the host may request in those same Thermal Management Temperature 1 and Thermal Management Temperature 2 fields of a Set Features command with the Feature Identifier set to NVME_FEAT_FID_HCTM.
  • sanicap โ€” Sanitize Capabilities, bestie, see enum nvme_id_ctrl_sanicap. โœจ
  • hmminds โ€” Host Memory Buffer Minimum Descriptor Entry Size: the smallest usable size of a Host Memory Buffer Descriptor Entry, measured in 4 KiB units.
  • hmmaxd โ€” Host Memory Maximum Descriptors Entries: literally just the number of usable Host Memory Buffer Descriptor Entries.
  • nsetidmax โ€” NVM Set Identifier Maximum โ€” defines the biggest valid NVM Set Identifier value for any controller in the NVM subsystem. ๐Ÿ‘‘
  • endgidmax โ€” Endurance Group Identifier Maximum, which defines the max value of a valid Endurance Group Identifier for any controller in the NVM subsystem.
  • anatt โ€” ANA Transition Time: the maximum amount of time (in seconds) either for a transition between ANA states or for the controller to report the ANA change state. Whichever, it's the ceiling. โณ
  • anacap โ€” Asymmetric Namespace Access Capabilities, see enum nvme_id_ctrl_anacap.
  • anagrpmax โ€” ANA Group Identifier Maximum, a.k.a. the maximum value of a valid ANA Group Identifier for any controller in the NVM subsystem.
  • nanagrpid โ€” Number of ANA Group Identifiers: how many ANA groups this controller supports. ๐Ÿซถ
  • pels โ€” Persistent Event Log Size, meaning the maximum reportable size for the Persistent Event Log.
  • domainid โ€” Domain Identifier: the identifier of the domain that contains this controller.
  • kpioc โ€” Key Per I/O Capabilities (KPIOC), see enum nvme_id_ctrl_kpioc.
  • rsvd359 โ€” Reserved. (Yes bestie, it's just sitting there. Respect the reserved bits. ๐Ÿ’€)
  • mptfawr โ€” Maximum Processing Time for Firmware Activation Without Reset (MPTFAWR). This one indicates the estimated max time, in 100 ms units, that the controller needs to process a Firmware Commit command that specifies a value of 011b in the Commit Action field. ๐Ÿ”ฅ
  • rmdca โ€” Restore Manufacturing Configuration Attributes, see enum nvme_id_ctrl_rmdca.
  • rsvd363 โ€” Reserved. Another one. Don't touch, don't look at it too long. ๐Ÿ™ˆ
  • megcap โ€” Max Endurance Group Capacity: the maximum capacity of a single Endurance Group.
  • tmpthha โ€” Temperature Threshold Hysteresis Attributes.
  • mupa โ€” Maximum Unlimited Power Attributes.
  • cqt โ€” Command Quiesce Time (CQT). This field tells you the expected worst-case time, in 1 millisecond units, for the controller to quiesce all outstanding commands after a Keep Alive Timeout or some other communication loss. Very "we're shutting it down, give us a sec" energy. ๐Ÿ’…
  • cdpa โ€” Configurable Device Personality Attributes: this field indicates the Configurable Device Personality feature attributes that the controller supports.
  • mup โ€” Maximum Unlimited Power: this field specifies the maximum power for power state 0 that comes from removing a power limit (like, the maximum power is not limited). โšก
  • ipmsr โ€” Interval Power Measurement Sample Rate: the maximum interval between power measurement samples used to collect interval power measurements.
  • msmt โ€” Maximum Stop Measurement Time: the maximum stop measurement time that's allowed to be specified in the SMT field for a Set Features command that specifies the Power Measurement feature.
  • mnens โ€” Maximum Number of Exported NVM Subsystems.
  • mnecpens โ€” Maximum Number of Exported Controllers per Exported NVM Subsystem.
  • mensnn โ€” Maximum Exported NVM Subsystem Number of Namespaces.
  • ensa โ€” Exported NVM Subsystem Attributes.
  • endsfs โ€” Exported Namespace Data Structure Formats Supported.
  • vsen1 โ€” Voltage Sensor 1: indicates the characteristics of Voltage Sensor 1, see struct nvme_id_ctrl_vsds. A value of 0h means Voltage Sensor 1 is not supported. โญ
  • vsen2 โ€” Voltage Sensor 2, see struct nvme_id_ctrl_vsds. A value of 0h indicates Voltage Sensor 2 is not supported.
  • vsen3 โ€” Voltage Sensor 3, see struct nvme_id_ctrl_vsds. A value of 0h indicates Voltage Sensor 3 is not supported.
  • vsen4 โ€” Voltage Sensor 4, see struct nvme_id_ctrl_vsds. A value of 0h indicates Voltage Sensor 4 is not supported. Four whole sensors, iconic. ๐Ÿฆ‹
  • msvmt โ€” Maximum Stop Voltage Measurement Time: the maximum stop measurement time, in minutes, allowed to be specified in the SVMT field for a Set Features command specifying the Voltage Measurement feature. A value of 0h means a maximum stop measurement time is not reported.
  • rsvd424 โ€” Reserved. (Blink and you'll miss it. Actually no, it's reserved, so you literally can't use it. ๐Ÿ˜ญ)
  • sqes โ€” Submission Queue Entry Size, see enum nvme_id_ctrl_sqes.
  • cqes โ€” Completion Queue Entry Size, see enum nvme_id_ctrl_cqes.
  • maxcmd โ€” Maximum Outstanding Commands: the max number of commands the controller processes at one time for a particular queue. Multitasking queen. ๐Ÿ‘‘
  • nn โ€” Number of Namespaces: the maximum value of a valid nsid for the NVM subsystem. If the MNAN (that's the struct nvme_id_ctrl.mnan field) is cleared to 0h, then this field also indicates the maximum number of namespaces supported by the NVM subsystem.
  • oncs โ€” Optional NVM Command Support, see enum nvme_id_ctrl_oncs.
  • fuses โ€” Fused Operation Support, see enum nvme_id_ctrl_fuses.
  • fna โ€” Format NVM Attributes, see enum nvme_id_ctrl_fna.
  • vwc โ€” Volatile Write Cache, see enum nvme_id_ctrl_vwc.
  • awun โ€” Atomic Write Unit Normal: the size of the write operation that's guaranteed to be written atomically to the NVM across all namespaces with any supported namespace format during normal operation. Specified in logical blocks and is a 0's based value. ๐ŸŽ€
  • awupf โ€” Atomic Write Unit Power Fail: same deal, the size of the write operation guaranteed to be written atomically to the NVM across all namespaces with any supported namespace format, but during a power fail or error condition. Also specified in logical blocks and also a 0's based value. โšก
  • icsvscc โ€” NVM Vendor Specific Command Configuration, see enum nvme_id_ctrl_nvscc.
  • nwpc โ€” Namespace Write Protection Capabilities, see enum nvme_id_ctrl_nwpc.
  • acwu โ€” Atomic Compare & Write Unit: the size of the write operation guaranteed to be written atomically to the NVM across all namespaces with any supported namespace format for a Compare and Write fused operation. Specified in logical blocks, and yup, a 0's based value.
  • ocfs โ€” Optional Copy Formats Supported: each bit n means the controller supports Copy Format n. ๐ŸŒˆ
  • sgls โ€” SGL Support, see enum nvme_id_ctrl_sgls.
  • mnan โ€” Maximum Number of Allowed Namespaces: the max number of namespaces supported by the NVM subsystem.
  • maxdna โ€” Maximum Domain Namespace Attachments: the maximum of the sum of the number of namespaces attached to each I/O controller in the Domain. Math-y. ๐Ÿงฎ
  • maxcna โ€” Maximum I/O Controller Namespace Attachments: the maximum number of namespaces allowed to be attached to this I/O controller.
  • oaqd โ€” Optimal Aggregated Queue Depth: the recommended max total number of outstanding I/O commands across all I/O queues on the controller for optimal operation. The "for optimal vibes" number, fr fr. โœจ
  • rhiri โ€” Recommended Host-Initiated Refresh Interval (RHIRI). If the Host-Initiated Refresh capability is supported, this field indicates the recommended time interval in days from last power down to the time at which the host should initiate the Host-Initiated Refresh operation. If this field is cleared to 0h, then this field is not reported.
  • hirt โ€” Host-Initiated Refresh Time (HIRT). If the Host-Initiated Refresh capability is supported, this field indicates the nominal amount of time in minutes that the controller takes to complete the Host-Initiated Refresh operation. Cleared to 0h? Then it's not reported. โฑ๏ธ
  • cmmrtd โ€” Controller Maximum Memory Range Tracking Descriptors: the max number of Memory Range Tracking Descriptors the controller supports.
  • nmmrtd โ€” NVM Subsystem Maximum Memory Range Tracking Descriptors: the max number of Memory Range Tracking Descriptors the NVM subsystem supports.
  • minmrtg โ€” Minimum Memory Range Tracking Granularity: the minimum value supported in the Requested Memory Range Tracking Granularity (RMRTG) field of the Track Memory Ranges data structure.
  • maxmrtg โ€” Maximum Memory Range Tracking Granularity: the maximum value supported in the Requested Memory Range Tracking Granularity (RMRTG) field of the Track Memory Ranges data structure. ๐ŸŽ€
  • trattr โ€” Tracking Attributes: indicates the supported attributes for the Track Send command and the Track Receive command. See enum nvme_id_ctrl_trattr.
  • rsvd577 โ€” Reserved. We love a consistent reserved field. ๐Ÿ’€
  • mcudmq โ€” Maximum Controller User Data Migration Queues: the max number of User Data Migration Queues the controller supports.
  • mnsudmq โ€” Maximum NVM Subsystem User Data Migration Queues: the max number of User Data Migration Queues the NVM subsystem supports. ๐Ÿซถ
  • mcmr โ€” Maximum CDQ Memory Ranges ๐Ÿ’… this is the max number of memory ranges you're allowed to specify in the PRP1 field of a Controller Data Queue command. That's the ceiling, bestie, respect it.
  • nmcmr โ€” NVM Subsystem Maximum CDQ Memory Ranges โœจ the max number of memory ranges across all the Controller Data Queues in the whole NVM subsystem. Subsystem-wide vibes, not just one queue.
  • mcdqpc โ€” Maximum Controller Data Queue PRP Count ๐ŸŽ€ the max number of PRPs you're allowed to put in the PRP list inside the Controller Data Queue command. Count 'em, don't exceed 'em.
  • rsvd588 โ€” Reserved ๐Ÿซถ nothing to see here, she's just holding space (literally).
  • subnqn โ€” NVM Subsystem NVMe Qualified Name, and it's a UTF-8 null terminated string ๐ŸŒธ the subsystem's whole government name, no cap.
  • rsvd1024 โ€” Reserved ๐Ÿ’€ again, reserved. Move along.
  • ioccsz โ€” I/O Queue Command Capsule Supported Size โญ defines the maximum I/O command capsule size, measured in 16 byte units (so do the math, don't forget to multiply).
  • iorcsz โ€” I/O Queue Response Capsule Supported Size ๐Ÿฆ‹ the maximum I/O response capsule size, also in 16 byte units. Matching energy, iconic.
  • icdoff โ€” In Capsule Data Offset ๐ŸŒˆ this one tells you the offset where the data actually starts within a capsule. Important caveat: this value applies to I/O Queues only โ€” she does not work everywhere, iykyk.
  • fcatt โ€” Fabrics Controller Attributes ๐Ÿ‘‘ see enum nvme_id_ctrl_fcatt for the full tea.
  • msdbd โ€” Maximum SGL Data Block Descriptors ๐Ÿ’– the max number of SGL Data Block or Keyed SGL Data Block descriptors a host is allowed to place in a capsule. And a value of 0h indicates no limit โ€” so zero literally means go off, infinite slay.
  • ofcs โ€” Optional Fabric Commands Support ๐ŸŒŸ see enum nvme_id_ctrl_ofcs for what's actually supported.
  • dctype โ€” Discovery Controller Type (DCTYPE) ๐Ÿงš this field indicates what type of Discovery controller the controller is โ€” see enum nvme_id_ctrl_dctype for the full menu.
  • ccrl โ€” Cross-Controller Reset Limit ๐Ÿ’… this field indicates the limit on the number of simultaneous in-progress Cross-Controller Reset operations this controller is able to cause to be initiated that are supported. Yes that's a whole mouthful, but it matters โ€” it's the concurrency cap, periodt.
  • rsvd1808 โ€” Reserved ๐Ÿ™ˆ reserved again, she's just here for the layout.
  • psd โ€” Power State Descriptors โšก see struct nvme_id_psd for the actual descriptor details.
  • vs โ€” Vendor Specific ๐Ÿ”ฅ this part is left up to the vendor, so whatever they put here is their business.

okay bestie that's the whole member list โ€” every field, every reserved gap, every "see this enum" pointer, all accounted for ๐Ÿ’œ go forth and parse responsibly.

And that's a wrap on struct nvme_id_ctrl from the libnvme(9) manual, dated October 2026 โ€” mwah, take care of her ๐Ÿซถโœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from