libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme(9) β€” the API Manual, bestie edition

Okay so this is libnvme, section 9 of the API Manual, and today we're going deep into one specific little enum that lives rent-free in the NVMe world. Buckle up πŸŽ€


✨ NAME ✨

enum nvme_export_nvms_set_config_state_cqe_dw0 β€” literally the "Manage Exported NVM Subsystem Send - Set Exported Configuration State - Completion Queue Entry Dword 0" situation, and it's valid when the command fails with %NVME_SC_INVALID_EXPORTED_CONFIG_STATE. iykyk πŸ’€

Like, this enum only really shows up when things go wrong, which is honestly its whole main character energy. Not me being the error-handling enum 😭


πŸ¦‹ SYNOPSIS πŸ¦‹

enum nvme_export_nvms_set_config_state_cqe_dw0 {
    NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_DWLOC_SHIFT ,
    NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_DWLOC_MASK ,
    NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_BITLOC_SHIFT ,
    NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_BITLOC_MASK

};

Four constants, all caps, all iconic. Copy them exactly, bestie β€” no "fixing" the spacing, no renaming, periodt πŸ”₯


🌸 Constants 🌸

  • NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_DWLOC_SHIFT β€” the shift amount that gets you the Dword Location (DWLOC): it's the offset in the data buffer pointing at the Dword that contained an invalid bit. So like, where in the buffer the drama happened πŸ“
  • NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_DWLOC_MASK β€” the mask that gets you that same DWLOC. Yes bestie, shift and mask, that's the combo 🫢
  • NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_BITLOC_SHIFT β€” the shift amount for the Bit Location (BITLOC): the offset of the invalid bit within the Dword that DWLOC points at. So DWLOC finds the Dword, BITLOC finds the exact bit. teamwork πŸ’–
  • NVME_EXPORT_NVMS_SET_CONFIG_STATE_CQE_BITLOC_MASK β€” the mask to get that BITLOC. And that's the whole squad, no notes ✨
ngl the whole point here is: when the command fails with %NVME_SC_INVALID_EXPORTED_CONFIG_STATE, these four constants let you zoom all the way in from "something's wrong" to "this exact bit in this exact Dword is the problem." Detective mode πŸ”

Okay that's the whole page, no cap 🌈 Go forth and decode your completion queue entries like the icon you are πŸ‘‘

October 2026 πŸ’œ enum nvme_export_nvms_set_config_state_cqe_dw0 πŸ’œ libnvme(9) β€” mwah, signing off, love u, bye πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from