drivers/infiniband/ulp/rtrs/rtrs-srv.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/rtrs/rtrs-srv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/ulp/rtrs/rtrs-srv.h- Extension
.h- Size
- 4055 bytes
- Lines
- 158
- 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/device.hlinux/refcount.hlinux/percpu.hrtrs-pri.h
Detected Declarations
struct rtrs_srv_stats_rdma_statsstruct rtrs_srv_statsstruct rtrs_srv_construct rtrs_srv_opstruct rtrs_srv_mrstruct rtrs_srv_pathstruct rtrs_srv_sessstruct rtrs_srv_ctxstruct rtrs_srv_ib_ctxenum rtrs_srv_statefunction rtrs_srv_update_rdma_stats
Annotated Snippet
struct rtrs_srv_stats_rdma_stats {
struct {
u64 cnt;
u64 size_total;
} dir[2];
};
struct rtrs_srv_stats {
struct kobject kobj_stats;
struct rtrs_srv_stats_rdma_stats __percpu *rdma_stats;
struct rtrs_srv_path *srv_path;
};
struct rtrs_srv_con {
struct rtrs_con c;
struct list_head rsp_wr_wait_list;
spinlock_t rsp_wr_wait_lock;
};
/* IO context in rtrs_srv, each io has one */
struct rtrs_srv_op {
struct rtrs_srv_con *con;
u32 msg_id;
u8 dir;
struct rtrs_msg_rdma_read *rd_msg;
struct ib_rdma_wr tx_wr;
struct ib_sge tx_sg;
struct list_head wait_list;
int status;
};
/*
* server side memory region context, when always_invalidate=Y, we need
* queue_depth of memory region to invalidate each memory region.
*/
struct rtrs_srv_mr {
struct ib_mr *mr;
struct sg_table sgt;
struct ib_cqe inv_cqe; /* only for always_invalidate=true */
u32 msg_id; /* only for always_invalidate=true */
u32 msg_off; /* only for always_invalidate=true */
struct rtrs_iu *iu; /* send buffer for new rkey msg */
};
struct rtrs_srv_path {
struct rtrs_path s;
struct rtrs_srv_sess *srv;
struct work_struct close_work;
enum rtrs_srv_state state;
spinlock_t state_lock;
int cur_cq_vector;
struct rtrs_srv_op **ops_ids;
struct percpu_ref ids_inflight_ref;
struct completion complete_done;
struct rtrs_srv_mr *mrs;
unsigned int mrs_num;
dma_addr_t *dma_addr;
bool established;
unsigned int mem_bits;
struct kobject kobj;
struct rtrs_srv_stats *stats;
unsigned long connection_timeout;
};
static inline struct rtrs_srv_path *to_srv_path(struct rtrs_path *s)
{
return container_of(s, struct rtrs_srv_path, s);
}
struct rtrs_srv_sess {
struct list_head paths_list;
int paths_up;
struct mutex paths_ev_mutex;
size_t paths_num;
struct mutex paths_mutex;
uuid_t paths_uuid;
refcount_t refcount;
struct rtrs_srv_ctx *ctx;
struct list_head ctx_list;
void *priv;
size_t queue_depth;
struct page **chunks;
struct device dev;
unsigned int dev_ref;
struct kobject *kobj_paths;
};
struct rtrs_srv_ctx {
struct rtrs_srv_ops ops;
struct rdma_cm_id *cm_id_ip;
Annotation
- Immediate include surface: `linux/device.h`, `linux/refcount.h`, `linux/percpu.h`, `rtrs-pri.h`.
- Detected declarations: `struct rtrs_srv_stats_rdma_stats`, `struct rtrs_srv_stats`, `struct rtrs_srv_con`, `struct rtrs_srv_op`, `struct rtrs_srv_mr`, `struct rtrs_srv_path`, `struct rtrs_srv_sess`, `struct rtrs_srv_ctx`, `struct rtrs_srv_ib_ctx`, `enum rtrs_srv_state`.
- 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.