diff options
Diffstat (limited to 'include/net/tcp.h')
| -rw-r--r-- | include/net/tcp.h | 36 |
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 @@ | |||
| 42 | extern struct inet_hashinfo tcp_hashinfo; | 43 | extern struct inet_hashinfo tcp_hashinfo; |
| 43 | 44 | ||
| 44 | extern atomic_t tcp_orphan_count; | 45 | extern atomic_t tcp_orphan_count; |
| 45 | extern int tcp_tw_count; | ||
| 46 | extern void tcp_time_wait(struct sock *sk, int state, int timeo); | 46 | extern void tcp_time_wait(struct sock *sk, int state, int timeo); |
| 47 | extern void tcp_tw_deschedule(struct inet_timewait_sock *tw); | 47 | extern 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 | ||
| 186 | extern struct inet_timewait_death_row tcp_death_row; | ||
| 187 | |||
| 212 | /* sysctl variables for tcp */ | 188 | /* sysctl variables for tcp */ |
| 213 | extern int sysctl_tcp_timestamps; | 189 | extern int sysctl_tcp_timestamps; |
| 214 | extern int sysctl_tcp_window_scaling; | 190 | extern int sysctl_tcp_window_scaling; |
| 215 | extern int sysctl_tcp_sack; | 191 | extern int sysctl_tcp_sack; |
| 216 | extern int sysctl_tcp_fin_timeout; | 192 | extern int sysctl_tcp_fin_timeout; |
| 217 | extern int sysctl_tcp_tw_recycle; | ||
| 218 | extern int sysctl_tcp_keepalive_time; | 193 | extern int sysctl_tcp_keepalive_time; |
| 219 | extern int sysctl_tcp_keepalive_probes; | 194 | extern int sysctl_tcp_keepalive_probes; |
| 220 | extern int sysctl_tcp_keepalive_intvl; | 195 | extern int sysctl_tcp_keepalive_intvl; |
| @@ -229,7 +204,6 @@ extern int sysctl_tcp_stdurg; | |||
| 229 | extern int sysctl_tcp_rfc1337; | 204 | extern int sysctl_tcp_rfc1337; |
| 230 | extern int sysctl_tcp_abort_on_overflow; | 205 | extern int sysctl_tcp_abort_on_overflow; |
| 231 | extern int sysctl_tcp_max_orphans; | 206 | extern int sysctl_tcp_max_orphans; |
| 232 | extern int sysctl_tcp_max_tw_buckets; | ||
| 233 | extern int sysctl_tcp_fack; | 207 | extern int sysctl_tcp_fack; |
| 234 | extern int sysctl_tcp_reordering; | 208 | extern int sysctl_tcp_reordering; |
| 235 | extern int sysctl_tcp_ecn; | 209 | extern int sysctl_tcp_ecn; |
