drivers/infiniband/ulp/isert/ib_isert.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/isert/ib_isert.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/ulp/isert/ib_isert.h- Extension
.h- Size
- 5066 bytes
- Lines
- 213
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/socket.hlinux/in.hlinux/in6.hrdma/ib_verbs.hrdma/rdma_cm.hrdma/rw.hscsi/iser.h
Detected Declarations
struct iser_rx_descstruct iser_tx_descstruct isert_cmdstruct isert_devicestruct isert_connstruct isert_devicestruct isert_npenum isert_desc_typeenum iser_conn_statefunction isert_get_hdr_offset
Annotated Snippet
struct iser_rx_desc {
char buf[ISER_RX_SIZE];
u64 dma_addr;
struct ib_sge rx_sg;
struct ib_cqe rx_cqe;
bool in_use;
};
static inline struct iser_rx_desc *cqe_to_rx_desc(struct ib_cqe *cqe)
{
return container_of(cqe, struct iser_rx_desc, rx_cqe);
}
static void *isert_get_iser_hdr(struct iser_rx_desc *desc)
{
return PTR_ALIGN(desc->buf + ISER_HEADERS_LEN, 512) - ISER_HEADERS_LEN;
}
static size_t isert_get_hdr_offset(struct iser_rx_desc *desc)
{
return isert_get_iser_hdr(desc) - (void *)desc->buf;
}
static void *isert_get_iscsi_hdr(struct iser_rx_desc *desc)
{
return isert_get_iser_hdr(desc) + sizeof(struct iser_ctrl);
}
static void *isert_get_data(struct iser_rx_desc *desc)
{
void *data = isert_get_iser_hdr(desc) + ISER_HEADERS_LEN;
WARN_ON((uintptr_t)data & 511);
return data;
}
struct iser_tx_desc {
struct iser_ctrl iser_header;
struct iscsi_hdr iscsi_header;
enum isert_desc_type type;
u64 dma_addr;
struct ib_sge tx_sg[2];
struct ib_cqe tx_cqe;
int num_sge;
struct ib_send_wr send_wr;
} __packed;
static inline struct iser_tx_desc *cqe_to_tx_desc(struct ib_cqe *cqe)
{
return container_of(cqe, struct iser_tx_desc, tx_cqe);
}
struct isert_cmd {
uint32_t read_stag;
uint32_t write_stag;
uint64_t read_va;
uint64_t write_va;
uint32_t inv_rkey;
u64 pdu_buf_dma;
u32 pdu_buf_len;
struct isert_conn *conn;
struct iscsit_cmd *iscsit_cmd;
struct iser_tx_desc tx_desc;
struct iser_rx_desc *rx_desc;
struct rdma_rw_ctx rw;
struct work_struct comp_work;
struct scatterlist sg;
bool ctx_init_done;
};
static inline struct isert_cmd *tx_desc_to_cmd(struct iser_tx_desc *desc)
{
return container_of(desc, struct isert_cmd, tx_desc);
}
struct isert_device;
struct isert_conn {
enum iser_conn_state state;
u32 responder_resources;
u32 initiator_depth;
bool pi_support;
struct iser_rx_desc *login_desc;
char *login_rsp_buf;
int login_req_len;
u64 login_rsp_dma;
struct iser_rx_desc *rx_descs;
struct ib_recv_wr rx_wr[ISERT_QP_MAX_RECV_DTOS];
struct iscsit_conn *conn;
struct list_head node;
Annotation
- Immediate include surface: `linux/socket.h`, `linux/in.h`, `linux/in6.h`, `rdma/ib_verbs.h`, `rdma/rdma_cm.h`, `rdma/rw.h`, `scsi/iser.h`.
- Detected declarations: `struct iser_rx_desc`, `struct iser_tx_desc`, `struct isert_cmd`, `struct isert_device`, `struct isert_conn`, `struct isert_device`, `struct isert_np`, `enum isert_desc_type`, `enum iser_conn_state`, `function isert_get_hdr_offset`.
- Atlas domain: Driver Families / drivers/infiniband.
- 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.