aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 917911165e3b..7118668ad534 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -196,6 +196,9 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
196/* TCP thin-stream limits */ 196/* TCP thin-stream limits */
197#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 */
198 198
199/* TCP initial congestion window */
200#define TCP_INIT_CWND 10
201
199extern struct inet_timewait_death_row tcp_death_row; 202extern struct inet_timewait_death_row tcp_death_row;
200 203
201/* sysctl variables for tcp */ 204/* sysctl variables for tcp */
@@ -799,15 +802,6 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk)
799/* Use define here intentionally to get WARN_ON location shown at the caller */ 802/* Use define here intentionally to get WARN_ON location shown at the caller */
800#define tcp_verify_left_out(tp) WARN_ON(tcp_left_out(tp) > tp->packets_out) 803#define tcp_verify_left_out(tp) WARN_ON(tcp_left_out(tp) > tp->packets_out)
801 804
802/*
803 * Convert RFC 3390 larger initial window into an equivalent number of packets.
804 * This is based on the numbers specified in RFC 5681, 3.1.
805 */
806static inline u32 rfc3390_bytes_to_packets(const u32 smss)
807{
808 return smss <= 1095 ? 4 : (smss > 2190 ? 2 : 3);
809}
810
811extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh); 805extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh);
812extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst); 806extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst);
813 807