diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-09-05 15:16:04 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-09-05 15:16:04 -0400 |
commit | f9773b22a27a4234f436c9570afd62d905e00a13 (patch) | |
tree | 1dd82dd838ffc7277f281b57d0e940dc970cd19f /include/linux/sunrpc | |
parent | 7af7a5963c40d8ed853d1004701c73a221d94644 (diff) | |
parent | 67af6f652f9ccad772c48f7c959ad5aa23bdfb40 (diff) |
Merge tag 'nfs-rdma-for-4.14-1' of git://git.linux-nfs.org/projects/anna/linux-nfs into linux-next
NFS-over-RDMA client updates for Linux 4.14
Bugfixes and cleanups:
- Constify rpc_xprt_ops
- Harden RPC call encoding and decoding
- Clean up rpc call decoding to use xdr_streams
- Remove unused variables from various structures
- Refactor code to remove imul instructions
- Rearrange rx_stats structure for better cacheline sharing
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/xdr.h | 13 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 261b48a2701d..86b59e3525a5 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -239,6 +239,19 @@ extern unsigned int xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | |||
239 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 239 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
240 | extern int xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, int (*actor)(struct scatterlist *, void *), void *data); | 240 | extern int xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len, int (*actor)(struct scatterlist *, void *), void *data); |
241 | 241 | ||
242 | /** | ||
243 | * xdr_stream_remaining - Return the number of bytes remaining in the stream | ||
244 | * @xdr: pointer to struct xdr_stream | ||
245 | * | ||
246 | * Return value: | ||
247 | * Number of bytes remaining in @xdr before xdr->end | ||
248 | */ | ||
249 | static inline size_t | ||
250 | xdr_stream_remaining(const struct xdr_stream *xdr) | ||
251 | { | ||
252 | return xdr->nwords << 2; | ||
253 | } | ||
254 | |||
242 | ssize_t xdr_stream_decode_string_dup(struct xdr_stream *xdr, char **str, | 255 | ssize_t xdr_stream_decode_string_dup(struct xdr_stream *xdr, char **str, |
243 | size_t maxlen, gfp_t gfp_flags); | 256 | size_t maxlen, gfp_t gfp_flags); |
244 | /** | 257 | /** |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index a97e6de5f9f2..5a7bff41f6b7 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -174,7 +174,7 @@ enum xprt_transports { | |||
174 | 174 | ||
175 | struct rpc_xprt { | 175 | struct rpc_xprt { |
176 | struct kref kref; /* Reference count */ | 176 | struct kref kref; /* Reference count */ |
177 | struct rpc_xprt_ops * ops; /* transport methods */ | 177 | const struct rpc_xprt_ops *ops; /* transport methods */ |
178 | 178 | ||
179 | const struct rpc_timeout *timeout; /* timeout parms */ | 179 | const struct rpc_timeout *timeout; /* timeout parms */ |
180 | struct sockaddr_storage addr; /* server address */ | 180 | struct sockaddr_storage addr; /* server address */ |