svcrdma: Clean out old XDR encoders
authorChuck Lever <chuck.lever@oracle.com>
Sun, 9 Apr 2017 17:07:21 +0000 (13:07 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 25 Apr 2017 21:25:56 +0000 (17:25 -0400)
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>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma_marshal.c

index 479bb7f6523302641f0a90db3ed47a444149763c..f3787d800ba46b7cdae49e19584fe64cbdff2ef3 100644 (file)
@@ -187,10 +187,6 @@ extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt,
 
 /* svc_rdma_marshal.c */
 extern int svc_rdma_xdr_decode_req(struct xdr_buf *);
-extern void svc_rdma_xdr_encode_reply_array(struct rpcrdma_write_array *, int);
-extern void svc_rdma_xdr_encode_array_chunk(struct rpcrdma_write_array *, int,
-                                           __be32, __be64, u32);
-extern unsigned int svc_rdma_xdr_get_reply_hdr_len(__be32 *rdma_resp);
 
 /* svc_rdma_recvfrom.c */
 extern int svc_rdma_recvfrom(struct svc_rqst *);
index ae58a897eca0178644bc1c74716bc92ea28572fe..bdcf7d85a3dc098e63ca3ff77309496262b39b76 100644 (file)
@@ -166,73 +166,3 @@ out_inval:
        dprintk("svcrdma: failed to parse transport header\n");
        return -EINVAL;
 }
-
-/**
- * svc_rdma_xdr_get_reply_hdr_length - Get length of Reply transport header
- * @rdma_resp: buffer containing Reply transport header
- *
- * Returns length of transport header, in bytes.
- */
-unsigned int svc_rdma_xdr_get_reply_hdr_len(__be32 *rdma_resp)
-{
-       unsigned int nsegs;
-       __be32 *p;
-
-       p = rdma_resp;
-
-       /* RPC-over-RDMA V1 replies never have a Read list. */
-       p += rpcrdma_fixed_maxsz + 1;
-
-       /* Skip Write list. */
-       while (*p++ != xdr_zero) {
-               nsegs = be32_to_cpup(p++);
-               p += nsegs * rpcrdma_segment_maxsz;
-       }
-
-       /* Skip Reply chunk. */
-       if (*p++ != xdr_zero) {
-               nsegs = be32_to_cpup(p++);
-               p += nsegs * rpcrdma_segment_maxsz;
-       }
-
-       return (unsigned long)p - (unsigned long)rdma_resp;
-}
-
-void svc_rdma_xdr_encode_write_list(struct rpcrdma_msg *rmsgp, int chunks)
-{
-       struct rpcrdma_write_array *ary;
-
-       /* no read-list */
-       rmsgp->rm_body.rm_chunks[0] = xdr_zero;
-
-       /* write-array discrim */
-       ary = (struct rpcrdma_write_array *)
-               &rmsgp->rm_body.rm_chunks[1];
-       ary->wc_discrim = xdr_one;
-       ary->wc_nchunks = cpu_to_be32(chunks);
-
-       /* write-list terminator */
-       ary->wc_array[chunks].wc_target.rs_handle = xdr_zero;
-
-       /* reply-array discriminator */
-       ary->wc_array[chunks].wc_target.rs_length = xdr_zero;
-}
-
-void svc_rdma_xdr_encode_reply_array(struct rpcrdma_write_array *ary,
-                                int chunks)
-{
-       ary->wc_discrim = xdr_one;
-       ary->wc_nchunks = cpu_to_be32(chunks);
-}
-
-void svc_rdma_xdr_encode_array_chunk(struct rpcrdma_write_array *ary,
-                                    int chunk_no,
-                                    __be32 rs_handle,
-                                    __be64 rs_offset,
-                                    u32 write_len)
-{
-       struct rpcrdma_segment *seg = &ary->wc_array[chunk_no].wc_target;
-       seg->rs_handle = rs_handle;
-       seg->rs_offset = rs_offset;
-       seg->rs_length = cpu_to_be32(write_len);
-}