libnvme(2)

πŸ’– libnvme β€” it's the enum nvme_id_ctrl_oacs page, bestie πŸ’–

okay so you found yourself in the libnvme(2) manual and it's giving "controller vibe check" energy, and honestly? obsessed. this whole page is about one enum, and that enum is a little bitmask baddie that tells you which optional Admin commands and features your NVMe controller actually supports β€” you know, the stuff hanging out in &struct nvme_id_ctrl.oacs. no cap, that's the entire plot. πŸ¦‹


✨ NAME ✨

enum nvme_id_ctrl_oacs β€” Flags indicating the optional Admin commands and features supported by the controller, see &struct nvme_id_ctrl.oacs.

like, it's the receipts for what your controller can and can't do. main character energy for a bitfield, fr fr. πŸ‘‘


🌸 SYNOPSIS 🌸

enum nvme_id_ctrl_oacs {
    NVME_CTRL_OACS_SSRS_SHIFT ,
    NVME_CTRL_OACS_FNVMS_SHIFT ,
    NVME_CTRL_OACS_FWDS_SHIFT ,
    NVME_CTRL_OACS_NMS_SHIFT ,
    NVME_CTRL_OACS_DSTS_SHIFT ,
    NVME_CTRL_OACS_DIRS_SHIFT ,
    NVME_CTRL_OACS_NSRS_SHIFT ,
    NVME_CTRL_OACS_VMS_SHIFT ,
    NVME_CTRL_OACS_DBCS_SHIFT ,
    NVME_CTRL_OACS_GLSS_SHIFT ,
    NVME_CTRL_OACS_CFLS_SHIFT ,
    NVME_CTRL_OACS_HMLMS_SHIFT ,
    NVME_CTRL_OACS_SSRS_MASK ,
    NVME_CTRL_OACS_FNVMS_MASK ,
    NVME_CTRL_OACS_FWDS_MASK ,
    NVME_CTRL_OACS_NMS_MASK ,
    NVME_CTRL_OACS_DSTS_MASK ,
    NVME_CTRL_OACS_DIRS_MASK ,
    NVME_CTRL_OACS_NSRS_MASK ,
    NVME_CTRL_OACS_VMS_MASK ,
    NVME_CTRL_OACS_DBCS_MASK ,
    NVME_CTRL_OACS_GLSS_MASK ,
    NVME_CTRL_OACS_CFLS_MASK ,
    NVME_CTRL_OACS_HMLMS_MASK ,
    NVME_CTRL_OACS_SECURITY ,
    NVME_CTRL_OACS_FORMAT ,
    NVME_CTRL_OACS_FW ,
    NVME_CTRL_OACS_NS_MGMT ,
    NVME_CTRL_OACS_SELF_TEST ,
    NVME_CTRL_OACS_DIRECTIVES ,
    NVME_CTRL_OACS_NVME_MI ,
    NVME_CTRL_OACS_VIRT_MGMT ,
    NVME_CTRL_OACS_DBBUF_CFG ,
    NVME_CTRL_OACS_LBA_STATUS ,
    NVME_CTRL_OACS_CMD_FEAT_LD ,
    NVME_CTRL_OACS_HMLM

};

πŸŽ€ Constants πŸŽ€

bestie, there's three flavours of constant here and they're literally a team: SHIFT ones tell you how far to shift to grab a bit, MASK ones give you the mask to grab it, and the plain-named ones are the actual bits β€” if set, that thing is supported. periodt. πŸ’…

πŸ”₯ the SHIFT girlies (how many places to slide over) πŸ”₯

  • NVME_CTRL_OACS_SSRS_SHIFT β€” Shift amount to get the Security Send Receive supported
  • NVME_CTRL_OACS_FNVMS_SHIFT β€” Shift amount to get the Format NVM supported
  • NVME_CTRL_OACS_FWDS_SHIFT β€” Shift amount to get the Firmware Download supported
  • NVME_CTRL_OACS_NMS_SHIFT β€” Shift amount to get the Namespace Management supported
  • NVME_CTRL_OACS_DSTS_SHIFT β€” Shift amount to get the Device Self-test supported
  • NVME_CTRL_OACS_DIRS_SHIFT β€” Shift amount to get the Directives supported
  • NVME_CTRL_OACS_NSRS_SHIFT β€” Shift amount to get the NVMe-MI Send Receive supported
  • NVME_CTRL_OACS_VMS_SHIFT β€” Shift amount to get the Virtualization Management supported
  • NVME_CTRL_OACS_DBCS_SHIFT β€” Shift amount to get the Doorbell Buffer Config supported
  • NVME_CTRL_OACS_GLSS_SHIFT β€” Shift amount to get the Get LBA Status supported
  • NVME_CTRL_OACS_CFLS_SHIFT β€” Shift amount to get the Command and Feature Lockdown supported
  • NVME_CTRL_OACS_HMLMS_SHIFT β€” Shift amount to get the Host Managed Live Migration support

