libnvme(2)

✨ libnvme ✨ β€” the API Manual, bestie edition πŸ’…

okay so we're deep in the libnvme(2) girlies today and the topic is struct nvmf_ext_die, aka the Extended Discovery Information Entry, aka the DIE. it's giving structure. it's giving bytes. it's giving "please don't touch the reserved fields." let's go 🫢


🌸 NAME 🌸

struct nvmf_ext_die β€” Extended Discovery Information Entry (DIE) πŸ’–


✨ SYNOPSIS ✨

struct nvmf_ext_die {
    __u8 trtype;
    __u8 adrfam;
    __u8 subtype;
    __u8 treq;
    __le16 portid;
    __le16 cntlid;
    __le16 asqsz;
    __u8 rsvd10[22];
    char trsvcid[NVMF_TRSVCID_SIZE];
    __u8 resv64[192];
    char nqn[NVME_NQN_LENGTH];
    char traddr[NVMF_TRADDR_SIZE];
    union nvmf_tsas         tsas;
    __le32 tel;
    __le16 numexat;
    __u8 resv1030[2];
    struct nvmf_ext_attr    exat[];
};

no cap, that's the whole layout. read it top to bottom like a group chat, everything matters 😌


πŸŽ€ Members πŸŽ€

every single field, in order, no skipping, we do NOT skip bestie:

  • trtype β€” Transport Type, and yes it's an enum nvmf_trtype ✨
  • adrfam β€” Address Family, typed as enum nvmf_addr_family 🌈
  • subtype β€” Subsystem Type, which is an enum nvme_subsys_type πŸ‘‘
  • treq β€” Transport Requirements, an enum nvmf_treq πŸ’œ
  • portid β€” Port ID πŸ“
  • cntlid β€” Controller ID πŸ’«
  • asqsz β€” Admin Max SQ Size πŸ”₯
  • rsvd10 β€” Reserved. hands off, it's not yours πŸ™ˆ
  • trsvcid β€” Transport Service Identifier πŸŽ€
  • resv64 β€” Reserved. also not yours. respect the reserved. πŸ’…
  • nqn β€” NVM Qualified Name ⭐
  • traddr β€” Transport Address πŸ¦‹
  • tsas β€” Transport Specific Address Subtype, and it's a union nvmf_tsas 🧚
  • tel β€” Total Entry Length 🌸
  • numexat β€” Number of Extended Attributes πŸ‘‘
  • resv1030 β€” Reserved. third reserved field, third time asking, please leave it alone 😭
  • exat β€” Extended Attributes 0, typed as struct nvmf_ext_attr, and yeah it's the flexible array member at the end, main character energy fr fr πŸ”₯
bestie heads up: the fields marked Reserved are Reserved. that means you do not write to them. you do not read meaning out of them. you simply admire them from a respectful distance. periodt πŸ’–

that's the whole DIE, decoded and slayed. struct girlies stay winning 🌈

okay bye ily, this was struct nvmf_ext_die from the libnvme(2) API Manual, dated July 2026 β€” mwah, go format some discovery entries responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from