aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2011-07-17 18:11:30 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-07-17 18:11:30 -0400
commitd9ba131d8f58c0d2ff5029e7002ab43f913b36f9 (patch)
treef2ed7330c72077bf84954b989cbe1ff47522a115 /include/linux/sunrpc
parent21de0a955f3af29fa1100d96f66e6adade89e77a (diff)
SUNRPC: Support dynamic slot allocation for TCP connections
Allow the number of available slots to grow with the TCP window size. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/xprt.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 05047250f218..d02762d1de27 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -22,6 +22,7 @@
22#define RPC_MIN_SLOT_TABLE (2U) 22#define RPC_MIN_SLOT_TABLE (2U)
23#define RPC_DEF_SLOT_TABLE (16U) 23#define RPC_DEF_SLOT_TABLE (16U)
24#define RPC_MAX_SLOT_TABLE (128U) 24#define RPC_MAX_SLOT_TABLE (128U)
25#define RPC_MAX_SLOT_TABLE_LIMIT (65536U)
25 26
26/* 27/*
27 * This describes a timeout strategy 28 * This describes a timeout strategy
@@ -168,7 +169,9 @@ struct rpc_xprt {
168 struct rpc_wait_queue pending; /* requests in flight */ 169 struct rpc_wait_queue pending; /* requests in flight */
169 struct rpc_wait_queue backlog; /* waiting for slot */ 170 struct rpc_wait_queue backlog; /* waiting for slot */
170 struct list_head free; /* free slots */ 171 struct list_head free; /* free slots */
171 unsigned int max_reqs; /* total slots */ 172 unsigned int max_reqs; /* max number of slots */
173 unsigned int min_reqs; /* min number of slots */
174 atomic_t num_reqs; /* total slots */
172 unsigned long state; /* transport state */ 175 unsigned long state; /* transport state */
173 unsigned char shutdown : 1, /* being shut down */ 176 unsigned char shutdown : 1, /* being shut down */
174 resvport : 1; /* use a reserved port */ 177 resvport : 1; /* use a reserved port */
@@ -281,7 +284,9 @@ void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task);
281void xprt_release(struct rpc_task *task); 284void xprt_release(struct rpc_task *task);
282struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); 285struct rpc_xprt * xprt_get(struct rpc_xprt *xprt);
283void xprt_put(struct rpc_xprt *xprt); 286void xprt_put(struct rpc_xprt *xprt);
284struct rpc_xprt * xprt_alloc(struct net *net, int size, int max_req); 287struct rpc_xprt * xprt_alloc(struct net *net, size_t size,
288 unsigned int num_prealloc,
289 unsigned int max_req);
285void xprt_free(struct rpc_xprt *); 290void xprt_free(struct rpc_xprt *);
286 291
287static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) 292static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p)