diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-03 07:47:41 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-03 07:47:41 +0000 |
commit | fee17f78c16789e740b050327e67abe76b500884 (patch) | |
tree | e6697c04381916b358fbc6759043ab28b9be56c5 /net/quic/congestion_control/quic_congestion_manager.h | |
parent | 7016f66d683e581d805c25cbde4db1fea933b255 (diff) | |
download | chromium_src-fee17f78c16789e740b050327e67abe76b500884.zip chromium_src-fee17f78c16789e740b050327e67abe76b500884.tar.gz chromium_src-fee17f78c16789e740b050327e67abe76b500884.tar.bz2 |
Land recent QUIC changes.
Count the number of retransmissions for a packet due to RTO and explicit nacks and implement exponential backoff based on number of retransmissions.
Merge internal change: 41823946
QuicConnection now packetizes acks and congestion control frames even more lazily and packs control frames with up to 1 stream frame.
Merge internal change: 41805161
Remove nitty-gritties of QuicFramer from QuicTimeWaitListManager and remove some static methods from QuicFramer.
Merge internal change: 41795314
Store socket addresses in QuicConnection.h instead of pushing it down to QuicFramer.h and getting it back from there.
Merge internal change: 41768211
Retransmit largest_observed_ packet if its missing.
Merge internal change: 41743584
Split framer packet creation into size determination and packet creation methods in order to ensure the maximum number of frames are fit into a single packet.
Merge internal change: 41702016
Handle packet reordering for queued packets.
Merge internal change: 41701179
Bug fix for retransmission order.
Merge internal change: 41638847
Adding basic dispatcher stats for QUIC
Merge internal change: 41630921
Minor fixes in quic_connection.cc
Merge internal change: 41610652
Use priority queue to maintain the list of sequence numbers to be retransmitted. This will enable us to do an exponential backoff for lost packets.
Merge internal change: 41582526
Adding DISALLOW_COPY_AND_ASSIGN to all congestion control classes that were missing it. And a few nits.
Merge internal change: 41580553
Break circular dependency between quic_protocol.h and quic_bandwidth.h
Merge internal change: 41578776
Fix uninitialized memory access in quic_framer_test.
Merge internal change: 41558816
Cleanup, consolidated quic_send_scheduler with quic_congestion_manager
Merge internal change: 41549823
Set the retransmit alarm only when we successfully write the packet to the socket instead of setting it when we attempt to write.
Merge internal change: 41547192
Introduced QuicByteCount and moved TCP receive_bytes packing to QuicFramer where it belongs.
Merge internal change: 41546840
Fix a bug with how FEC groups were being created in QUIC. Now opening multiple and always closing the group.
Merge internal change: 41538221
Removing QUIC logspam
Merge internal change: 41537896
Exposing ReadPublicHeader and ReadPublicResetPacket static methods which don't take a dependency on reader_(unlike Process..() methods).
Merge internal change: 41535886
Use "test" not "testing" for test namespaces to be consistent with other QUIC code.
Merge internal change: 41534488
Fix a number of minor issues that came up in landing recent chrome changes.
Merge internal change: 41531793
Removed the QuicReceiptMetricsCollector and started using the ReceiveAlgorithmInterface directly in the CongestionManager. The QuicReceiptMetricsCollector did not provide any functionality.
Merge internal change: 41486246
Integrating new quic bandwidth class
Merge internal change: 41473682
R=jar@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/12145002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180299 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/congestion_control/quic_congestion_manager.h')
-rw-r--r-- | net/quic/congestion_control/quic_congestion_manager.h | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/net/quic/congestion_control/quic_congestion_manager.h b/net/quic/congestion_control/quic_congestion_manager.h index 9402213..09a9c9c 100644 --- a/net/quic/congestion_control/quic_congestion_manager.h +++ b/net/quic/congestion_control/quic_congestion_manager.h @@ -3,8 +3,8 @@ // found in the LICENSE file. // // This is the interface from the QuicConnection into the QUIC -// congestion control code. It wraps the QuicSendScheduler and -// QuicReceiptMetricsCollector and provides a single interface +// congestion control code. It wraps the SendAlgorithmInterface and +// ReceiveAlgorithmInterface and provides a single interface // for consumers. #ifndef NET_QUIC_CONGESTION_CONTROL_QUIC_CONGESTION_MANAGER_H_ @@ -12,17 +12,19 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "net/quic/congestion_control/send_algorithm_interface.h" +#include "net/quic/quic_bandwidth.h" #include "net/quic/quic_protocol.h" namespace net { namespace test { class QuicConnectionPeer; +class QuicCongestionManagerPeer; } // namespace test class QuicClock; -class QuicReceiptMetricsCollector; -class QuicSendScheduler; +class ReceiveAlgorithmInterface; class QuicCongestionManager { public: @@ -40,7 +42,7 @@ class QuicCongestionManager { // Called when we have sent bytes to the peer. This informs the manager both // the number of bytes sent and if they were retransmitted. virtual void SentPacket(QuicPacketSequenceNumber sequence_number, - size_t bytes, + QuicByteCount bytes, bool is_retransmission); // Calculate the time until we can send the next packet to the wire. @@ -63,16 +65,34 @@ class QuicCongestionManager { // timestamp: the arrival time of the packet. // revived: true if the packet was lost and then recovered with help of a // FEC packet. - virtual void RecordIncomingPacket(size_t bytes, + virtual void RecordIncomingPacket(QuicByteCount bytes, QuicPacketSequenceNumber sequence_number, QuicTime timestamp, bool revived); + const QuicTime::Delta DefaultRetransmissionTime(); + + const QuicTime::Delta GetRetransmissionDelay( + size_t number_retransmissions); + private: friend class test::QuicConnectionPeer; - - scoped_ptr<QuicReceiptMetricsCollector> collector_; - scoped_ptr<QuicSendScheduler> scheduler_; + friend class test::QuicCongestionManagerPeer; + typedef std::map<QuicPacketSequenceNumber, size_t> PendingPacketsMap; + + // TODO(pwestin): Currently only used for testing. How do we surface this? + QuicBandwidth SentBandwidth() const; + // TODO(pwestin): Currently only used for testing. How do we surface this? + QuicBandwidth BandwidthEstimate(); + void CleanupPacketHistory(); + + const QuicClock* clock_; + scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_; + scoped_ptr<SendAlgorithmInterface> send_algorithm_; + SendAlgorithmInterface::SentPacketsMap packet_history_map_; + PendingPacketsMap pending_packets_; + + DISALLOW_COPY_AND_ASSIGN(QuicCongestionManager); }; } // namespace net |