libnvme(9)
π libnvme(9) π
okay so bestie, welcome to the libnvme(9) corner of the API manual β yes, the manual name is literally libnvme(9), it's giving iconic, it's giving "I live here now" β¨
πΈ NAME πΈ
enum nvme_cmbsz β this field indicates the controller memory buffer size π
like. the whole enum is about one field. one. and it's the controller memory buffer size. main character field energy fr fr.
π¦ SYNOPSIS π¦
enum nvme_cmbsz {
NVME_CMBSZ_SQS_SHIFT ,
NVME_CMBSZ_CQS_SHIFT ,
NVME_CMBSZ_LISTS_SHIFT ,
NVME_CMBSZ_RDS_SHIFT ,
NVME_CMBSZ_WDS_SHIFT ,
NVME_CMBSZ_SZU_SHIFT ,
NVME_CMBSZ_SZ_SHIFT ,
NVME_CMBSZ_SQS_MASK ,
NVME_CMBSZ_CQS_MASK ,
NVME_CMBSZ_LISTS_MASK ,
NVME_CMBSZ_RDS_MASK ,
NVME_CMBSZ_WDS_MASK ,
NVME_CMBSZ_SZU_MASK ,
NVME_CMBSZ_SZ_MASK ,
NVME_CMBSZ_SZU_4K ,
NVME_CMBSZ_SZU_64K ,
NVME_CMBSZ_SZU_1M ,
NVME_CMBSZ_SZU_16M ,
NVME_CMBSZ_SZU_256M ,
NVME_CMBSZ_SZU_4G ,
NVME_CMBSZ_SZU_64G
};
copy it exactly, don't be out here renaming things, I'm watching π
π Constants π
bestie we have THREE whole flavours of constant here and I need you to know each one. shifts, masks, and the size-unit values. periodt.
π§ the shift amounts
NVME_CMBSZ_SQS_SHIFTβ shift amount to get the submission queue support. yes queen, just a shift amount πNVME_CMBSZ_CQS_SHIFTβ shift amount to get the completion queue supportNVME_CMBSZ_LISTS_SHIFTβ shift amount to get the PLP SGL list supportNVME_CMBSZ_RDS_SHIFTβ shift amount to get the read data supportNVME_CMBSZ_WDS_SHIFTβ shift amount to get the write data supportNVME_CMBSZ_SZU_SHIFTβ shift amount to get the size unitsNVME_CMBSZ_SZ_SHIFTβ shift amount to get the size
π the masks
NVME_CMBSZ_SQS_MASKβ mask to get the submission queue supportNVME_CMBSZ_CQS_MASKβ mask to get the completion queue supportNVME_CMBSZ_LISTS_MASKβ mask to get the PLP SGL list supportNVME_CMBSZ_RDS_MASKβ mask to get the read data supportNVME_CMBSZ_WDS_MASKβ mask to get the write data supportNVME_CMBSZ_SZU_MASKβ mask to get the size unitsNVME_CMBSZ_SZ_MASKβ mask to get the size
π the size units (the SZU era, we love her)
NVME_CMBSZ_SZU_4Kβ4 KiBNVME_CMBSZ_SZU_64Kβ64 KiBNVME_CMBSZ_SZU_1Mβ1 MiBNVME_CMBSZ_SZU_16Mβ16 MiBNVME_CMBSZ_SZU_256Mβ256 MiBNVME_CMBSZ_SZU_4Gβ4 GiBNVME_CMBSZ_SZU_64Gβ64 GiB
lowkey a vibe check: these are the constants exactly as documented. no extra lore, no invented behaviour, I would never π
okay that's the whole page, you ate that π«Ά the source/version line is enum nvme_cmbsz from libnvme(9), and the date stamp says October 2026 β so go forth, shift those bits, mask those fields, and remember: 64 GiB of controller memory buffer is not a phase, it's a lifestyle πβ¨π
π¦ 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