diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index b74444cee24d..d3545d0cff75 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1514,6 +1514,18 @@ static void tcp_cwnd_validate(struct sock *sk, bool is_cwnd_limited) | |||
1514 | if (sysctl_tcp_slow_start_after_idle && | 1514 | if (sysctl_tcp_slow_start_after_idle && |
1515 | (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto) | 1515 | (s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto) |
1516 | tcp_cwnd_application_limited(sk); | 1516 | tcp_cwnd_application_limited(sk); |
1517 | |||
1518 | /* The following conditions together indicate the starvation | ||
1519 | * is caused by insufficient sender buffer: | ||
1520 | * 1) just sent some data (see tcp_write_xmit) | ||
1521 | * 2) not cwnd limited (this else condition) | ||
1522 | * 3) no more data to send (null tcp_send_head ) | ||
1523 | * 4) application is hitting buffer limit (SOCK_NOSPACE) | ||
1524 | */ | ||
1525 | if (!tcp_send_head(sk) && sk->sk_socket && | ||
1526 | test_bit(SOCK_NOSPACE, &sk->sk_socket->flags) && | ||
1527 | (1 << sk->sk_state) & (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) | ||
1528 | tcp_chrono_start(sk, TCP_CHRONO_SNDBUF_LIMITED); | ||
1517 | } | 1529 | } |
1518 | } | 1530 | } |
1519 | 1531 | ||