libnvme(9)
π libnvme(9)
okay bestie, welcome to the libnvme API manual β¨ this one's a little slice of it β the enum nvme_pma page, and yes the whole thing is about Power Measurement Attributes (PMA) fields. it's giving "bit-shifting but make it fashion" π don't worry, it's short, we'll get through it together.
πΈ NAME πΈ
enum nvme_pma β the Power Measurement Attributes (PMA) field π literally the enum where all your PMA bit math lives.
β¨ SYNOPSIS β¨
here's the whole enum, copy it exactly bestie, no typos or it's over for us π
enum nvme_pma {
NVME_PMA_PME_SHIFT ,
NVME_PMA_NCPDF_SHIFT ,
NVME_PMA_EPF_SHIFT ,
NVME_PMA_MIPWRTS_SHIFT ,
NVME_PMA_PHDO_SHIFT ,
NVME_PMA_PMT_SHIFT ,
NVME_PMA_PME_MASK ,
NVME_PMA_NCPDF_MASK ,
NVME_PMA_EPF_MASK ,
NVME_PMA_MIPWRTS_MASK ,
NVME_PMA_PHDO_MASK ,
NVME_PMA_PMT_MASK
};
π¦ Constants π¦
six shifts, six masks, twelve icons in total, and every single one of them is doing its little job π«Ά the shifts move the bits into place, the masks pick them back out. iconic behavior, honestly.
the shift squad (move it, move it) π«
NVME_PMA_PME_SHIFTβ the shift amount that gets you the power measurement enable. yes, the enable one. the main character.NVME_PMA_NCPDF_SHIFTβ the shift amount that gets you the non-contiguous power data flag π©NVME_PMA_EPF_SHIFTβ the shift amount that gets you the estimated power flag. estimated! not confirmed! πNVME_PMA_MIPWRTS_SHIFTβ the shift amount that gets you the maximum interval power timestamp support β±οΈ big timestamp energy.NVME_PMA_PHDO_SHIFTβ the shift amount that gets you the power histogram descriptor overflow. say that five times fast, i dare you πNVME_PMA_PMT_SHIFTβ the shift amount that gets you the power measurement type. the type, bestie, not the measurement itself. know the difference β¨
the mask brigade (pick it back out) π
NVME_PMA_PME_MASKβ the mask that gets you the power measurement enable. same field, opposite direction, we love a symmetrical queen πNVME_PMA_NCPDF_MASKβ the mask that gets you the non-contiguous power data flag π©NVME_PMA_EPF_MASKβ the mask that gets you the estimated power flag πNVME_PMA_MIPWRTS_MASKβ the mask that gets you the maximum interval power timestamp support β±οΈNVME_PMA_PHDO_MASKβ the mask that gets you the power histogram descriptor overflow πNVME_PMA_PMT_MASKβ the mask that gets you the power measurement type π
ngl, every one of these is described exactly the same way as its shift sibling β the shift moves the bits, the mask grabs them. do not mix them up, i'm begging π
okay that's the whole page, no cap π it's giving short and sweet, and you ate it up fr fr. π
and a lil sign-off for the record books: this page is enum nvme_pma out of the libnvme(9) manual, dated October 2026 β the source/version and date are right here in the credits because we always give credit, periodt π«Άβ¨
π¦ 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