libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ¦‹ libnvme(9) β€” the API Manual, bestie edition πŸ¦‹

Okay so this page lives in the libnvme manual, section 9, and it's all about one very specific little struct. Grab a snack, we're doing a field-by-field tour πŸ’…


✨ NAME ✨

struct nvmf_dim_data β€” Discovery Information Management (DIM) β€” Data. That's the whole vibe: it's the data blob for DIM. Iconic, honestly.


🌸 SYNOPSIS 🌸

Here's the shape of it, exactly as the header gods wrote it:

struct nvmf_dim_data {
    __le32 tdl;
    __u8 rsvd4[4];
    __le64 nument;
    __le16 entfmt;
    __le16 etype;
    __u8 portlcl;
    __u8 rsvd21;
    __le16 ektype;
    char eid[NVME_NQN_LENGTH];
    char ename[NVMF_ENAME_LEN];
    char ever[NVMF_EVER_LEN];
    __u8 rsvd600[424];
    union nvmf_die  die[];
};

Look at that trailing flexible array member at the end, she's literally built to grow 🧚✨


πŸ‘‘ Members πŸ‘‘

Time for the meet-and-greet, one field at a time. No skipping, we don't do that here 🫢

  • tdl β€” Total Data Length. The overall length of the data, in case you were wondering how much data the data is πŸ“
  • rsvd4 β€” Reserved. Nothing to see, move along, it's just vibing there taking up space πŸ’€
  • nument β€” Number of entries. How many die entries you're working with β€” remember this number, bestie, you'll need it later 🌈
  • entfmt β€” Entry Format, and it's an enum nvmf_dim_entfmt. Fancy typed enum energy ✨
  • etype β€” Entity Type, typed as enum nvmf_dim_etype. Yes there's two of these, no they're not the same thing, don't mix them up πŸ™ˆ
  • portlcl β€” Port Local. That's the field name, that's the whole description, we simply report the facts πŸ’œ
  • rsvd21 β€” Reserved. Another reserved one. Reserved fields are having a whole moment on this struct, honestly πŸ’…
  • ektype β€” Entry Key Type. The type of the entry key, lowkey self-explanatory πŸ”₯
  • eid β€” Entity Identifier, e.g. Host NQN. It's a char array of NVME_NQN_LENGTH, and it holds stuff like your Host NQN ⭐
  • ename β€” Entity Name, e.g. hostname. A char array sized NVMF_ENAME_LEN πŸŽ€
  • ever β€” Entity Version, e.g. OS Name/Version. A char array sized NVMF_EVER_LEN β€” yes, ever, not env, we're being careful here 😭
  • rsvd600 β€” Reserved. A whole __u8 rsvd600[424], which is a lot of reserved. 424 bytes of pure "please ignore me" energy πŸ¦‹
  • die β€” Discovery Information Entry (see nument above πŸ‘€). It's a union nvmf_die flexible array, so there are as many of these as nument says β€” that's the callback to the earlier field, iykyk πŸ’–
Bestie note: those rsvd* fields are reserved β€” the manual just says "Reserved" and that's genuinely all the info there is. Don't go inventing meaning for them, that's not the move 🧚

🌟 cute sign-off 🌟

That's the whole page, and it's from October 2026, all about struct nvmf_dim_data, living in libnvme(9). Slay, go forth and parse your discovery data correctly, bestie πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from