BBR_ST_PROBE_RTT,
};
-enum bbr_ack_phase {
- BBR_ACK_PHASE_ACKS_PROBE_STARTING,
- BBR_ACK_PHASE_ACKS_PROBE_STOPPING,
- BBR_ACK_PHASE_ACKS_PROBE_FEEDBACK,
- BBR_ACK_PHASE_ACKS_REFILLING,
-};
-
struct bbr {
/* Delivery rate sampling information. */
struct quic_cc_drs drs;
uint64_t offload_budget;
uint64_t probe_up_cnt;
uint32_t cycle_stamp;
- enum bbr_ack_phase ack_phase;
unsigned int bw_probe_wait;
int bw_probe_samples;
int bw_probe_up_rounds;
bbr->offload_budget = 0;
bbr->probe_up_cnt = UINT64_MAX;
bbr->cycle_stamp = TICK_ETERNITY;
- bbr->ack_phase = 0;
bbr->bw_probe_wait = 0;
bbr->bw_probe_samples = 0;
bbr->bw_probe_up_rounds = 0;
bbr->probe_up_cnt = MAX(p->cwnd / growth_this_round, 1) * p->mtu;
}
+static inline void bbr_advance_max_bw_filter(struct bbr *bbr)
+{
+ bbr->cycle_count++;
+}
+
/* 4.3.3. ProbeBW
*
* Long-lived BBR flows tend to spend the vast majority of their time in the
bbr->probe_up_cnt = UINT64_MAX;
bbr_pick_probe_wait(bbr);
bbr->cycle_stamp = now_ms;
- bbr->ack_phase = BBR_ACK_PHASE_ACKS_PROBE_STOPPING;
bbr_start_round(bbr);
bbr->state = BBR_ST_PROBE_BW_DOWN;
bbr->pacing_gain = 90;
bbr->cwnd_gain = BBR_DEFAULT_CWND_GAIN_MULT;
+ if (!bbr->drs.rs.is_app_limited)
+ bbr_advance_max_bw_filter(bbr);
}
/* 4.3.3.2. ProbeBW_CRUISE
bbr_reset_lower_bounds(bbr);
bbr->bw_probe_up_rounds = 0;
bbr->bw_probe_up_acks = 0;
- bbr->ack_phase = BBR_ACK_PHASE_ACKS_REFILLING;
bbr_start_round(bbr);
bbr->state = BBR_ST_PROBE_BW_REFILL;
bbr->pacing_gain = 100;
static void bbr_start_probe_bw_up(struct bbr *bbr, struct quic_cc_path *p)
{
- bbr->ack_phase = BBR_ACK_PHASE_ACKS_PROBE_STARTING;
bbr_start_round(bbr);
bbr_reset_full_bw(bbr);
bbr->full_bw = p->delivery_rate;
}
}
-static void bbr_advance_max_bw_filter(struct bbr *bbr)
-{
- bbr->cycle_count++;
-}
-
static uint64_t bbr_target_inflight(struct bbr *bbr, struct quic_cc_path *p)
{
uint64_t bdp = bbr_inflight(bbr, p, bbr->bw, bbr->cwnd_gain);
static void bbr_adapt_upper_bounds(struct bbr *bbr, struct quic_cc_path *p,
uint32_t acked)
{
- if (bbr->ack_phase == BBR_ACK_PHASE_ACKS_PROBE_STARTING && bbr->round_start)
- /* starting to get bw probing samples */
- bbr->ack_phase = BBR_ACK_PHASE_ACKS_PROBE_FEEDBACK;
-
- if (bbr->ack_phase == BBR_ACK_PHASE_ACKS_PROBE_STOPPING && bbr->round_start) {
- /* end of samples from bw probing phase */
- if (bbr_is_probing_bw(bbr) && !bbr->drs.rs.is_app_limited)
- bbr_advance_max_bw_filter(bbr);
- }
-
if (bbr_is_inflight_too_high(bbr, p))
return;
bbr_enter_probe_rtt(bbr);
bbr_save_cwnd(bbr, p);
bbr->probe_rtt_done_stamp = TICK_ETERNITY;
- bbr->ack_phase = BBR_ACK_PHASE_ACKS_PROBE_STOPPING;
bbr_start_round(bbr);
}