diff options
author | Weiping Pan <wpan@redhat.com> | 2014-04-18 00:27:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-20 18:18:56 -0400 |
commit | 86fd14ad1e8c4b8f5e9a7a27b26bdade91dd4bd0 (patch) | |
tree | 8f6dd795862f5b73f06c244c856d12ce0accc147 /net/ipv4/tcp_input.c | |
parent | 17d8ecb8ff791359c9d9a44bc766c3d4b87f37f7 (diff) |
tcp: make tcp_cwnd_application_limited() static
Make tcp_cwnd_application_limited() static and move it from tcp_input.c to
tcp_output.c
Signed-off-by: Weiping Pan <wpan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index d6b46eb2f94c..6efed134ab63 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4703,28 +4703,6 @@ static int tcp_prune_queue(struct sock *sk) | |||
4703 | return -1; | 4703 | return -1; |
4704 | } | 4704 | } |
4705 | 4705 | ||
4706 | /* RFC2861, slow part. Adjust cwnd, after it was not full during one rto. | ||
4707 | * As additional protections, we do not touch cwnd in retransmission phases, | ||
4708 | * and if application hit its sndbuf limit recently. | ||
4709 | */ | ||
4710 | void tcp_cwnd_application_limited(struct sock *sk) | ||
4711 | { | ||
4712 | struct tcp_sock *tp = tcp_sk(sk); | ||
4713 | |||
4714 | if (inet_csk(sk)->icsk_ca_state == TCP_CA_Open && | ||
4715 | sk->sk_socket && !test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) { | ||
4716 | /* Limited by application or receiver window. */ | ||
4717 | u32 init_win = tcp_init_cwnd(tp, __sk_dst_get(sk)); | ||
4718 | u32 win_used = max(tp->snd_cwnd_used, init_win); | ||
4719 | if (win_used < tp->snd_cwnd) { | ||
4720 | tp->snd_ssthresh = tcp_current_ssthresh(sk); | ||
4721 | tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1; | ||
4722 | } | ||
4723 | tp->snd_cwnd_used = 0; | ||
4724 | } | ||
4725 | tp->snd_cwnd_stamp = tcp_time_stamp; | ||
4726 | } | ||
4727 | |||
4728 | static bool tcp_should_expand_sndbuf(const struct sock *sk) | 4706 | static bool tcp_should_expand_sndbuf(const struct sock *sk) |
4729 | { | 4707 | { |
4730 | const struct tcp_sock *tp = tcp_sk(sk); | 4708 | const struct tcp_sock *tp = tcp_sk(sk); |