1 // Copyright 2019 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef QUICHE_QUIC_CORE_CONGESTION_CONTROL_BBR2_PROBE_RTT_H_ 6 #define QUICHE_QUIC_CORE_CONGESTION_CONTROL_BBR2_PROBE_RTT_H_ 7 8 #include "net/third_party/quiche/src/quic/core/congestion_control/bbr2_misc.h" 9 #include "net/third_party/quiche/src/quic/core/quic_time.h" 10 #include "net/third_party/quiche/src/quic/core/quic_types.h" 11 #include "net/third_party/quiche/src/quic/platform/api/quic_export.h" 12 13 namespace quic { 14 15 class Bbr2Sender; 16 class QUIC_EXPORT_PRIVATE Bbr2ProbeRttMode final : public Bbr2ModeBase { 17 public: 18 using Bbr2ModeBase::Bbr2ModeBase; 19 20 void Enter(QuicTime now, 21 const Bbr2CongestionEvent* congestion_event) override; Leave(QuicTime,const Bbr2CongestionEvent *)22 void Leave(QuicTime /*now*/, 23 const Bbr2CongestionEvent* /*congestion_event*/) override {} 24 25 Bbr2Mode OnCongestionEvent( 26 QuicByteCount prior_in_flight, 27 QuicTime event_time, 28 const AckedPacketVector& acked_packets, 29 const LostPacketVector& lost_packets, 30 const Bbr2CongestionEvent& congestion_event) override; 31 32 Limits<QuicByteCount> GetCwndLimits() const override; 33 IsProbingForBandwidth()34 bool IsProbingForBandwidth() const override { return false; } 35 36 Bbr2Mode OnExitQuiescence(QuicTime now, 37 QuicTime quiescence_start_time) override; 38 39 struct QUIC_EXPORT_PRIVATE DebugState { 40 QuicByteCount inflight_target; 41 QuicTime exit_time = QuicTime::Zero(); 42 }; 43 44 DebugState ExportDebugState() const; 45 46 private: 47 const Bbr2Params& Params() const; 48 49 QuicByteCount InflightTarget() const; 50 51 QuicTime exit_time_ = QuicTime::Zero(); 52 }; 53 54 QUIC_EXPORT_PRIVATE std::ostream& operator<<( 55 std::ostream& os, 56 const Bbr2ProbeRttMode::DebugState& state); 57 58 } // namespace quic 59 60 #endif // QUICHE_QUIC_CORE_CONGESTION_CONTROL_BBR2_PROBE_RTT_H_ 61