libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme(9) β€” API Manual, but make it make sense

Okay bestie, so this is a page from the libnvme(9) API Manual, and it's all about one very specific little struct. No cap, it's niche, but it's iconic niche. Let's get into it 🫢


✨ NAME ✨

struct nvme_rate_limiting_controller_descriptor β€” the Rate Limiting Controller Descriptor (QCD). That's its full government name, and yes, it goes by QCD. iykyk πŸ’…


🌸 SYNOPSIS 🌸

Here's the whole vibe, laid out in C, exactly as written:

struct nvme_rate_limiting_controller_descriptor {
    __le16 cntlid;
    __le16 nnsmad;
    __u8 rsvd4[4];
    struct nvme_rate_limiting_max_access_descriptor rlma;
    __u8 rsvd40[24];
    __u8 vs[256];
    __le32 nvsma_offset[];
};

Not me being obsessed with a struct that has two reserved blocks and a flexible array member at the end. main character energy fr fr πŸ”₯


πŸŽ€ Members πŸŽ€

Let's meet the cast, one field at a time. Every single one of them, because we don't skip anyone in this group chat πŸ¦‹

  • cntlid β€” the Controller Identifier. It's giving "who am I" but for a controller πŸ’–
  • nnsmad β€” the Number of Non-Volatile Storage Medium Access Descriptors in nvsma_offset, and it's non-zero. Like, literally cannot be zero, bestie. That's the rule. ⭐
  • rsvd4 β€” Reserved. Nothing to see here, moving on πŸ™ˆ
  • rlma β€” the Rate Limiting Maximum Access of the controller to the NVM subsystem port. Whole lotta words, but it's the rate limiting bit and it's kind of the moment πŸ‘‘
  • rsvd40 β€” Reserved. Again. We love a filler arc πŸ’€
  • vs β€” Vendor Specific. This one's not for us, it's for the vendor's own lore 🌈
  • nvsma_offset β€” Dword offsets, relative to the start of the Rate Limiting log page, pointing at the Non-Volatile Storage Medium Access Descriptors β€” and there are nnsmad entries of them. So it's a whole little directory of offsets, and the count lives up in nnsmad ✨
Lowkey important: those are Dword offsets, and they're measured relative to the start of the Rate Limiting log page β€” not relative to the struct. Don't do the wrong math, I'm begging 😭

That's the whole page, bestie β€” every field accounted for, nothing skipped, nothing invented. Slay. Periodt. πŸ§šπŸ’œ

This little gem landed in the October 2026 edition of the libnvme(9) API Manual β€” written by libnvme(9) (yes, same energy as naming your cat after yourself), and signed off at the bottom of the page just like this. Ciao, ily, go read your log pages responsibly πŸ“

πŸ“¦ where this page comes from