Lines Matching refs:bw

44  * we estimated that we reached the full bw of the pipe then we enter PROBE_BW;
82 BBR_PROBE_BW, /* discover, share bw: pace around estimated bw */
91 struct minmax bw; /* Max recent delivery rate in pkts/uS << 24 */
104 lt_use_bw:1; /* use lt_bw as our bw estimate? */
111 full_bw_reached:1, /* reached full bw in Startup? */
112 full_bw_cnt:2, /* number of rounds without large bw gains */
117 u32 full_bw; /* recent bw, to estimate if pipe is full */
130 /* Window length of bw filter (in rounds): */
139 /* Pace at ~1% below estimated bw, on average, to reduce queue at bottleneck.
159 /* The pacing_gain values for the PROBE_BW gain cycle, to discover/share bw: */
161 BBR_UNIT * 5 / 4, /* probe for more available bw */
162 BBR_UNIT * 3 / 4, /* drain queue and/or yield bw to other flows */
163 BBR_UNIT, BBR_UNIT, BBR_UNIT, /* cruise at 1.0*bw to utilize pipe, */
176 /* If bw has increased significantly (1.25x), there may be more bw available: */
178 /* But after 3 rounds w/o significant bw growth, estimate pipe is full: */
182 /* The minimum number of rounds in an LT bw sampling interval: */
186 /* If 2 intervals have a bw ratio <= 1/8, their bw is "consistent": */
188 /* If 2 intervals have a bw diff <= 4 Kbit/sec their bw is "consistent": */
217 return minmax_get(&bbr->bw);
253 /* Convert a BBR bw and gain factor to a pacing rate in bytes per second. */
254 static unsigned long bbr_bw_to_pacing_rate(struct sock *sk, u32 bw, int gain)
256 u64 rate = bw;
268 u64 bw;
277 bw = (u64)tp->snd_cwnd * BW_UNIT;
278 do_div(bw, rtt_us);
279 sk->sk_pacing_rate = bbr_bw_to_pacing_rate(sk, bw, bbr_high_gain);
282 /* Pace using current bw estimate and a gain factor. */
283 static void bbr_set_pacing_rate(struct sock *sk, u32 bw, int gain)
287 unsigned long rate = bbr_bw_to_pacing_rate(sk, bw, gain);
338 /* Avoid pointless buffer overflows: pace at est. bw if we don't
350 * bdp = ceil(bw * min_rtt * gain)
357 static u32 bbr_bdp(struct sock *sk, u32 bw, int gain)
372 w = (u64)bw * bbr->min_rtt_us;
410 static u32 bbr_inflight(struct sock *sk, u32 bw, int gain)
414 inflight = bbr_bdp(sk, bw, gain);
428 * in_network_at_edt = inflight_at_edt - (EDT - now) * bw
513 /* Slow-start up toward target cwnd (if bw estimate is growing, or packet loss
517 u32 acked, u32 bw, int gain)
529 target_cwnd = bbr_bdp(sk, bw, gain);
559 u32 inflight, bw;
561 /* The pacing_gain of 1.0 paces at the estimated bw to try to fully
568 bw = bbr_max_bw(sk);
570 /* A pacing_gain > 1.0 probes for bw by trying to raise inflight to at
578 inflight >= bbr_inflight(sk, bw, bbr->pacing_gain));
580 /* A pacing_gain < 1.0 tries to drain extra queue we added if bw
581 * probing didn't find more bw. If inflight falls to match BDP then we
585 inflight <= bbr_inflight(sk, bw, BBR_UNIT);
597 /* Gain cycling: cycle pacing gain to converge to fair share of available bw. */
654 /* Long-term bw sampling interval is done. Estimate whether we're policed. */
655 static void bbr_lt_bw_interval_done(struct sock *sk, u32 bw)
660 if (bbr->lt_bw) { /* do we have bw from a previous interval? */
661 /* Is new bw close to the lt_bw from the previous interval? */
662 diff = abs(bw - bbr->lt_bw);
667 bbr->lt_bw = (bw + bbr->lt_bw) >> 1; /* avg 2 intvls */
674 bbr->lt_bw = bw;
690 u64 bw;
704 * Starting samples earlier includes bursts that over-estimate the bw.
752 bw = (u64)delivered * BW_UNIT;
753 do_div(bw, t);
754 bbr_lt_bw_interval_done(sk, bw);
762 u64 bw;
782 bw = div64_long((u64)rs->delivered * BW_UNIT, rs->interval_us);
787 * bw, causing needless slow-down. Thus, to continue to send at the
789 * they describe the path bw at least as well as our bw model.
795 if (!rs->is_app_limited || bw >= bbr_max_bw(sk)) {
796 /* Incorporate new sample into our max bw filter. */
797 minmax_running_max(&bbr->bw, bbr_bw_rtts, bbr->rtt_cnt, bw);
810 * Max extra_acked is clamped by cwnd and bw * bbr_extra_acked_max_us (100 ms).
863 * estimates that STARTUP filled the pipe if the estimated bw hasn't changed by
1027 u32 bw;
1031 bw = bbr_bw(sk);
1032 bbr_set_pacing_rate(sk, bw, bbr->pacing_gain);
1033 bbr_set_cwnd(sk, rs, rs->acked_sacked, bw, bbr->cwnd_gain);
1053 minmax_reset(&bbr->bw, bbr->rtt_cnt, 0); /* init max bw to 0 */
1111 u64 bw = bbr_bw(sk);
1113 bw = bw * tp->mss_cache * USEC_PER_SEC >> BW_SCALE;
1115 info->bbr.bbr_bw_lo = (u32)bw;
1116 info->bbr.bbr_bw_hi = (u32)(bw >> 32);