linux/net/sunrpc/xprtrdma
Chuck Lever e248aa7be8 svcrdma: Remove max_sge check at connect time
Two and a half years ago, the client was changed to use gathered
Send for larger inline messages, in commit 655fec6987 ("xprtrdma:
Use gathered Send for large inline messages"). Several fixes were
required because there are a few in-kernel device drivers whose
max_sge is 3, and these were broken by the change.

Apparently my memory is going, because some time later, I submitted
commit 25fd86eca1 ("svcrdma: Don't overrun the SGE array in
svc_rdma_send_ctxt"), and after that, commit f3c1fd0ee2 ("svcrdma:
Reduce max_send_sges"). These too incorrectly assumed in-kernel
device drivers would have more than a few Send SGEs available.

The fix for the server side is not the same. This is because the
fundamental problem on the server is that, whether or not the client
has provisioned a chunk for the RPC reply, the server must squeeze
even the most complex RPC replies into a single RDMA Send. Failing
in the send path because of Send SGE exhaustion should never be an
option.

Therefore, instead of failing when the send path runs out of SGEs,
switch to using a bounce buffer mechanism to handle RPC replies that
are too complex for the device to send directly. That allows us to
remove the max_sge check to enable drivers with small max_sge to
work again.

Reported-by: Don Dutile <ddutile@redhat.com>
Fixes: 25fd86eca1 ("svcrdma: Don't overrun the SGE array in ...")
Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2019-02-06 15:32:34 -05:00
..
backchannel.c NFS client updates for Linux 4.21 2019-01-02 16:35:23 -08:00
frwr_ops.c xprtrdma: Don't leak freed MRs 2019-01-02 12:05:18 -05:00
Makefile xprtrdma: Remove support for FMR memory registration 2019-01-02 12:05:17 -05:00
module.c NFS client updates for Linux 4.18 2018-06-12 10:09:03 -07:00
rpc_rdma.c xprtrdma: Prevent leak of rpcrdma_rep objects 2019-01-02 12:05:19 -05:00
svc_rdma_backchannel.c xprtrdma: Don't wake pending tasks until disconnect is done 2019-01-02 12:05:16 -05:00
svc_rdma_recvfrom.c svcrdma: Optimize the logic that selects the R_key to invalidate 2018-11-28 18:36:03 -05:00
svc_rdma_rw.c A mistake on my part caused me to tag my branch 6 commits too early, 2018-08-23 16:00:10 -07:00
svc_rdma_sendto.c svcrdma: Remove max_sge check at connect time 2019-02-06 15:32:34 -05:00
svc_rdma_transport.c svcrdma: Remove max_sge check at connect time 2019-02-06 15:32:34 -05:00
svc_rdma.c sunrpc: remove svc_rdma_bc_class 2018-12-27 21:01:41 -05:00
transport.c NFS client updates for Linux 4.21 2019-01-02 16:35:23 -08:00
verbs.c xprtrdma: Double free in rpcrdma_sendctxs_create() 2019-01-08 12:06:17 -05:00
xprt_rdma.h NFS client updates for Linux 4.21 2019-01-02 16:35:23 -08:00