Congestion Control interface for receiving ECN feedback. PiperOrigin-RevId: 515174710
diff --git a/quiche/quic/core/congestion_control/bbr2_sender.h b/quiche/quic/core/congestion_control/bbr2_sender.h index 7f47a4e..d808791 100644 --- a/quiche/quic/core/congestion_control/bbr2_sender.h +++ b/quiche/quic/core/congestion_control/bbr2_sender.h
@@ -92,6 +92,9 @@ void OnApplicationLimited(QuicByteCount bytes_in_flight) override; void PopulateConnectionStats(QuicConnectionStats* stats) const override; + + void CongestionExperienced(QuicPacketCount /*num_ce*/, + QuicPacketCount /*num_ect*/) override {} // End implementation of SendAlgorithmInterface. const Bbr2Params& Params() const { return params_; }
diff --git a/quiche/quic/core/congestion_control/bbr_sender.h b/quiche/quic/core/congestion_control/bbr_sender.h index 5f711fd..774cb7e 100644 --- a/quiche/quic/core/congestion_control/bbr_sender.h +++ b/quiche/quic/core/congestion_control/bbr_sender.h
@@ -130,6 +130,8 @@ std::string GetDebugState() const override; void OnApplicationLimited(QuicByteCount bytes_in_flight) override; void PopulateConnectionStats(QuicConnectionStats* stats) const override; + void CongestionExperienced(QuicPacketCount /*num_ce*/, + QuicPacketCount /*num_ect*/) override {} // End implementation of SendAlgorithmInterface. // Gets the number of RTTs BBR remains in STARTUP phase.
diff --git a/quiche/quic/core/congestion_control/send_algorithm_interface.h b/quiche/quic/core/congestion_control/send_algorithm_interface.h index db14a1e..82be341 100644 --- a/quiche/quic/core/congestion_control/send_algorithm_interface.h +++ b/quiche/quic/core/congestion_control/send_algorithm_interface.h
@@ -160,6 +160,11 @@ // Called before connection close to collect stats. virtual void PopulateConnectionStats(QuicConnectionStats* stats) const = 0; + + // Called when the connection has received feedback about received + // Explicit Congestion Notification (ECN) marks. + virtual void CongestionExperienced(QuicPacketCount num_ce, + QuicPacketCount num_ect) = 0; }; } // namespace quic
diff --git a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h index 2531e5a..ae24c8c 100644 --- a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h +++ b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h
@@ -72,6 +72,8 @@ std::string GetDebugState() const override; void OnApplicationLimited(QuicByteCount bytes_in_flight) override; void PopulateConnectionStats(QuicConnectionStats* /*stats*/) const override {} + void CongestionExperienced(QuicPacketCount /*num_ce*/, + QuicPacketCount /*num_ect*/) override {} // End implementation of SendAlgorithmInterface. QuicByteCount min_congestion_window() const { return min_congestion_window_; }
diff --git a/quiche/quic/test_tools/quic_test_utils.h b/quiche/quic/test_tools/quic_test_utils.h index 9d717df..3664b11 100644 --- a/quiche/quic/test_tools/quic_test_utils.h +++ b/quiche/quic/test_tools/quic_test_utils.h
@@ -1243,6 +1243,8 @@ MOCK_METHOD(void, OnApplicationLimited, (QuicByteCount), (override)); MOCK_METHOD(void, PopulateConnectionStats, (QuicConnectionStats*), (const, override)); + MOCK_METHOD(void, CongestionExperienced, (QuicPacketCount, QuicPacketCount), + (override)); }; class MockLossAlgorithm : public LossDetectionInterface {