diff options
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 05eb4664d0dd..bd8749cc8084 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
@@ -86,6 +86,31 @@ struct svc_rdma_op_ctxt { | |||
86 | struct page *pages[RPCSVC_MAXPAGES]; | 86 | struct page *pages[RPCSVC_MAXPAGES]; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | /* | ||
90 | * NFS_ requests are mapped on the client side by the chunk lists in | ||
91 | * the RPCRDMA header. During the fetching of the RPC from the client | ||
92 | * and the writing of the reply to the client, the memory in the | ||
93 | * client and the memory in the server must be mapped as contiguous | ||
94 | * vaddr/len for access by the hardware. These data strucures keep | ||
95 | * these mappings. | ||
96 | * | ||
97 | * For an RDMA_WRITE, the 'sge' maps the RPC REPLY. For RDMA_READ, the | ||
98 | * 'sge' in the svc_rdma_req_map maps the server side RPC reply and the | ||
99 | * 'ch' field maps the read-list of the RPCRDMA header to the 'sge' | ||
100 | * mapping of the reply. | ||
101 | */ | ||
102 | struct svc_rdma_chunk_sge { | ||
103 | int start; /* sge no for this chunk */ | ||
104 | int count; /* sge count for this chunk */ | ||
105 | }; | ||
106 | struct svc_rdma_req_map { | ||
107 | unsigned long count; | ||
108 | union { | ||
109 | struct kvec sge[RPCSVC_MAXPAGES]; | ||
110 | struct svc_rdma_chunk_sge ch[RPCSVC_MAXPAGES]; | ||
111 | }; | ||
112 | }; | ||
113 | |||
89 | #define RDMACTXT_F_LAST_CTXT 2 | 114 | #define RDMACTXT_F_LAST_CTXT 2 |
90 | 115 | ||
91 | struct svcxprt_rdma { | 116 | struct svcxprt_rdma { |
@@ -173,6 +198,8 @@ extern int svc_rdma_post_recv(struct svcxprt_rdma *); | |||
173 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); | 198 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); |
174 | extern struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *); | 199 | extern struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *); |
175 | extern void svc_rdma_put_context(struct svc_rdma_op_ctxt *, int); | 200 | extern void svc_rdma_put_context(struct svc_rdma_op_ctxt *, int); |
201 | extern struct svc_rdma_req_map *svc_rdma_get_req_map(void); | ||
202 | extern void svc_rdma_put_req_map(struct svc_rdma_req_map *); | ||
176 | extern void svc_sq_reap(struct svcxprt_rdma *); | 203 | extern void svc_sq_reap(struct svcxprt_rdma *); |
177 | extern void svc_rq_reap(struct svcxprt_rdma *); | 204 | extern void svc_rq_reap(struct svcxprt_rdma *); |
178 | extern struct svc_xprt_class svc_rdma_class; | 205 | extern struct svc_xprt_class svc_rdma_class; |