svcrdma: Update synopsis of svc_rdma_send_reply_chunk()
Preparing for subsequent patches, no behavior change expected. Pass the RPC Call's svc_rdma_recv_ctxt deeper into the sendto() path. This enables passing more information about Requester- provided Write and Reply chunks into the lower-level send functions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
Родитель
2fe8c44633
Коммит
6fa5785e78
|
@ -179,7 +179,7 @@ extern int svc_rdma_send_write_chunk(struct svcxprt_rdma *rdma,
|
||||||
unsigned int offset,
|
unsigned int offset,
|
||||||
unsigned long length);
|
unsigned long length);
|
||||||
extern int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma,
|
extern int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma,
|
||||||
__be32 *rp_ch, bool writelist,
|
const struct svc_rdma_recv_ctxt *rctxt,
|
||||||
struct xdr_buf *xdr);
|
struct xdr_buf *xdr);
|
||||||
|
|
||||||
/* svc_rdma_sendto.c */
|
/* svc_rdma_sendto.c */
|
||||||
|
|
|
@ -545,8 +545,7 @@ out_err:
|
||||||
/**
|
/**
|
||||||
* svc_rdma_send_reply_chunk - Write all segments in the Reply chunk
|
* svc_rdma_send_reply_chunk - Write all segments in the Reply chunk
|
||||||
* @rdma: controlling RDMA transport
|
* @rdma: controlling RDMA transport
|
||||||
* @rp_ch: Reply chunk provided by client
|
* @rctxt: Write and Reply chunks from client
|
||||||
* @writelist: true if client provided a Write list
|
|
||||||
* @xdr: xdr_buf containing an RPC Reply
|
* @xdr: xdr_buf containing an RPC Reply
|
||||||
*
|
*
|
||||||
* Returns a non-negative number of bytes the chunk consumed, or
|
* Returns a non-negative number of bytes the chunk consumed, or
|
||||||
|
@ -556,13 +555,14 @@ out_err:
|
||||||
* %-ENOTCONN if posting failed (connection is lost),
|
* %-ENOTCONN if posting failed (connection is lost),
|
||||||
* %-EIO if rdma_rw initialization failed (DMA mapping, etc).
|
* %-EIO if rdma_rw initialization failed (DMA mapping, etc).
|
||||||
*/
|
*/
|
||||||
int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma, __be32 *rp_ch,
|
int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma,
|
||||||
bool writelist, struct xdr_buf *xdr)
|
const struct svc_rdma_recv_ctxt *rctxt,
|
||||||
|
struct xdr_buf *xdr)
|
||||||
{
|
{
|
||||||
struct svc_rdma_write_info *info;
|
struct svc_rdma_write_info *info;
|
||||||
int consumed, ret;
|
int consumed, ret;
|
||||||
|
|
||||||
info = svc_rdma_write_info_alloc(rdma, rp_ch);
|
info = svc_rdma_write_info_alloc(rdma, rctxt->rc_reply_chunk);
|
||||||
if (!info)
|
if (!info)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -574,7 +574,7 @@ int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma, __be32 *rp_ch,
|
||||||
/* Send the page list in the Reply chunk only if the
|
/* Send the page list in the Reply chunk only if the
|
||||||
* client did not provide Write chunks.
|
* client did not provide Write chunks.
|
||||||
*/
|
*/
|
||||||
if (!writelist && xdr->page_len) {
|
if (!rctxt->rc_write_list && xdr->page_len) {
|
||||||
ret = svc_rdma_send_xdr_pagelist(info, xdr,
|
ret = svc_rdma_send_xdr_pagelist(info, xdr,
|
||||||
xdr->head[0].iov_len,
|
xdr->head[0].iov_len,
|
||||||
xdr->page_len);
|
xdr->page_len);
|
||||||
|
|
|
@ -833,7 +833,7 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
|
||||||
svc_rdma_xdr_encode_write_list(rdma_resp, wr_lst, ret);
|
svc_rdma_xdr_encode_write_list(rdma_resp, wr_lst, ret);
|
||||||
}
|
}
|
||||||
if (rp_ch) {
|
if (rp_ch) {
|
||||||
ret = svc_rdma_send_reply_chunk(rdma, rp_ch, wr_lst, xdr);
|
ret = svc_rdma_send_reply_chunk(rdma, rctxt, &rqstp->rq_res);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto err2;
|
goto err2;
|
||||||
svc_rdma_xdr_encode_reply_chunk(rdma_resp, rp_ch, ret);
|
svc_rdma_xdr_encode_reply_chunk(rdma_resp, rp_ch, ret);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче