linux_dsm_epyc7002/net/sunrpc/xprtrdma
Chuck Lever 52d28fe4f6 xprtrdma: Try to fail quickly if proto=rdma
rdma_resolve_addr(3) says:

> This call is used to map a given destination IP address to a
> usable RDMA address. The IP to RDMA address mapping is done
> using the local routing tables, or via ARP.

If this can't be done, there's no local device that can be used
to establish an RDMA-capable network path to the remote. In this
case, the RDMA CM very quickly posts an RDMA_CM_EVENT_ADDR_ERROR
upcall.

Currently rpcrdma_conn_upcall() converts RDMA_CM_EVENT_ADDR_ERROR
to EHOSTUNREACH. mount.nfs seems to want to retry EHOSTUNREACH
forever, thinking that this is a temporary situation. This makes
mount.nfs appear to hang if I try to mount with proto=rdma through,
say, a conventional Ethernet device.

If the admin has specified proto=rdma along with a server IP address
that requires a network path that does not support RDMA, instead
let's fail with a permanent error. -EPROTONOSUPPORT is returned when
NFSv4 or one of its minor versions is not supported.

-EPROTO is not (currently) retried by mount.nfs.

There are potentially other similar cases where -EPROTO is an
appropriate return code.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Olga Kornievskaia <kolga@netapp.com>
Tested-by: Anna Schumaker <Anna.Schumaker@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2018-05-07 09:20:03 -04:00
..
backchannel.c xprtrdma: Move creation of rl_rdmabuf to rpcrdma_create_req 2018-04-10 16:06:22 -04:00
fmr_ops.c xprtrdma: Chain Send to FastReg WRs 2018-04-10 16:06:22 -04:00
frwr_ops.c xprtrdma: Chain Send to FastReg WRs 2018-04-10 16:06:22 -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
module.c xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
rpc_rdma.c xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
svc_rdma_backchannel.c svcrdma: Post Receives in the Receive completion handler 2018-01-18 11:52:51 -05:00
svc_rdma_recvfrom.c svcrdma: Clean up rdma_build_arg_xdr 2018-03-20 17:32:13 -04:00
svc_rdma_rw.c svcrdma: Fix Read chunk round-up 2018-02-08 13:40:17 -05:00
svc_rdma_sendto.c svcrdma: Post Receives in the Receive completion handler 2018-01-18 11:52:51 -05:00
svc_rdma_transport.c sunrpc: Save remote presentation address in svc_xprt for trace events 2018-04-03 15:08:11 -04:00
svc_rdma.c svcrdma: Consult max_qp_init_rd_atom when accepting connections 2018-03-20 17:32:13 -04:00
transport.c xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
verbs.c xprtrdma: Try to fail quickly if proto=rdma 2018-05-07 09:20:03 -04:00
xprt_rdma.h xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00