xprtrdma: Reduce required number of send SGEs
The MAX_SEND_SGES check introduced in commit 655fec69 ("xprtrdma: Use gathered Send for large inline messages") fails for devices that have a small max_sge. Instead of checking for a large fixed maximum number of SGEs, check for a minimum small number. RPC-over-RDMA will switch to using a Read chunk if an xdr_buf has more pages than can fit in the device's max_sge limit. This is considerably better than failing all together to mount the server. This fix supports devices that have as few as three send SGEs available. Reported-by: NSelvin Xavier <selvin.xavier@broadcom.com> Reported-by: NDevesh Sharma <devesh.sharma@broadcom.com> Reported-by: NHonggang Li <honli@redhat.com> Reported-by: NRam Amrani <Ram.Amrani@cavium.com> Fixes: 655fec69 ("xprtrdma: Use gathered Send for large ...") Cc: stable@vger.kernel.org # v4.9+ Tested-by: NHonggang Li <honli@redhat.com> Tested-by: NRam Amrani <Ram.Amrani@cavium.com> Tested-by: NSteve Wise <swise@opengridcomputing.com> Reviewed-by: NParav Pandit <parav@mellanox.com> Signed-off-by: NChuck Lever <chuck.lever@oracle.com> Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
Showing
想要评论请 注册 或 登录