~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/rdma/rw.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (c) 2016 HGST, a Western Digital Company.
  4  */
  5 #ifndef _RDMA_RW_H
  6 #define _RDMA_RW_H
  7 
  8 #include <linux/dma-mapping.h>
  9 #include <linux/scatterlist.h>
 10 #include <rdma/ib_verbs.h>
 11 #include <rdma/rdma_cm.h>
 12 #include <rdma/mr_pool.h>
 13 
 14 struct rdma_rw_ctx {
 15         /* number of RDMA READ/WRITE WRs (not counting MR WRs) */
 16         u32                     nr_ops;
 17 
 18         /* tag for the union below: */
 19         u8                      type;
 20 
 21         union {
 22                 /* for mapping a single SGE: */
 23                 struct {
 24                         struct ib_sge           sge;
 25                         struct ib_rdma_wr       wr;
 26                 } single;
 27 
 28                 /* for mapping of multiple SGEs: */
 29                 struct {
 30                         struct ib_sge           *sges;
 31                         struct ib_rdma_wr       *wrs;
 32                 } map;
 33 
 34                 /* for registering multiple WRs: */
 35                 struct rdma_rw_reg_ctx {
 36                         struct ib_sge           sge;
 37                         struct ib_rdma_wr       wr;
 38                         struct ib_reg_wr        reg_wr;
 39                         struct ib_send_wr       inv_wr;
 40                         struct ib_mr            *mr;
 41                 } *reg;
 42         };
 43 };
 44 
 45 int rdma_rw_ctx_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u32 port_num,
 46                 struct scatterlist *sg, u32 sg_cnt, u32 sg_offset,
 47                 u64 remote_addr, u32 rkey, enum dma_data_direction dir);
 48 void rdma_rw_ctx_destroy(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
 49                          u32 port_num, struct scatterlist *sg, u32 sg_cnt,
 50                          enum dma_data_direction dir);
 51 
 52 int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
 53                 u32 port_num, struct scatterlist *sg, u32 sg_cnt,
 54                 struct scatterlist *prot_sg, u32 prot_sg_cnt,
 55                 struct ib_sig_attrs *sig_attrs, u64 remote_addr, u32 rkey,
 56                 enum dma_data_direction dir);
 57 void rdma_rw_ctx_destroy_signature(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
 58                 u32 port_num, struct scatterlist *sg, u32 sg_cnt,
 59                 struct scatterlist *prot_sg, u32 prot_sg_cnt,
 60                 enum dma_data_direction dir);
 61 
 62 struct ib_send_wr *rdma_rw_ctx_wrs(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
 63                 u32 port_num, struct ib_cqe *cqe, struct ib_send_wr *chain_wr);
 64 int rdma_rw_ctx_post(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u32 port_num,
 65                 struct ib_cqe *cqe, struct ib_send_wr *chain_wr);
 66 
 67 unsigned int rdma_rw_mr_factor(struct ib_device *device, u32 port_num,
 68                 unsigned int maxpages);
 69 void rdma_rw_init_qp(struct ib_device *dev, struct ib_qp_init_attr *attr);
 70 int rdma_rw_init_mrs(struct ib_qp *qp, struct ib_qp_init_attr *attr);
 71 void rdma_rw_cleanup_mrs(struct ib_qp *qp);
 72 
 73 #endif /* _RDMA_RW_H */
 74 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php