diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-17 18:11:30 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-17 18:11:30 -0400 |
commit | d9ba131d8f58c0d2ff5029e7002ab43f913b36f9 (patch) | |
tree | f2ed7330c72077bf84954b989cbe1ff47522a115 /include | |
parent | 21de0a955f3af29fa1100d96f66e6adade89e77a (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')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 9 |
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); | |||
281 | void xprt_release(struct rpc_task *task); | 284 | void xprt_release(struct rpc_task *task); |
282 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | 285 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); |
283 | void xprt_put(struct rpc_xprt *xprt); | 286 | void xprt_put(struct rpc_xprt *xprt); |
284 | struct rpc_xprt * xprt_alloc(struct net *net, int size, int max_req); | 287 | struct rpc_xprt * xprt_alloc(struct net *net, size_t size, |
288 | unsigned int num_prealloc, | ||
289 | unsigned int max_req); | ||
285 | void xprt_free(struct rpc_xprt *); | 290 | void xprt_free(struct rpc_xprt *); |
286 | 291 | ||
287 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) | 292 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |