linux-sg2042/net/sunrpc/xprtrdma
Chuck Lever 25fd86eca1 svcrdma: Don't overrun the SGE array in svc_rdma_send_ctxt
Receive buffers are always the same size, but each Send WR has a
variable number of SGEs, based on the contents of the xdr_buf being
sent.

While assembling a Send WR, keep track of the number of SGEs so that
we don't exceed the device's maximum, or walk off the end of the
Send SGE array.

For now the Send path just fails if it exceeds the maximum.

The current logic in svc_rdma_accept bases the maximum number of
Send SGEs on the largest NFS request that can be sent or received.
In the transport layer, the limit is actually based on the
capabilities of the underlying device, not on properties of the
Upper Layer Protocol.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2018-05-11 15:48:57 -04:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
backchannel.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
fmr_ops.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
frwr_ops.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
module.c xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00
rpc_rdma.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
svc_rdma.c xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00
svc_rdma_backchannel.c svcrdma: Introduce svc_rdma_send_ctxt 2018-05-11 15:48:57 -04:00
svc_rdma_recvfrom.c svcrdma: Introduce svc_rdma_send_ctxt 2018-05-11 15:48:57 -04:00
svc_rdma_rw.c svcrdma: Persistently allocate and DMA-map Receive buffers 2018-05-11 15:48:57 -04:00
svc_rdma_sendto.c svcrdma: Don't overrun the SGE array in svc_rdma_send_ctxt 2018-05-11 15:48:57 -04:00
svc_rdma_transport.c svcrdma: Don't overrun the SGE array in svc_rdma_send_ctxt 2018-05-11 15:48:57 -04:00
transport.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
verbs.c xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00
xprt_rdma.h xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00