libnvme(2)
π¦ NAME π¦
okay so bestie, welcome to libnvme β this is the enum nvme_cmbloc, and it's literally the vibe map for where the controller memory buffer lives. That's it. That's the whole thing. This field indicates the controller memory buffer location π
β¨ SYNOPSIS β¨
here's the iconic lineup, copy-pasted with love so nothing gets lost:
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
};
π Constants π
so here's the tea: you got your SHIFT girlies up top (they slide bits into position) and your MASK girlies down below (they pull the bits back out). two halves of one flawless outfit, fr fr π«Ά
πΈ the SHIFT squad πΈ
NVME_CMBLOC_BIR_SHIFTβ shift amount to get the base indicator register π«NVME_CMBLOC_CQMMS_SHIFTβ shift amount to get the CMB queue mixed memory supportNVME_CMBLOC_CQPDS_SHIFTβ shift amount to get the CMB queue physically discontiguous supportNVME_CMBLOC_CDPLMS_SHIFTβ shift amount to get the CMB data pointer mixed locations supportNVME_CMBLOC_CDPCILS_SHIFTβ shift amount to get the CMB data pointer and command independent locations supportNVME_CMBLOC_CDMMMS_SHIFTβ shift amount to get the CMB data metadata mixed memory supportNVME_CMBLOC_CQDA_SHIFTβ shift amount to get the CMB queue dword alignmentNVME_CMBLOC_OFST_SHIFTβ shift amount to get the offset
π¦ the MASK squad π¦
NVME_CMBLOC_BIR_MASKβ mask to get the base indicator register πNVME_CMBLOC_CQMMS_MASKβ mask to get the CMB queue mixed memory supportNVME_CMBLOC_CQPDS_MASKβ mask to get the CMB queue physically discontiguous supportNVME_CMBLOC_CDPLMS_MASKβ mask to get the CMB data pointer mixed locations supportNVME_CMBLOC_CDPCILS_MASKβ mask to get the CMB data pointer and command independent locations supportNVME_CMBLOC_CDMMMS_MASKβ mask to get the CMB data metadata mixed memory supportNVME_CMBLOC_CQDA_MASKβ mask to get the CMB queue dword alignmentNVME_CMBLOC_OFST_MASKβ mask to get the offset
no cap: every single one of these is either a shift amount or a mask. there's no secret third thing. i checked. π
π sign-off π
this lil cutie lives in the API manual for libnvme, and the page itself is literally named enum nvme_cmbloc (iconic, self-titled, main character energy). it went out into the world dated July 2026, and it reps libnvme β manual section 2. and that's the whole page, bestie. ate and left no crumbs. periodt. π β π§
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms