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

Side by Side Diff: net/quic/congestion_control/tcp_cubic_sender.h

Issue 476023002: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0814_2
Patch Set: Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // TCP cubic send side congestion algorithm, emulates the behavior of 5 // TCP cubic send side congestion algorithm, emulates the behavior of
6 // TCP cubic. 6 // TCP cubic.
7 7
8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ 8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_
9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ 9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual void RevertRetransmissionTimeout() OVERRIDE; 55 virtual void RevertRetransmissionTimeout() OVERRIDE;
56 virtual QuicTime::Delta TimeUntilSend( 56 virtual QuicTime::Delta TimeUntilSend(
57 QuicTime now, 57 QuicTime now,
58 QuicByteCount bytes_in_flight, 58 QuicByteCount bytes_in_flight,
59 HasRetransmittableData has_retransmittable_data) const OVERRIDE; 59 HasRetransmittableData has_retransmittable_data) const OVERRIDE;
60 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; 60 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE;
61 virtual bool HasReliableBandwidthEstimate() const OVERRIDE; 61 virtual bool HasReliableBandwidthEstimate() const OVERRIDE;
62 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; 62 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE;
63 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; 63 virtual QuicByteCount GetCongestionWindow() const OVERRIDE;
64 virtual bool InSlowStart() const OVERRIDE; 64 virtual bool InSlowStart() const OVERRIDE;
65 virtual bool InRecovery() const OVERRIDE;
65 virtual QuicByteCount GetSlowStartThreshold() const OVERRIDE; 66 virtual QuicByteCount GetSlowStartThreshold() const OVERRIDE;
66 virtual CongestionControlType GetCongestionControlType() const OVERRIDE; 67 virtual CongestionControlType GetCongestionControlType() const OVERRIDE;
67 // End implementation of SendAlgorithmInterface. 68 // End implementation of SendAlgorithmInterface.
68 69
69 private: 70 private:
70 friend class test::TcpCubicSenderPeer; 71 friend class test::TcpCubicSenderPeer;
71 72
72 // TODO(ianswett): Remove these and migrate to OnCongestionEvent. 73 // TODO(ianswett): Remove these and migrate to OnCongestionEvent.
73 void OnPacketAcked(QuicPacketSequenceNumber acked_sequence_number, 74 void OnPacketAcked(QuicPacketSequenceNumber acked_sequence_number,
74 QuicByteCount acked_bytes, 75 QuicByteCount acked_bytes,
75 QuicByteCount bytes_in_flight); 76 QuicByteCount bytes_in_flight);
76 void OnPacketLost(QuicPacketSequenceNumber largest_loss, 77 void OnPacketLost(QuicPacketSequenceNumber largest_loss,
77 QuicByteCount bytes_in_flight); 78 QuicByteCount bytes_in_flight);
78 79
79 QuicByteCount SendWindow() const; 80 QuicByteCount SendWindow() const;
80 void MaybeIncreaseCwnd(QuicPacketSequenceNumber acked_sequence_number, 81 void MaybeIncreaseCwnd(QuicPacketSequenceNumber acked_sequence_number,
81 QuicByteCount bytes_in_flight); 82 QuicByteCount bytes_in_flight);
82 bool IsCwndLimited(QuicByteCount bytes_in_flight) const; 83 bool IsCwndLimited(QuicByteCount bytes_in_flight) const;
83 bool InRecovery() const;
84 // Methods for isolating PRR from the rest of TCP Cubic. 84 // Methods for isolating PRR from the rest of TCP Cubic.
85 void PrrOnPacketLost(QuicByteCount bytes_in_flight); 85 void PrrOnPacketLost(QuicByteCount bytes_in_flight);
86 void PrrOnPacketAcked(QuicByteCount acked_bytes); 86 void PrrOnPacketAcked(QuicByteCount acked_bytes);
87 QuicTime::Delta PrrTimeUntilSend(QuicByteCount bytes_in_flight) const; 87 QuicTime::Delta PrrTimeUntilSend(QuicByteCount bytes_in_flight) const;
88 88
89 89
90 HybridSlowStart hybrid_slow_start_; 90 HybridSlowStart hybrid_slow_start_;
91 Cubic cubic_; 91 Cubic cubic_;
92 const RttStats* rtt_stats_; 92 const RttStats* rtt_stats_;
93 QuicConnectionStats* stats_; 93 QuicConnectionStats* stats_;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 // Maximum number of outstanding packets for tcp. 137 // Maximum number of outstanding packets for tcp.
138 QuicTcpCongestionWindow max_tcp_congestion_window_; 138 QuicTcpCongestionWindow max_tcp_congestion_window_;
139 139
140 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); 140 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender);
141 }; 141 };
142 142
143 } // namespace net 143 } // namespace net
144 144
145 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ 145 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/send_algorithm_interface.h ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698