libnvme(2)
π NAME π
okay so bestie, welcome to libnvme(2) β the API manual, yes that API manual π«Ά β and today's main character is enum nvme_id_iocs_iocsc, which is, and I quote, "This field indicates the Identify I/O Command Set Data Structure." iconic. it's giving "bit fields that run the whole storage world" and honestly?? slay.
β¨ SYNOPSIS β¨
here's the whole enum, copy it exactly bestie, no cap:
enum nvme_id_iocs_iocsc {
NVME_IOCS_IOCSC_NVMCS_SHIFT ,
NVME_IOCS_IOCSC_NVMCS_MASK ,
NVME_IOCS_IOCSC_KVCS_SHIFT ,
NVME_IOCS_IOCSC_KVCS_MASK ,
NVME_IOCS_IOCSC_ZNSCS_SHIFT ,
NVME_IOCS_IOCSC_ZNSCS_MASK ,
NVME_IOCS_IOCSC_SLMCS_SHIFT ,
NVME_IOCS_IOCSC_SLMCS_MASK ,
NVME_IOCS_IOCSC_CPNCS_SHIFT ,
NVME_IOCS_IOCSC_CPNCS_MASK
};
(yeah there's a lil blank line before the closing brace, that's just the vibe, we don't touch it π )
πΈ Constants πΈ
it's giving shift-and-mask duo energy. every command set rolls up as a shift + a mask and you literally cannot have one without the other. the way that pattern repeats five whole times β obsessed. π
NVME_IOCS_IOCSC_NVMCS_SHIFTβ the shift amount you use to get the value of NVM Command SetNVME_IOCS_IOCSC_NVMCS_MASKβ the mask you use to get the value of NVM Command SetNVME_IOCS_IOCSC_KVCS_SHIFTβ the shift amount you use to get the value of Key Value Command SetNVME_IOCS_IOCSC_KVCS_MASKβ the mask you use to get the value of Key Value Command SetNVME_IOCS_IOCSC_ZNSCS_SHIFTβ the shift amount you use to get the value of Zoned Namespace Command SetNVME_IOCS_IOCSC_ZNSCS_MASKβ the mask you use to get the value of Zoned Namespace Command SetNVME_IOCS_IOCSC_SLMCS_SHIFTβ the shift amount you use to get the value of Subsystem Local Memory Command SetNVME_IOCS_IOCSC_SLMCS_MASKβ the mask you use to get the value of Subsystem Local Memory Command SetNVME_IOCS_IOCSC_CPNCS_SHIFTβ the shift amount you use to get the value of Computational Programs Namespace Command SetNVME_IOCS_IOCSC_CPNCS_MASKβ the mask you use to get the value of Computational Programs Namespace Command Set
bestie reminder π β shift first, then mask. don't do it backwards, iykyk. and yes, "Computational Programs Namespace Command Set" is a mouthful, we still say the whole thing, fr fr.
that's the whole page, no filler, every constant accounted for π. this lil masterpiece is from July 2026, it lives under the title enum nvme_id_iocs_iocsc, and it's page libnvme(2) of the API Manual. go forth and bit-twiddle, queen πβ¨
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms