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

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

Issue 352403002: Repair the CWND reduction caused by spurious RTO's in QUIC's congestion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual void OnCongestionEvent(bool rtt_updated, 47 virtual void OnCongestionEvent(bool rtt_updated,
48 QuicByteCount bytes_in_flight, 48 QuicByteCount bytes_in_flight,
49 const CongestionMap& acked_packets, 49 const CongestionMap& acked_packets,
50 const CongestionMap& lost_packets) OVERRIDE; 50 const CongestionMap& lost_packets) OVERRIDE;
51 virtual bool OnPacketSent(QuicTime sent_time, 51 virtual bool OnPacketSent(QuicTime sent_time,
52 QuicByteCount bytes_in_flight, 52 QuicByteCount bytes_in_flight,
53 QuicPacketSequenceNumber sequence_number, 53 QuicPacketSequenceNumber sequence_number,
54 QuicByteCount bytes, 54 QuicByteCount bytes,
55 HasRetransmittableData is_retransmittable) OVERRIDE; 55 HasRetransmittableData is_retransmittable) OVERRIDE;
56 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE; 56 virtual void OnRetransmissionTimeout(bool packets_retransmitted) OVERRIDE;
57 virtual void RevertRetransmissionTimeout() OVERRIDE;
57 virtual QuicTime::Delta TimeUntilSend( 58 virtual QuicTime::Delta TimeUntilSend(
58 QuicTime now, 59 QuicTime now,
59 QuicByteCount bytes_in_flight, 60 QuicByteCount bytes_in_flight,
60 HasRetransmittableData has_retransmittable_data) const OVERRIDE; 61 HasRetransmittableData has_retransmittable_data) const OVERRIDE;
61 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE; 62 virtual QuicBandwidth BandwidthEstimate() const OVERRIDE;
62 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE; 63 virtual QuicTime::Delta RetransmissionDelay() const OVERRIDE;
63 virtual QuicByteCount GetCongestionWindow() const OVERRIDE; 64 virtual QuicByteCount GetCongestionWindow() const OVERRIDE;
64 // End implementation of SendAlgorithmInterface. 65 // End implementation of SendAlgorithmInterface.
65 66
66 private: 67 private:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 112
112 // Track the largest packet that has been acked. 113 // Track the largest packet that has been acked.
113 QuicPacketSequenceNumber largest_acked_sequence_number_; 114 QuicPacketSequenceNumber largest_acked_sequence_number_;
114 115
115 // Track the largest sequence number outstanding when a CWND cutback occurs. 116 // Track the largest sequence number outstanding when a CWND cutback occurs.
116 QuicPacketSequenceNumber largest_sent_at_last_cutback_; 117 QuicPacketSequenceNumber largest_sent_at_last_cutback_;
117 118
118 // Congestion window in packets. 119 // Congestion window in packets.
119 QuicTcpCongestionWindow congestion_window_; 120 QuicTcpCongestionWindow congestion_window_;
120 121
122 // Congestion window before the last loss event or RTO.
123 QuicByteCount previous_congestion_window_;
124
121 // Slow start congestion window in packets, aka ssthresh. 125 // Slow start congestion window in packets, aka ssthresh.
122 QuicTcpCongestionWindow slowstart_threshold_; 126 QuicTcpCongestionWindow slowstart_threshold_;
123 127
128 // Slow start threshold before the last loss event or RTO.
129 QuicTcpCongestionWindow previous_slowstart_threshold_;
130
124 // Whether the last loss event caused us to exit slowstart. 131 // Whether the last loss event caused us to exit slowstart.
125 // Used for stats collection of slowstart_packets_lost 132 // Used for stats collection of slowstart_packets_lost
126 bool last_cutback_exited_slowstart_; 133 bool last_cutback_exited_slowstart_;
127 134
128 // Maximum number of outstanding packets for tcp. 135 // Maximum number of outstanding packets for tcp.
129 QuicTcpCongestionWindow max_tcp_congestion_window_; 136 QuicTcpCongestionWindow max_tcp_congestion_window_;
130 137
131 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); 138 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender);
132 }; 139 };
133 140
134 } // namespace net 141 } // namespace net
135 142
136 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ 143 #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