libnvme(9)
π libnvme β section 9, bestie β¨
Okay so real quick, this page lives in the libnvme(9) manual β section 9, the big-brain kernel/API shelf β and it's all about one very specific little enum. Buckle up π
πΈ NAME πΈ
enum nvme_cmbloc β literally the field that tells you the controller memory buffer location, and no I'm not kidding, that's the whole vibe. It's giving "where in memory does the CMB live" energy π
β¨ SYNOPSIS β¨
Here's the whole enum, in all its glory, copied exactly because I would never do you dirty like that:
enum nvme_cmbloc {
NVME_CMBLOC_BIR_SHIFT ,
NVME_CMBLOC_CQMMS_SHIFT ,
NVME_CMBLOC_CQPDS_SHIFT ,
NVME_CMBLOC_CDPLMS_SHIFT ,
NVME_CMBLOC_CDPCILS_SHIFT ,
NVME_CMBLOC_CDMMMS_SHIFT ,
NVME_CMBLOC_CQDA_SHIFT ,
NVME_CMBLOC_OFST_SHIFT ,
NVME_CMBLOC_BIR_MASK ,
NVME_CMBLOC_CQMMS_MASK ,
NVME_CMBLOC_CQPDS_MASK ,
NVME_CMBLOC_CDPLMS_MASK ,
NVME_CMBLOC_CDPCILS_MASK ,
NVME_CMBLOC_CDMMMS_MASK ,
NVME_CMBLOC_CQDA_MASK ,
NVME_CMBLOC_OFST_MASK
};
Like, look at her. Eight shifts, eight masks, perfectly balanced π₯
π¦ Constants π¦
Bestie, here's the thing: every field has a SHIFT (how far to move the bits, iykyk) and a MASK (how to scoop the bits back out). Two halves of one iconic whole π
π The SHIFT girlies π
NVME_CMBLOC_BIR_SHIFTβ the shift amount you use to get the base indicator register πNVME_CMBLOC_CQMMS_SHIFTβ shift amount to get the CMB queue mixed memory support flag β¨NVME_CMBLOC_CQPDS_SHIFTβ shift amount to get the CMB queue physically discontiguous support flag, say that five times fast πNVME_CMBLOC_CDPLMS_SHIFTβ shift amount to get the CMB data pointer mixed locations support flag π«ΆNVME_CMBLOC_CDPCILS_SHIFTβ shift amount to get the CMB data pointer and command independent locations support flag, absolute mouthful, but slay πNVME_CMBLOC_CDMMMS_SHIFTβ shift amount to get the CMB data metadata mixed memory support flag πΈNVME_CMBLOC_CQDA_SHIFTβ shift amount to get the CMB queue dword alignment βNVME_CMBLOC_OFST_SHIFTβ shift amount to get the offset π
π The MASK icons π
NVME_CMBLOC_BIR_MASKβ mask to get the base indicator register πNVME_CMBLOC_CQMMS_MASKβ mask to get the CMB queue mixed memory support β¨NVME_CMBLOC_CQPDS_MASKβ mask to get the CMB queue physically discontiguous support πNVME_CMBLOC_CDPLMS_MASKβ mask to get the CMB data pointer mixed locations support π«ΆNVME_CMBLOC_CDPCILS_MASKβ mask to get the CMB data pointer and command independent locations support π¦NVME_CMBLOC_CDMMMS_MASKβ mask to get the CMB data metadata mixed memory support πΈNVME_CMBLOC_CQDA_MASKβ mask to get the CMB queue dword alignment βNVME_CMBLOC_OFST_MASKβ mask to get the offset π
Not me hyping up bit manipulation at 2am β but honestly? Shift first, mask second, and you'll never fumble the field extraction. That's the whole trick, no cap π
Sign-off time, because every icon needs her credits: this page is enum nvme_cmbloc, dated October 2026, and it's part of libnvme(9). 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