diff options
Diffstat (limited to 'net/rxrpc/sysctl.c')
-rw-r--r-- | net/rxrpc/sysctl.c | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/net/rxrpc/sysctl.c b/net/rxrpc/sysctl.c index 34c706d2f79c..4a7af7aff37d 100644 --- a/net/rxrpc/sysctl.c +++ b/net/rxrpc/sysctl.c | |||
@@ -21,6 +21,8 @@ static const unsigned int four = 4; | |||
21 | static const unsigned int thirtytwo = 32; | 21 | static const unsigned int thirtytwo = 32; |
22 | static const unsigned int n_65535 = 65535; | 22 | static const unsigned int n_65535 = 65535; |
23 | static const unsigned int n_max_acks = RXRPC_RXTX_BUFF_SIZE - 1; | 23 | static const unsigned int n_max_acks = RXRPC_RXTX_BUFF_SIZE - 1; |
24 | static const unsigned long one_jiffy = 1; | ||
25 | static const unsigned long max_jiffies = MAX_JIFFY_OFFSET; | ||
24 | 26 | ||
25 | /* | 27 | /* |
26 | * RxRPC operating parameters. | 28 | * RxRPC operating parameters. |
@@ -29,64 +31,60 @@ static const unsigned int n_max_acks = RXRPC_RXTX_BUFF_SIZE - 1; | |||
29 | * information on the individual parameters. | 31 | * information on the individual parameters. |
30 | */ | 32 | */ |
31 | static struct ctl_table rxrpc_sysctl_table[] = { | 33 | static struct ctl_table rxrpc_sysctl_table[] = { |
32 | /* Values measured in milliseconds */ | 34 | /* Values measured in milliseconds but used in jiffies */ |
33 | { | 35 | { |
34 | .procname = "req_ack_delay", | 36 | .procname = "req_ack_delay", |
35 | .data = &rxrpc_requested_ack_delay, | 37 | .data = &rxrpc_requested_ack_delay, |
36 | .maxlen = sizeof(unsigned int), | 38 | .maxlen = sizeof(unsigned long), |
37 | .mode = 0644, | 39 | .mode = 0644, |
38 | .proc_handler = proc_dointvec, | 40 | .proc_handler = proc_doulongvec_ms_jiffies_minmax, |
39 | .extra1 = (void *)&zero, | 41 | .extra1 = (void *)&one_jiffy, |
42 | .extra2 = (void *)&max_jiffies, | ||
40 | }, | 43 | }, |
41 | { | 44 | { |
42 | .procname = "soft_ack_delay", | 45 | .procname = "soft_ack_delay", |
43 | .data = &rxrpc_soft_ack_delay, | 46 | .data = &rxrpc_soft_ack_delay, |
44 | .maxlen = sizeof(unsigned int), | 47 | .maxlen = sizeof(unsigned long), |
45 | .mode = 0644, | 48 | .mode = 0644, |
46 | .proc_handler = proc_dointvec, | 49 | .proc_handler = proc_doulongvec_ms_jiffies_minmax, |
47 | .extra1 = (void *)&one, | 50 | .extra1 = (void *)&one_jiffy, |
51 | .extra2 = (void *)&max_jiffies, | ||
48 | }, | 52 | }, |
49 | { | 53 | { |
50 | .procname = "idle_ack_delay", | 54 | .procname = "idle_ack_delay", |
51 | .data = &rxrpc_idle_ack_delay, | 55 | .data = &rxrpc_idle_ack_delay, |
52 | .maxlen = sizeof(unsigned int), | 56 | .maxlen = sizeof(unsigned long), |
53 | .mode = 0644, | 57 | .mode = 0644, |
54 | .proc_handler = proc_dointvec, | 58 | .proc_handler = proc_doulongvec_ms_jiffies_minmax, |
55 | .extra1 = (void *)&one, | 59 | .extra1 = (void *)&one_jiffy, |
56 | }, | 60 | .extra2 = (void *)&max_jiffies, |
57 | { | ||
58 | .procname = "resend_timeout", | ||
59 | .data = &rxrpc_resend_timeout, | ||
60 | .maxlen = sizeof(unsigned int), | ||
61 | .mode = 0644, | ||
62 | .proc_handler = proc_dointvec, | ||
63 | .extra1 = (void *)&one, | ||
64 | }, | 61 | }, |
65 | { | 62 | { |
66 | .procname = "idle_conn_expiry", | 63 | .procname = "idle_conn_expiry", |
67 | .data = &rxrpc_conn_idle_client_expiry, | 64 | .data = &rxrpc_conn_idle_client_expiry, |
68 | .maxlen = sizeof(unsigned int), | 65 | .maxlen = sizeof(unsigned long), |
69 | .mode = 0644, | 66 | .mode = 0644, |
70 | .proc_handler = proc_dointvec_ms_jiffies, | 67 | .proc_handler = proc_doulongvec_ms_jiffies_minmax, |
71 | .extra1 = (void *)&one, | 68 | .extra1 = (void *)&one_jiffy, |
69 | .extra2 = (void *)&max_jiffies, | ||
72 | }, | 70 | }, |
73 | { | 71 | { |
74 | .procname = "idle_conn_fast_expiry", | 72 | .procname = "idle_conn_fast_expiry", |
75 | .data = &rxrpc_conn_idle_client_fast_expiry, | 73 | .data = &rxrpc_conn_idle_client_fast_expiry, |
76 | .maxlen = sizeof(unsigned int), | 74 | .maxlen = sizeof(unsigned long), |
77 | .mode = 0644, | 75 | .mode = 0644, |
78 | .proc_handler = proc_dointvec_ms_jiffies, | 76 | .proc_handler = proc_doulongvec_ms_jiffies_minmax, |
79 | .extra1 = (void *)&one, | 77 | .extra1 = (void *)&one_jiffy, |
78 | .extra2 = (void *)&max_jiffies, | ||
80 | }, | 79 | }, |
81 | |||
82 | /* Values measured in seconds but used in jiffies */ | ||
83 | { | 80 | { |
84 | .procname = "max_call_lifetime", | 81 | .procname = "resend_timeout", |
85 | .data = &rxrpc_max_call_lifetime, | 82 | .data = &rxrpc_resend_timeout, |
86 | .maxlen = sizeof(unsigned int), | 83 | .maxlen = sizeof(unsigned long), |
87 | .mode = 0644, | 84 | .mode = 0644, |
88 | .proc_handler = proc_dointvec, | 85 | .proc_handler = proc_doulongvec_ms_jiffies_minmax, |
89 | .extra1 = (void *)&one, | 86 | .extra1 = (void *)&one_jiffy, |
87 | .extra2 = (void *)&max_jiffies, | ||
90 | }, | 88 | }, |
91 | 89 | ||
92 | /* Non-time values */ | 90 | /* Non-time values */ |