libnvme(9)
π 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 thestruct nvme_id_ctrl.ipmsrfield. 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 thestruct nvme_id_ctrl.ipmsrfield. same vibe, different number. iconic π₯NVME_CTRL_IPMSR_SRS_MASKβ the mask you use to get the Sample Rate Scale out of thestruct nvme_id_ctrl.ipmsrfield. 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 thestruct nvme_id_ctrl.ipmsrfield. 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
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms