drivers/infiniband/ulp/rtrs/rtrs-clt.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/rtrs/rtrs-clt.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/ulp/rtrs/rtrs-clt.h- Extension
.h- Size
- 6732 bytes
- Lines
- 250
- 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/device.hrtrs-pri.h
Detected Declarations
struct rtrs_clt_stats_reconnectsstruct rtrs_clt_stats_cpu_migrstruct rtrs_clt_stats_rdmastruct rtrs_clt_stats_pcpustruct rtrs_clt_statsstruct rtrs_clt_construct rtrs_permitstruct rtrs_clt_io_reqstruct rtrs_rbufstruct rtrs_clt_pathstruct rtrs_clt_sessenum rtrs_clt_stateenum rtrs_mp_policyfunction permit_size
Annotated Snippet
struct rtrs_clt_stats_reconnects {
int successful_cnt;
int fail_cnt;
};
/* see Documentation/ABI/testing/sysfs-class-rtrs-client for details */
struct rtrs_clt_stats_cpu_migr {
atomic_t from;
int to;
};
/* stats for Read and write operation.
* see Documentation/ABI/testing/sysfs-class-rtrs-client for details
*/
struct rtrs_clt_stats_rdma {
struct {
u64 cnt;
u64 size_total;
} dir[2];
u64 failover_cnt;
};
struct rtrs_clt_stats_pcpu {
struct rtrs_clt_stats_cpu_migr cpu_migr;
struct rtrs_clt_stats_rdma rdma;
};
struct rtrs_clt_stats {
struct kobject kobj_stats;
struct rtrs_clt_stats_pcpu __percpu *pcpu_stats;
struct rtrs_clt_stats_reconnects reconnects;
atomic_t inflight;
};
struct rtrs_clt_con {
struct rtrs_con c;
struct rtrs_iu *rsp_ius;
u32 queue_num;
unsigned int cpu;
struct mutex con_mutex;
int cm_err;
};
/**
* rtrs_permit - permits the memory allocation for future RDMA operation.
* Combine with irq pinning to keep IO on same CPU.
*/
struct rtrs_permit {
enum rtrs_clt_con_type con_type;
unsigned int cpu_id;
unsigned int mem_id;
unsigned int mem_off;
};
/**
* rtrs_clt_io_req - describes one inflight IO request
*/
struct rtrs_clt_io_req {
struct rtrs_iu *iu;
struct scatterlist *sglist; /* list holding user data */
unsigned int sg_cnt;
unsigned int sg_size;
unsigned int data_len;
unsigned int usr_len;
void *priv;
bool in_use;
enum rtrs_mp_policy mp_policy;
struct rtrs_clt_con *con;
struct ib_sge *sge;
struct rtrs_permit *permit;
enum dma_data_direction dir;
void (*conf)(void *priv, int errno);
struct ib_mr *mr;
struct ib_cqe inv_cqe;
struct completion inv_comp;
int inv_errno;
bool need_inv_comp;
refcount_t ref;
};
struct rtrs_rbuf {
u64 addr;
u32 rkey;
};
struct rtrs_clt_path {
struct rtrs_path s;
struct rtrs_clt_sess *clt;
Annotation
- Immediate include surface: `linux/device.h`, `rtrs-pri.h`.
- Detected declarations: `struct rtrs_clt_stats_reconnects`, `struct rtrs_clt_stats_cpu_migr`, `struct rtrs_clt_stats_rdma`, `struct rtrs_clt_stats_pcpu`, `struct rtrs_clt_stats`, `struct rtrs_clt_con`, `struct rtrs_permit`, `struct rtrs_clt_io_req`, `struct rtrs_rbuf`, `struct rtrs_clt_path`.
- 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.