gfe-relnote: In BandwidthSampler, capture the number of lost bytes at the time a packet is sent, and make it available to caller when the packet is acked or lost. No behavior change, not protected.
In addition to the number of lost bytes, this CL also makes the number of sent bytes and number of acked bytes available to caller when a packet is acked or lost.
This is needed for BBRv2 to set inflight_hi when loss is high.
PiperOrigin-RevId: 242001670
Change-Id: I90543435eb1052b2afb3942d1b744c8153524461
diff --git a/quic/core/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc
index e59aa8d..5c9e9ea 100644
--- a/quic/core/congestion_control/bbr_sender.cc
+++ b/quic/core/congestion_control/bbr_sender.cc
@@ -505,13 +505,14 @@
}
BandwidthSample bandwidth_sample =
sampler_.OnPacketAcknowledged(now, packet.packet_number);
- last_sample_is_app_limited_ = bandwidth_sample.is_app_limited;
- has_non_app_limited_sample_ |= !bandwidth_sample.is_app_limited;
+ last_sample_is_app_limited_ = bandwidth_sample.state_at_send.is_app_limited;
+ has_non_app_limited_sample_ |=
+ !bandwidth_sample.state_at_send.is_app_limited;
if (!bandwidth_sample.rtt.IsZero()) {
sample_min_rtt = std::min(sample_min_rtt, bandwidth_sample.rtt);
}
- if (!bandwidth_sample.is_app_limited ||
+ if (!bandwidth_sample.state_at_send.is_app_limited ||
bandwidth_sample.bandwidth > BandwidthEstimate()) {
max_bandwidth_.Update(bandwidth_sample.bandwidth, round_trip_count_);
}