include/linux/nvme-fc.h
Source file repositories/reference/linux-study-clean/include/linux/nvme-fc.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/nvme-fc.h- Extension
.h- Size
- 9955 bytes
- Lines
- 439
- 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
uapi/scsi/fc/fc_fs.h
Detected Declarations
struct nvme_fc_cmd_iustruct nvme_fc_ersp_iustruct nvme_fc_nvme_sr_iustruct nvme_fc_nvme_sr_rsp_iustruct fcnvme_ls_rqst_w0struct fcnvme_lsdesc_rqststruct fcnvme_lsdesc_rjtstruct fcnvme_lsdesc_cr_assoc_cmdstruct fcnvme_lsdesc_cr_conn_cmdstruct fcnvme_lsdesc_disconn_cmdstruct fcnvme_lsdesc_conn_idstruct fcnvme_lsdesc_assoc_idstruct fcnvme_ls_rjtstruct fcnvme_ls_acc_hdrstruct fcnvme_ls_cr_assoc_rqststruct fcnvme_ls_cr_assoc_accstruct fcnvme_ls_cr_conn_rqststruct fcnvme_ls_cr_conn_accstruct fcnvme_ls_disconnect_assoc_rqststruct fcnvme_ls_disconnect_assoc_accstruct fcnvme_ls_disconnect_conn_rqststruct fcnvme_ls_disconnect_conn_accenum fcnvme_ls_rjt_reasonenum fcnvme_ls_rjt_explanfunction fccmnd_set_cat_adminfunction fccmnd_set_cat_cssfunction fcnvme_lsdesc_len
Annotated Snippet
struct nvme_fc_cmd_iu {
__u8 format_id;
__u8 fc_id;
__be16 iu_len;
__u8 rsvd4[2];
__u8 rsv_cat;
__u8 flags;
__be64 connection_id;
__be32 csn;
__be32 data_len;
struct nvme_command sqe;
__u8 dps;
__u8 lbads;
__be16 ms;
__be32 rsvd92;
};
#define NVME_FC_SIZEOF_ZEROS_RSP 12
enum {
FCNVME_SC_SUCCESS = 0,
FCNVME_SC_INVALID_FIELD = 1,
/* reserved 2 */
FCNVME_SC_ILL_CONN_PARAMS = 3,
};
struct nvme_fc_ersp_iu {
__u8 ersp_result;
__u8 rsvd1;
__be16 iu_len;
__be32 rsn;
__be32 xfrd_len;
__be32 rsvd12;
struct nvme_completion cqe;
/* for now - no additional payload */
};
#define FCNVME_NVME_SR_OPCODE 0x01
#define FCNVME_NVME_SR_RSP_OPCODE 0x02
struct nvme_fc_nvme_sr_iu {
__u8 fc_id;
__u8 opcode;
__u8 rsvd2;
__u8 retry_rctl;
__be32 rsvd4;
};
enum {
FCNVME_SRSTAT_ACC = 0x0,
/* reserved 0x1 */
/* reserved 0x2 */
FCNVME_SRSTAT_LOGICAL_ERR = 0x3,
FCNVME_SRSTAT_INV_QUALIF = 0x4,
FCNVME_SRSTAT_UNABL2PERFORM = 0x9,
};
struct nvme_fc_nvme_sr_rsp_iu {
__u8 fc_id;
__u8 opcode;
__u8 rsvd2;
__u8 status;
__be32 rsvd4;
};
/* FC-NVME Link Services - LS cmd values (w0 bits 31:24) */
enum {
FCNVME_LS_RSVD = 0,
FCNVME_LS_RJT = 1,
FCNVME_LS_ACC = 2,
FCNVME_LS_CREATE_ASSOCIATION = 3, /* Create Association */
FCNVME_LS_CREATE_CONNECTION = 4, /* Create I/O Connection */
FCNVME_LS_DISCONNECT_ASSOC = 5, /* Disconnect Association */
FCNVME_LS_DISCONNECT_CONN = 6, /* Disconnect Connection */
};
/* FC-NVME Link Service Descriptors */
enum {
FCNVME_LSDESC_RSVD = 0x0,
FCNVME_LSDESC_RQST = 0x1,
FCNVME_LSDESC_RJT = 0x2,
FCNVME_LSDESC_CREATE_ASSOC_CMD = 0x3,
FCNVME_LSDESC_CREATE_CONN_CMD = 0x4,
FCNVME_LSDESC_DISCONN_CMD = 0x5,
FCNVME_LSDESC_CONN_ID = 0x6,
FCNVME_LSDESC_ASSOC_ID = 0x7,
};
Annotation
- Immediate include surface: `uapi/scsi/fc/fc_fs.h`.
- Detected declarations: `struct nvme_fc_cmd_iu`, `struct nvme_fc_ersp_iu`, `struct nvme_fc_nvme_sr_iu`, `struct nvme_fc_nvme_sr_rsp_iu`, `struct fcnvme_ls_rqst_w0`, `struct fcnvme_lsdesc_rqst`, `struct fcnvme_lsdesc_rjt`, `struct fcnvme_lsdesc_cr_assoc_cmd`, `struct fcnvme_lsdesc_cr_conn_cmd`, `struct fcnvme_lsdesc_disconn_cmd`.
- 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.