Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tcp: Increase the initial congestion window to 10.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Nandita Dukkipati <nanditad@google.com>

+13 -10
+3 -9
include/net/tcp.h
··· 196 196 /* TCP thin-stream limits */ 197 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 + 199 202 extern struct inet_timewait_death_row tcp_death_row; 200 203 201 204 /* sysctl variables for tcp */ ··· 801 798 802 799 /* Use define here intentionally to get WARN_ON location shown at the caller */ 803 800 #define tcp_verify_left_out(tp) WARN_ON(tcp_left_out(tp) > tp->packets_out) 804 - 805 - /* 806 - * Convert RFC 3390 larger initial window into an equivalent number of packets. 807 - * This is based on the numbers specified in RFC 5681, 3.1. 808 - */ 809 - static inline u32 rfc3390_bytes_to_packets(const u32 smss) 810 - { 811 - return smss <= 1095 ? 4 : (smss > 2190 ? 2 : 3); 812 - } 813 801 814 802 extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh); 815 803 extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst);
+9
net/dccp/ccids/ccid2.c
··· 583 583 dccp_ackvec_parsed_cleanup(&hc->tx_av_chunks); 584 584 } 585 585 586 + /* 587 + * Convert RFC 3390 larger initial window into an equivalent number of packets. 588 + * This is based on the numbers specified in RFC 5681, 3.1. 589 + */ 590 + static inline u32 rfc3390_bytes_to_packets(const u32 smss) 591 + { 592 + return smss <= 1095 ? 4 : (smss > 2190 ? 2 : 3); 593 + } 594 + 586 595 static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) 587 596 { 588 597 struct ccid2_hc_tx_sock *hc = ccid_priv(ccid);
+1 -1
net/ipv4/tcp_input.c
··· 817 817 __u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0); 818 818 819 819 if (!cwnd) 820 - cwnd = rfc3390_bytes_to_packets(tp->mss_cache); 820 + cwnd = TCP_INIT_CWND; 821 821 return min_t(__u32, cwnd, tp->snd_cwnd_clamp); 822 822 } 823 823