aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sysctl.c
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2007-08-15 19:07:44 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:09 -0400
commit4d93df0abd50b9c9e2d4561439a1a1d21ec5e68f (patch)
tree47e5bde0c37ed7ce68032ffa9110f252533fc710 /net/sctp/sysctl.c
parent13c99b248f06e0b71d925f162d8e3b0084886a21 (diff)
[SCTP]: Rewrite of sctp buffer management code
This patch introduces autotuning to the sctp buffer management code similar to the TCP. The buffer space can be grown if the advertised receive window still has room. This might happen if small message sizes are used, which is common in telecom environmens. New tunables are introduced that provide limits to buffer growth and memory pressure is entered if to much buffer spaces is used. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sysctl.c')
-rw-r--r--net/sctp/sysctl.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index e2c679baf912..ba75ef4669e3 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -52,6 +52,15 @@ static int int_max = INT_MAX;
52static long sack_timer_min = 1; 52static long sack_timer_min = 1;
53static long sack_timer_max = 500; 53static long sack_timer_max = 500;
54 54
55int sysctl_sctp_mem[3];
56int sysctl_sctp_rmem[3];
57int sysctl_sctp_wmem[3];
58
59/*
60 * per assoc memory limitationf for sends
61 */
62int sysctl_sctp_wmem[3];
63
55static ctl_table sctp_table[] = { 64static ctl_table sctp_table[] = {
56 { 65 {
57 .ctl_name = NET_SCTP_RTO_INITIAL, 66 .ctl_name = NET_SCTP_RTO_INITIAL,
@@ -226,6 +235,30 @@ static ctl_table sctp_table[] = {
226 .extra1 = &sack_timer_min, 235 .extra1 = &sack_timer_min,
227 .extra2 = &sack_timer_max, 236 .extra2 = &sack_timer_max,
228 }, 237 },
238 {
239 .ctl_name = CTL_UNNUMBERED,
240 .procname = "sctp_mem",
241 .data = &sysctl_sctp_mem,
242 .maxlen = sizeof(sysctl_sctp_mem),
243 .mode = 0644,
244 .proc_handler = &proc_dointvec,
245 },
246 {
247 .ctl_name = CTL_UNNUMBERED,
248 .procname = "sctp_rmem",
249 .data = &sysctl_sctp_rmem,
250 .maxlen = sizeof(sysctl_sctp_rmem),
251 .mode = 0644,
252 .proc_handler = &proc_dointvec,
253 },
254 {
255 .ctl_name = CTL_UNNUMBERED,
256 .procname = "sctp_wmem",
257 .data = &sysctl_sctp_wmem,
258 .maxlen = sizeof(sysctl_sctp_wmem),
259 .mode = 0644,
260 .proc_handler = &proc_dointvec,
261 },
229 { .ctl_name = 0 } 262 { .ctl_name = 0 }
230}; 263};
231 264