The cwnd calculated by bbrv1 is larger than that of bbrv3, because bbrv1 is accumulated by 3 * bbr_tso_segs_goal, but bbrv3 is not.
In bbrv1:
static u32 bbr_quantization_budget(struct sock *sk, u32 cwnd)
{
struct bbr *bbr = inet_csk_ca(sk);
/* Allow enough full-sized skbs in flight to utilize end systems. */
cwnd += 3 * bbr_tso_segs_goal(sk);
/* Reduce delayed ACKs by rounding up cwnd to the next even number. */
cwnd = (cwnd + 1) & ~1U;
/* Ensure gain cycling gets inflight above BDP even for small BDPs. */
if (bbr->mode == BBR_PROBE_BW && bbr->cycle_idx == 0)
cwnd += 2;
return cwnd;
}
In bbrv3:
static u32 bbr_quantization_budget(struct sock *sk, u32 cwnd)
{
struct bbr *bbr = inet_csk_ca(sk);
u32 tso_segs_goal;
tso_segs_goal = 3 * bbr_tso_segs_goal(sk);
/* Allow enough full-sized skbs in flight to utilize end systems. */
cwnd = max_t(u32, cwnd, tso_segs_goal);
cwnd = max_t(u32, cwnd, bbr_param(sk, cwnd_min_target));
/* Ensure gain cycling gets inflight above BDP even for small BDPs. */
if (bbr->mode == BBR_PROBE_BW && bbr->cycle_idx == BBR_BW_PROBE_UP)
cwnd += 2;
return cwnd;
}
Thanks.