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

Function bbr_cwnd_limiting

freebsd/netinet/tcp_stacks/bbr.c:11888–11906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11886}
11887
11888static void
11889bbr_cwnd_limiting(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t in_level)
11890{
11891 if (bbr->rc_filled_pipe && bbr_target_cwnd_mult_limit && (bbr->rc_use_google == 0)) {
11892 /*
11893 * Limit the cwnd to not be above N x the target plus whats
11894 * is outstanding. The target is based on the current b/w
11895 * estimate.
11896 */
11897 uint32_t target;
11898
11899 target = bbr_get_target_cwnd(bbr, bbr_get_bw(bbr), BBR_UNIT);
11900 target += ctf_outstanding(tp);
11901 target *= bbr_target_cwnd_mult_limit;
11902 if (tp->snd_cwnd > target)
11903 tp->snd_cwnd = target;
11904 bbr_log_type_cwndupd(bbr, 0, 0, 0, 10, 0, 0, __LINE__);
11905 }
11906}
11907
11908static int
11909bbr_window_update_needed(struct tcpcb *tp, struct socket *so, uint32_t recwin, int32_t maxseg)

Callers 1

bbr.cFile · 0.85

Calls 4

bbr_get_target_cwndFunction · 0.85
bbr_get_bwFunction · 0.85
ctf_outstandingFunction · 0.85
bbr_log_type_cwndupdFunction · 0.85

Tested by

no test coverage detected