#include "quiche/quic/core/congestion_control/bbr2_sender.h"
#include <algorithm>
#include <cstddef>
#include <ostream>
#include <sstream>
#include <string>
#include "quiche/quic/core/congestion_control/bandwidth_sampler.h"
#include "quiche/quic/core/congestion_control/bbr2_drain.h"
#include "quiche/quic/core/congestion_control/bbr2_misc.h"
#include "quiche/quic/core/crypto/crypto_protocol.h"
#include "quiche/quic/core/quic_bandwidth.h"
#include "quiche/quic/core/quic_tag.h"
#include "quiche/quic/core/quic_types.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"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/print_elements.h"
namespace quic {
namespace {
const QuicByteCount kDefaultMinimumCongestionWindow = …;
const float kInitialPacingGain = …;
const int kMaxModeChangesPerCongestionEvent = …;
}
#define BBR2_MODE_DISPATCH(member_function_call) …
Bbr2Sender::Bbr2Sender(QuicTime now, const RttStats* rtt_stats,
const QuicUnackedPacketMap* unacked_packets,
QuicPacketCount initial_cwnd_in_packets,
QuicPacketCount max_cwnd_in_packets, QuicRandom* random,
QuicConnectionStats* stats, BbrSender* old_sender)
: … { … }
void Bbr2Sender::SetFromConfig(const QuicConfig& config,
Perspective perspective) { … }
void Bbr2Sender::ApplyConnectionOptions(
const QuicTagVector& connection_options) { … }
Limits<QuicByteCount> Bbr2Sender::GetCwndLimitsByMode() const { … }
const Limits<QuicByteCount>& Bbr2Sender::cwnd_limits() const { … }
void Bbr2Sender::AdjustNetworkParameters(const NetworkParams& params) { … }
void Bbr2Sender::SetInitialCongestionWindowInPackets(
QuicPacketCount congestion_window) { … }
void Bbr2Sender::OnCongestionEvent(bool ,
QuicByteCount prior_in_flight,
QuicTime event_time,
const AckedPacketVector& acked_packets,
const LostPacketVector& lost_packets,
QuicPacketCount ,
QuicPacketCount ) { … }
void Bbr2Sender::UpdatePacingRate(QuicByteCount bytes_acked) { … }
void Bbr2Sender::UpdateCongestionWindow(QuicByteCount bytes_acked) { … }
QuicByteCount Bbr2Sender::GetTargetCongestionWindow(float gain) const { … }
void Bbr2Sender::OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight,
QuicPacketNumber packet_number,
QuicByteCount bytes,
HasRetransmittableData is_retransmittable) { … }
void Bbr2Sender::OnPacketNeutered(QuicPacketNumber packet_number) { … }
bool Bbr2Sender::CanSend(QuicByteCount bytes_in_flight) { … }
QuicByteCount Bbr2Sender::GetCongestionWindow() const { … }
QuicBandwidth Bbr2Sender::PacingRate(QuicByteCount ) const { … }
void Bbr2Sender::OnApplicationLimited(QuicByteCount bytes_in_flight) { … }
QuicByteCount Bbr2Sender::GetTargetBytesInflight() const { … }
void Bbr2Sender::PopulateConnectionStats(QuicConnectionStats* stats) const { … }
void Bbr2Sender::OnEnterQuiescence(QuicTime now) { … }
void Bbr2Sender::OnExitQuiescence(QuicTime now) { … }
std::string Bbr2Sender::GetDebugState() const { … }
Bbr2Sender::DebugState Bbr2Sender::ExportDebugState() const { … }
std::ostream& operator<<(std::ostream& os, const Bbr2Sender::DebugState& s) { … }
}