MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bbr_setup_less_of_rate

Function bbr_setup_less_of_rate

freebsd/netinet/tcp_stacks/bbr.c:5507–5529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5505}
5506
5507static void
5508bbr_setup_less_of_rate(struct tcp_bbr *bbr, uint32_t cts,
5509 uint64_t act_rate, uint64_t rate_wanted)
5510{
5511 /*
5512 * We could not get a full gains worth
5513 * of rate.
5514 */
5515 if (get_filter_value(&bbr->r_ctl.rc_delrate) >= act_rate) {
5516 /* we can't even get the real rate */
5517 uint64_t red;
5518
5519 bbr->skip_gain = 1;
5520 bbr->gain_is_limited = 0;
5521 red = get_filter_value(&bbr->r_ctl.rc_delrate) - act_rate;
5522 if (red)
5523 filter_reduce_by(&bbr->r_ctl.rc_delrate, red, cts);
5524 } else {
5525 /* We can use a lower gain */
5526 bbr->skip_gain = 0;
5527 bbr->gain_is_limited = 1;
5528 }
5529}
5530
5531static void
5532bbr_update_hardware_pacing_rate(struct tcp_bbr *bbr, uint32_t cts)

Callers 2

bbr.cFile · 0.85

Calls 2

get_filter_valueFunction · 0.85
filter_reduce_byFunction · 0.85

Tested by

no test coverage detected