aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
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 /net/sunrpc/clnt.c
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 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 4677959d2834..cc1b773a79d3 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1075,13 +1075,12 @@ static u32 *
1075call_header(struct rpc_task *task) 1075call_header(struct rpc_task *task)
1076{ 1076{
1077 struct rpc_clnt *clnt = task->tk_client; 1077 struct rpc_clnt *clnt = task->tk_client;
1078 struct rpc_xprt *xprt = clnt->cl_xprt;
1079 struct rpc_rqst *req = task->tk_rqstp; 1078 struct rpc_rqst *req = task->tk_rqstp;
1080 u32 *p = req->rq_svec[0].iov_base; 1079 u32 *p = req->rq_svec[0].iov_base;
1081 1080
1082 /* FIXME: check buffer size? */ 1081 /* FIXME: check buffer size? */
1083 if (xprt->stream) 1082
1084 *p++ = 0; /* fill in later */ 1083 p = xprt_skip_transport_header(task->tk_xprt, p);
1085 *p++ = req->rq_xid; /* XID */ 1084 *p++ = req->rq_xid; /* XID */
1086 *p++ = htonl(RPC_CALL); /* CALL */ 1085 *p++ = htonl(RPC_CALL); /* CALL */
1087 *p++ = htonl(RPC_VERSION); /* RPC version */ 1086 *p++ = htonl(RPC_VERSION); /* RPC version */