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

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

Issue 20227003: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Land Recent QUIC changes Created 7 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 behaviour of 5 // TCP cubic send side congestion algorithm, emulates the behaviour 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 10 matching lines...) Expand all
21 namespace net { 21 namespace net {
22 22
23 namespace test { 23 namespace test {
24 class TcpCubicSenderPeer; 24 class TcpCubicSenderPeer;
25 } // namespace test 25 } // namespace test
26 26
27 class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface { 27 class NET_EXPORT_PRIVATE TcpCubicSender : public SendAlgorithmInterface {
28 public: 28 public:
29 // Reno option provided for testing. 29 // Reno option provided for testing.
30 TcpCubicSender(const QuicClock* clock, bool reno); 30 TcpCubicSender(const QuicClock* clock, bool reno);
31 virtual ~TcpCubicSender();
31 32
32 // Start implementation of SendAlgorithmInterface. 33 // Start implementation of SendAlgorithmInterface.
33 virtual void OnIncomingQuicCongestionFeedbackFrame( 34 virtual void OnIncomingQuicCongestionFeedbackFrame(
34 const QuicCongestionFeedbackFrame& feedback, 35 const QuicCongestionFeedbackFrame& feedback,
35 QuicTime feedback_receive_time, 36 QuicTime feedback_receive_time,
36 const SentPacketsMap& sent_packets) OVERRIDE; 37 const SentPacketsMap& sent_packets) OVERRIDE;
37 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number, 38 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number,
38 QuicByteCount acked_bytes, 39 QuicByteCount acked_bytes,
39 QuicTime::Delta rtt) OVERRIDE; 40 QuicTime::Delta rtt) OVERRIDE;
40 virtual void OnIncomingLoss(QuicTime ack_receive_time) OVERRIDE; 41 virtual void OnIncomingLoss(QuicTime ack_receive_time) OVERRIDE;
41 virtual void SentPacket(QuicTime sent_time, 42 virtual void SentPacket(QuicTime sent_time,
42 QuicPacketSequenceNumber sequence_number, 43 QuicPacketSequenceNumber sequence_number,
43 QuicByteCount bytes, 44 QuicByteCount bytes,
44 Retransmission is_retransmission) OVERRIDE; 45 Retransmission is_retransmission) OVERRIDE;
45 virtual void AbandoningPacket(QuicPacketSequenceNumber sequence_number, 46 virtual void AbandoningPacket(QuicPacketSequenceNumber sequence_number,
46 QuicByteCount abandoned_bytes) OVERRIDE; 47 QuicByteCount abandoned_bytes) OVERRIDE;
47 virtual QuicTime::Delta TimeUntilSend( 48 virtual QuicTime::Delta TimeUntilSend(
48 QuicTime now, 49 QuicTime now,
49 Retransmission is_retransmission, 50 Retransmission is_retransmission,
50 HasRetransmittableData has_retransmittable_data) OVERRIDE; 51 HasRetransmittableData has_retransmittable_data) OVERRIDE;
51 virtual QuicBandwidth BandwidthEstimate() OVERRIDE; 52 virtual QuicBandwidth BandwidthEstimate() OVERRIDE;
52 virtual QuicTime::Delta SmoothedRtt() OVERRIDE; 53 virtual QuicTime::Delta SmoothedRtt() OVERRIDE;
54 virtual QuicTime::Delta RetransmissionDelay() OVERRIDE;
53 // End implementation of SendAlgorithmInterface. 55 // End implementation of SendAlgorithmInterface.
54 56
55 private: 57 private:
56 friend class test::TcpCubicSenderPeer; 58 friend class test::TcpCubicSenderPeer;
57 59
58 QuicByteCount AvailableCongestionWindow(); 60 QuicByteCount AvailableCongestionWindow();
59 QuicByteCount CongestionWindow(); 61 QuicByteCount CongestionWindow();
60 void Reset(); 62 void Reset();
61 void AckAccounting(QuicTime::Delta rtt); 63 void AckAccounting(QuicTime::Delta rtt);
62 void CongestionAvoidance(QuicPacketSequenceNumber ack); 64 void CongestionAvoidance(QuicPacketSequenceNumber ack);
(...skipping 24 matching lines...) Expand all
87 89
88 // Congestion window in packets. 90 // Congestion window in packets.
89 QuicTcpCongestionWindow congestion_window_; 91 QuicTcpCongestionWindow congestion_window_;
90 92
91 // Slow start congestion window in packets. 93 // Slow start congestion window in packets.
92 QuicTcpCongestionWindow slowstart_threshold_; 94 QuicTcpCongestionWindow slowstart_threshold_;
93 95
94 // Min RTT during this session. 96 // Min RTT during this session.
95 QuicTime::Delta delay_min_; 97 QuicTime::Delta delay_min_;
96 98
99 // Smoothed RTT during this session.
100 QuicTime::Delta smoothed_rtt_;
101
102 // Mean RTT deviation during this session.
103 // Approximation of standard deviation, the error is roughly 1.25 times
104 // larger than the standard deviation, for a normally distributed signal.
105 QuicTime::Delta mean_deviation_;
106
97 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); 107 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender);
98 }; 108 };
99 109
100 } // namespace net 110 } // namespace net
101 111
102 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ 112 #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