2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-01 09:43:24 +08:00
linux-next/net/sunrpc/xprtrdma
Chuck Lever 71641d99ce svcrdma: Properly compute .len and .buflen for received RPC Calls
When an RPC-over-RDMA request is received, the Receive buffer
contains a Transport Header possibly followed by an RPC message.

Even though rq_arg.head[0] (as passed to NFSD) does not contain the
Transport Header header, currently rq_arg.len includes the size of
the Transport Header.

That violates the intent of the xdr_buf API contract. .buflen should
include everything, but .len should be exactly the length of the RPC
message in the buffer.

The rq_arg fields are summed together at the end of
svc_rdma_recvfrom to obtain the correct return value. rq_arg.len
really ought to contain the correct number of bytes already, but it
currently doesn't due to the above misbehavior.

Let's instead ensure that .buflen includes the length of the
transport header, and that .len is always equal to head.iov_len +
.page_len + tail.iov_len .

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2017-07-12 15:54:57 -04:00
..
backchannel.c xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup() 2017-05-24 07:53:37 -04:00
fmr_ops.c xprtrdma: Refactor management of mw_list field 2017-02-10 14:02:37 -05:00
frwr_ops.c xprtrdma: Refactor management of mw_list field 2017-02-10 14:02:37 -05:00
Makefile svcrdma: Remove svc_rdma_marshal.c 2017-06-28 14:21:43 -04:00
module.c rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
rpc_rdma.c xprtrdma: Squelch ENOBUFS warnings 2017-04-25 16:12:33 -04:00
svc_rdma_backchannel.c svcrdma: Clean up RPC-over-RDMA backchannel reply processing 2017-04-25 17:25:55 -04:00
svc_rdma_recvfrom.c svcrdma: Properly compute .len and .buflen for received RPC Calls 2017-07-12 15:54:57 -04:00
svc_rdma_rw.c svcrdma: Properly compute .len and .buflen for received RPC Calls 2017-07-12 15:54:57 -04:00
svc_rdma_sendto.c svcrdma: Avoid Send Queue overflow 2017-06-28 14:21:43 -04:00
svc_rdma_transport.c svcrdma: Use generic RDMA R/W API in RPC Call path 2017-07-12 15:54:56 -04:00
svc_rdma.c svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt 2017-04-25 17:25:55 -04:00
transport.c xprtrdma: Support unplugging an HCA from under an NFS mount 2017-04-25 16:12:24 -04:00
verbs.c xprtrdma: Annotate receive workqueue 2017-04-25 16:12:31 -04:00
xprt_rdma.h xprtrdma: Remove rpcrdma_buffer::rb_pool 2017-04-25 16:12:35 -04:00