aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2017-06-23 17:18:33 -0400
committerJ. Bruce Fields <bfields@redhat.com>2017-07-12 15:54:56 -0400
commitcafc739892f34b9090413179ca259409fc43bfae (patch)
tree8e9b937a90238519f7d41e2fe918bdc159b31196 /include/linux/sunrpc
parent026d958b38c628a1b4ced534808945365e2747a5 (diff)
svcrdma: Use generic RDMA R/W API in RPC Call path
The current svcrdma recvfrom code path has a lot of detail about registration mode and the type of port (iWARP, IB, etc). Instead, use the RDMA core's generic R/W API. This shares code with other RDMA-enabled ULPs that manages the gory details of buffer registration and the posting of RDMA Read Work Requests. Since the Read list marshaling code is being replaced, I took the opportunity to replace C structure-based XDR encoding code with more portable code that uses pointer arithmetic. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/svc_rdma.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index cf5d5412298b..b1ba19ba1071 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -82,10 +82,7 @@ struct svc_rdma_op_ctxt {
82 int hdr_count; 82 int hdr_count;
83 struct xdr_buf arg; 83 struct xdr_buf arg;
84 struct ib_cqe cqe; 84 struct ib_cqe cqe;
85 struct ib_cqe reg_cqe;
86 struct ib_cqe inv_cqe;
87 u32 byte_len; 85 u32 byte_len;
88 u32 position;
89 struct svcxprt_rdma *xprt; 86 struct svcxprt_rdma *xprt;
90 unsigned long flags; 87 unsigned long flags;
91 enum dma_data_direction direction; 88 enum dma_data_direction direction;
@@ -116,7 +113,6 @@ struct svcxprt_rdma {
116 struct list_head sc_accept_q; /* Conn. waiting accept */ 113 struct list_head sc_accept_q; /* Conn. waiting accept */
117 int sc_ord; /* RDMA read limit */ 114 int sc_ord; /* RDMA read limit */
118 int sc_max_sge; 115 int sc_max_sge;
119 int sc_max_sge_rd; /* max sge for read target */
120 bool sc_snd_w_inv; /* OK to use Send With Invalidate */ 116 bool sc_snd_w_inv; /* OK to use Send With Invalidate */
121 117
122 atomic_t sc_sq_avail; /* SQEs ready to be consumed */ 118 atomic_t sc_sq_avail; /* SQEs ready to be consumed */
@@ -141,10 +137,6 @@ struct svcxprt_rdma {
141 struct ib_qp *sc_qp; 137 struct ib_qp *sc_qp;
142 struct ib_cq *sc_rq_cq; 138 struct ib_cq *sc_rq_cq;
143 struct ib_cq *sc_sq_cq; 139 struct ib_cq *sc_sq_cq;
144 int (*sc_reader)(struct svcxprt_rdma *,
145 struct svc_rqst *,
146 struct svc_rdma_op_ctxt *,
147 int *, u32 *, u32, u32, u64, bool);
148 u32 sc_dev_caps; /* distilled device caps */ 140 u32 sc_dev_caps; /* distilled device caps */
149 unsigned int sc_frmr_pg_list_len; 141 unsigned int sc_frmr_pg_list_len;
150 struct list_head sc_frmr_q; 142 struct list_head sc_frmr_q;
@@ -187,12 +179,6 @@ extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt,
187 179
188/* svc_rdma_recvfrom.c */ 180/* svc_rdma_recvfrom.c */
189extern int svc_rdma_recvfrom(struct svc_rqst *); 181extern int svc_rdma_recvfrom(struct svc_rqst *);
190extern int rdma_read_chunk_lcl(struct svcxprt_rdma *, struct svc_rqst *,
191 struct svc_rdma_op_ctxt *, int *, u32 *,
192 u32, u32, u64, bool);
193extern int rdma_read_chunk_frmr(struct svcxprt_rdma *, struct svc_rqst *,
194 struct svc_rdma_op_ctxt *, int *, u32 *,
195 u32, u32, u64, bool);
196 182
197/* svc_rdma_rw.c */ 183/* svc_rdma_rw.c */
198extern void svc_rdma_destroy_rw_ctxts(struct svcxprt_rdma *rdma); 184extern void svc_rdma_destroy_rw_ctxts(struct svcxprt_rdma *rdma);