πŸ¦‹ the MASK besties (the actual mask value) πŸ¦‹

  • NVME_CTRL_OACS_SSRS_MASK β€” Mask to get the Security Send Receive supported
  • NVME_CTRL_OACS_FNVMS_MASK β€” Mask to get the Format NVM supported
  • NVME_CTRL_OACS_FWDS_MASK β€” Mask to get the Firmware Download supported
  • NVME_CTRL_OACS_NMS_MASK β€” Mask to get the Namespace Management supported
  • NVME_CTRL_OACS_DSTS_MASK β€” Mask to get the Device Self-test supported
  • NVME_CTRL_OACS_DIRS_MASK β€” Mask to get the Directives supported
  • NVME_CTRL_OACS_NSRS_MASK β€” Mask to get the NVMe-MI Send Receive supported
  • NVME_CTRL_OACS_VMS_MASK β€” Mask to get the Virtualization Management supported
  • NVME_CTRL_OACS_DBCS_MASK β€” Mask to get the Doorbell Buffer Config supported
  • NVME_CTRL_OACS_GLSS_MASK β€” Mask to get the Get LBA Status supported
  • NVME_CTRL_OACS_CFLS_MASK β€” Mask to get the Command and Feature Lockdown supported
  • NVME_CTRL_OACS_HMLMS_MASK β€” Mask to get the Host Managed Live Migration support

πŸ‘‘ the actual bits (if set, she's supported) πŸ‘‘

  • NVME_CTRL_OACS_SECURITY β€” If set, then the controller supports the Security Send and Security Receive commands.
  • NVME_CTRL_OACS_FORMAT β€” If set then the controller supports the Format NVM command.
  • NVME_CTRL_OACS_FW β€” If set, then the controller supports the Firmware Commit and Firmware Image Download commands.
  • NVME_CTRL_OACS_NS_MGMT β€” If set, then the controller supports the Namespace Management capability
  • NVME_CTRL_OACS_SELF_TEST β€” If set, then the controller supports the Device Self-test command.
  • NVME_CTRL_OACS_DIRECTIVES β€” If set, then the controller supports Directives and the Directive Send and Directive Receive commands.
  • NVME_CTRL_OACS_NVME_MI β€” If set, then the controller supports the NVMe-MI Send and NVMe-MI Receive commands.
  • NVME_CTRL_OACS_VIRT_MGMT β€” If set, then the controller supports the Virtualization Management command.
  • NVME_CTRL_OACS_DBBUF_CFG β€” If set, then the controller supports the Doorbell Buffer Config command.
  • NVME_CTRL_OACS_LBA_STATUS β€” If set, then the controller supports the Get LBA Status capability.
  • NVME_CTRL_OACS_CMD_FEAT_LD β€” If set, then the controller supports the command and feature lockdown capability.
  • NVME_CTRL_OACS_HMLM β€” If set, then the controller supports the command and Host Managed Live Migration capability.

πŸ’€ reminder bestie: SHIFT gets you the position, MASK gets you the bit, and the plain constant is the value you compare against. don't mix them up, that's a vibe check you will fail. 🫢

and that's the whole page, babe β€” no SEE ALSO, no options, just the oacs enum living her best life. this libnvme(2) bop dropped in July 2026 (enum nvme_id_ctrl_oacs, part of the libnvme API manual) and honestly? she ate. ✨🌈 go check &struct nvme_id_ctrl.oacs and slay. πŸŽ€πŸ’œ

πŸ“¦ where this page comes from