libnvme(2)

πŸ’– libnvme(2) β€” bestie edition πŸ’–

okay so this is a page from the libnvme API manual, and we're talking about enum nvme_cmic. yes it's a mouthful, yes it's important, stay with me 🫢


🌸 NAME 🌸

enum nvme_cmic β€” this field is literally the controller's multi-path I/O and NS sharing capabilities. that's the whole vibe. it tells you what your controller can do when multiple paths / multiple namespaces are in the mix ✨


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole enum, no crumbs left behind:

enum nvme_cmic {
    NVME_CMIC_MULTI_PORT_SHIFT ,
    NVME_CMIC_MULTI_CTRL_SHIFT ,
    NVME_CMIC_MULTI_SRIOV_SHIFT ,
    NVME_CMIC_MULTI_ANA_SHIFT ,
    NVME_CMIC_MULTI_RSVD_SHIFT ,
    NVME_CMIC_MULTI_PORT_MASK ,
    NVME_CMIC_MULTI_CTRL_MASK ,
    NVME_CMIC_MULTI_SRIOV_MASK ,
    NVME_CMIC_MULTI_ANA_MASK ,
    NVME_CMIC_MULTI_RSVD_MASK

};

πŸ’… Constants πŸ’…

so we've got two flavours here, bestie: shift amounts and masks. shifts slide the bits over, masks grab 'em out. iconic duo, fr fr.

  • NVME_CMIC_MULTI_PORT_SHIFT β€” shift amount to get the NVM subsystem port πŸšͺ
  • NVME_CMIC_MULTI_CTRL_SHIFT β€” shift amount to get the controllers πŸŽ›οΈ
  • NVME_CMIC_MULTI_SRIOV_SHIFT β€” shift amount to get the SR-IOV virtual function 🌈
  • NVME_CMIC_MULTI_ANA_SHIFT β€” shift amount to get the asymmetric namespace access reporting πŸ‘€
  • NVME_CMIC_MULTI_RSVD_SHIFT β€” shift amount to get the reserved πŸ’€
  • NVME_CMIC_MULTI_PORT_MASK β€” mask to get the NVM subsystem port πŸšͺ
  • NVME_CMIC_MULTI_CTRL_MASK β€” mask to get the controllers πŸŽ›οΈ
  • NVME_CMIC_MULTI_SRIOV_MASK β€” mask to get the SR-IOV virtual function 🌈
  • NVME_CMIC_MULTI_ANA_MASK β€” mask to get the asymmetric namespace access reporting πŸ‘€
  • NVME_CMIC_MULTI_RSVD_MASK β€” mask to get the reserved πŸ’€
not me listing all ten of these like a playlist. anyway. shifts to move, masks to grab. that's the whole assignment πŸ’–

and that's the page, bestie πŸŽ€ this was enum nvme_cmic from the libnvme(2) manual, dated July 2026. go forth and bit-manipulate responsibly βœ¨πŸ‘‘πŸ¦‹

πŸ“¦ where this page comes from