libnvme(2)

πŸ’– libnvme(2) β€” API Manual πŸ’–

okay so bestie, welcome to the libnvme manual, section 2 (that's the API/system-calls girlies ✨). today's main character is a little struct called struct nbft_info_subsystem_ns, and she's literally the blueprint for Subsystem Namespace (SSNS) info. no cap, she's kind of a big deal πŸŽ€


🌸 NAME 🌸

struct nbft_info_subsystem_ns β€” Subsystem Namespace (SSNS) info πŸ’…


✨ SYNOPSIS ✨

here's the whole fit, every field, verbatim, because we do not gatekeep 🫢

struct nbft_info_subsystem_ns {
    int index;
    struct nbft_info_discovery *discovery;
    struct nbft_info_security *security;
    int num_hfis;
    struct nbft_info_hfi **hfis;
    char transport[8];
    char traddr[40];
    char *trsvcid;
    __u16 subsys_port_id;
    __u32 nsid;
    enum nbft_info_nid_type nid_type;
    __u8 *nid;
    char *subsys_nqn;
    bool pdu_header_digest_required;
    bool data_digest_required;
    int controller_id;
    int asqsz;
    char *dhcp_root_path_string;
    bool discovered;
    bool unavailable;
 };

πŸ‘‘ Members πŸ‘‘

field by field, no skipping, we're thorough in this house πŸ’–

  • index β€” the SSNS Descriptor Index in the descriptor list. basically her seat number at the table πŸ“‹
  • discovery β€” the Primary Discovery Controller that's associated with this SSNS Descriptor. her bestie, her plus-one πŸ’«
  • security β€” the Security Profile Descriptor associated with this namespace. the bodyguard situation πŸ›‘οΈ
  • num_hfis β€” Number of HFIs. just the count, periodt πŸ”’
  • hfis β€” the List of HFIs associated with this namespace. it includes the primary HFI at the first position and all the secondary HFIs. and bestie, listen: this array is null-terminated, so don't go wandering past the end, she'll let you know when she's done πŸ’€
  • transport β€” the Transport Type string (like tcp, for example). think of it as her vibe/flavor of transport 🌈
  • traddr β€” Subsystem Transport Address. where she lives πŸ“
  • trsvcid β€” Subsystem Transport Service Identifier. the "which door" of it all πŸšͺ
  • subsys_port_id β€” The Subsystem Port ID. lowkey just the port's whole identity ✨
  • nsid β€” The Namespace ID of this descriptor, or when nid should be used instead. she's conditional, she contains multitudes πŸ¦‹
  • nid_type β€” the Namespace Identifier Type, see enum nbft_info_nid_type if you wanna know more πŸ‘€
  • nid β€” The Namespace Identifier value itself πŸ’…
  • subsys_nqn β€” Subsystem and Namespace NQN. her government name, fr fr πŸ“›
  • pdu_header_digest_required β€” PDU Header Digest (HDGST) Flag: the use of NVM Header Digest Enabled is required. so like, required-required, no skipping 🚨
  • data_digest_required β€” Data Digest (DDGST) Flag: the use of NVM Data Digest Enabled is required. same energy, also mandatory πŸ”₯
  • controller_id β€” Controller ID (SSNS Extended Information Descriptor): the controller ID associated with the Admin Queue, or 0 if not supported. zero means "girl, not supported" πŸ™ˆ
  • asqsz β€” Admin Submission Queue Size (SSNS Extended Information Descriptor), or 0 if not supported. same deal, 0 = no support 🫠
  • dhcp_root_path_string β€” DHCP Root Path Override string (SSNS Extended Information Descriptor). she's the override, she's the exception, she's THAT girl πŸ’œ
  • discovered β€” Indicates that this namespace was acquired through discovery. so she was found, not assigned πŸ”
  • unavailable β€” Namespace is unavailable as indicated by the pre-OS driver. she's on do-not-disturb, pls respect it 😭

ngl none of this is dangerous, it's all just descriptor info. the only real trap is that hfis array being null-terminated β€” respect the terminator or you'll be reading garbage memory and that's giving undefined behaviour πŸ’€

that's the whole page bestie, you ate it πŸ“πŸ§š go forth and query your SSNS with confidence ✨

kisses, this was struct nbft_info_subsystem_ns from the libnvme(2) API Manual β€” July 2026 edition. mwah πŸ’‹

πŸ“¦ where this page comes from