include/scsi/srp.h
Source file repositories/reference/linux-study-clean/include/scsi/srp.h
File Facts
- System
- Linux kernel
- Corpus path
include/scsi/srp.h- Extension
.h- Size
- 7020 bytes
- Lines
- 311
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hscsi/scsi.h
Detected Declarations
struct srp_direct_bufstruct srp_indirect_bufstruct srp_imm_bufstruct srp_login_reqstruct srp_login_req_rdmastruct srp_login_rspstruct srp_login_rejstruct srp_i_logoutstruct srp_t_logoutstruct srp_tsk_mgmtstruct srp_cmdstruct srp_rspstruct srp_cred_reqstruct srp_cred_rspstruct srp_aer_reqstruct srp_aer_rspenum srp_login_rej_reason
Annotated Snippet
struct srp_direct_buf {
__be64 va;
__be32 key;
__be32 len;
};
/*
* We need the packed attribute because the SRP spec puts the list of
* descriptors at an offset of 20, which is not aligned to the size of
* struct srp_direct_buf. The whole structure must be packed to avoid
* having the 20-byte structure padded to 24 bytes on 64-bit architectures.
*/
struct srp_indirect_buf {
struct srp_direct_buf table_desc __packed __aligned(4);
__be32 len;
struct srp_direct_buf desc_list[] __packed __aligned(4);
};
/* Immediate data buffer descriptor as defined in SRP2. */
struct srp_imm_buf {
__be32 len;
};
/* srp_login_req.flags */
enum {
SRP_MULTICHAN_SINGLE = 0,
SRP_MULTICHAN_MULTI = 1,
SRP_IMMED_REQUESTED = 0x80, /* new in SRP2 */
};
struct srp_login_req {
u8 opcode;
u8 reserved1[7];
u64 tag;
__be32 req_it_iu_len;
u8 reserved2[4];
__be16 req_buf_fmt;
u8 req_flags;
u8 reserved3[1];
__be16 imm_data_offset; /* new in SRP2 */
u8 reserved4[2];
u8 initiator_port_id[16];
u8 target_port_id[16];
};
/**
* struct srp_login_req_rdma - RDMA/CM login parameters.
*
* RDMA/CM over InfiniBand can only carry 92 - 36 = 56 bytes of private
* data. The %srp_login_req_rdma structure contains the same information as
* %srp_login_req but with the reserved data removed.
*/
struct srp_login_req_rdma {
u64 tag;
__be16 req_buf_fmt;
u8 req_flags;
u8 opcode;
__be32 req_it_iu_len;
u8 initiator_port_id[16];
u8 target_port_id[16];
__be16 imm_data_offset;
u8 reserved[6];
};
/* srp_login_rsp.rsp_flags */
enum {
SRP_LOGIN_RSP_MULTICHAN_NO_CHAN = 0x0,
SRP_LOGIN_RSP_MULTICHAN_TERMINATED = 0x1,
SRP_LOGIN_RSP_MULTICHAN_MAINTAINED = 0x2,
SRP_LOGIN_RSP_IMMED_SUPP = 0x80, /* new in SRP2 */
};
/*
* The SRP spec defines the size of the LOGIN_RSP structure to be 52
* bytes, so it needs to be packed to avoid having it padded to 56
* bytes on 64-bit architectures.
*/
struct srp_login_rsp {
u8 opcode;
u8 reserved1[3];
__be32 req_lim_delta;
u64 tag __packed __aligned(4);
__be32 max_it_iu_len;
__be32 max_ti_iu_len;
__be16 buf_fmt;
u8 rsp_flags;
u8 reserved2[25];
};
struct srp_login_rej {
Annotation
- Immediate include surface: `linux/types.h`, `scsi/scsi.h`.
- Detected declarations: `struct srp_direct_buf`, `struct srp_indirect_buf`, `struct srp_imm_buf`, `struct srp_login_req`, `struct srp_login_req_rdma`, `struct srp_login_rsp`, `struct srp_login_rej`, `struct srp_i_logout`, `struct srp_t_logout`, `struct srp_tsk_mgmt`.
- Atlas domain: Repository Root And Misc / include.
- 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.