include/rdma/rw.h
Source file repositories/reference/linux-study-clean/include/rdma/rw.h
File Facts
- System
- Linux kernel
- Corpus path
include/rdma/rw.h- Extension
.h- Size
- 3028 bytes
- Lines
- 96
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bvec.hlinux/dma-mapping.hlinux/scatterlist.hrdma/ib_verbs.hrdma/rdma_cm.hrdma/mr_pool.h
Detected Declarations
struct rdma_rw_ctxstruct rdma_rw_reg_ctxstruct bio_vec
Annotated Snippet
struct rdma_rw_ctx {
/* number of RDMA READ/WRITE WRs (not counting MR WRs) */
u32 nr_ops;
/* tag for the union below: */
u8 type;
union {
/* for mapping a single SGE: */
struct {
struct ib_sge sge;
struct ib_rdma_wr wr;
} single;
/* for mapping of multiple SGEs: */
struct {
struct ib_sge *sges;
struct ib_rdma_wr *wrs;
} map;
/* for IOVA-based mapping of bvecs into contiguous DMA range: */
struct {
struct dma_iova_state state;
struct ib_sge sge;
struct ib_rdma_wr wr;
size_t mapped_len;
} iova;
/* for registering multiple WRs: */
struct rdma_rw_reg_ctx {
struct ib_sge sge;
struct ib_rdma_wr wr;
struct ib_reg_wr reg_wr;
struct ib_send_wr inv_wr;
struct ib_mr *mr;
struct sg_table sgt;
} *reg;
};
};
int rdma_rw_ctx_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u32 port_num,
struct scatterlist *sg, u32 sg_cnt, u32 sg_offset,
u64 remote_addr, u32 rkey, enum dma_data_direction dir);
void rdma_rw_ctx_destroy(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
u32 port_num, struct scatterlist *sg, u32 sg_cnt,
enum dma_data_direction dir);
struct bio_vec;
int rdma_rw_ctx_init_bvec(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
u32 port_num, const struct bio_vec *bvecs, u32 nr_bvec,
struct bvec_iter iter, u64 remote_addr, u32 rkey,
enum dma_data_direction dir);
void rdma_rw_ctx_destroy_bvec(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
u32 port_num, const struct bio_vec *bvecs, u32 nr_bvec,
enum dma_data_direction dir);
int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
u32 port_num, struct scatterlist *sg, u32 sg_cnt,
struct scatterlist *prot_sg, u32 prot_sg_cnt,
struct ib_sig_attrs *sig_attrs, u64 remote_addr, u32 rkey,
enum dma_data_direction dir);
void rdma_rw_ctx_destroy_signature(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
u32 port_num, struct scatterlist *sg, u32 sg_cnt,
struct scatterlist *prot_sg, u32 prot_sg_cnt,
enum dma_data_direction dir);
struct ib_send_wr *rdma_rw_ctx_wrs(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
u32 port_num, struct ib_cqe *cqe, struct ib_send_wr *chain_wr);
int rdma_rw_ctx_post(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u32 port_num,
struct ib_cqe *cqe, struct ib_send_wr *chain_wr);
unsigned int rdma_rw_mr_factor(struct ib_device *device, u32 port_num,
unsigned int maxpages);
unsigned int rdma_rw_max_send_wr(struct ib_device *dev, u32 port_num,
unsigned int max_rdma_ctxs, u32 create_flags);
void rdma_rw_init_qp(struct ib_device *dev, struct ib_qp_init_attr *attr);
int rdma_rw_init_mrs(struct ib_qp *qp, struct ib_qp_init_attr *attr);
void rdma_rw_cleanup_mrs(struct ib_qp *qp);
#endif /* _RDMA_RW_H */
Annotation
- Immediate include surface: `linux/bvec.h`, `linux/dma-mapping.h`, `linux/scatterlist.h`, `rdma/ib_verbs.h`, `rdma/rdma_cm.h`, `rdma/mr_pool.h`.
- Detected declarations: `struct rdma_rw_ctx`, `struct rdma_rw_reg_ctx`, `struct bio_vec`.
- Atlas domain: Repository Root And Misc / include.
- 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.