libnvme(2)

πŸ’– enum nvme_cc β€” the controller configuration πŸ’–

okay bestie, welcome to the libnvme manual, page libnvme(2). sit down, grab a strawberry πŸ“, because today we're talking about enum nvme_cc, aka the controller configuration. this thing is literally the field that says how your controller is set up. it's giving "settings panel but make it an enum". πŸ’…


✨ NAME ✨

enum nvme_cc β€” this field indicates the controller configuration.

no cap, that's the whole vibe. 🫢


🌈 SYNOPSIS 🌈

enum nvme_cc {
    NVME_CC_EN_SHIFT ,
    NVME_CC_CSS_SHIFT ,
    NVME_CC_MPS_SHIFT ,
    NVME_CC_AMS_SHIFT ,
    NVME_CC_SHN_SHIFT ,
    NVME_CC_IOSQES_SHIFT ,
    NVME_CC_IOCQES_SHIFT ,
    NVME_CC_CRIME_SHIFT ,
    NVME_CC_EN_MASK ,
    NVME_CC_CSS_MASK ,
    NVME_CC_MPS_MASK ,
    NVME_CC_AMS_MASK ,
    NVME_CC_SHN_MASK ,
    NVME_CC_CRIME_MASK ,
    NVME_CC_IOSQES_MASK ,
    NVME_CC_IOCQES_MASK ,
    NVME_CC_CSS_NVM ,
    NVME_CC_CSS_CSI ,
    NVME_CC_CSS_ADMIN ,
    NVME_CC_AMS_RR ,
    NVME_CC_AMS_WRRU ,
    NVME_CC_AMS_VS ,
    NVME_CC_SHN_NONE ,
    NVME_CC_SHN_NORMAL ,
    NVME_CC_SHN_ABRUPT ,
    NVME_CC_CRWME ,
    NVME_CC_CRIME

};

look at her. 27 members, all iconic, all in their little lineup like a girl group. πŸ‘‘


πŸŽ€ Constants πŸŽ€

bestie listen: these are the actual spellings, we do NOT freestyle the names. every single one, in order, exactly as the compiler expects. 🧚

the shift amounts (bits be shifting ✨)

  • NVME_CC_EN_SHIFT β€” shift amount to get the enable
  • NVME_CC_CSS_SHIFT β€” shift amount to get the I/O command set selected
  • NVME_CC_MPS_SHIFT β€” shift amount to get the memory page size
  • NVME_CC_AMS_SHIFT β€” shift amount to get the arbitration mechanism selected
  • NVME_CC_SHN_SHIFT β€” shift amount to get the shutdown notification
  • NVME_CC_IOSQES_SHIFT β€” shift amount to get the I/O submission queue entry size
  • NVME_CC_IOCQES_SHIFT β€” shift amount to get the I/O completion queue entry size
  • NVME_CC_CRIME_SHIFT β€” shift amount to get the controller ready independent of media enable

the masks (cover-up but make it bitwise πŸ’…)

  • NVME_CC_EN_MASK β€” mask to get the enable
  • NVME_CC_CSS_MASK β€” mask to get the I/O command set selected
  • NVME_CC_MPS_MASK β€” mask to get the memory page size
  • NVME_CC_AMS_MASK β€” mask to get the arbitration mechanism selected
  • NVME_CC_SHN_MASK β€” mask to get the shutdown notification
  • NVME_CC_CRIME_MASK β€” mask to get the I/O submission queue entry size
  • NVME_CC_IOSQES_MASK β€” mask to get the I/O completion queue entry size
  • NVME_CC_IOCQES_MASK β€” mask to get the controller ready independent of media enable

the command set options (pick ur fighter βš”οΈ)

  • NVME_CC_CSS_NVM β€” NVM command set
  • NVME_CC_CSS_CSI β€” all supported I/O command sets
  • NVME_CC_CSS_ADMIN β€” admin command set only

the arbitration mechanisms (who goes first, no pushing 🚦)

  • NVME_CC_AMS_RR β€” round robin
  • NVME_CC_AMS_WRRU β€” weighted round robin with urgent priority class
  • NVME_CC_AMS_VS β€” vendor specific

the shutdown notifications (say bye properly 😭)

  • NVME_CC_SHN_NONE β€” no notification; no effect
  • NVME_CC_SHN_NORMAL β€” normal shutdown notification
  • NVME_CC_SHN_ABRUPT β€” abrupt shutdown notification

the "controller ready" girls (main character energy πŸ‘‘)

  • NVME_CC_CRWME β€” controller ready with media enable
  • NVME_CC_CRIME β€” controller ready independent of media enable

fr fr, that's the whole enum. no hidden lore, no extra members, we showed you everything. πŸ”₯

and that's a wrap on this one, bestie 🫢 this page came straight out of the libnvme API manual β€” yep, enum nvme_cc in libnvme(2) β€” and the date on it is July 2026. go forth and configure ur controller, you absolute icon. slay, periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from