linux/net/sunrpc
Roland Dreier d3073779f8 SVCRDMA: Use only 1 RDMA read scatter entry for iWARP adapters
The iWARP protocol limits RDMA read requests to a single scatter
entry.  NFS/RDMA has code in rdma_read_max_sge() that is supposed to
limit the sge_count for RDMA read requests to 1, but the code to do
that is inside an #ifdef RDMA_TRANSPORT_IWARP block.  In the mainline
kernel at least, RDMA_TRANSPORT_IWARP is an enum and not a
preprocessor #define, so the #ifdef'ed code is never compiled.

In my test of a kernel build with -j8 on an NFS/RDMA mount, this
problem eventually leads to trouble starting with:

    svcrdma: Error posting send = -22
    svcrdma : RDMA_READ error = -22

and things go downhill from there.

The trivial fix is to delete the #ifdef guard.  The check seems to be
a remnant of when the NFS/RDMA code was not merged and needed to
compile against multiple kernel versions, although I don't think it
ever worked as intended.  In any case now that the code is upstream
there's no need to test whether the RDMA_TRANSPORT_IWARP constant is
defined or not.

Without this patch, my kernel build on an NFS/RDMA mount using NetEffect
adapters quickly and 100% reproducibly failed with an error like:

    ld: final link failed: Software caused connection abort

With the patch applied I was able to complete a kernel build on the
same setup.

(Tom Tucker says this is "actually an _ancient_ remnant when it had to
compile against iWARP vs. non-iWARP enabled OFA trees.")

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-24 11:25:25 -07:00
..
auth_gss [SUNRPC]: net/* NULL noise 2008-03-17 22:48:03 -07:00
xprtrdma SVCRDMA: Use only 1 RDMA read scatter entry for iWARP adapters 2008-03-24 11:25:25 -07:00
Makefile svc: Add an svc transport class 2008-02-01 16:42:07 -05:00
auth.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
auth_null.c SUNRPC: cleanup rpc credential cache garbage collection 2007-07-10 23:40:35 -04:00
auth_unix.c SUNRPC: Remove the tk_auth macro... 2007-07-10 23:40:37 -04:00
cache.c [SUNRPC]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:00:59 -08:00
clnt.c docbook: sunrpc filenames and notation fixes 2008-02-13 16:21:19 -08:00
rpc_pipe.c Introduce path_put() 2008-02-14 21:13:33 -08:00
rpcb_clnt.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
sched.c Merge branch 'task_killable' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-02-01 11:45:47 +11:00
socklib.c SUNRPC: temp var should match return type of xdr_skb_read_actor 2008-01-30 02:05:43 -05:00
stats.c [SUNRPC]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:00:59 -08:00
sunrpc_syms.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svc.c SUNRPC: RPC program information is stored in unsigned integers 2008-02-01 17:01:31 -05:00
svc_xprt.c [NET] endianness noise: INADDR_ANY 2008-03-17 22:44:53 -07:00
svcauth.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svcauth_unix.c SUNRPC: Move exported symbol definitions after function declaration part 2 2008-02-01 17:01:24 -05:00
svcsock.c Wrap buffers used for rpc debug printks into RPC_IFDEBUG 2008-02-21 18:42:29 -05:00
sysctl.c svc: Add /proc/sys/sunrpc/transport files 2008-02-01 16:42:13 -05:00
timer.c SUNRPC: add EXPORT_SYMBOL_GPL for generic transport functions 2007-10-09 17:17:36 -04:00
xdr.c SUNRPC: Use unsigned string lengths in xdr_decode_string_inplace 2008-02-01 16:42:02 -05:00
xprt.c docbook: sunrpc filenames and notation fixes 2008-02-13 16:21:19 -08:00
xprtsock.c SUNRPC: Clean up functions that free address_strings array 2008-01-30 02:06:08 -05:00