You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: quinn-proto/src/congestion/bbr3/mod.rs
+21-36Lines changed: 21 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -271,7 +271,7 @@ pub struct Bbr3 {
271
271
is_cwnd_limited:bool,
272
272
/// equivalent to BBR.cycle_count: The virtual time used by the BBR.max_bw filter window. Note that BBR.cycle_count only needs to be tracked with a single bit,
273
273
/// since the BBR.max_bw_filter only needs to track samples from two time slots: the previous ProbeBW cycle and the current ProbeBW cycle.
274
-
cycle_count:u64,
274
+
cycle_count:bool,
275
275
/// equivalent to C.cwnd: The transport sender's congestion window. When transmitting data, the sending connection ensures that C.inflight does not exceed C.cwnd.
276
276
cwnd:u64,
277
277
/// equivalent to C.pacing_rate: The current pacing rate for a BBR flow, which controls inter-packet spacing.
@@ -319,14 +319,6 @@ pub struct Bbr3 {
319
319
next_round_delivered:u64,
320
320
/// equivalent to BBR.idle_restart: A boolean that is true if and only if a connection is restarting after being idle.
321
321
idle_restart:bool,
322
-
/// equivalent to BBR.LossThresh: A constant specifying the maximum tolerated per-round-trip packet loss rate when probing for bandwidth (the default is 2%).
323
-
loss_thresh:f64,
324
-
/// equivalent to BBR.Beta: A constant specifying the default multiplicative decrease to make upon each round trip during which the connection detects packet loss (the value is 0.7).
325
-
beta:f64,
326
-
/// equivalent to BBR.Headroom: A constant specifying the multiplicative factor to apply to BBR.inflight_longterm when calculating
327
-
/// a volume of free headroom to try to leave unused in the path
328
-
/// (e.g. free space in the bottleneck buffer or free time slots in the bottleneck link) that can be used by cross traffic (the value is 0.15).
329
-
headroom:f64,
330
322
/// equivalent to BBR.MinPipeCwnd: The minimal C.cwnd value BBR targets, to allow pipelining with endpoints that follow an "ACK every other packet" delayed-ACK policy: 4 * C.SMSS.
331
323
min_pipe_cwnd:u64,
332
324
/// equivalent to BBR.max_bw: The windowed maximum recent bandwidth sample, obtained using the BBR delivery rate sampling algorithm in
@@ -384,8 +376,6 @@ pub struct Bbr3 {
384
376
full_bw_count:u64,
385
377
/// equivalent to BBR.min_rtt_stamp: The wall clock time at which the current BBR.min_rtt sample was obtained.
386
378
min_rtt_stamp:Option<Instant>,
387
-
/// equivalent to BBR.MinRTTFilterLen: A constant specifying the length of the BBR.min_rtt min filter window, BBR.MinRTTFilterLen is 10 secs.
388
-
min_rtt_filter_len:u64,
389
379
/// equivalent to BBR.ProbeRTTDuration: A constant specifying the minimum duration for which ProbeRTT state holds C.inflight to BBR.MinPipeCwnd or fewer packets: 200 ms.
390
380
probe_rtt_duration:Duration,
391
381
/// equivalent to BBR.ProbeRTTInterval: A constant specifying the minimum time interval between ProbeRTT states: 5 secs.
@@ -474,14 +464,14 @@ impl Bbr3 {
474
464
let probe_rtt_cwnd_gain = config.probe_rtt_cwnd_gain.unwrap_or(PROBE_RTT_CWND_GAIN);
475
465
// the calculation for initial pacing rate described here <https://www.ietf.org/archive/id/draft-ietf-ccwg-bbr-04.html#section-5.6.2-5>
476
466
let nominal_bandwidth = initial_cwnd asf64 / 0.001;
477
-
let pacing_rate = STARTUP_PACING_GAIN* nominal_bandwidth;
467
+
let pacing_rate = startup_pacing_gain* nominal_bandwidth;
478
468
Self{
479
469
smss,
480
470
initial_cwnd,
481
471
delivered:0,
482
472
inflight:0,
483
473
is_cwnd_limited:false,
484
-
cycle_count:0,
474
+
cycle_count:false,
485
475
cwnd: initial_cwnd,
486
476
pacing_rate,
487
477
send_quantum:2* smss,// we start high, but it will be adjusted in set_send_quantum <https://www.ietf.org/archive/id/draft-ietf-ccwg-bbr-04.html#section-5.6.3>
@@ -501,9 +491,6 @@ impl Bbr3 {
501
491
round_start:true,
502
492
next_round_delivered:0,
503
493
idle_restart:false,
504
-
loss_thresh:LOSS_THRESH,
505
-
beta:BETA,
506
-
headroom:HEADROOM,
507
494
min_pipe_cwnd:4* smss,// 4 * C.SMSS as defined in <https://www.ietf.org/archive/id/draft-ietf-ccwg-bbr-04.html#section-2.7-4>
0 commit comments