drivers/infiniband/ulp/iser/iscsi_iser.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/iser/iscsi_iser.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/ulp/iser/iscsi_iser.h- Extension
.h- Size
- 18114 bytes
- Lines
- 570
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/net.hlinux/printk.hscsi/libiscsi.hscsi/scsi_transport_iscsi.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/iser.hlinux/interrupt.hlinux/wait.hlinux/sched.hlinux/list.hlinux/slab.hlinux/dma-mapping.hlinux/mutex.hlinux/mempool.hlinux/uio.hlinux/socket.hlinux/in.hlinux/in6.hrdma/ib_verbs.hrdma/rdma_cm.h
Detected Declarations
struct iser_data_bufstruct iser_devicestruct iscsi_iser_taskstruct iscsi_endpointstruct iser_reg_resourcesstruct iser_mem_regstruct iser_tx_descstruct iser_rx_descstruct iser_login_descstruct iser_connstruct ib_connstruct iser_devicestruct iser_reg_resourcesstruct iser_fr_descstruct iser_fr_poolstruct ib_connstruct iser_connstruct iscsi_iser_taskstruct iser_globalenum iser_conn_stateenum iser_task_statusenum iser_data_direnum iser_desc_typefunction to_iser_connfunction iser_rxfunction iser_txfunction iser_login
Annotated Snippet
struct iser_data_buf {
struct scatterlist *sg;
int size;
unsigned long data_len;
int dma_nents;
};
/* fwd declarations */
struct iser_device;
struct iscsi_iser_task;
struct iscsi_endpoint;
struct iser_reg_resources;
/**
* struct iser_mem_reg - iSER memory registration info
*
* @sge: memory region sg element
* @rkey: memory region remote key
* @desc: pointer to fast registration context
*/
struct iser_mem_reg {
struct ib_sge sge;
u32 rkey;
struct iser_fr_desc *desc;
};
enum iser_desc_type {
ISCSI_TX_CONTROL ,
ISCSI_TX_SCSI_COMMAND,
ISCSI_TX_DATAOUT
};
/**
* struct iser_tx_desc - iSER TX descriptor
*
* @iser_header: iser header
* @iscsi_header: iscsi header
* @type: command/control/dataout
* @dma_addr: header buffer dma_address
* @tx_sg: sg[0] points to iser/iscsi headers
* sg[1] optionally points to either of immediate data
* unsolicited data-out or control
* @num_sge: number sges used on this TX task
* @cqe: completion handler
* @mapped: Is the task header mapped
* @reg_wr: registration WR
* @send_wr: send WR
* @inv_wr: invalidate WR
*/
struct iser_tx_desc {
struct iser_ctrl iser_header;
struct iscsi_hdr iscsi_header;
enum iser_desc_type type;
u64 dma_addr;
struct ib_sge tx_sg[2];
int num_sge;
struct ib_cqe cqe;
bool mapped;
struct ib_reg_wr reg_wr;
struct ib_send_wr send_wr;
struct ib_send_wr inv_wr;
};
#define ISER_RX_PAD_SIZE (256 - (ISER_RX_PAYLOAD_SIZE + \
sizeof(u64) + sizeof(struct ib_sge) + \
sizeof(struct ib_cqe)))
/**
* struct iser_rx_desc - iSER RX descriptor
*
* @iser_header: iser header
* @iscsi_header: iscsi header
* @data: received data segment
* @dma_addr: receive buffer dma address
* @rx_sg: ib_sge of receive buffer
* @cqe: completion handler
* @pad: for sense data TODO: Modify to maximum sense length supported
*/
struct iser_rx_desc {
struct iser_ctrl iser_header;
struct iscsi_hdr iscsi_header;
char data[ISER_RECV_DATA_SEG_LEN];
u64 dma_addr;
struct ib_sge rx_sg;
struct ib_cqe cqe;
char pad[ISER_RX_PAD_SIZE];
} __packed;
/**
* struct iser_login_desc - iSER login descriptor
*
Annotation
- Immediate include surface: `linux/types.h`, `linux/net.h`, `linux/printk.h`, `scsi/libiscsi.h`, `scsi/scsi_transport_iscsi.h`, `scsi/scsi_cmnd.h`, `scsi/scsi_device.h`, `scsi/iser.h`.
- Detected declarations: `struct iser_data_buf`, `struct iser_device`, `struct iscsi_iser_task`, `struct iscsi_endpoint`, `struct iser_reg_resources`, `struct iser_mem_reg`, `struct iser_tx_desc`, `struct iser_rx_desc`, `struct iser_login_desc`, `struct iser_conn`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.