libnvme(9)
π 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
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms