diff --git a/net/ipv4/tcp_bbr2.c b/net/ipv4/tcp_bbr2.c index 57b4abebb275b..5510adc92bbb4 100644 --- a/net/ipv4/tcp_bbr2.c +++ b/net/ipv4/tcp_bbr2.c @@ -2617,15 +2617,12 @@ static void bbr2_set_state(struct sock *sk, u8 new_state) /* bbr_adapt_lower_bounds() needs cwnd before * we suffered an RTO, to update inflight_lo: */ - WARN_ON_ONCE(bbr->prior_cwnd == 0); - WARN_ON_ONCE(bbr->prior_cwnd == ~0U); - bbr->inflight_lo = bbr->prior_cwnd; + bbr->inflight_lo = + max(tp->snd_cwnd, bbr->prior_cwnd); } bbr_debug(sk, 0, &rs, &ctx); } else if (bbr->prev_ca_state == TCP_CA_Loss && new_state != TCP_CA_Loss) { - WARN_ON_ONCE(bbr->prior_cwnd == 0); - WARN_ON_ONCE(bbr->prior_cwnd == ~0U); tp->snd_cwnd = max(tp->snd_cwnd, bbr->prior_cwnd); bbr->try_fast_path = 0; /* bound cwnd using latest model */ }