libnvme(2)
πΈ libnvme(2) β API Manual πΈ
okay so bestie, welcome to the libnvme show π this is the API manual, and today we're unpacking struct nbft_ssns β the iconic, lowkey-loaded star of the whole page. grab a strawberry drink π and let's get into it, because this struct ate and left no crumbs.
β¨ NAME β¨
struct nbft_ssns β Subsystem Namespace (SSNS) Descriptor (Figure 15) π
π¦ SYNOPSIS π¦
struct nbft_ssns {
__u8 structure_id;
__le16 index;
__le16 flags;
__u8 trtype;
__le16 trflags;
__u8 primary_discovery_ctrl_index;
__u8 reserved1;
struct nbft_heap_obj subsys_traddr_obj;
struct nbft_heap_obj subsys_trsvcid_obj;
__le16 subsys_port_id;
__le32 nsid;
__u8 nidt;
__u8 nid[16];
__u8 security_desc_index;
__u8 primary_hfi_desc_index;
__u8 reserved2;
struct nbft_heap_obj secondary_hfi_assoc_obj;
struct nbft_heap_obj subsys_ns_nqn_obj;
struct nbft_heap_obj ssns_extended_info_desc_obj;
__u8 reserved3[62];
};
that's the whole cast list, no cap π now let's meet every single one of them because they ALL matter.
π Members π
structure_idβ Structure ID: this field shall be set to4h(i.e., SSNS;#NBFT_DESC_SSNS). it's giving "this is who I am" β¨indexβ SSNS Descriptor Index: this field tells you the number of this Subsystem Namespace Descriptor inside the Subsystem Namespace Descriptor List. like its seat number at the function πflagsβ SSNS Flags, seeenum nbft_ssns_flags.trtypeβ Transport Type, seeenum nbft_trtype.trflagsβ Transport Specific Flags, seeenum nbft_ssns_trflags.primary_discovery_ctrl_indexβ Primary Discovery Controller Index: this is the Discovery Descriptor Index field of the Discovery Descriptor (seestruct nbft_discovery) that's associated with this SSNS Descriptor. so like: if a Discovery controller was used to establish this record, this value shall be set to a non-zero value. if this namespace was associated with multiple Discovery controllers, those Discovery controllers shall have records in the Discovery Descriptor so that multi-path rediscovery can happen as required. and if no Discovery controller was utilized to inform this namespace record, this field shall be cleared to0h. simple as that bestie π«Άreserved1β Reserved. don't touch, she's resting π΄subsys_traddr_objβ Subsystem Transport Address Heap Object Reference: this field shows the location and size of a heap object containing the Subsystem Transport Address. for IP based transports types, it shall be an IP Address. πsubsys_trsvcid_objβ Subsystem Transport Service Identifier Heap Object Reference: this field shows the location and size of a heap object containing an array of bytes indicating the Subsystem Transport Service Identifier. seeenum nbft_trtype.subsys_port_idβ Subsystem Port ID: the port in the NVM subsystem associated with this transport address, used by the pre-OS driver. main character energy honestly π₯nsidβ Namespace ID: this field is the namespace identifier (NSID) of the namespace indicated by this descriptor. this field shall be cleared to0hif not specified by the user. and if this value is cleared to0h, then consumers of the NBFT shall rely on the NID. important!! πnidtβ Namespace Identifier Type (NIDT): this field carries the value of the Namespace Identifier Type (NIDT) field in the Namespace Identification Descriptor for the namespace indicated by this descriptor. if a namespace supports multiple NIDT entries for uniqueness, the order of preference is NIDT field value of3h(i.e., UUID) before2h(i.e., NSGUID), and2hbefore1h(i.e., EUI-64). ranking slay πnidβ Namespace Identifier (NID): this field carries the value of the Namespace Identifier (NID) field in the Namespace Identification Descriptor for the namespace indicated by this descriptor.security_desc_indexβ Security Profile Descriptor Index: if the Use Security Flag bit in the SSNS Flags field is set to1h, then this field indicates the value of the Security Profile Descriptor Index field of the Security Profile Descriptor (seestruct nbft_security) associated with this namespace. if the Use Security Flag bit is cleared to0h, then no Security Profile Descriptor is associated with this namespace and this field is reserved. πprimary_hfi_desc_indexβ Primary HFI Descriptor Index: this field indicates the value of the HFI Descriptor Index field of the HFI Descriptor (seestruct nbft_hfi) for the interface associated with this namespace. if multiple HFIs are associated with this record, subsequent interfaces should be populated in the Secondary HFI Associations field. the more the merrier fr fr π§reserved2β Reserved. also napping π΄secondary_hfi_assoc_objβ Secondary HFI Associations Heap Object Reference: if this field is set to a non-zero value, then this field indicates an array of bytes, in which each byte contains the value of the HFI Descriptor Index field of an HFI Descriptor in the HFI Descriptor List. if this field is cleared to0h, then no secondary HFI associations are specified.subsys_ns_nqn_objβ Subsystem and Namespace NQN Heap Object Reference: this field indicates the location and size of a heap object containing the Subsystem and Namespace NQN. πssns_extended_info_desc_objβ SSNS Extended Information Descriptor Heap Object Reference: if the SSNS Extended Info In-use Flag bit is set to1h, then this field indicates the offset in bytes of a heap object containing an SSNS Extended Information Descriptor (seestruct nbft_ssns_ext_info) heap object from byte offset0hof the NBFT Table Header. if the SSNS Extended Info In-use Flag bit is cleared to0h, then this field is reserved. β¨reserved3β Reserved. beauty sleep, don't disturb π
lowkey reminder bestie: every reserved field up there? not yours to fill. leave them exactly as they are β periodt π
and that's the whole page, you understood it, you ate, no crumbs left ππ¦
that's a wrap on the struct nbft_ssns page from the libnvme(2) API Manual, dated July 2026 π go forth and read your descriptors, bestie β you've got this πβ¨
π¦ 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