STRUCT NVMEFC_FCP_REQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 (see NVMEFC_FCP_xxx) 🧭
  • done β€” The callback routine the LLDD is to invoke upon completion of the FCP operation. the req argument 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 the fcprqst_priv_sz value specified in the nvme_fc_port_template supplied 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 equal payload_length on success. slay when the numbers match πŸ’―
  • status β€” Completion status of the FCP operation. must be 0 upon 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