aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/xprt.h
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2005-08-25 19:25:54 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-09-23 12:38:50 -0400
commit529b33c6db0120126b1381faa51406dc463acdc9 (patch)
tree4856a23687aa891f6a5d1c45db80190b90b0fc68 /include/linux/sunrpc/xprt.h
parent555ee3af161b037865793bd4bebc06b58daafde6 (diff)
[PATCH] RPC: allow RPC client's port range to be adjustable
Select an RPC client source port between 650 and 1023 instead of between 1 and 800. The old range conflicts with a number of network services. Provide sysctls to allow admins to select a different port range. Note that this doesn't affect user-level RPC library behavior, which still uses 1 to 800. Based on a suggestion by Olaf Kirch <okir@suse.de>. Test-plan: Repeated mount and unmount. Destructive testing. Idle timeouts. 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.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index dcf0326bda01..9d9266cf8a36 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -52,6 +52,17 @@ extern unsigned int xprt_tcp_slot_table_entries;
52#define RPC_REPHDRSIZE 4 52#define RPC_REPHDRSIZE 4
53 53
54/* 54/*
55 * Parameters for choosing a free port
56 */
57extern unsigned int xprt_min_resvport;
58extern unsigned int xprt_max_resvport;
59
60#define RPC_MIN_RESVPORT (1U)
61#define RPC_MAX_RESVPORT (65535U)
62#define RPC_DEF_MIN_RESVPORT (650U)
63#define RPC_DEF_MAX_RESVPORT (1023U)
64
65/*
55 * This describes a timeout strategy 66 * This describes a timeout strategy
56 */ 67 */
57struct rpc_timeout { 68struct rpc_timeout {
@@ -62,6 +73,9 @@ struct rpc_timeout {
62 unsigned char to_exponential; 73 unsigned char to_exponential;
63}; 74};
64 75
76struct rpc_task;
77struct rpc_xprt;
78
65/* 79/*
66 * This describes a complete RPC request 80 * This describes a complete RPC request
67 */ 81 */
@@ -107,9 +121,6 @@ struct rpc_rqst {
107#define rq_svec rq_snd_buf.head 121#define rq_svec rq_snd_buf.head
108#define rq_slen rq_snd_buf.len 122#define rq_slen rq_snd_buf.len
109 123
110struct rpc_task;
111struct rpc_xprt;
112
113struct rpc_xprt_ops { 124struct rpc_xprt_ops {
114 void (*set_buffer_size)(struct rpc_xprt *xprt); 125 void (*set_buffer_size)(struct rpc_xprt *xprt);
115 int (*reserve_xprt)(struct rpc_task *task); 126 int (*reserve_xprt)(struct rpc_task *task);