STRUCT NVMEFC_FCP_REQ(9)
π struct nvmefc_fcp_req β the Kernel API Manual glow-up π
okay so bestie, welcome to the Kernel API Manual entry for struct nvmefc_fcp_req, and no cap, this one is kind of a big deal π«Ά. It's the request structure that gets passed from the NVME-FC transport down to the LLDD so a NVME FCP IO operation can actually, you know, happen. main character energy fr.
β¨ NAME β¨
struct nvmefc_fcp_req β Request structure passed from NVME-FC transport to LLDD in order to perform a NVME FCP IO operation. that's the whole vibe π«
π¦ SYNOPSIS π¦
like, here's the shape of it, literally:
struct nvmefc_fcp_req {
void *cmdaddr;
void *rspaddr;
dma_addr_t cmddma;
dma_addr_t rspdma;
u16 cmdlen;
u16 rsplen;
u32 payload_length;
struct sg_table sg_table;
struct scatterlist *first_sgl;
int sg_cnt;
enum nvmefc_fcp_datadir io_dir;
void (*done)(struct nvmefc_fcp_req *req);
void *private;
__le16 sqid;
u16 rcv_rsplen;
u32 transferred_length;
u32 status;
};
π Members π
okay so every single field, and what it's giving β¨:
cmdaddrβ pointer to the FCP CMD IU buffer πrspaddrβ pointer to the FCP RSP IU buffer πcmddmaβ PCI DMA address of the FCP CMD IU buffer πrspdmaβ PCI DMA address of the FCP RSP IU buffer πcmdlenβ Length, in bytes, of the FCP CMD IU buffer πrsplenβ Length, in bytes, of the FCP RSP IU buffer πpayload_lengthβ Length of DATA_IN or DATA_OUT payload data to transfer. the actual goods, iykyk π¦sg_tableβ scatter/gather structure for payload data πΈfirst_sglβ memory for 1st scatter/gather list segment for payload data πΈsg_cntβ number of elements in the scatter/gather list π’io_dirβ direction of the FCP request (seeNVMEFC_FCP_xxx) π§doneβ The callback routine the LLDD is to invoke upon completion of the FCP operation. thereqargument is the pointer to the original FCP IO operation. like, the "call me when you're done bestie" field πprivateβ pointer to memory allocated alongside the FCP operation request structure that is specifically for the LLDD to use while processing the operation. The length of the buffer corresponds to thefcprqst_priv_szvalue specified in thenvme_fc_port_templatesupplied by the LLDD. it's giving personal stash, hands off πsqidβ The nvme SQID the command is being issued on πrcv_rsplenβ length, in bytes, of the FCP RSP IU received. π¬transferred_lengthβ amount of payload data, in bytes, that were transferred. Should equalpayload_lengthon success. slay when the numbers match π―statusβ Completion status of the FCP operation. must be0upon success, negative errno value upon failure (ex:-EIO). > Note: this is NOT a reflection of the NVME CQE completion status. Only the status of the FCP operation at the NVME-FC level. so like, don't get it twisted π
π Description π
okay so the tea β β these are the values set by the NVME-FC layer prior to calling the LLDD fcp_io entrypoint. π«‘
and these are the values set by the LLDD indicating completion status of the FCP operation. They must be set prior to calling the done callback. no skipping, periodt π
π§ SEE ALSO π§
go be nosy, bestie, the whole fam is here π:
Kernel file ./include/linux/nvme-fc-driver.h struct nvmefc_ls_req(9), struct nvmefc_ls_rsp(9), struct nvme_fc_port_info(9), struct nvme_fc_local_port(9), struct nvme_fc_remote_port(9), struct nvme_fc_port_template(9), struct nvmet_fc_port_info(9), struct nvmefc_tgt_fcp_req(9), struct nvmet_fc_target_port(9), struct nvmet_fc_target_template(9)
and that's the whole page, bestie π this lil number lives in ./include/linux, dated October 2026, and it's filed under struct nvmefc_fcp_req(9) β go off, icon π
β¨
π¦ 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