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

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

Issue 1014433002: Land Recent QUIC Changes until 03/09/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replaces_Perspective_enun_88006458
Patch Set: Rebase - added NET_EXPORT_PRIVATE to fix compiler error 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_bytes_sender.h
diff --git a/net/quic/congestion_control/tcp_cubic_sender.h b/net/quic/congestion_control/tcp_cubic_bytes_sender.h
similarity index 75%
copy from net/quic/congestion_control/tcp_cubic_sender.h
copy to net/quic/congestion_control/tcp_cubic_bytes_sender.h
index d8560e38caa009316af501b1e191e70b41faa017..f4cdd974527559372ec74f014d0e758a0df87ba5 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.h
+++ b/net/quic/congestion_control/tcp_cubic_bytes_sender.h
@@ -1,21 +1,18 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2015 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_
+// TCP cubic send side congestion algorithm, emulates the behavior of TCP cubic.
+
+#ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_BYTES_SENDER_H_
+#define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_BYTES_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/cubic_bytes.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"
@@ -26,17 +23,17 @@ namespace net {
class RttStats;
namespace test {
-class TcpCubicSenderPeer;
+class TcpCubicBytesSenderPeer;
} // namespace test
-class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface {
+class NET_EXPORT_PRIVATE TcpCubicBytesSender : public SendAlgorithmInterface {
public:
- TcpCubicSender(const QuicClock* clock,
- const RttStats* rtt_stats,
- bool reno,
- QuicPacketCount initial_tcp_congestion_window,
- QuicConnectionStats* stats);
- ~TcpCubicSender() override;
+ TcpCubicBytesSender(const QuicClock* clock,
+ const RttStats* rtt_stats,
+ bool reno,
+ QuicPacketCount initial_tcp_congestion_window,
+ QuicConnectionStats* stats);
+ ~TcpCubicBytesSender() override;
// Start implementation of SendAlgorithmInterface.
void SetFromConfig(const QuicConfig& config,
@@ -71,7 +68,7 @@ class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface {
// End implementation of SendAlgorithmInterface.
private:
- friend class test::TcpCubicSenderPeer;
+ friend class test::TcpCubicBytesSenderPeer;
// Compute the TCP Reno beta based on the current number of connections.
float RenoBeta() const;
@@ -84,11 +81,12 @@ class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface {
QuicByteCount bytes_in_flight);
void MaybeIncreaseCwnd(QuicPacketSequenceNumber acked_sequence_number,
+ QuicByteCount acked_bytes,
QuicByteCount bytes_in_flight);
bool IsCwndLimited(QuicByteCount bytes_in_flight) const;
HybridSlowStart hybrid_slow_start_;
- Cubic cubic_;
+ CubicBytes cubic_;
PrrSender prr_;
const RttStats* rtt_stats_;
QuicConnectionStats* stats_;
@@ -111,21 +109,21 @@ class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface {
// 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 in bytes.
+ QuicByteCount congestion_window_;
- // Slow start congestion window in packets, aka ssthresh.
- QuicPacketCount slowstart_threshold_;
+ // Slow start congestion window in bytes, aka ssthresh.
+ QuicByteCount slowstart_threshold_;
- // Whether the last loss event caused us to exit slowstart.
- // Used for stats collection of slowstart_packets_lost
+ // Whether the last loss event caused us to exit slowstart. Used for stats
+ // collection of slowstart_packets_lost.
bool last_cutback_exited_slowstart_;
const QuicClock* clock_;
- DISALLOW_COPY_AND_ASSIGN(TcpCubicSender);
+ DISALLOW_COPY_AND_ASSIGN(TcpCubicBytesSender);
};
} // namespace net
-#endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_
+#endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_BYTES_SENDER_H_
« no previous file with comments | « net/quic/congestion_control/cubic_bytes_test.cc ('k') | net/quic/congestion_control/tcp_cubic_bytes_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698