Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / tcp_cong.c
index cdf2e707bb100500511d6b2d46ece69e19163cfa..019c2389a341f6254185c8b9169d9b09c8c16c78 100644 (file)
@@ -317,28 +317,11 @@ void tcp_slow_start(struct tcp_sock *tp)
                snd_cwnd = 1U;
        }
 
-       /* RFC3465: ABC Slow start
-        * Increase only after a full MSS of bytes is acked
-        *
-        * TCP sender SHOULD increase cwnd by the number of
-        * previously unacknowledged bytes ACKed by each incoming
-        * acknowledgment, provided the increase is not more than L
-        */
-       if (sysctl_tcp_abc && tp->bytes_acked < tp->mss_cache)
-               return;
-
        if (sysctl_tcp_max_ssthresh > 0 && tp->snd_cwnd > sysctl_tcp_max_ssthresh)
                cnt = sysctl_tcp_max_ssthresh >> 1;     /* limited slow start */
        else
                cnt = snd_cwnd;                         /* exponential increase */
 
-       /* RFC3465: ABC
-        * We MAY increase by 2 if discovered delayed ack
-        */
-       if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache)
-               cnt <<= 1;
-       tp->bytes_acked = 0;
-
        tp->snd_cwnd_cnt += cnt;
        while (tp->snd_cwnd_cnt >= snd_cwnd) {
                tp->snd_cwnd_cnt -= snd_cwnd;
@@ -378,20 +361,9 @@ void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
        /* In "safe" area, increase. */
        if (tp->snd_cwnd <= tp->snd_ssthresh)
                tcp_slow_start(tp);
-
        /* In dangerous area, increase slowly. */
-       else if (sysctl_tcp_abc) {
-               /* RFC3465: Appropriate Byte Count
-                * increase once for each full cwnd acked
-                */
-               if (tp->bytes_acked >= tp->snd_cwnd*tp->mss_cache) {
-                       tp->bytes_acked -= tp->snd_cwnd*tp->mss_cache;
-                       if (tp->snd_cwnd < tp->snd_cwnd_clamp)
-                               tp->snd_cwnd++;
-               }
-       } else {
+       else
                tcp_cong_avoid_ai(tp, tp->snd_cwnd);
-       }
 }
 EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid);