libnvme(9)
πΈ libnvme(9) β struct nbft_control πΈ
okay bestie, sit down, hydrate, and get comfy because we're reading an API manual page together and honestly? it's giving β¨ firmware table realness β¨. this is from the API Manual, and the whole page is about struct nbft_control β aka the NBFT Table - Control Descriptor (Figure 9). she's the main character of the NBFT table, no cap π
π NAME π
struct nbft_control β the NBFT Table - Control Descriptor (Figure 9). yes that's literally her full government name π«Ά
β¨ SYNOPSIS β¨
like, here's the whole struct, copied exactly so you can't mess it up π₯
struct nbft_control {
__u8 structure_id;
__u8 major_revision;
__u8 minor_revision;
__u8 reserved1;
__le16 csl;
__u8 flags;
__u8 reserved2;
struct nbft_heap_obj hdesc;
__u8 hsv;
__u8 reserved3;
__le32 hfio;
__le16 hfil;
__u8 hfiv;
__u8 num_hfi;
__le32 ssnso;
__le16 ssnsl;
__u8 ssnsv;
__u8 num_ssns;
__le32 seco;
__le16 secl;
__u8 secv;
__u8 num_sec;
__le32 disco;
__le16 discl;
__u8 discv;
__u8 num_disc;
__u8 reserved4[16];
};
π Members π
every single field, bestie. no skipping, we're not doing that to each other π
structure_idβ Structure ID: this field specifies the element (refer toenum nbft_desc_type). this field shall be set to1h(i.e., Control,#NBFT_DESC_CONTROL). it's the "hi, this is who I am" of the whole descriptor πͺͺmajor_revisionβ Major Revision: the major revision of the structure corresponding to the Signature field. lowkey important: larger major revision numbers should not be assumed backward compatible to lower major revision numbers with the same signature. so don't assume, okay? πminor_revisionβ Minor Revision: the minor revision of the structure corresponding to the signature field. if the major revision numbers are the same, any minor revision number differences shall be backwards compatible with the same signature. so if major matches, minor is safe to vibe with πreserved1β Reserved. nothing to see here, moving on β¨cslβ Control Structure Length (CSL): this field indicates the length in bytes of the Control Descriptor. she knows her own size, iconic πflagsβ Flags, seeenum nbft_control_flags. go check the enum, iykyk π©reserved2β Reserved. another little reserved moment π«Άhdescβ Host Descriptor (HDESC): this field indicates the location and length of the Host Descriptor (seestruct nbft_host). it's a pointer AND a length, multitasking queen πhsvβ Host Descriptor Version (HSV): this field indicates the version of the Host Descriptor. version check, always π¦reserved3β Reserved. reserved erasure πhfioβ HFI Descriptor List Offset (HFIO): if this field is set to a non-zero value, then this field indicates the offset in bytes of the HFI Descriptor List, if any, from byte offset0hof the NBFT Table Header. if thenum_hfifield is cleared to0h, then this field is reserved. okay so non-zero = offset, and no HFIs = reserved, keep that straight bestie π§hfilβ HFI Descriptor Length (HFIL): this field indicates the length in bytes of each HFI Descriptor, if any. if thenum_hfifield is cleared to0h, then this field is reserved. length of each one, note that πhfivβ HFI Descriptor Version (HFIV): this field indicates the version of each HFI Descriptor. versions on versions on versions πnum_hfiβ Number of Host Fabric Interface Descriptors (NumHFI): this field indicates the number of HFI Descriptors (seestruct nbft_hfi) in the HFI Descriptor List, if any. if no interfaces have been configured, then this field shall be cleared to0h. zero means no interfaces, periodt π«ssnsoβ SSNS Descriptor List Offset (SSNSO):: this field indicates the offset in bytes of the SSNS Descriptor List, if any, from byte offset0hof the NBFT Table Header. if thenum_ssnsfield is cleared to0h, then this field is reserved. (yes the original has two colons and we're keeping them, don't @ me) πssnslβ SSNS Descriptor Length (SSNSL): this field indicates the length in bytes of each SSNS Descriptor, if any. if thenum_ssnsfield is cleared to0h, then this field is reserved. same pattern, different field πΈssnsvβ SSNS Descriptor Version (SSNSV): this field indicates the version of the SSNS Descriptor. vibes: versioned πnum_ssnsβ Number of Subsystem and Namespace Descriptors (NumSSNS): this field indicates the number of Subsystem Namespace (SSNS) Descriptors (seestruct nbft_ssns) in the SSNS Descriptor List, if any. count 'em if they're there π’secoβ Security Profile Descriptor List Offset (SECO): this field indicates the offset in bytes of the Security Profile Descriptor List, if any, from byte offset0hof the NBFT Table Header. if thenum_secfield is cleared to0h, then this field is reserved. security girlies stay offset π‘οΈseclβ Security Profile Descriptor Length (SECL): this field indicates the length in bytes of each Security Profile Descriptor, if any. if thenum_secfield is cleared to0h, then this field is reserved. length per descriptor, mhm πsecvβ Security Profile Descriptor Version (SECV): this field indicates the version of the Security Profile Descriptor. version β¨num_secβ Number of Security Profile Descriptors (NumSec): this field indicates the number of Security Profile Descriptors (seestruct nbft_security), if any, in the Security Profile Descriptor List. how many security profiles? this many πdiscoβ Discovery Descriptor Offset (DISCO): this field indicates the offset in bytes of the Discovery Descriptor List, if any, from byte offset0hof the NBFT Table Header. if thenum_discfield is cleared to0h, then this field is reserved. disco by name, discovery by nature πΊdisclβ Discovery Descriptor Length (DISCL): this field indicates the length in bytes of each Discovery Descriptor, if any. if thenum_discfield is cleared to0h, then this field is reserved. length, per descriptor, again πdiscvβ Discovery Descriptor Version (DISCV): this field indicates the version of the Discovery Descriptor. version check #4, we're consistent πnum_discβ Number of Discovery Descriptors (NumDisc): this field indicates the number of Discovery Descriptors (seestruct nbft_discovery), if any, in the Discovery Descriptor List, if any. note the double "if any" β the original said it twice and I'm not editing the queen πreserved4β Reserved. and it'sreserved4[16]in the struct, so sixteen whole bytes of reserved. she's committed to being reserved π«Ά
β οΈ real talk bestie: thosereservedfields and the "ifnum_*is cleared to0h, then this field is reserved" rules are not suggestions. the spec says what it says, and we respect it. also do not assume largermajor_revisionnumbers are backward compatible β that's a hard no π ββοΈ
π¦ cute little sign-off π¦
that's the whole page, bestie! this one's from October 2026, for struct nbft_control, out of the libnvme(9) API Manual. go forth and parse those descriptors correctly, you absolute legend ππβ¨
π¦ 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