#include "quiche/quic/core/congestion_control/bbr2_misc.h"
#include <algorithm>
#include <limits>
#include "quiche/quic/core/congestion_control/bandwidth_sampler.h"
#include "quiche/quic/core/quic_bandwidth.h"
#include "quiche/quic/core/quic_time.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_flag_utils.h"
#include "quiche/quic/platform/api/quic_flags.h"
#include "quiche/quic/platform/api/quic_logging.h"
namespace quic {
RoundTripCounter::RoundTripCounter() : … { … }
void RoundTripCounter::OnPacketSent(QuicPacketNumber packet_number) { … }
bool RoundTripCounter::OnPacketsAcked(QuicPacketNumber last_acked_packet) { … }
void RoundTripCounter::RestartRound() { … }
MinRttFilter::MinRttFilter(QuicTime::Delta initial_min_rtt,
QuicTime initial_min_rtt_timestamp)
: … { … }
void MinRttFilter::Update(QuicTime::Delta sample_rtt, QuicTime now) { … }
void MinRttFilter::ForceUpdate(QuicTime::Delta sample_rtt, QuicTime now) { … }
Bbr2NetworkModel::Bbr2NetworkModel(const Bbr2Params* params,
QuicTime::Delta initial_rtt,
QuicTime initial_rtt_timestamp,
float cwnd_gain, float pacing_gain,
const BandwidthSampler* old_sampler)
: … { … }
void Bbr2NetworkModel::OnPacketSent(QuicTime sent_time,
QuicByteCount bytes_in_flight,
QuicPacketNumber packet_number,
QuicByteCount bytes,
HasRetransmittableData is_retransmittable) { … }
void Bbr2NetworkModel::OnCongestionEventStart(
QuicTime event_time, const AckedPacketVector& acked_packets,
const LostPacketVector& lost_packets,
Bbr2CongestionEvent* congestion_event) { … }
void Bbr2NetworkModel::AdaptLowerBounds(
const Bbr2CongestionEvent& congestion_event) { … }
void Bbr2NetworkModel::OnCongestionEventFinish(
QuicPacketNumber least_unacked_packet,
const Bbr2CongestionEvent& congestion_event) { … }
void Bbr2NetworkModel::UpdateNetworkParameters(QuicTime::Delta rtt) { … }
bool Bbr2NetworkModel::MaybeExpireMinRtt(
const Bbr2CongestionEvent& congestion_event) { … }
bool Bbr2NetworkModel::IsInflightTooHigh(
const Bbr2CongestionEvent& congestion_event,
int64_t max_loss_events) const { … }
void Bbr2NetworkModel::RestartRoundEarly() { … }
void Bbr2NetworkModel::OnNewRound() { … }
void Bbr2NetworkModel::cap_inflight_lo(QuicByteCount cap) { … }
QuicByteCount Bbr2NetworkModel::inflight_hi_with_headroom() const { … }
bool Bbr2NetworkModel::HasBandwidthGrowth(
const Bbr2CongestionEvent& congestion_event) { … }
void Bbr2NetworkModel::CheckPersistentQueue(
const Bbr2CongestionEvent& congestion_event, float target_gain) { … }
}