libnvme(2)

πŸ’– libnvme(2) β€” enum nvme_lm_cdq_fields πŸ’–

okay bestie, welcome to the cutest little corner of the libnvme API manual 🌸 this one's all about enum nvme_lm_cdq_fields, aka the Controller Data Queue command fields. it's giving "bit-twiddling but make it fashion" ✨


NAME πŸŽ€

enum nvme_lm_cdq_fields β€” Controller Data Queue command fields. that's it, that's the whole vibe. πŸ’…


SYNOPSIS πŸ¦‹

here's the whole enum, verbatim, no notes, exactly as it lives in the header:

enum nvme_lm_cdq_fields {
    NVME_LM_CDQ_MOS_SHIFT ,
    NVME_LM_CDQ_MOS_MASK ,
    NVME_LM_CDQ_SEL_SHIFT ,
    NVME_LM_CDQ_SEL_MASK ,
    NVME_LM_SEL_CREATE_CDQ ,
    NVME_LM_SEL_DELETE_CDQ ,
    NVME_LM_QT_SHIFT ,
    NVME_LM_QT_MASK ,
    NVME_LM_CQS_SHIFT ,
    NVME_LM_CQS_MASK ,
    NVME_LM_QT_USER_DATA_MIGRATION_QUEUE ,
    NVME_LM_CREATE_CDQ_PC ,
    NVME_LM_CREATE_CDQ_CNTLID_SHIFT ,
    NVME_LM_CREATE_CDQ_CNTLID_MASK ,
    NVME_LM_DELETE_CDQ_CDQID_SHIFT ,
    NVME_LM_DELETE_CDQ_CDQID_MASK ,
    NVME_LM_CREATE_CDQ_CDQID_SHIFT ,
    NVME_LM_CREATE_CDQ_CDQID_MASK

};

Constants ✨

bestie these are the constants and you're gonna know every single one, no skipping, no skimming, we're doing this properly 🫢

  • NVME_LM_CDQ_MOS_SHIFT β€” the shift you use to set the Management Operation Specific (MOS) field 🌈
  • NVME_LM_CDQ_MOS_MASK β€” the mask you use to set the MOS field, its ride-or-die partner πŸ’–
  • NVME_LM_CDQ_SEL_SHIFT β€” shift to set the Select (SEL) field
  • NVME_LM_CDQ_SEL_MASK β€” mask to set the SEL field
  • NVME_LM_SEL_CREATE_CDQ β€” the Create CDQ select option πŸŽ€
  • NVME_LM_SEL_DELETE_CDQ β€” the Delete CDQ select option πŸ’€
  • NVME_LM_QT_SHIFT β€” how much you shift to set the Queue Type (QT) field relative to MOS, lowkey important πŸ‘€
  • NVME_LM_QT_MASK β€” mask to set the QT field relative to MOS
  • NVME_LM_CQS_SHIFT β€” shift amount for the Create Queue Specific (CQS) field 🌸
  • NVME_LM_CQS_MASK β€” mask to set the CQS field
  • NVME_LM_QT_USER_DATA_MIGRATION_QUEUE β€” User Data Migration Queue type πŸ¦‹ iconic honestly
  • NVME_LM_CREATE_CDQ_PC β€” Physically Contiguous (PC)
  • NVME_LM_CREATE_CDQ_CNTLID_SHIFT β€” shift amount to set the CNTLID field relative to MOS
  • NVME_LM_CREATE_CDQ_CNTLID_MASK β€” mask to set the CNTLID field relative to MOS
  • NVME_LM_DELETE_CDQ_CDQID_SHIFT β€” shift amount to set the CDQID field for deletion πŸ—‘οΈ
  • NVME_LM_DELETE_CDQ_CDQID_MASK β€” mask to set the CDQID field for deletion
  • NVME_LM_CREATE_CDQ_CDQID_SHIFT β€” shift amount to get the CDQID field from the Create response in completion dword0 ⭐
  • NVME_LM_CREATE_CDQ_CDQID_MASK β€” mask to get the CNTLID field from the Create response in completion dword0 (yes bestie, that's what it says, and we keep it exactly like that πŸ™ˆ)

ngl there's a lot of shifting and masking happening here, so if you're poking at these raw, double-check before you commit, fr fr. πŸ’œ

that's the whole page, you ate it, periodt πŸ‘‘ this came from the libnvme manual, enum nvme_lm_cdq_fields section, dated July 2026 β€” mwah, go slay your CDQ commands bestie πŸ’…πŸ’–

πŸ“¦ where this page comes from