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

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

Issue 1613513003: Early connection migration in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Style nit fixed. Created 4 years, 10 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 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 18 matching lines...) Expand all
29 static const int64_t kDefaultRetransmissionTimeMs = 500; 29 static const int64_t kDefaultRetransmissionTimeMs = 500;
30 // TCP RFC calls for 1 second RTO however Linux differs from this default and 30 // TCP RFC calls for 1 second RTO however Linux differs from this default and
31 // define the minimum RTO to 200ms, we will use the same until we have data to 31 // define the minimum RTO to 200ms, we will use the same until we have data to
32 // support a higher or lower value. 32 // support a higher or lower value.
33 static const int64_t kMinRetransmissionTimeMs = 200; 33 static const int64_t kMinRetransmissionTimeMs = 200;
34 static const int64_t kMaxRetransmissionTimeMs = 60000; 34 static const int64_t kMaxRetransmissionTimeMs = 60000;
35 // Maximum number of exponential backoffs used for RTO timeouts. 35 // Maximum number of exponential backoffs used for RTO timeouts.
36 static const size_t kMaxRetransmissions = 10; 36 static const size_t kMaxRetransmissions = 10;
37 // Maximum number of packets retransmitted upon an RTO. 37 // Maximum number of packets retransmitted upon an RTO.
38 static const size_t kMaxRetransmissionsOnTimeout = 2; 38 static const size_t kMaxRetransmissionsOnTimeout = 2;
39 // Minimum number of consecutive RTOs before .
Ryan Hamilton 2016/02/02 04:19:59 Is this comment complete?
Jana 2016/02/02 06:53:53 Obviously not :-) I'm fixing this in the shared co
40 const size_t kMinTimeoutsWhenPeerUnreachable = 2;
39 41
40 // Ensure the handshake timer isnt't faster than 10ms. 42 // Ensure the handshake timer isnt't faster than 10ms.
41 // This limits the tenth retransmitted packet to 10s after the initial CHLO. 43 // This limits the tenth retransmitted packet to 10s after the initial CHLO.
42 static const int64_t kMinHandshakeTimeoutMs = 10; 44 static const int64_t kMinHandshakeTimeoutMs = 10;
43 45
44 // Sends up to two tail loss probes before firing an RTO, 46 // Sends up to two tail loss probes before firing an RTO,
45 // per draft RFC draft-dukkipati-tcpm-tcp-loss-probe. 47 // per draft RFC draft-dukkipati-tcpm-tcp-loss-probe.
46 static const size_t kDefaultMaxTailLossProbes = 2; 48 static const size_t kDefaultMaxTailLossProbes = 2;
47 static const int64_t kMinTailLossProbeTimeoutMs = 10; 49 static const int64_t kMinTailLossProbeTimeoutMs = 10;
48 50
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 } 1025 }
1024 1026
1025 rtt_stats_.OnConnectionMigration(); 1027 rtt_stats_.OnConnectionMigration();
1026 send_algorithm_->OnConnectionMigration(); 1028 send_algorithm_->OnConnectionMigration();
1027 } 1029 }
1028 1030
1029 bool QuicSentPacketManager::InSlowStart() const { 1031 bool QuicSentPacketManager::InSlowStart() const {
1030 return send_algorithm_->InSlowStart(); 1032 return send_algorithm_->InSlowStart();
1031 } 1033 }
1032 1034
1035 bool QuicSentPacketManager::IsPeerMaybeUnreachable() const {
1036 return consecutive_rto_count_ >= kMinTimeoutsWhenPeerUnreachable;
1037 }
1038
1033 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( 1039 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo(
1034 QuicPacketNumber packet_number) { 1040 QuicPacketNumber packet_number) {
1035 return unacked_packets_.GetMutableTransmissionInfo(packet_number); 1041 return unacked_packets_.GetMutableTransmissionInfo(packet_number);
1036 } 1042 }
1037 1043
1038 void QuicSentPacketManager::RemoveObsoletePackets() { 1044 void QuicSentPacketManager::RemoveObsoletePackets() {
1039 unacked_packets_.RemoveObsoletePackets(); 1045 unacked_packets_.RemoveObsoletePackets();
1040 } 1046 }
1041 1047
1042 } // namespace net 1048 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698