libnvme(9)

πŸ“¦ version 3.2, in arch rolling

🌸 NAME 🌸

okay bestie, welcome to the libnvme girlies' corner of section 9 πŸ’… β€” today we're talking about struct libnvme_uring_cmd, which is, and I quote, the nvme uring command structure. that's it. that's the whole name. she's a struct, she lives in libnvme, she handles uring commands. iconic behavior honestly πŸŽ€


✨ SYNOPSIS ✨

here's her whole lewk, no notes, exactly as she is πŸ‘‘

struct libnvme_uring_cmd {
    __u8 opcode;
    __u8 flags;
    __u16 rsvd1;
    __u32 nsid;
    __u32 cdw2;
    __u32 cdw3;
    __u64 metadata;
    __u64 addr;
    __u32 metadata_len;
    __u32 data_len;
    __u32 cdw10;
    __u32 cdw11;
    __u32 cdw12;
    __u32 cdw13;
    __u32 cdw14;
    __u32 cdw15;
    __u32 timeout_ms;
    __u32 rsvd2;
 };

like, she's got layers and she's got range πŸ¦‹


🫢 Members 🫢

lowkey the real main characters are the fields. let's do a vibe check on every single one of them, fr fr 🌈

  • opcode β€” the Operation code ✨ see enum libnvme_io_opcodes and enum libnvme_admin_opcodes if you wanna know your options. she's the "what are we even doing here" field.
  • flags β€” not supported!! 😭 it's intended for command flags (eg: SGL, FUSE) but like... it's not doing that rn. don't @ her.
  • rsvd1 β€” Reserved for future use πŸ’€ the placeholder bestie keeping a seat warm.
  • nsid β€” Namespace Identifier, or Fabrics type 🌸 dual-purpose queen. she contains multitudes.
  • cdw2 β€” Command Dword 2 πŸ’… (no spec defined use β€” she's just there for the vibes, ngl)
  • cdw3 β€” Command Dword 3 πŸŽ€ (also no spec defined use. matching set with cdw2, we love a duo)
  • metadata β€” User space address to metadata buffer (NULL if not used) 🧚 if you're not using her, she's NULL, and that's valid.
  • addr β€” User space address to data buffer (NULL if not used) πŸ“ same energy as her sister above. no buffer? NULL. simple as.
  • metadata_len β€” Metadata buffer transfer length πŸ“ how much metadata we're transferring, bestie.
  • data_len β€” Data buffer transfer length πŸ“¦ how much data we're transferring. keep up.
  • cdw10 β€” Command Dword 10 πŸ”₯ (command specific β€” so like, it depends, iykyk)
  • cdw11 β€” Command Dword 11 πŸ”₯ (command specific, again. they're a set, periodt)
  • cdw12 β€” Command Dword 12 πŸ”₯ (command specific. yes we're still going)
  • cdw13 β€” Command Dword 13 πŸ”₯ (command specific. half way through the dword parade πŸŽ‰)
  • cdw14 β€” Command Dword 14 πŸ”₯ (command specific. almost there girlies)
  • cdw15 β€” Command Dword 15 πŸ”₯ (command specific. last of the dword girlies, we made it 😭)
  • timeout_ms β€” if it's non-zero, it overrides the system default timeout, in milliseconds ⏱️ so like, she's the "actually, we're doing it on my schedule" field. main character energy fr.
  • rsvd2 β€” Reserved for future use (and fills an implicit struct pad πŸ’€ yes the sentence ends like that, i'm just the messenger bestie. she's reserved AND she's structural. a multi-hyphenate πŸ‘‘)
quick note diva: flags is genuinely not supported, so don't go planning your SGL/FUSE era around it, okay? it's giving "coming soon" and we respect the waitlist πŸ™ˆ

and that's the whole struct, bestie!! go forth and command your uring devices responsibly πŸ’–βœ¨

oh and before i forget β€” this little love letter is from struct libnvme_uring_cmd, libnvme(9), dated October 2026 πŸ—“οΈπŸ’œ mwah, see u in the group chat πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from