include/linux/nvme-fc-driver.h
Source file repositories/reference/linux-study-clean/include/linux/nvme-fc-driver.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/nvme-fc-driver.h- Extension
.h- Size
- 47900 bytes
- Lines
- 1071
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: implementation source
- Status
- source implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/scatterlist.hlinux/blk-mq.h
Detected Declarations
struct nvmefc_ls_reqstruct nvmefc_ls_rspstruct nvme_fc_port_infostruct nvmefc_fcp_reqstruct nvme_fc_local_portstruct nvme_fc_remote_portstruct nvme_fc_port_templatestruct nvmet_fc_port_infostruct nvmefc_tgt_fcp_reqstruct nvmet_fc_target_portstruct nvmet_fc_target_templateenum nvmefc_fcp_datadirenum nvme_fc_obj_state
Annotated Snippet
struct nvmefc_ls_req {
void *rqstaddr;
dma_addr_t rqstdma;
u32 rqstlen;
void *rspaddr;
dma_addr_t rspdma;
u32 rsplen;
u32 timeout;
void *private;
void (*done)(struct nvmefc_ls_req *req, int status);
} __aligned(sizeof(u64)); /* alignment for other things alloc'd with */
/**
* struct nvmefc_ls_rsp - Structure passed from the transport to the LLDD
* to request the transmit the NVME-FC LS response to a
* NVME-FC LS request. The structure originates in the LLDD
* and is given to the transport via the xxx_rcv_ls_req()
* transport routine. As such, the structure represents the
* FC exchange context for the NVME-FC LS request that was
* received and which the response is to be sent for.
* Used by the LLDD to pass the nvmet-fc transport (controller)
* received LS's such as Create Association, Create Connection
* and Disconnect Association.
* Used by the LLDD to pass the nvme-fc transport (host)
* received LS's such as Disconnect Association or Disconnect
* Connection.
*
* The structure is allocated by the LLDD whenever a LS Request is received
* from the FC link. The address of the structure is passed to the nvmet-fc
* or nvme-fc layer via the xxx_rcv_ls_req() transport routines.
*
* The address of the structure is to be passed back to the LLDD
* when the response is to be transmit. The LLDD will use the address to
* map back to the LLDD exchange structure which maintains information such
* the remote N_Port that sent the LS as well as any FC exchange context.
* Upon completion of the LS response transmit, the LLDD will pass the
* address of the structure back to the transport LS rsp done() routine,
* allowing the transport release dma resources. Upon completion of
* the done() routine, no further access to the structure will be made by
* the transport and the LLDD can de-allocate the structure.
*
* Field initialization:
* At the time of the xxx_rcv_ls_req() call, there is no content that
* is valid in the structure.
*
* When the structure is used for the LLDD->xmt_ls_rsp() call, the
* transport layer will fully set the fields in order to specify the
* response payload buffer and its length as well as the done routine
* to be called upon completion of the transmit. The transport layer
* will also set a private pointer for its own use in the done routine.
*
* Values set by the transport layer prior to calling the LLDD xmt_ls_rsp
* entrypoint:
* @rspbuf: pointer to the LS response buffer
* @rspdma: PCI DMA address of the LS response buffer
* @rsplen: Length, in bytes, of the LS response buffer
* @done: The callback routine the LLDD is to invoke upon completion of
* transmitting the LS response. req argument is the pointer to
* the original ls request.
* @nvme_fc_private: pointer to an internal transport-specific structure
* used as part of the transport done() processing. The LLDD is
* not to access this pointer.
*/
struct nvmefc_ls_rsp {
void *rspbuf;
dma_addr_t rspdma;
u16 rsplen;
void (*done)(struct nvmefc_ls_rsp *rsp);
void *nvme_fc_private; /* LLDD is not to access !! */
};
/*
* ********************** LLDD FC-NVME Host API ********************
*
* For FC LLDD's that are the NVME Host role.
*
* ******************************************************************
*/
/**
* struct nvme_fc_port_info - port-specific ids and FC connection-specific
* data element used during NVME Host role
Annotation
- Immediate include surface: `linux/scatterlist.h`, `linux/blk-mq.h`.
- Detected declarations: `struct nvmefc_ls_req`, `struct nvmefc_ls_rsp`, `struct nvme_fc_port_info`, `struct nvmefc_fcp_req`, `struct nvme_fc_local_port`, `struct nvme_fc_remote_port`, `struct nvme_fc_port_template`, `struct nvmet_fc_port_info`, `struct nvmefc_tgt_fcp_req`, `struct nvmet_fc_target_port`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.