kernel_optimize_test/net/sunrpc/xprtrdma
Chuck Lever 4757d90b15 svcrdma: Report Write/Reply chunk overruns
Observed at Connectathon 2017.

If a client has underestimated the size of a Write or Reply chunk,
the Linux server writes as much payload data as it can, then it
recognizes there was a problem and closes the connection without
sending the transport header.

This creates a couple of problems:

<> The client never receives indication of the server-side failure,
   so it continues to retransmit the bad RPC. Forward progress on
   the transport is blocked.

<> The reply payload pages are not moved out of the svc_rqst, thus
   they can be released by the RPC server before the RDMA Writes
   have completed.

The new rdma_rw-ized helpers return a distinct error code when a
Write/Reply chunk overrun occurs, so it's now easy for the caller
(svc_rdma_sendto) to recognize this case.

Instead of dropping the connection, post an RDMA_ERROR message. The
client now sees an RDMA_ERROR and can properly terminate the RPC
transaction.

As part of the new logic, set up the same delayed release for these
payload pages as would have occurred in the normal case.

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>
2017-04-25 17:25:55 -04:00
..
backchannel.c
fmr_ops.c
frwr_ops.c
Makefile svcrdma: Introduce local rdma_rw API helpers 2017-04-25 17:25:55 -04:00
module.c
rpc_rdma.c
svc_rdma_backchannel.c svcrdma: Use rdma_rw API in RPC reply path 2017-04-25 17:25:55 -04:00
svc_rdma_marshal.c svcrdma: Clean up RDMA_ERROR path 2017-04-25 17:25:55 -04:00
svc_rdma_recvfrom.c svcrdma: Clean up RDMA_ERROR path 2017-04-25 17:25:55 -04:00
svc_rdma_rw.c svcrdma: Introduce local rdma_rw API helpers 2017-04-25 17:25:55 -04:00
svc_rdma_sendto.c svcrdma: Report Write/Reply chunk overruns 2017-04-25 17:25:55 -04:00
svc_rdma_transport.c svcrdma: Use rdma_rw API in RPC reply path 2017-04-25 17:25:55 -04:00
svc_rdma.c svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT 2017-04-25 17:25:54 -04:00
transport.c
verbs.c xprtrdma: Squelch kbuild sparse complaint 2017-03-17 16:05:21 -04:00
xprt_rdma.h