Merge tag 'nfs-for-4.16-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[linux-2.6-microblaze.git] / net / ipv4 / tcp_bbr.c
index 785712b..a471f69 100644 (file)
@@ -481,7 +481,8 @@ static void bbr_advance_cycle_phase(struct sock *sk)
 
        bbr->cycle_idx = (bbr->cycle_idx + 1) & (CYCLE_LEN - 1);
        bbr->cycle_mstamp = tp->delivered_mstamp;
-       bbr->pacing_gain = bbr_pacing_gain[bbr->cycle_idx];
+       bbr->pacing_gain = bbr->lt_use_bw ? BBR_UNIT :
+                                           bbr_pacing_gain[bbr->cycle_idx];
 }
 
 /* Gain cycling: cycle pacing gain to converge to fair share of available bw. */
@@ -490,8 +491,7 @@ static void bbr_update_cycle_phase(struct sock *sk,
 {
        struct bbr *bbr = inet_csk_ca(sk);
 
-       if ((bbr->mode == BBR_PROBE_BW) && !bbr->lt_use_bw &&
-           bbr_is_next_cycle_phase(sk, rs))
+       if (bbr->mode == BBR_PROBE_BW && bbr_is_next_cycle_phase(sk, rs))
                bbr_advance_cycle_phase(sk);
 }