T2.2: BandwidthEstimator with cwnd/REMB target_send_bps

This commit is contained in:
Siavash Sameni
2026-05-11 19:16:25 +04:00
parent fe1f9484bd
commit 3de56cf1f9
4 changed files with 201 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ pub struct QuinnPathSnapshot {
/// Total congestion events observed by the QUIC stack.
pub congestion_events: u64,
/// Current congestion window in bytes.
pub cwnd: u64,
pub cwnd_bytes: u64,
/// Total packets sent on this path.
pub sent_packets: u64,
/// Total packets lost on this path.
@@ -34,6 +34,8 @@ pub struct QuinnPathSnapshot {
/// Current PMTUD-discovered maximum datagram payload size (bytes).
/// Starts at `initial_mtu` (1200) and grows as PMTUD probes succeed.
pub current_mtu: usize,
/// Bytes currently in flight (unacknowledged).
pub bytes_in_flight: u64,
}
/// QUIC-based transport implementing the `MediaTransport` trait.
@@ -107,10 +109,13 @@ impl QuinnTransport {
rtt_ms,
loss_pct,
congestion_events: stats.path.congestion_events,
cwnd: stats.path.cwnd,
cwnd_bytes: stats.path.cwnd,
sent_packets: stats.path.sent_packets,
lost_packets: stats.path.lost_packets,
current_mtu,
// quinn 0.11 does not expose bytes_in_flight on PathStats;
// reserved for when the underlying stat becomes available.
bytes_in_flight: 0,
}
}