libnvme(9)
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. Seeenum 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 (seeenum nvme_registersNVME_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, seeenum nvme_id_ctrl_oaes.ctrattโ Controller Attributes, seeenum 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, seeenum nvme_id_ctrl_bpcap.chsiโ CXL HDM Support Information, seeenum 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), seeenum nvme_id_ctrl_plsi.cntrltypeโ Controller Type, seeenum 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), seeenum 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, seeenum nvme_id_ctrl_nvmsr.vwciโ VPD Write Cycle Information, seeenum nvme_id_ctrl_vwci.mecโ Management Endpoint Capabilities, seeenum nvme_id_ctrl_mec.oacsโ Optional Admin Command Support, the optional Admin commands and features supported by the controller, seeenum 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. Seeenum nvme_id_ctrl_frmw.lpaโ Log Page Attributes, seeenum 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 instruct nvme_id_ctrl.psd. This is a 0โs based value.avsccโ Admin Vendor Specific Command Configuration, seeenum nvme_id_ctrl_avscc.apstaโ Autonomous Power State Transition Attributes, seeenum nvme_id_ctrl_apsta.wctempโ Warning Composite Temperature Threshold indicates the minimum Composite Temperature field value (seestruct 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 (seestruct 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, seeenum nvme_id_ctrl_rpmbs.edsttโ Extended Device Self-test Time, if Device Self-test command is supported (seestruct 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, seeenum 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 of0hindicates no information on granularity is provided. A value ofFFhindicates no restriction.kasโ Keep Alive Support indicates the granularity of the Keep Alive Timer in 100 millisecond units.hctmaโ Host Controlled Thermal Management Attributes, seeenum 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 toNVME_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 toNVME_FEAT_FID_HCTM.sanicapโ Sanitize Capabilities, bestie, seeenum 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, seeenum 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), seeenum 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 of011bin the Commit Action field. ๐ฅrmdcaโ Restore Manufacturing Configuration Attributes, seeenum 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, seestruct nvme_id_ctrl_vsds. A value of0hmeans Voltage Sensor 1 is not supported. โญvsen2โ Voltage Sensor 2, seestruct nvme_id_ctrl_vsds. A value of0hindicates Voltage Sensor 2 is not supported.vsen3โ Voltage Sensor 3, seestruct nvme_id_ctrl_vsds. A value of0hindicates Voltage Sensor 3 is not supported.vsen4โ Voltage Sensor 4, seestruct nvme_id_ctrl_vsds. A value of0hindicates 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 of0hmeans 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, seeenum nvme_id_ctrl_sqes.cqesโ Completion Queue Entry Size, seeenum 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 validnsidfor the NVM subsystem. If the MNAN (that's thestruct nvme_id_ctrl.mnanfield) is cleared to0h, then this field also indicates the maximum number of namespaces supported by the NVM subsystem.oncsโ Optional NVM Command Support, seeenum nvme_id_ctrl_oncs.fusesโ Fused Operation Support, seeenum nvme_id_ctrl_fuses.fnaโ Format NVM Attributes, seeenum nvme_id_ctrl_fna.vwcโ Volatile Write Cache, seeenum 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 a0'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 a0's based value. โกicsvsccโ NVM Vendor Specific Command Configuration, seeenum nvme_id_ctrl_nvscc.nwpcโ Namespace Write Protection Capabilities, seeenum 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, a0's based value.ocfsโ Optional Copy Formats Supported: each bit n means the controller supports Copy Format n. ๐sglsโ SGL Support, seeenum 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 to0h, 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 to0h? 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. Seeenum 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 ๐ seeenum nvme_id_ctrl_fcattfor 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 of0hindicates no limit โ so zero literally means go off, infinite slay.ofcsโ Optional Fabric Commands Support ๐ seeenum nvme_id_ctrl_ofcsfor what's actually supported.dctypeโ Discovery Controller Type (DCTYPE) ๐ง this field indicates what type of Discovery controller the controller is โ seeenum nvme_id_ctrl_dctypefor 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 โก seestruct nvme_id_psdfor 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
- arch rolling: nvme-cli 3.2-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms