aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/xprt.h
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-08-25 19:25:49 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-09-23 12:38:33 -0400
commit808012fbb23a52ec59352445d2076d175ad4ab26 (patch)
tree7175edb3917bc35f7f5484f567e91d7303a17663 /include/linux/sunrpc/xprt.h
parent262965f53defd312a294b45366ea17907b6a616b (diff)
[PATCH] RPC: skip over transport-specific heads automatically
Add a generic mechanism for skipping over transport-specific headers when constructing an RPC request. This removes another "xprt->stream" dependency. Test-plan: Write-intensive workload on a single mount point (try both UDP and TCP). Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc/xprt.h')
-rw-r--r--include/linux/sunrpc/xprt.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index e73174c7e45..966c456a0f6 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -155,6 +155,8 @@ struct rpc_xprt {
155 155
156 size_t max_payload; /* largest RPC payload size, 156 size_t max_payload; /* largest RPC payload size,
157 in bytes */ 157 in bytes */
158 unsigned int tsh_size; /* size of transport specific
159 header */
158 160
159 struct rpc_wait_queue sending; /* requests waiting to send */ 161 struct rpc_wait_queue sending; /* requests waiting to send */
160 struct rpc_wait_queue resend; /* requests waiting to resend */ 162 struct rpc_wait_queue resend; /* requests waiting to resend */
@@ -236,6 +238,11 @@ int xprt_adjust_timeout(struct rpc_rqst *req);
236void xprt_release(struct rpc_task *task); 238void xprt_release(struct rpc_task *task);
237int xprt_destroy(struct rpc_xprt *xprt); 239int xprt_destroy(struct rpc_xprt *xprt);
238 240
241static inline u32 *xprt_skip_transport_header(struct rpc_xprt *xprt, u32 *p)
242{
243 return p + xprt->tsh_size;
244}
245
239/* 246/*
240 * Transport switch helper functions 247 * Transport switch helper functions
241 */ 248 */