libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… 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