Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: net/quic/congestion_control/tcp_cubic_sender.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/congestion_control/tcp_cubic_sender.h
diff --git a/net/quic/congestion_control/tcp_cubic_sender.h b/net/quic/congestion_control/tcp_cubic_sender.h
deleted file mode 100644
index a919d027b1e13b799e007e62f8a8b283627583c2..0000000000000000000000000000000000000000
--- a/net/quic/congestion_control/tcp_cubic_sender.h
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// TCP cubic send side congestion algorithm, emulates the behavior of
-// TCP cubic.
-
-#ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_
-#define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "net/base/net_export.h"
-#include "net/quic/congestion_control/cubic.h"
-#include "net/quic/congestion_control/hybrid_slow_start.h"
-#include "net/quic/congestion_control/prr_sender.h"
-#include "net/quic/congestion_control/send_algorithm_interface.h"
-#include "net/quic/crypto/cached_network_parameters.h"
-#include "net/quic/quic_bandwidth.h"
-#include "net/quic/quic_connection_stats.h"
-#include "net/quic/quic_protocol.h"
-#include "net/quic/quic_time.h"
-
-namespace net {
-
-class RttStats;
-
-namespace test {
-class TcpCubicSenderPeer;
-} // namespace test
-
-class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface {
- public:
- // Reno option and max_tcp_congestion_window are provided for testing.
- TcpCubicSender(const QuicClock* clock,
- const RttStats* rtt_stats,
- bool reno,
- QuicPacketCount initial_tcp_congestion_window,
- QuicPacketCount max_tcp_congestion_window,
- QuicConnectionStats* stats);
- ~TcpCubicSender() override;
-
- // Start implementation of SendAlgorithmInterface.
- void SetFromConfig(const QuicConfig& config,
- bool is_server,
- bool using_pacing) override;
- bool ResumeConnectionState(
- const CachedNetworkParameters& cached_network_params) override;
- void SetNumEmulatedConnections(int num_connections) override;
- void OnCongestionEvent(bool rtt_updated,
- QuicByteCount bytes_in_flight,
- const CongestionVector& acked_packets,
- const CongestionVector& lost_packets) override;
- bool OnPacketSent(QuicTime sent_time,
- QuicByteCount bytes_in_flight,
- QuicPacketSequenceNumber sequence_number,
- QuicByteCount bytes,
- HasRetransmittableData is_retransmittable) override;
- void OnRetransmissionTimeout(bool packets_retransmitted) override;
- void RevertRetransmissionTimeout() override;
- QuicTime::Delta TimeUntilSend(
- QuicTime now,
- QuicByteCount bytes_in_flight,
- HasRetransmittableData has_retransmittable_data) const override;
- QuicBandwidth PacingRate() const override;
- QuicBandwidth BandwidthEstimate() const override;
- bool HasReliableBandwidthEstimate() const override;
- QuicTime::Delta RetransmissionDelay() const override;
- QuicByteCount GetCongestionWindow() const override;
- bool InSlowStart() const override;
- bool InRecovery() const override;
- QuicByteCount GetSlowStartThreshold() const override;
- CongestionControlType GetCongestionControlType() const override;
- // End implementation of SendAlgorithmInterface.
-
- private:
- friend class test::TcpCubicSenderPeer;
-
- // Compute the TCP Reno beta based on the current number of connections.
- float RenoBeta() const;
-
- // TODO(ianswett): Remove these and migrate to OnCongestionEvent.
- void OnPacketAcked(QuicPacketSequenceNumber acked_sequence_number,
- QuicByteCount acked_bytes,
- QuicByteCount bytes_in_flight);
- void OnPacketLost(QuicPacketSequenceNumber largest_loss,
- QuicByteCount bytes_in_flight);
-
- void MaybeIncreaseCwnd(QuicPacketSequenceNumber acked_sequence_number,
- QuicByteCount bytes_in_flight);
- bool IsCwndLimited(QuicByteCount bytes_in_flight) const;
-
- HybridSlowStart hybrid_slow_start_;
- Cubic cubic_;
- PrrSender prr_;
- const RttStats* rtt_stats_;
- QuicConnectionStats* stats_;
-
- // If true, Reno congestion control is used instead of Cubic.
- const bool reno_;
-
- // Number of connections to simulate.
- uint32 num_connections_;
-
- // ACK counter for the Reno implementation.
- uint64 congestion_window_count_;
-
- // Track the largest packet that has been sent.
- QuicPacketSequenceNumber largest_sent_sequence_number_;
-
- // Track the largest packet that has been acked.
- QuicPacketSequenceNumber largest_acked_sequence_number_;
-
- // Track the largest sequence number outstanding when a CWND cutback occurs.
- QuicPacketSequenceNumber largest_sent_at_last_cutback_;
-
- // Congestion window in packets.
- QuicPacketCount congestion_window_;
-
- // Congestion window before the last RTO.
- // Must be 0 before or after RTO recovery.
- QuicPacketCount previous_congestion_window_;
-
- // Slow start congestion window in packets, aka ssthresh.
- QuicPacketCount slowstart_threshold_;
-
- // Slow start threshold before the last loss event or RTO.
- QuicPacketCount previous_slowstart_threshold_;
-
- // Whether the last loss event caused us to exit slowstart.
- // Used for stats collection of slowstart_packets_lost
- bool last_cutback_exited_slowstart_;
-
- // Maximum number of outstanding packets for tcp.
- QuicPacketCount max_tcp_congestion_window_;
-
- const QuicClock* clock_;
-
- DISALLOW_COPY_AND_ASSIGN(TcpCubicSender);
-};
-
-} // namespace net
-
-#endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_
« no previous file with comments | « net/quic/congestion_control/send_algorithm_simulator.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698