linux-stable/net/sunrpc/xprtrdma
Chuck Lever a0544c946d svcrdma: Hook up the logic to return ERR_CHUNK
RFC 5666 Section 4.2 states:

> When the peer detects an RPC-over-RDMA header version that it does
> not support (currently this document defines only version 1), it
> replies with an error code of ERR_VERS, and provides the low and
> high inclusive version numbers it does, in fact, support.

And:

> When other decoding errors are detected in the header or chunks,
> either an RPC decode error MAY be returned or the RPC/RDMA error
> code ERR_CHUNK MUST be returned.

The Linux NFS server does throw ERR_VERS when a client sends it
a request whose rdma_version is not "one." But it does not return
ERR_CHUNK when a header decoding error occurs. It just drops the
request.

To improve protocol extensibility, it should reject invalid values
in the rdma_proc field instead of treating them all like RDMA_MSG.
Otherwise clients can't detect when the server doesn't support
new rdma_proc values.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Devesh Sharma <devesh.sharma@broadcom.com>
Tested-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2016-03-01 13:06:40 -08:00
..
backchannel.c xprtrdma: Disable RPC/RDMA backchannel debugging messages 2015-12-18 15:34:33 -05:00
fmr_ops.c xprtrdma: Add ro_unmap_sync method for FMR 2015-12-18 15:34:33 -05:00
frwr_ops.c Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
Makefile svcrdma: Add class for RDMA backwards direction transport 2016-01-19 15:30:48 -05:00
module.c rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
physical_ops.c xprtrdma: Add ro_unmap_sync method for all-physical registration 2015-12-18 15:34:33 -05:00
rpc_rdma.c xprtrdma: Invalidate in the RPC reply handler 2015-12-18 15:34:33 -05:00
svc_rdma.c svcrdma: Define maximum number of backchannel requests 2016-01-19 15:30:48 -05:00
svc_rdma_backchannel.c svcrdma: svc_rdma_post_recv() should close connection on error 2016-03-01 13:06:37 -08:00
svc_rdma_marshal.c svcrdma: Hook up the logic to return ERR_CHUNK 2016-03-01 13:06:40 -08:00
svc_rdma_recvfrom.c svcrdma: Hook up the logic to return ERR_CHUNK 2016-03-01 13:06:40 -08:00
svc_rdma_sendto.c svcrdma: Make RDMA_ERROR messages work 2016-03-01 13:06:38 -08:00
svc_rdma_transport.c svcrdma: Make RDMA_ERROR messages work 2016-03-01 13:06:38 -08:00
transport.c Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
verbs.c Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00
xprt_rdma.h Initial roundup of 4.5 merge window patches 2016-01-23 18:45:06 -08:00