aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/net/tcp.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 3e4b33e36602..cda30ea354a2 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -60,6 +60,9 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
60 */ 60 */
61#define MAX_TCP_WINDOW 32767U 61#define MAX_TCP_WINDOW 32767U
62 62
63/* Offer an initial receive window of 10 mss. */
64#define TCP_DEFAULT_INIT_RCVWND 10
65
63/* Minimal accepted MSS. It is (60+60+8) - (20+20). */ 66/* Minimal accepted MSS. It is (60+60+8) - (20+20). */
64#define TCP_MIN_MSS 88U 67#define TCP_MIN_MSS 88U
65 68
@@ -100,12 +103,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
100#define TCP_SYNACK_RETRIES 5 /* number of times to retry passive opening a 103#define TCP_SYNACK_RETRIES 5 /* number of times to retry passive opening a
101 * connection: ~180sec is RFC minimum */ 104 * connection: ~180sec is RFC minimum */
102 105
103
104#define TCP_ORPHAN_RETRIES 7 /* number of times to retry on an orphaned
105 * socket. 7 is ~50sec-16min.
106 */
107
108
109#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT 106#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT
110 * state, about 60 seconds */ 107 * state, about 60 seconds */
111#define TCP_FIN_TIMEOUT TCP_TIMEWAIT_LEN 108#define TCP_FIN_TIMEOUT TCP_TIMEWAIT_LEN
@@ -199,6 +196,9 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
199/* TCP thin-stream limits */ 196/* TCP thin-stream limits */
200#define TCP_THIN_LINEAR_RETRIES 6 /* After 6 linear retries, do exp. backoff */ 197#define TCP_THIN_LINEAR_RETRIES 6 /* After 6 linear retries, do exp. backoff */
201 198
199/* TCP initial congestion window as per draft-hkchu-tcpm-initcwnd-01 */
200#define TCP_INIT_CWND 10
201
202extern struct inet_timewait_death_row tcp_death_row; 202extern struct inet_timewait_death_row tcp_death_row;
203 203
204/* sysctl variables for tcp */ 204/* sysctl variables for tcp */
@@ -224,7 +224,7 @@ extern int sysctl_tcp_fack;
224extern int sysctl_tcp_reordering; 224extern int sysctl_tcp_reordering;
225extern int sysctl_tcp_ecn; 225extern int sysctl_tcp_ecn;
226extern int sysctl_tcp_dsack; 226extern int sysctl_tcp_dsack;
227extern int sysctl_tcp_mem[3]; 227extern long sysctl_tcp_mem[3];
228extern int sysctl_tcp_wmem[3]; 228extern int sysctl_tcp_wmem[3];
229extern int sysctl_tcp_rmem[3]; 229extern int sysctl_tcp_rmem[3];
230extern int sysctl_tcp_app_win; 230extern int sysctl_tcp_app_win;
@@ -247,7 +247,7 @@ extern int sysctl_tcp_cookie_size;
247extern int sysctl_tcp_thin_linear_timeouts; 247extern int sysctl_tcp_thin_linear_timeouts;
248extern int sysctl_tcp_thin_dupack; 248extern int sysctl_tcp_thin_dupack;
249 249
250extern atomic_t tcp_memory_allocated; 250extern atomic_long_t tcp_memory_allocated;
251extern struct percpu_counter tcp_sockets_allocated; 251extern struct percpu_counter tcp_sockets_allocated;
252extern int tcp_memory_pressure; 252extern int tcp_memory_pressure;
253 253
@@ -280,7 +280,7 @@ static inline bool tcp_too_many_orphans(struct sock *sk, int shift)
280 } 280 }
281 281
282 if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && 282 if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
283 atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]) 283 atomic_long_read(&tcp_memory_allocated) > sysctl_tcp_mem[2])
284 return true; 284 return true;
285 return false; 285 return false;
286} 286}
@@ -312,7 +312,8 @@ extern void tcp_shutdown (struct sock *sk, int how);
312 312
313extern int tcp_v4_rcv(struct sk_buff *skb); 313extern int tcp_v4_rcv(struct sk_buff *skb);
314 314
315extern int tcp_v4_remember_stamp(struct sock *sk); 315extern struct inet_peer *tcp_v4_get_peer(struct sock *sk, bool *release_it);
316extern void *tcp_v4_tw_get_peer(struct sock *sk);
316extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw); 317extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
317extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 318extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
318 size_t size); 319 size_t size);
@@ -346,8 +347,6 @@ static inline void tcp_dec_quickack_mode(struct sock *sk,
346 } 347 }
347} 348}
348 349
349extern void tcp_enter_quickack_mode(struct sock *sk);
350
351#define TCP_ECN_OK 1 350#define TCP_ECN_OK 1
352#define TCP_ECN_QUEUE_CWR 2 351#define TCP_ECN_QUEUE_CWR 2
353#define TCP_ECN_DEMAND_CWR 4 352#define TCP_ECN_DEMAND_CWR 4
@@ -1036,7 +1035,13 @@ static inline int tcp_paws_check(const struct tcp_options_received *rx_opt,
1036 return 1; 1035 return 1;
1037 if (unlikely(get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS)) 1036 if (unlikely(get_seconds() >= rx_opt->ts_recent_stamp + TCP_PAWS_24DAYS))
1038 return 1; 1037 return 1;
1039 1038 /*
1039 * Some OSes send SYN and SYNACK messages with tsval=0 tsecr=0,
1040 * then following tcp messages have valid values. Ignore 0 value,
1041 * or else 'negative' tsval might forbid us to accept their packets.
1042 */
1043 if (!rx_opt->ts_recent)
1044 return 1;
1040 return 0; 1045 return 0;
1041} 1046}
1042 1047
@@ -1063,8 +1068,6 @@ static inline int tcp_paws_reject(const struct tcp_options_received *rx_opt,
1063 return 1; 1068 return 1;
1064} 1069}
1065 1070
1066#define TCP_CHECK_TIMER(sk) do { } while (0)
1067
1068static inline void tcp_mib_init(struct net *net) 1071static inline void tcp_mib_init(struct net *net)
1069{ 1072{
1070 /* See RFC 2012 */ 1073 /* See RFC 2012 */
@@ -1150,8 +1153,6 @@ struct tcp_md5sig_pool {
1150 union tcp_md5sum_block md5_blk; 1153 union tcp_md5sum_block md5_blk;
1151}; 1154};
1152 1155
1153#define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */
1154
1155/* - functions */ 1156/* - functions */
1156extern int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key, 1157extern int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key,
1157 struct sock *sk, struct request_sock *req, 1158 struct sock *sk, struct request_sock *req,
@@ -1395,7 +1396,7 @@ extern struct request_sock_ops tcp6_request_sock_ops;
1395extern void tcp_v4_destroy_sock(struct sock *sk); 1396extern void tcp_v4_destroy_sock(struct sock *sk);
1396 1397
1397extern int tcp_v4_gso_send_check(struct sk_buff *skb); 1398extern int tcp_v4_gso_send_check(struct sk_buff *skb);
1398extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); 1399extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, u32 features);
1399extern struct sk_buff **tcp_gro_receive(struct sk_buff **head, 1400extern struct sk_buff **tcp_gro_receive(struct sk_buff **head,
1400 struct sk_buff *skb); 1401 struct sk_buff *skb);
1401extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head, 1402extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head,