nvmf_reg_write32(9)
π nvmf_reg_write32(9) β the Kernel API Manual, bestie edition
okay so you're in the Kernel API Manual and the page is literally called nvmf_reg_write32, and honestly? she's a little legend. let's get into it π
β¨ NAME β¨
nvmf_reg_write32 β the NVMe Fabrics "Property Write" API function. that's it, that's her whole job π
π¦ SYNOPSIS π¦
int nvmf_reg_write32 (struct nvme_ctrl *ctrl , u32 off , u32 val );
like yes she returns an int, we love a return value queen π
πΈ ARGUMENTS πΈ
ctrlβ your host NVMe controller instance π«Ά she's the one holding down the admin queue, and that admin queue is what gets used to submit the property read command over to the allocated NVMe controller resource sitting on the target system. so basically she's the main character carrying the whole operation.offβ the starting offset value of the property register you're targeting β¨ (peep the fabrics section of the NVMe standard, iykyk).valβ the input parameter, aka the actual value you want written to the property. she's the payload, she's the moment π
π₯ DESCRIPTION π₯
the NVMe host system uses this to write a 32-bit capsule property value to an NVMe controller on the target system. simple, clean, slay π
and if you're sitting there like "capsule property?? what does that even mean" β no worries bestie, the page says it plain: a "Capsule property" is a "PCIe register concept" that's been applied to the NVMe fabrics space. it's giving repurposed, it's giving cross-over episode π
β RETURN β
here's the vibe check, verbatim:
0: successful write > 0: NVMe error status code < 0: Linux errno error code
so: 0 means the write went through, anything above 0 is an NVMe error status code π, and anything below 0 is a Linux errno error code π. read your return values, bestie, don't leave her on read.
π SEE ALSO π
- Kernel file
./drivers/nvme/host/fabrics.cβ that's where the source lives, go be nosy π nvmf_get_address(9)nvmf_reg_read32(9)nvmf_reg_read64(9)nvmf_log_connect_error(9)nvmf_connect_admin_queue(9)nvmf_connect_io_queue(9)nvmf_register_transport(9)nvmf_unregister_transport(9)
the whole friend group, assembled π«Άβ¨
heads up: if your return value is negative, that's a Linux errno, not an NVMe status β don't mix your eras π
and that's the page!! she lives over in ./drivers/nvme/host, dated October 2026, and she's part of the Kernel API Manual (kernel API manual, in the 9 section, obvi). go forth and write your 32-bit capsule property values, bestie πππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms