aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2017-04-09 13:07:21 -0400
committerJ. Bruce Fields <bfields@redhat.com>2017-04-25 17:25:56 -0400
commitdadf3e435debb85dfcf28c157012047153a21a97 (patch)
tree79622c7cb1f1637bc37bc50d2e83b8636d38c223
parent2cf32924c68a22783e6f630e1b5345a80aa1a376 (diff)
svcrdma: Clean out old XDR encoders
Clean up: These have been replaced and are no longer used. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--include/linux/sunrpc/svc_rdma.h4
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_marshal.c70
2 files changed, 0 insertions, 74 deletions
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index 479bb7f65233..f3787d800ba4 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -187,10 +187,6 @@ extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt,
187 187
188/* svc_rdma_marshal.c */ 188/* svc_rdma_marshal.c */
189extern int svc_rdma_xdr_decode_req(struct xdr_buf *); 189extern int svc_rdma_xdr_decode_req(struct xdr_buf *);
190extern void svc_rdma_xdr_encode_reply_array(struct rpcrdma_write_array *, int);
191extern void svc_rdma_xdr_encode_array_chunk(struct rpcrdma_write_array *, int,
192 __be32, __be64, u32);
193extern unsigned int svc_rdma_xdr_get_reply_hdr_len(__be32 *rdma_resp);
194 190
195/* svc_rdma_recvfrom.c */ 191/* svc_rdma_recvfrom.c */
196extern int svc_rdma_recvfrom(struct svc_rqst *); 192extern int svc_rdma_recvfrom(struct svc_rqst *);
diff --git a/net/sunrpc/xprtrdma/svc_rdma_marshal.c b/net/sunrpc/xprtrdma/svc_rdma_marshal.c
index ae58a897eca0..bdcf7d85a3dc 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_marshal.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_marshal.c
@@ -166,73 +166,3 @@ out_inval:
166 dprintk("svcrdma: failed to parse transport header\n"); 166 dprintk("svcrdma: failed to parse transport header\n");
167 return -EINVAL; 167 return -EINVAL;
168} 168}
169
170/**
171 * svc_rdma_xdr_get_reply_hdr_length - Get length of Reply transport header
172 * @rdma_resp: buffer containing Reply transport header
173 *
174 * Returns length of transport header, in bytes.
175 */
176unsigned int svc_rdma_xdr_get_reply_hdr_len(__be32 *rdma_resp)
177{
178 unsigned int nsegs;
179 __be32 *p;
180
181 p = rdma_resp;
182
183 /* RPC-over-RDMA V1 replies never have a Read list. */
184 p += rpcrdma_fixed_maxsz + 1;
185
186 /* Skip Write list. */
187 while (*p++ != xdr_zero) {
188 nsegs = be32_to_cpup(p++);
189 p += nsegs * rpcrdma_segment_maxsz;
190 }
191
192 /* Skip Reply chunk. */
193 if (*p++ != xdr_zero) {
194 nsegs = be32_to_cpup(p++);
195 p += nsegs * rpcrdma_segment_maxsz;
196 }
197
198 return (unsigned long)p - (unsigned long)rdma_resp;
199}
200
201void svc_rdma_xdr_encode_write_list(struct rpcrdma_msg *rmsgp, int chunks)
202{
203 struct rpcrdma_write_array *ary;
204
205 /* no read-list */
206 rmsgp->rm_body.rm_chunks[0] = xdr_zero;
207
208 /* write-array discrim */
209 ary = (struct rpcrdma_write_array *)
210 &rmsgp->rm_body.rm_chunks[1];
211 ary->wc_discrim = xdr_one;
212 ary->wc_nchunks = cpu_to_be32(chunks);
213
214 /* write-list terminator */
215 ary->wc_array[chunks].wc_target.rs_handle = xdr_zero;
216
217 /* reply-array discriminator */
218 ary->wc_array[chunks].wc_target.rs_length = xdr_zero;
219}
220
221void svc_rdma_xdr_encode_reply_array(struct rpcrdma_write_array *ary,
222 int chunks)
223{
224 ary->wc_discrim = xdr_one;
225 ary->wc_nchunks = cpu_to_be32(chunks);
226}
227
228void svc_rdma_xdr_encode_array_chunk(struct rpcrdma_write_array *ary,
229 int chunk_no,
230 __be32 rs_handle,
231 __be64 rs_offset,
232 u32 write_len)
233{
234 struct rpcrdma_segment *seg = &ary->wc_array[chunk_no].wc_target;
235 seg->rs_handle = rs_handle;
236 seg->rs_offset = rs_offset;
237 seg->rs_length = cpu_to_be32(write_len);
238}