Skip to content

Commit dadf3e4

Browse files
chuckleverJ. Bruce Fields
authored andcommitted
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>
1 parent 2cf3292 commit dadf3e4

2 files changed

Lines changed: 0 additions & 74 deletions

File tree

‎include/linux/sunrpc/svc_rdma.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ extern int svc_rdma_handle_bc_reply(struct rpc_xprt *xprt,
187187

188188
/* svc_rdma_marshal.c */
189189
extern int svc_rdma_xdr_decode_req(struct xdr_buf *);
190-
extern void svc_rdma_xdr_encode_reply_array(struct rpcrdma_write_array *, int);
191-
extern void svc_rdma_xdr_encode_array_chunk(struct rpcrdma_write_array *, int,
192-
__be32, __be64, u32);
193-
extern unsigned int svc_rdma_xdr_get_reply_hdr_len(__be32 *rdma_resp);
194190

195191
/* svc_rdma_recvfrom.c */
196192
extern int svc_rdma_recvfrom(struct svc_rqst *);

‎net/sunrpc/xprtrdma/svc_rdma_marshal.c‎

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -166,73 +166,3 @@ int svc_rdma_xdr_decode_req(struct xdr_buf *rq_arg)
166166
dprintk("svcrdma: failed to parse transport header\n");
167167
return -EINVAL;
168168
}
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-
*/
176-
unsigned 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-
201-
void 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-
221-
void 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-
228-
void 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-
}

0 commit comments

Comments
 (0)