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

Function bbr_initial_cwnd

freebsd/netinet/tcp_stacks/bbr.c:3409–3432  ·  view source on GitHub ↗

* Return the initial cwnd. */

Source from the content-addressed store, hash-verified

3407 * Return the initial cwnd.
3408 */
3409static uint32_t
3410bbr_initial_cwnd(struct tcp_bbr *bbr, struct tcpcb *tp)
3411{
3412 uint32_t i_cwnd;
3413
3414 if (bbr->rc_init_win) {
3415 i_cwnd = bbr->rc_init_win * tp->t_maxseg;
3416 } else if (V_tcp_initcwnd_segments)
3417 i_cwnd = min((V_tcp_initcwnd_segments * tp->t_maxseg),
3418 max(2 * tp->t_maxseg, 14600));
3419 else if (V_tcp_do_rfc3390)
3420 i_cwnd = min(4 * tp->t_maxseg,
3421 max(2 * tp->t_maxseg, 4380));
3422 else {
3423 /* Per RFC5681 Section 3.1 */
3424 if (tp->t_maxseg > 2190)
3425 i_cwnd = 2 * tp->t_maxseg;
3426 else if (tp->t_maxseg > 1095)
3427 i_cwnd = 3 * tp->t_maxseg;
3428 else
3429 i_cwnd = 4 * tp->t_maxseg;
3430 }
3431 return (i_cwnd);
3432}
3433
3434/*
3435 * Given a specified gain, return the target

Callers 5

__bbr_get_bwFunction · 0.85
bbr_get_raw_target_cwndFunction · 0.85
bbr_ack_receivedFunction · 0.85
tcp_bbr_tso_size_checkFunction · 0.85
bbr_set_sockoptFunction · 0.85

Calls 2

minFunction · 0.85
maxFunction · 0.85

Tested by

no test coverage detected