diff options
author | David S. Miller <davem@davemloft.net> | 2015-07-10 00:22:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-10 00:22:53 +0300 |
commit | 986ca37eaedc9bc3045a91cc32e6e7427bd87b5d (patch) | |
tree | db19bf4b5ef34ff71a94b9b50ac58875734fedd1 /net/ipv4/tcp_input.c | |
parent | 1007f59dce53a22cba164f854d7bdc171c85dc79 (diff) | |
parent | b20a3fa30a281b52b2576b509efbe5cd47a5a79b (diff) | |
download | linux-986ca37eaedc9bc3045a91cc32e6e7427bd87b5d.tar.xz |
Merge branch 'tcp-in-slow-start'
Yuchung Cheng says:
====================
tcp: fixes some congestion control corner cases
This patch series fixes corner cases of TCP congestion control.
First issue is to avoid continuing slow start when cwnd reaches ssthresh.
Second issue is incorrectly processing order of congestion state and
cwnd update when entering fast recovery or undoing cwnd.
====================
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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7f4a8d5f6eb0..1578fc2a6f39 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3568,10 +3568,6 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) &sack_state); acked -= tp->packets_out; - /* Advance cwnd if state allows */ - if (tcp_may_raise_cwnd(sk, flag)) - tcp_cong_avoid(sk, ack, acked); - if (tcp_ack_is_dubious(sk, flag)) { is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP)); tcp_fastretrans_alert(sk, acked, prior_unsacked, @@ -3580,6 +3576,10 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) if (tp->tlp_high_seq) tcp_process_tlp_ack(sk, ack, flag); + /* Advance cwnd if state allows */ + if (tcp_may_raise_cwnd(sk, flag)) + tcp_cong_avoid(sk, ack, acked); + if ((flag & FLAG_FORWARD_PROGRESS) || !(flag & FLAG_NOT_DUP)) { struct dst_entry *dst = __sk_dst_get(sk); if (dst) |