diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2017-02-07 11:58:15 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-02-08 14:41:24 -0500 |
commit | cbaf58032efca401834518b905f528ac912449e4 (patch) | |
tree | b1d3b67f20557bc45115931fff8df5aad433f799 /include/linux/sunrpc | |
parent | b880092109323d1cc608c420fa712d3e19508e13 (diff) | |
download | linux-stable-cbaf58032efca401834518b905f528ac912449e4.tar.gz linux-stable-cbaf58032efca401834518b905f528ac912449e4.tar.bz2 linux-stable-cbaf58032efca401834518b905f528ac912449e4.zip |
svcrdma: Another sendto chunk list parsing update
Commit 5fdca6531434 ("svcrdma: Renovate sendto chunk list parsing")
missed a spot. svc_rdma_xdr_get_reply_hdr_len() also assumes the
Write list has only one Write chunk. There's no harm in making this
code more general.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/rpc_rdma.h | 9 | ||||
-rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h index cfda6adcf33c..245fc59b7324 100644 --- a/include/linux/sunrpc/rpc_rdma.h +++ b/include/linux/sunrpc/rpc_rdma.h @@ -110,6 +110,15 @@ struct rpcrdma_msg { }; /* + * XDR sizes, in quads + */ +enum { + rpcrdma_fixed_maxsz = 4, + rpcrdma_segment_maxsz = 4, + rpcrdma_readchunk_maxsz = 2 + rpcrdma_segment_maxsz, +}; + +/* * Smallest RPC/RDMA header: rm_xid through rm_type, then rm_nochunks */ #define RPCRDMA_HDRLEN_MIN (sizeof(__be32) * 7) diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 757fb963696c..551c51816352 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h @@ -218,7 +218,7 @@ extern void svc_rdma_xdr_encode_reply_header(struct svcxprt_rdma *, struct rpcrdma_msg *, struct rpcrdma_msg *, enum rpcrdma_proc); -extern int svc_rdma_xdr_get_reply_hdr_len(struct rpcrdma_msg *); +extern unsigned int svc_rdma_xdr_get_reply_hdr_len(__be32 *rdma_resp); /* svc_rdma_recvfrom.c */ extern int svc_rdma_recvfrom(struct svc_rqst *); |