libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… 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 support
  • NVME_CMBSZ_LISTS_SHIFT β€” shift amount to get the PLP SGL list support
  • NVME_CMBSZ_RDS_SHIFT β€” shift amount to get the read data support
  • NVME_CMBSZ_WDS_SHIFT β€” shift amount to get the write data support
  • NVME_CMBSZ_SZU_SHIFT β€” shift amount to get the size units
  • NVME_CMBSZ_SZ_SHIFT β€” shift amount to get the size

🌈 the masks

  • NVME_CMBSZ_SQS_MASK β€” mask to get the submission queue support
  • NVME_CMBSZ_CQS_MASK β€” mask to get the completion queue support
  • NVME_CMBSZ_LISTS_MASK β€” mask to get the PLP SGL list support
  • NVME_CMBSZ_RDS_MASK β€” mask to get the read data support
  • NVME_CMBSZ_WDS_MASK β€” mask to get the write data support
  • NVME_CMBSZ_SZU_MASK β€” mask to get the size units
  • NVME_CMBSZ_SZ_MASK β€” mask to get the size

πŸ“ the size units (the SZU era, we love her)

  • NVME_CMBSZ_SZU_4K β€” 4 KiB
  • NVME_CMBSZ_SZU_64K β€” 64 KiB
  • NVME_CMBSZ_SZU_1M β€” 1 MiB
  • NVME_CMBSZ_SZU_16M β€” 16 MiB
  • NVME_CMBSZ_SZU_256M β€” 256 MiB
  • NVME_CMBSZ_SZU_4G β€” 4 GiB
  • NVME_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