aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/xprt.h
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-08-25 19:25:51 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-09-23 12:38:38 -0400
commit12a804698b29d040b7cdd92e8a44b0e75164dae9 (patch)
tree9885cf95a0a2945ad8cd00de59633a0aa16a3599 /include/linux/sunrpc/xprt.h
parentfe3aca290f17ae4978bd73d02aa4029f1c9c024c (diff)
[PATCH] RPC: expose API for serializing access to RPC transports
The next several patches introduce an API that allows transports to choose whether the RPC client provides congestion control or whether the transport itself provides it. The first method we abstract is the one that serializes access to the RPC transport to prevent the bytes from different requests from mingling together. This method provides proper request serialization and the opportunity to prevent new requests from being started because the transport is congested. The normal situation is for the transport to handle congestion control itself. Although NFS over UDP was first, it has been recognized after years of experience that having the transport provide congestion control is much better than doing it in the RPC client. Thus TCP, and probably every future transport implementation, will use the default method, xprt_lock_write, provided in xprt.c, which does not provide any kind of congestion control. UDP can continue using the xprt.c-provided Van Jacobson congestion avoidance implementation. Test-plan: Use WAN simulation to cause sporadic bursty packet loss. Look for significant regression in performance or client stability. 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index ac08e99a81cb..eee1c6877851 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -132,6 +132,7 @@ struct rpc_xprt;
132 132
133struct rpc_xprt_ops { 133struct rpc_xprt_ops {
134 void (*set_buffer_size)(struct rpc_xprt *xprt); 134 void (*set_buffer_size)(struct rpc_xprt *xprt);
135 int (*reserve_xprt)(struct rpc_task *task);
135 void (*connect)(struct rpc_task *task); 136 void (*connect)(struct rpc_task *task);
136 int (*send_request)(struct rpc_task *task); 137 int (*send_request)(struct rpc_task *task);
137 void (*set_retrans_timeout)(struct rpc_task *task); 138 void (*set_retrans_timeout)(struct rpc_task *task);
@@ -232,6 +233,8 @@ void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long
232 */ 233 */
233void xprt_connect(struct rpc_task *task); 234void xprt_connect(struct rpc_task *task);
234void xprt_reserve(struct rpc_task *task); 235void xprt_reserve(struct rpc_task *task);
236int xprt_reserve_xprt(struct rpc_task *task);
237int xprt_reserve_xprt_cong(struct rpc_task *task);
235int xprt_prepare_transmit(struct rpc_task *task); 238int xprt_prepare_transmit(struct rpc_task *task);
236void xprt_transmit(struct rpc_task *task); 239void xprt_transmit(struct rpc_task *task);
237int xprt_adjust_timeout(struct rpc_rqst *req); 240int xprt_adjust_timeout(struct rpc_rqst *req);