aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index dc151139b5af..3c24881f2a65 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -943,7 +943,8 @@ static void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
943 if (tp->packets_out > tp->snd_cwnd_used) 943 if (tp->packets_out > tp->snd_cwnd_used)
944 tp->snd_cwnd_used = tp->packets_out; 944 tp->snd_cwnd_used = tp->packets_out;
945 945
946 if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto) 946 if (sysctl_tcp_slow_start_after_idle &&
947 (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto)
947 tcp_cwnd_application_limited(sk); 948 tcp_cwnd_application_limited(sk);
948 } 949 }
949} 950}
@@ -1607,6 +1608,9 @@ u32 __tcp_select_window(struct sock *sk)
1607 */ 1608 */
1608 if (window <= free_space - mss || window > free_space) 1609 if (window <= free_space - mss || window > free_space)
1609 window = (free_space/mss)*mss; 1610 window = (free_space/mss)*mss;
1611 else if (mss == full_space &&
1612 free_space > window + full_space/2)
1613 window = free_space;
1610 } 1614 }
1611 1615
1612 return window; 1616 return window;