drivers/infiniband/ulp/rtrs/rtrs-pri.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/rtrs/rtrs-pri.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/ulp/rtrs/rtrs-pri.h- Extension
.h- Size
- 11449 bytes
- Lines
- 419
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/uuid.hrdma/rdma_cm.hrdma/ib_verbs.hrdma/ib.hrtrs.h
Detected Declarations
struct rtrs_ib_devstruct rtrs_rdma_dev_pd_opsstruct rtrs_rdma_dev_pdstruct rtrs_ib_devstruct rtrs_construct rtrs_pathstruct rtrs_iustruct rtrs_sg_descstruct rtrs_msg_conn_reqstruct rtrs_msg_conn_rspstruct rtrs_msg_info_reqstruct rtrs_msg_info_rspstruct rtrs_msg_rkey_rspstruct rtrs_msg_rdma_readstruct rtrs_msg_rdma_writestruct rtrs_msg_rdma_hdrenum rtrs_imm_constenum rtrs_imm_typeenum rtrs_msg_typesenum rtrs_msg_flagsfunction rtrs_to_immfunction rtrs_from_immfunction rtrs_to_io_req_immfunction rtrs_to_io_rsp_immfunction rtrs_from_io_rsp_imm
Annotated Snippet
struct rtrs_rdma_dev_pd_ops {
int (*init)(struct rtrs_ib_dev *dev);
void (*deinit)(struct rtrs_ib_dev *dev);
};
struct rtrs_rdma_dev_pd {
struct mutex mutex;
struct list_head list;
enum ib_pd_flags pd_flags;
const struct rtrs_rdma_dev_pd_ops *ops;
};
struct rtrs_ib_dev {
struct ib_device *ib_dev;
struct ib_pd *ib_pd;
struct kref ref;
struct list_head entry;
struct rtrs_rdma_dev_pd *pool;
struct ib_event_handler event_handler;
};
struct rtrs_con {
struct rtrs_path *path;
struct ib_qp *qp;
struct ib_cq *cq;
struct rdma_cm_id *cm_id;
unsigned int cid;
int nr_cqe;
atomic_t wr_cnt;
atomic_t sq_wr_avail;
};
struct rtrs_path {
struct list_head entry;
struct sockaddr_storage dst_addr;
struct sockaddr_storage src_addr;
char sessname[NAME_MAX];
uuid_t uuid;
struct rtrs_con **con;
unsigned int con_num;
unsigned int irq_con_num;
unsigned int recon_cnt;
unsigned int signal_interval;
struct rtrs_ib_dev *dev;
int dev_ref;
struct ib_cqe *hb_cqe;
void (*hb_err_handler)(struct rtrs_con *con);
struct workqueue_struct *hb_wq;
struct delayed_work hb_dwork;
unsigned int hb_interval_ms;
unsigned int hb_missed_cnt;
unsigned int hb_missed_max;
ktime_t hb_last_sent;
ktime_t hb_cur_latency;
};
/* rtrs information unit */
struct rtrs_iu {
struct ib_cqe cqe;
dma_addr_t dma_addr;
void *buf;
size_t size;
enum dma_data_direction direction;
};
/**
* enum rtrs_msg_types - RTRS message types, see also rtrs/README
* @RTRS_MSG_INFO_REQ: Client additional info request to the server
* @RTRS_MSG_INFO_RSP: Server additional info response to the client
* @RTRS_MSG_WRITE: Client writes data per RDMA to server
* @RTRS_MSG_READ: Client requests data transfer from server
* @RTRS_MSG_RKEY_RSP: Server refreshed rkey for rbuf
*/
enum rtrs_msg_types {
RTRS_MSG_INFO_REQ,
RTRS_MSG_INFO_RSP,
RTRS_MSG_WRITE,
RTRS_MSG_READ,
RTRS_MSG_RKEY_RSP,
};
/**
* enum rtrs_msg_flags - RTRS message flags.
* @RTRS_MSG_NEED_INVAL_F: Send invalidation in response.
* @RTRS_MSG_NEW_RKEY_F: Send refreshed rkey in response.
*/
enum rtrs_msg_flags {
RTRS_MSG_NEED_INVAL_F = 1 << 0,
RTRS_MSG_NEW_RKEY_F = 1 << 1,
};
Annotation
- Immediate include surface: `linux/uuid.h`, `rdma/rdma_cm.h`, `rdma/ib_verbs.h`, `rdma/ib.h`, `rtrs.h`.
- Detected declarations: `struct rtrs_ib_dev`, `struct rtrs_rdma_dev_pd_ops`, `struct rtrs_rdma_dev_pd`, `struct rtrs_ib_dev`, `struct rtrs_con`, `struct rtrs_path`, `struct rtrs_iu`, `struct rtrs_sg_desc`, `struct rtrs_msg_conn_req`, `struct rtrs_msg_conn_rsp`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.