aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-09 23:44:40 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:55:48 -0400
commit295ff7edb8f72b77d524759266f7524deae379b3 (patch)
treee16e99e324444fb01ae3dfd221b5d47a88acfeb8 /include/net/tcp.h
parent0b4e03bf0bc43ad6250a1e2fa25fc3eb2b028977 (diff)
[TIMEWAIT]: Introduce inet_timewait_death_row
That groups all of the tables and variables associated to the TCP timewait schedulling/recycling/killing code, that now can be isolated from the TCP specific code and used by other transport protocols, such as DCCP. Next changeset will move this code to net/ipv4/inet_timewait_sock.c Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h36
1 files changed, 5 insertions, 31 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 077db859ae0d..4c4cd4fb1ed8 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -29,6 +29,7 @@
29#include <linux/percpu.h> 29#include <linux/percpu.h>
30 30
31#include <net/inet_connection_sock.h> 31#include <net/inet_connection_sock.h>
32#include <net/inet_timewait_sock.h>
32#include <net/inet_hashtables.h> 33#include <net/inet_hashtables.h>
33#include <net/checksum.h> 34#include <net/checksum.h>
34#include <net/request_sock.h> 35#include <net/request_sock.h>
@@ -42,9 +43,9 @@
42extern struct inet_hashinfo tcp_hashinfo; 43extern struct inet_hashinfo tcp_hashinfo;
43 44
44extern atomic_t tcp_orphan_count; 45extern atomic_t tcp_orphan_count;
45extern int tcp_tw_count;
46extern void tcp_time_wait(struct sock *sk, int state, int timeo); 46extern void tcp_time_wait(struct sock *sk, int state, int timeo);
47extern void tcp_tw_deschedule(struct inet_timewait_sock *tw); 47extern void inet_twsk_deschedule(struct inet_timewait_sock *tw,
48 struct inet_timewait_death_row *twdr);
48 49
49#define MAX_TCP_HEADER (128 + MAX_HEADER) 50#define MAX_TCP_HEADER (128 + MAX_HEADER)
50 51
@@ -148,33 +149,6 @@ extern void tcp_tw_deschedule(struct inet_timewait_sock *tw);
148 * timestamps. It must be less than 149 * timestamps. It must be less than
149 * minimal timewait lifetime. 150 * minimal timewait lifetime.
150 */ 151 */
151
152#define TCP_TW_RECYCLE_SLOTS_LOG 5
153#define TCP_TW_RECYCLE_SLOTS (1<<TCP_TW_RECYCLE_SLOTS_LOG)
154
155/* If time > 4sec, it is "slow" path, no recycling is required,
156 so that we select tick to get range about 4 seconds.
157 */
158
159#if HZ <= 16 || HZ > 4096
160# error Unsupported: HZ <= 16 or HZ > 4096
161#elif HZ <= 32
162# define TCP_TW_RECYCLE_TICK (5+2-TCP_TW_RECYCLE_SLOTS_LOG)
163#elif HZ <= 64
164# define TCP_TW_RECYCLE_TICK (6+2-TCP_TW_RECYCLE_SLOTS_LOG)
165#elif HZ <= 128
166# define TCP_TW_RECYCLE_TICK (7+2-TCP_TW_RECYCLE_SLOTS_LOG)
167#elif HZ <= 256
168# define TCP_TW_RECYCLE_TICK (8+2-TCP_TW_RECYCLE_SLOTS_LOG)
169#elif HZ <= 512
170# define TCP_TW_RECYCLE_TICK (9+2-TCP_TW_RECYCLE_SLOTS_LOG)
171#elif HZ <= 1024
172# define TCP_TW_RECYCLE_TICK (10+2-TCP_TW_RECYCLE_SLOTS_LOG)
173#elif HZ <= 2048
174# define TCP_TW_RECYCLE_TICK (11+2-TCP_TW_RECYCLE_SLOTS_LOG)
175#else
176# define TCP_TW_RECYCLE_TICK (12+2-TCP_TW_RECYCLE_SLOTS_LOG)
177#endif
178/* 152/*
179 * TCP option 153 * TCP option
180 */ 154 */
@@ -209,12 +183,13 @@ extern void tcp_tw_deschedule(struct inet_timewait_sock *tw);
209#define TCP_NAGLE_CORK 2 /* Socket is corked */ 183#define TCP_NAGLE_CORK 2 /* Socket is corked */
210#define TCP_NAGLE_PUSH 4 /* Cork is overriden for already queued data */ 184#define TCP_NAGLE_PUSH 4 /* Cork is overriden for already queued data */
211 185
186extern struct inet_timewait_death_row tcp_death_row;
187
212/* sysctl variables for tcp */ 188/* sysctl variables for tcp */
213extern int sysctl_tcp_timestamps; 189extern int sysctl_tcp_timestamps;
214extern int sysctl_tcp_window_scaling; 190extern int sysctl_tcp_window_scaling;
215extern int sysctl_tcp_sack; 191extern int sysctl_tcp_sack;
216extern int sysctl_tcp_fin_timeout; 192extern int sysctl_tcp_fin_timeout;
217extern int sysctl_tcp_tw_recycle;
218extern int sysctl_tcp_keepalive_time; 193extern int sysctl_tcp_keepalive_time;
219extern int sysctl_tcp_keepalive_probes; 194extern int sysctl_tcp_keepalive_probes;
220extern int sysctl_tcp_keepalive_intvl; 195extern int sysctl_tcp_keepalive_intvl;
@@ -229,7 +204,6 @@ extern int sysctl_tcp_stdurg;
229extern int sysctl_tcp_rfc1337; 204extern int sysctl_tcp_rfc1337;
230extern int sysctl_tcp_abort_on_overflow; 205extern int sysctl_tcp_abort_on_overflow;
231extern int sysctl_tcp_max_orphans; 206extern int sysctl_tcp_max_orphans;
232extern int sysctl_tcp_max_tw_buckets;
233extern int sysctl_tcp_fack; 207extern int sysctl_tcp_fack;
234extern int sysctl_tcp_reordering; 208extern int sysctl_tcp_reordering;
235extern int sysctl_tcp_ecn; 209extern int sysctl_tcp_ecn;