libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme(9) β€” like, the actual API manual, bestie πŸ’…

okay so this is a page straight out of the API Manual for libnvme, section 9, and it's honestly such a tiny little icon. we're talking about one enum. one. and yet?? it's carrying the whole interval power measurement situation on its back. no cap, let's get into it 🫢


✨ NAME ✨

enum nvme_id_ctrl_ipmsr β€” Interval Power Measurement Sample Rate

that's it. that's the whole name. short, sweet, and lowkey mysterious until you read the next bit 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole struct, verbatim, don't @ me:

enum nvme_id_ctrl_ipmsr {
    NVME_CTRL_IPMSR_SRS_SHIFT ,
    NVME_CTRL_IPMSR_SRV_SHIFT ,
    NVME_CTRL_IPMSR_SRS_MASK

};

wait, no, hold up β€” let me give you the full one, all four constants, exactly as written, no skipping, we don't do that here πŸ’–

enum nvme_id_ctrl_ipmsr {
    NVME_CTRL_IPMSR_SRS_SHIFT ,
    NVME_CTRL_IPMSR_SRV_SHIFT ,
    NVME_CTRL_IPMSR_SRS_MASK ,
    NVME_CTRL_IPMSR_SRV_MASK

};

see? four. living their best lives. ✨


πŸŽ€ Constants πŸŽ€

okay so each of these is a little key that helps you pull one specific number out of the struct nvme_id_ctrl.ipmsr field. that field is the main character, these constants are its entourage. let's meet them πŸ‘‘

  • NVME_CTRL_IPMSR_SRS_SHIFT β€” the shift amount you use to get the Sample Rate Scale out of the struct nvme_id_ctrl.ipmsr field. it's giving "move the bits over, bestie" energy πŸ’«
  • NVME_CTRL_IPMSR_SRV_SHIFT β€” the shift amount you use to get the Sample Rate Value out of the struct nvme_id_ctrl.ipmsr field. same vibe, different number. iconic πŸ”₯
  • NVME_CTRL_IPMSR_SRS_MASK β€” the mask you use to get the Sample Rate Scale out of the struct nvme_id_ctrl.ipmsr field. put it on, filter out the noise, slay πŸ’…
  • NVME_CTRL_IPMSR_SRV_MASK β€” the mask you use to get the Sample Rate Value out of the struct nvme_id_ctrl.ipmsr field. mask on, value out. periodt 🧚
real talk though: shift for the sliding, mask for the grabbing. two different jobs, both obsessed with the same ipmsr field. don't mix 'em up πŸ™ˆ

and that's the whole page!! tiny but mighty, fr fr. this little enum came to you from the API Manual, libnvme(9), dated October 2026 β€” so like, remember it fondly, and remember that enum nvme_id_ctrl_ipmsr was out here doing interval power measurement sample rate things while the rest of us were just vibing. mwah πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from