libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸŽ€ libnvme(9) πŸŽ€

okay so bestie, welcome to the API Manual for libnvme β€” and today's main character is a struct that's literally the blueprint for the Rate Limiting log page. yes, that log page. sit down, hydrate, let's go πŸ’…


✨ NAME ✨

struct nvme_rate_limiting_log β€” the Rate Limiting log page (Log Page Identifier 28h) πŸ¦‹

like, it's a struct, it's about rate limiting, it's log page 28h, that's the vibe check and it passed.


🌸 SYNOPSIS 🌸

struct nvme_rate_limiting_log {
    __u8 rsvd0[2];
    __le16 np;
    __le32 lpl;
    __le32 gc;
    __le16 nst;
    __u8 rsvd14[2];
    __le32 port_offset[];
};

no cap, that's the whole shape of it. look at her. iconic. πŸ‘‘


πŸ’– Members πŸ’–

so these are the fields, and every single one of them matters, don't skip, i'm serious πŸ™ˆ

  • rsvd0 β€” Reserved. that's it. that's the whole field. she's just sitting there being reserved, we respect her privacy πŸ’€
  • np β€” Number of Ports in port_offset, and it's 0's based (so like, off-by-one is the whole personality, keep that in mind fr fr)
  • lpl β€” Log Page Length, in dwords, of this log page. dwords, bestie, not bytes, not words β€” dwords πŸ“
  • gc β€” Generation Count, and the way it increments each time the information in this log page changes since the last time the host read it? highkey important. it's literally the "hey something moved" counter ✨
  • nst β€” Number of Supported Targets, also 0's based (again with the 0's based, love that for us 🫢)
  • rsvd14 β€” Reserved. second reserved field, also minding her own business 🌸
  • port_offset β€” Dword offsets, relative to the start of this log page, pointing to the Rate Limiting Port Descriptors, and there are np + 1 entries (yes, np + 1, because np is 0's based, told you it mattered 😭). okay and then the rest is kind of a whole lore drop: the Rate Limiting Data (which is referenced by these offsets and nested offsets), the Supported Target list, and the trailing padding all follow this array β€” and you locate all of it using lpl, np, and nst. three fields, one treasure map πŸ—ΊοΈπŸ’œ
lowkey a warning-ish heads up: those offsets are dword offsets relative to the start of this log page, and everything after the array is found via lpl, np, and nst β€” so don't go treating these as byte offsets or just vibing your way through the layout, bestie, do the math πŸ’…

🌈 a lil sign-off 🌈

and that's the page! she's from the API Manual, her name is struct nvme_rate_limiting_log, and she was dated October 2026 β€” so like, mark your calendar, drink some water, and go read that log page correctly. mwah πŸ’–πŸŽ€πŸ¦‹β­πŸ”₯

periodt. 🧚

πŸ“¦ where this page comes from