Skip to content

Commit acde64f

Browse files
committed
WIP: quic: minor modifs for BBR (to be merged)
1 parent a400cfb commit acde64f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/quic_cc_bbr.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,10 +1292,10 @@ static void bbr_update_control_parameters(struct bbr *bbr,
12921292
bbr_set_cwnd(bbr, p, acked);
12931293
}
12941294

1295-
static inline int in_recovery_period(struct bbr *bbr, uint32_t ts)
1295+
static inline int in_recovery_period(struct quic_cc_path *p, uint32_t ts)
12961296
{
1297-
return tick_isset(bbr->recovery_start_ts) ||
1298-
tick_is_le(ts, bbr->recovery_start_ts);
1297+
return tick_isset(p->recovery_start_ts) ||
1298+
tick_is_le(ts, p->recovery_start_ts);
12991299
}
13001300

13011301
static void bbr_handle_recovery(struct bbr *bbr, struct quic_cc_path *p,
@@ -1304,7 +1304,7 @@ static void bbr_handle_recovery(struct bbr *bbr, struct quic_cc_path *p,
13041304
{
13051305
if (bbr->in_loss_recovery) {
13061306
if (tick_isset(largest_pkt_sent_ts) &&
1307-
!in_recovery_period(bbr, largest_pkt_sent_ts)) {
1307+
!in_recovery_period(p, largest_pkt_sent_ts)) {
13081308
bbr->in_loss_recovery = 0;
13091309
bbr->round_count_at_recovery = UINT64_MAX;
13101310
bbr_restore_cwnd(bbr, p);
@@ -1321,6 +1321,7 @@ static void bbr_handle_recovery(struct bbr *bbr, struct quic_cc_path *p,
13211321
bbr->round_start ? bbr->round_count : bbr->round_count + 1;
13221322
bbr_save_cwnd(bbr, p);
13231323
p->cwnd = p->in_flight + MAX(acked, p->mtu);
1324+
p->recovery_start_ts = bbr->recovery_start_ts;
13241325
bbr->recovery_start_ts = TICK_ETERNITY;
13251326
}
13261327

@@ -1448,7 +1449,7 @@ static void bbr_congestion_event(struct quic_cc *cc, uint32_t ts)
14481449
struct bbr *bbr = quic_cc_priv(&p->cc);
14491450

14501451
if (bbr->in_loss_recovery ||
1451-
tick_isset(bbr->recovery_start_ts) || in_recovery_period(bbr, ts))
1452+
tick_isset(bbr->recovery_start_ts) || in_recovery_period(p, ts))
14521453
return;
14531454

14541455
bbr->recovery_start_ts = ts;

0 commit comments

Comments
 (0)