Expand description
BBR congestion control for the RLC transport’s send path.
A from-the-spec implementation of BBR (Bottleneck Bandwidth and Round-trip propagation time), Cardwell et al., following:
draft-cardwell-iccrg-bbr-congestion-control(the state machine, the pacing-rate / cwnd formulas, the full-pipe detection), anddraft-cheng-iccrg-delivery-rate-estimation(the per-packet rate-sample bookkeeping).
This is the BBRv1 model: the bottleneck is characterised by two
quantities the sender can measure, BtlBw (the windowed-MAX of the
delivery rate) and RTprop (the windowed-MIN of the round-trip
time), and the sender PACES at pacing_gain * BtlBw while bounding
in-flight to cwnd_gain * BDP (BDP = BtlBw * RTprop). That keeps the
bottleneck queue near-empty: throughput at the bottleneck rate with
minimal standing queue, which is the whole point, low latency under
bufferbloat where a loss-based controller fills the buffer.
§Why the rate sampler matters (the part a naive version gets wrong)
The delivery rate must NOT be acked_bytes / ack_arrival_interval:
when a frontier hole fills, the receiver delivers a backlog at once,
the ACKs arrive compressed, and that ratio spikes to many times the
true link rate. The spec’s fix (followed here) snapshots, PER PACKET
at send time, the connection’s delivered count and the time it was
last updated; on ACK the rate is delivered_delta / max(send_elapsed, ack_elapsed). Taking the MAX of the send-side and
ack-side elapsed intervals makes the estimate robust to both ACK
compression (ack_elapsed too small) and send bursts (send_elapsed too
small). This is exactly what an earlier hand-rolled
windowed-max-of-raw-ACK-delta got wrong.
Structs§
- Bbr
- BBR sender-side state.
- Packet
Sample - Per-packet rate-sample snapshot, stored by the caller alongside each in-flight packet and handed back when that packet is delivered.