Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / net / ipv4 / tcp_bbr.c
index 58e2f479ffb4d523b4ccfbb859bdd186a55ab83d..4bfff3c87e8e2de2c9af77ae1d5bb157a28f2207 100644 (file)
@@ -354,6 +354,10 @@ static u32 bbr_target_cwnd(struct sock *sk, u32 bw, int gain)
        /* Reduce delayed ACKs by rounding up cwnd to the next even number. */
        cwnd = (cwnd + 1) & ~1U;
 
+       /* Ensure gain cycling gets inflight above BDP even for small BDPs. */
+       if (bbr->mode == BBR_PROBE_BW && gain > BBR_UNIT)
+               cwnd += 2;
+
        return cwnd;
 }