Lines Matching +full:idle +full:- +full:wait +full:- +full:delay

1 // SPDX-License-Identifier: GPL-2.0-only
8 * IEEE Journal on Selected Areas in Communication, 13(8):1465--1480,
17 * using fine-grained timers, NewReno, and FACK.
19 * only every-other RTT during slow start, we increase during
29 * o When the sender re-starts from idle, it waits until it has
32 * assumed senders never went idle.
55 /* There are several situations when we must "re-start" Vegas:
61 * unacknowledged data (restarting an idle connection)
65 * stale info -- both the saved cwnd and congestion feedback are
68 * Instead we must wait until the completion of an RTT during
77 vegas->doing_vegas_now = 1; in vegas_enable()
80 vegas->beg_snd_nxt = tp->snd_nxt; in vegas_enable()
82 vegas->cntRTT = 0; in vegas_enable()
83 vegas->minRTT = 0x7fffffff; in vegas_enable()
91 vegas->doing_vegas_now = 0; in vegas_disable()
98 vegas->baseRTT = 0x7fffffff; in tcp_vegas_init()
105 * o min-filter RTT samples from within an RTT to get the current
106 * propagation delay + queuing delay (we are min-filtering to try to
108 * o min-filter RTT samples from a much longer window (forever for now)
109 * to find the propagation delay (baseRTT)
116 if (sample->rtt_us < 0) in tcp_vegas_pkts_acked()
120 vrtt = sample->rtt_us + 1; in tcp_vegas_pkts_acked()
122 /* Filter to find propagation delay: */ in tcp_vegas_pkts_acked()
123 if (vrtt < vegas->baseRTT) in tcp_vegas_pkts_acked()
124 vegas->baseRTT = vrtt; in tcp_vegas_pkts_acked()
127 * the current prop. delay + queuing delay: in tcp_vegas_pkts_acked()
129 vegas->minRTT = min(vegas->minRTT, vrtt); in tcp_vegas_pkts_acked()
130 vegas->cntRTT++; in tcp_vegas_pkts_acked()
144 * If the connection is idle and we are restarting,
162 return min(tp->snd_ssthresh, tcp_snd_cwnd(tp)); in tcp_vegas_ssthresh()
170 if (!vegas->doing_vegas_now) { in tcp_vegas_cong_avoid()
175 if (after(ack, vegas->beg_snd_nxt)) { in tcp_vegas_cong_avoid()
176 /* Do the Vegas once-per-RTT cwnd adjustment. */ in tcp_vegas_cong_avoid()
181 vegas->beg_snd_nxt = tp->snd_nxt; in tcp_vegas_cong_avoid()
192 if (vegas->cntRTT <= 2) { in tcp_vegas_cong_avoid()
212 rtt = vegas->minRTT; in tcp_vegas_cong_avoid()
220 target_cwnd = (u64)tcp_snd_cwnd(tp) * vegas->baseRTT; in tcp_vegas_cong_avoid()
227 diff = tcp_snd_cwnd(tp) * (rtt-vegas->baseRTT) / vegas->baseRTT; in tcp_vegas_cong_avoid()
243 tp->snd_ssthresh = tcp_vegas_ssthresh(tp); in tcp_vegas_cong_avoid()
258 tcp_snd_cwnd_set(tp, tcp_snd_cwnd(tp) - 1); in tcp_vegas_cong_avoid()
259 tp->snd_ssthresh in tcp_vegas_cong_avoid()
275 else if (tcp_snd_cwnd(tp) > tp->snd_cwnd_clamp) in tcp_vegas_cong_avoid()
276 tcp_snd_cwnd_set(tp, tp->snd_cwnd_clamp); in tcp_vegas_cong_avoid()
278 tp->snd_ssthresh = tcp_current_ssthresh(sk); in tcp_vegas_cong_avoid()
282 vegas->cntRTT = 0; in tcp_vegas_cong_avoid()
283 vegas->minRTT = 0x7fffffff; in tcp_vegas_cong_avoid()
296 if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { in tcp_vegas_get_info()
297 info->vegas.tcpv_enabled = ca->doing_vegas_now; in tcp_vegas_get_info()
298 info->vegas.tcpv_rttcnt = ca->cntRTT; in tcp_vegas_get_info()
299 info->vegas.tcpv_rtt = ca->baseRTT; in tcp_vegas_get_info()
300 info->vegas.tcpv_minrtt = ca->minRTT; in tcp_vegas_get_info()