diff options
-rw-r--r-- | include/net/tcp.h | 1 | ||||
-rw-r--r-- | net/core/request_sock.c | 16 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 16 |
3 files changed, 16 insertions, 17 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index a2e323c54457..f730935b824a 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -564,7 +564,6 @@ static __inline__ int tcp_sk_listen_hashfn(struct sock *sk) | |||
564 | #define TCP_NAGLE_PUSH 4 /* Cork is overriden for already queued data */ | 564 | #define TCP_NAGLE_PUSH 4 /* Cork is overriden for already queued data */ |
565 | 565 | ||
566 | /* sysctl variables for tcp */ | 566 | /* sysctl variables for tcp */ |
567 | extern int sysctl_max_syn_backlog; | ||
568 | extern int sysctl_tcp_timestamps; | 567 | extern int sysctl_tcp_timestamps; |
569 | extern int sysctl_tcp_window_scaling; | 568 | extern int sysctl_tcp_window_scaling; |
570 | extern int sysctl_tcp_sack; | 569 | extern int sysctl_tcp_sack; |
diff --git a/net/core/request_sock.c b/net/core/request_sock.c index 78fd60a46bf2..bb55675f0685 100644 --- a/net/core/request_sock.c +++ b/net/core/request_sock.c | |||
@@ -18,6 +18,22 @@ | |||
18 | 18 | ||
19 | #include <net/request_sock.h> | 19 | #include <net/request_sock.h> |
20 | 20 | ||
21 | /* | ||
22 | * Maximum number of SYN_RECV sockets in queue per LISTEN socket. | ||
23 | * One SYN_RECV socket costs about 80bytes on a 32bit machine. | ||
24 | * It would be better to replace it with a global counter for all sockets | ||
25 | * but then some measure against one socket starving all other sockets | ||
26 | * would be needed. | ||
27 | * | ||
28 | * It was 128 by default. Experiments with real servers show, that | ||
29 | * it is absolutely not enough even at 100conn/sec. 256 cures most | ||
30 | * of problems. This value is adjusted to 128 for very small machines | ||
31 | * (<=32Mb of memory) and to 1024 on normal or better ones (>=256Mb). | ||
32 | * Further increasing requires to change hash table size. | ||
33 | */ | ||
34 | int sysctl_max_syn_backlog = 256; | ||
35 | EXPORT_SYMBOL(sysctl_max_syn_backlog); | ||
36 | |||
21 | int reqsk_queue_alloc(struct request_sock_queue *queue, | 37 | int reqsk_queue_alloc(struct request_sock_queue *queue, |
22 | const int nr_table_entries) | 38 | const int nr_table_entries) |
23 | { | 39 | { |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 485ca9cb1707..2d41d5d6ad19 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1366,21 +1366,6 @@ static inline struct ip_options *tcp_v4_save_options(struct sock *sk, | |||
1366 | return dopt; | 1366 | return dopt; |
1367 | } | 1367 | } |
1368 | 1368 | ||
1369 | /* | ||
1370 | * Maximum number of SYN_RECV sockets in queue per LISTEN socket. | ||
1371 | * One SYN_RECV socket costs about 80bytes on a 32bit machine. | ||
1372 | * It would be better to replace it with a global counter for all sockets | ||
1373 | * but then some measure against one socket starving all other sockets | ||
1374 | * would be needed. | ||
1375 | * | ||
1376 | * It was 128 by default. Experiments with real servers show, that | ||
1377 | * it is absolutely not enough even at 100conn/sec. 256 cures most | ||
1378 | * of problems. This value is adjusted to 128 for very small machines | ||
1379 | * (<=32Mb of memory) and to 1024 on normal or better ones (>=256Mb). | ||
1380 | * Further increasing requires to change hash table size. | ||
1381 | */ | ||
1382 | int sysctl_max_syn_backlog = 256; | ||
1383 | |||
1384 | struct request_sock_ops tcp_request_sock_ops = { | 1369 | struct request_sock_ops tcp_request_sock_ops = { |
1385 | .family = PF_INET, | 1370 | .family = PF_INET, |
1386 | .obj_size = sizeof(struct tcp_request_sock), | 1371 | .obj_size = sizeof(struct tcp_request_sock), |
@@ -2662,7 +2647,6 @@ EXPORT_SYMBOL(tcp_proc_register); | |||
2662 | EXPORT_SYMBOL(tcp_proc_unregister); | 2647 | EXPORT_SYMBOL(tcp_proc_unregister); |
2663 | #endif | 2648 | #endif |
2664 | EXPORT_SYMBOL(sysctl_local_port_range); | 2649 | EXPORT_SYMBOL(sysctl_local_port_range); |
2665 | EXPORT_SYMBOL(sysctl_max_syn_backlog); | ||
2666 | EXPORT_SYMBOL(sysctl_tcp_low_latency); | 2650 | EXPORT_SYMBOL(sysctl_tcp_low_latency); |
2667 | EXPORT_SYMBOL(sysctl_tcp_tw_reuse); | 2651 | EXPORT_SYMBOL(sysctl_tcp_tw_reuse); |
2668 | 2652 | ||