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

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

Issue 1003863006: Rollback of merge internal change: 87346681. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Make_SentPacketManager_remove_pending_88507368
Patch Set: Created 5 years, 9 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
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/quic_connection_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 (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 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // This will likely have to be tuned. 54 // This will likely have to be tuned.
55 const QuicPacketSequenceNumber kMaxPacketGap = 5000; 55 const QuicPacketSequenceNumber kMaxPacketGap = 5000;
56 56
57 // Limit the number of FEC groups to two. If we get enough out of order packets 57 // Limit the number of FEC groups to two. If we get enough out of order packets
58 // that this becomes limiting, we can revisit. 58 // that this becomes limiting, we can revisit.
59 const size_t kMaxFecGroups = 2; 59 const size_t kMaxFecGroups = 2;
60 60
61 // Maximum number of acks received before sending an ack in response. 61 // Maximum number of acks received before sending an ack in response.
62 const QuicPacketCount kMaxPacketsReceivedBeforeAckSend = 20; 62 const QuicPacketCount kMaxPacketsReceivedBeforeAckSend = 20;
63 63
64 // Maximum number of tracked packets.
65 const QuicPacketCount kMaxTrackedPackets = 5 * kMaxTcpCongestionWindow;
66
64 bool Near(QuicPacketSequenceNumber a, QuicPacketSequenceNumber b) { 67 bool Near(QuicPacketSequenceNumber a, QuicPacketSequenceNumber b) {
65 QuicPacketSequenceNumber delta = (a > b) ? a - b : b - a; 68 QuicPacketSequenceNumber delta = (a > b) ? a - b : b - a;
66 return delta <= kMaxPacketGap; 69 return delta <= kMaxPacketGap;
67 } 70 }
68 71
69 // An alarm that is scheduled to send an ack if a timeout occurs. 72 // An alarm that is scheduled to send an ack if a timeout occurs.
70 class AckAlarm : public QuicAlarm::Delegate { 73 class AckAlarm : public QuicAlarm::Delegate {
71 public: 74 public:
72 explicit AckAlarm(QuicConnection* connection) 75 explicit AckAlarm(QuicConnection* connection)
73 : connection_(connection) { 76 : connection_(connection) {
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 } 2095 }
2093 for (const QuicFrame& frame : retransmittable_frames->frames()) { 2096 for (const QuicFrame& frame : retransmittable_frames->frames()) {
2094 if (frame.type == CONNECTION_CLOSE_FRAME) { 2097 if (frame.type == CONNECTION_CLOSE_FRAME) {
2095 return true; 2098 return true;
2096 } 2099 }
2097 } 2100 }
2098 return false; 2101 return false;
2099 } 2102 }
2100 2103
2101 } // namespace net 2104 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698