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

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

Issue 1777293002: Add a new QUIC Ack Decimation mode that is reordering tolerant. Protected by FLAG_quic_ack_decimati… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115844136
Patch Set: Created 4 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_received_packet_manager.h ('k') | net/quic/quic_sent_packet_manager.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_received_packet_manager.h" 5 #include "net/quic/quic_received_packet_manager.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // Ack frame gets updated because missing packets are updated because of 280 // Ack frame gets updated because missing packets are updated because of
281 // stop waiting frame. 281 // stop waiting frame.
282 ack_frame_updated_ = true; 282 ack_frame_updated_ = true;
283 } 283 }
284 peer_least_packet_awaiting_ack_ = stop_waiting.least_unacked; 284 peer_least_packet_awaiting_ack_ = stop_waiting.least_unacked;
285 } 285 }
286 DCHECK(ack_frame_.missing_packets.Empty() || 286 DCHECK(ack_frame_.missing_packets.Empty() ||
287 ack_frame_.missing_packets.Min() >= peer_least_packet_awaiting_ack_); 287 ack_frame_.missing_packets.Min() >= peer_least_packet_awaiting_ack_);
288 } 288 }
289 289
290 bool QuicReceivedPacketManager::HasMissingPackets() const {
291 return !ack_frame_.missing_packets.Empty();
292 }
293
290 bool QuicReceivedPacketManager::HasNewMissingPackets() const { 294 bool QuicReceivedPacketManager::HasNewMissingPackets() const {
291 return !ack_frame_.missing_packets.Empty() && 295 return !ack_frame_.missing_packets.Empty() &&
292 (ack_frame_.largest_observed - ack_frame_.missing_packets.Max()) <= 296 (ack_frame_.largest_observed - ack_frame_.missing_packets.Max()) <=
293 kMaxPacketsAfterNewMissing; 297 kMaxPacketsAfterNewMissing;
294 } 298 }
295 299
296 size_t QuicReceivedPacketManager::NumTrackedPackets() const { 300 size_t QuicReceivedPacketManager::NumTrackedPackets() const {
297 return entropy_tracker_.size(); 301 return entropy_tracker_.size();
298 } 302 }
299 303
300 bool QuicReceivedPacketManager::ack_frame_updated() const { 304 bool QuicReceivedPacketManager::ack_frame_updated() const {
301 return ack_frame_updated_; 305 return ack_frame_updated_;
302 } 306 }
303 307
304 } // namespace net 308 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_received_packet_manager.h ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698