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

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 109993008: Fix QUIC's TCP style retransmission logic to only send a maximum of 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "net/quic/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/quic/congestion_control/pacing_sender.h" 9 #include "net/quic/congestion_control/pacing_sender.h"
10 #include "net/quic/quic_ack_notifier_manager.h" 10 #include "net/quic/quic_ack_notifier_manager.h"
(...skipping 26 matching lines...) Expand all
37 static const int kHistoryPeriodMs = 5000; 37 static const int kHistoryPeriodMs = 5000;
38 38
39 static const int kDefaultRetransmissionTimeMs = 500; 39 static const int kDefaultRetransmissionTimeMs = 500;
40 // TCP RFC calls for 1 second RTO however Linux differs from this default and 40 // TCP RFC calls for 1 second RTO however Linux differs from this default and
41 // define the minimum RTO to 200ms, we will use the same until we have data to 41 // define the minimum RTO to 200ms, we will use the same until we have data to
42 // support a higher or lower value. 42 // support a higher or lower value.
43 static const int kMinRetransmissionTimeMs = 200; 43 static const int kMinRetransmissionTimeMs = 200;
44 static const int kMaxRetransmissionTimeMs = 60000; 44 static const int kMaxRetransmissionTimeMs = 60000;
45 static const size_t kMaxRetransmissions = 10; 45 static const size_t kMaxRetransmissions = 10;
46 46
47 // We want to make sure if we get a nack packet which triggers several 47 // We only retransmit 2 packets per ack.
48 // retransmissions, we don't queue up too many packets. 10 is TCP's default 48 static const size_t kMaxRetransmissionsPerAck = 2;
49 // initial congestion window(RFC 6928).
50 static const size_t kMaxRetransmissionsPerAck = kDefaultInitialWindow;
51 49
52 // TCP retransmits after 3 nacks. 50 // TCP retransmits after 3 nacks.
53 static const size_t kNumberOfNacksBeforeRetransmission = 3; 51 static const size_t kNumberOfNacksBeforeRetransmission = 3;
54 52
55 COMPILE_ASSERT(kHistoryPeriodMs >= kBitrateSmoothingPeriodMs, 53 COMPILE_ASSERT(kHistoryPeriodMs >= kBitrateSmoothingPeriodMs,
56 history_must_be_longer_or_equal_to_the_smoothing_period); 54 history_must_be_longer_or_equal_to_the_smoothing_period);
57 } // namespace 55 } // namespace
58 56
59 #define ENDPOINT (is_server_ ? "Server: " : " Client: ") 57 #define ENDPOINT (is_server_ ? "Server: " : " Client: ")
60 58
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 return; 768 return;
771 } 769 }
772 770
773 using_pacing_ = true; 771 using_pacing_ = true;
774 send_algorithm_.reset( 772 send_algorithm_.reset(
775 new PacingSender(send_algorithm_.release(), 773 new PacingSender(send_algorithm_.release(),
776 QuicTime::Delta::FromMicroseconds(1))); 774 QuicTime::Delta::FromMicroseconds(1)));
777 } 775 }
778 776
779 } // namespace net 777 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698