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

Function bbr_get_a_state_target

freebsd/netinet/tcp_stacks/bbr.c:10709–10728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10707}
10708
10709static uint32_t
10710bbr_get_a_state_target(struct tcp_bbr *bbr, uint32_t gain)
10711{
10712 uint32_t mss, tar;
10713
10714 if (bbr->rc_use_google) {
10715 /* Google just uses the cwnd target */
10716 tar = bbr_get_target_cwnd(bbr, bbr_get_bw(bbr), gain);
10717 } else {
10718 mss = min((bbr->rc_tp->t_maxseg - bbr->rc_last_options),
10719 bbr->r_ctl.rc_pace_max_segs);
10720 /* Get the base cwnd with gain rounded to a mss */
10721 tar = roundup(bbr_get_raw_target_cwnd(bbr, bbr_get_bw(bbr),
10722 gain), mss);
10723 /* Make sure it is within our min */
10724 if (tar < get_min_cwnd(bbr))
10725 return (get_min_cwnd(bbr));
10726 }
10727 return (tar);
10728}
10729
10730static void
10731bbr_set_state_target(struct tcp_bbr *bbr, int line)

Callers 1

bbr_set_state_targetFunction · 0.85

Calls 5

bbr_get_target_cwndFunction · 0.85
bbr_get_bwFunction · 0.85
minFunction · 0.85
bbr_get_raw_target_cwndFunction · 0.85
get_min_cwndFunction · 0.85

Tested by

no test coverage detected