diff options
author | Roland Dreier <rdreier@cisco.com> | 2008-03-24 12:03:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-24 14:25:25 -0400 |
commit | d3073779f8362d64b804882f5f41c208c4a5e11e (patch) | |
tree | 6aa6a950cc9bed39deafd73bca1e99e108d31b51 | |
parent | b9e76a00749521f2b080fa8a4fb15f66538ab756 (diff) |
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>
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index ab54a736486e..971271602dd0 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |||
@@ -237,14 +237,12 @@ static void rdma_set_ctxt_sge(struct svc_rdma_op_ctxt *ctxt, | |||
237 | 237 | ||
238 | static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) | 238 | static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) |
239 | { | 239 | { |
240 | #ifdef RDMA_TRANSPORT_IWARP | ||
241 | if ((RDMA_TRANSPORT_IWARP == | 240 | if ((RDMA_TRANSPORT_IWARP == |
242 | rdma_node_get_transport(xprt->sc_cm_id-> | 241 | rdma_node_get_transport(xprt->sc_cm_id-> |
243 | device->node_type)) | 242 | device->node_type)) |
244 | && sge_count > 1) | 243 | && sge_count > 1) |
245 | return 1; | 244 | return 1; |
246 | else | 245 | else |
247 | #endif | ||
248 | return min_t(int, sge_count, xprt->sc_max_sge); | 246 | return min_t(int, sge_count, xprt->sc_max_sge); |
249 | } | 247 | } |
250 | 248 | ||