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

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

Issue 968923005: Remove TCP and BBR's max congestion window. No practical change, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@minor_simplification_PendingRetransmission_87254408
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/quic_protocol.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_unacked_packet_map.h" 5 #include "net/quic/quic_unacked_packet_map.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/quic_connection_stats.h" 9 #include "net/quic/quic_connection_stats.h"
10 #include "net/quic/quic_utils_chromium.h" 10 #include "net/quic/quic_utils_chromium.h"
11 11
12 using std::max; 12 using std::max;
13 13
14 namespace net { 14 namespace net {
15 15
16 namespace {
17
18 // Maximum amount of reordering before packets are considered useless for
19 // RTT measurement purposes.
20 const QuicPacketCount kMaxReorderingForRtt = 200;
21
22 } // anonymous namespace
23
16 QuicUnackedPacketMap::QuicUnackedPacketMap() 24 QuicUnackedPacketMap::QuicUnackedPacketMap()
17 : largest_sent_packet_(0), 25 : largest_sent_packet_(0),
18 largest_observed_(0), 26 largest_observed_(0),
19 least_unacked_(1), 27 least_unacked_(1),
20 bytes_in_flight_(0), 28 bytes_in_flight_(0),
21 pending_crypto_packet_count_(0) { 29 pending_crypto_packet_count_(0) {
22 } 30 }
23 31
24 QuicUnackedPacketMap::~QuicUnackedPacketMap() { 32 QuicUnackedPacketMap::~QuicUnackedPacketMap() {
25 QuicPacketSequenceNumber index = least_unacked_; 33 QuicPacketSequenceNumber index = least_unacked_;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 const TransmissionInfo& info) const { 274 const TransmissionInfo& info) const {
267 return !IsPacketUsefulForMeasuringRtt(sequence_number, info) && 275 return !IsPacketUsefulForMeasuringRtt(sequence_number, info) &&
268 !IsPacketUsefulForCongestionControl(info) && 276 !IsPacketUsefulForCongestionControl(info) &&
269 !IsPacketUsefulForRetransmittableData(info); 277 !IsPacketUsefulForRetransmittableData(info);
270 } 278 }
271 279
272 bool QuicUnackedPacketMap::IsPacketRemovable( 280 bool QuicUnackedPacketMap::IsPacketRemovable(
273 QuicPacketSequenceNumber sequence_number, 281 QuicPacketSequenceNumber sequence_number,
274 const TransmissionInfo& info) const { 282 const TransmissionInfo& info) const {
275 return (!IsPacketUsefulForMeasuringRtt(sequence_number, info) || 283 return (!IsPacketUsefulForMeasuringRtt(sequence_number, info) ||
276 unacked_packets_.size() > kMaxTcpCongestionWindow) && 284 unacked_packets_.size() > kMaxReorderingForRtt) &&
277 !IsPacketUsefulForCongestionControl(info) && 285 !IsPacketUsefulForCongestionControl(info) &&
278 !IsPacketUsefulForRetransmittableData(info); 286 !IsPacketUsefulForRetransmittableData(info);
279 } 287 }
280 288
281 bool QuicUnackedPacketMap::IsUnacked( 289 bool QuicUnackedPacketMap::IsUnacked(
282 QuicPacketSequenceNumber sequence_number) const { 290 QuicPacketSequenceNumber sequence_number) const {
283 if (sequence_number < least_unacked_ || 291 if (sequence_number < least_unacked_ ||
284 sequence_number >= least_unacked_ + unacked_packets_.size()) { 292 sequence_number >= least_unacked_ + unacked_packets_.size()) {
285 return false; 293 return false;
286 } 294 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 385 }
378 } 386 }
379 return false; 387 return false;
380 } 388 }
381 389
382 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const { 390 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const {
383 return least_unacked_; 391 return least_unacked_;
384 } 392 }
385 393
386 } // namespace net 394 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698