diff options
author | Steven Whitehouse <steve@chygwyn.com> | 2005-12-05 16:42:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-12-05 16:42:06 -0500 |
commit | 1f12bcc9d1840fd26bf577065214f1ebeb2609ba (patch) | |
tree | 4fb87a594d00671e2bc31998d94b3d470e9062d3 /net/decnet/sysctl_net_decnet.c | |
parent | dab9630fb3d206f49658066a3ecf80ea120364db (diff) |
[DECNET]: add memory buffer settings
The patch (originally from Steve) simply adds memory buffer settings to
DECnet similar to those in TCP.
Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/sysctl_net_decnet.c')
-rw-r--r-- | net/decnet/sysctl_net_decnet.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c index 02bca49cb508..0e9d2c571165 100644 --- a/net/decnet/sysctl_net_decnet.c +++ b/net/decnet/sysctl_net_decnet.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * | 10 | * |
11 | * Changes: | 11 | * Changes: |
12 | * Steve Whitehouse - C99 changes and default device handling | 12 | * Steve Whitehouse - C99 changes and default device handling |
13 | * Steve Whitehouse - Memory buffer settings, like the tcp ones | ||
13 | * | 14 | * |
14 | */ | 15 | */ |
15 | #include <linux/config.h> | 16 | #include <linux/config.h> |
@@ -37,6 +38,11 @@ int decnet_dr_count = 3; | |||
37 | int decnet_log_martians = 1; | 38 | int decnet_log_martians = 1; |
38 | int decnet_no_fc_max_cwnd = NSP_MIN_WINDOW; | 39 | int decnet_no_fc_max_cwnd = NSP_MIN_WINDOW; |
39 | 40 | ||
41 | /* Reasonable defaults, I hope, based on tcp's defaults */ | ||
42 | int sysctl_decnet_mem[3] = { 768 << 3, 1024 << 3, 1536 << 3 }; | ||
43 | int sysctl_decnet_wmem[3] = { 4 * 1024, 16 * 1024, 128 * 1024 }; | ||
44 | int sysctl_decnet_rmem[3] = { 4 * 1024, 87380, 87380 * 2 }; | ||
45 | |||
40 | #ifdef CONFIG_SYSCTL | 46 | #ifdef CONFIG_SYSCTL |
41 | extern int decnet_dst_gc_interval; | 47 | extern int decnet_dst_gc_interval; |
42 | static int min_decnet_time_wait[] = { 5 }; | 48 | static int min_decnet_time_wait[] = { 5 }; |
@@ -428,6 +434,33 @@ static ctl_table dn_table[] = { | |||
428 | .extra1 = &min_decnet_no_fc_max_cwnd, | 434 | .extra1 = &min_decnet_no_fc_max_cwnd, |
429 | .extra2 = &max_decnet_no_fc_max_cwnd | 435 | .extra2 = &max_decnet_no_fc_max_cwnd |
430 | }, | 436 | }, |
437 | { | ||
438 | .ctl_name = NET_DECNET_MEM, | ||
439 | .procname = "decnet_mem", | ||
440 | .data = &sysctl_decnet_mem, | ||
441 | .maxlen = sizeof(sysctl_decnet_mem), | ||
442 | .mode = 0644, | ||
443 | .proc_handler = &proc_dointvec, | ||
444 | .strategy = &sysctl_intvec, | ||
445 | }, | ||
446 | { | ||
447 | .ctl_name = NET_DECNET_RMEM, | ||
448 | .procname = "decnet_rmem", | ||
449 | .data = &sysctl_decnet_rmem, | ||
450 | .maxlen = sizeof(sysctl_decnet_rmem), | ||
451 | .mode = 0644, | ||
452 | .proc_handler = &proc_dointvec, | ||
453 | .strategy = &sysctl_intvec, | ||
454 | }, | ||
455 | { | ||
456 | .ctl_name = NET_DECNET_WMEM, | ||
457 | .procname = "decnet_wmem", | ||
458 | .data = &sysctl_decnet_wmem, | ||
459 | .maxlen = sizeof(sysctl_decnet_wmem), | ||
460 | .mode = 0644, | ||
461 | .proc_handler = &proc_dointvec, | ||
462 | .strategy = &sysctl_intvec, | ||
463 | }, | ||
431 | { | 464 | { |
432 | .ctl_name = NET_DECNET_DEBUG_LEVEL, | 465 | .ctl_name = NET_DECNET_DEBUG_LEVEL, |
433 | .procname = "debug", | 466 | .procname = "debug", |