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

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

Issue 2221093002: Deprecate quic_do_not_migrate_on_old_packet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@128997036
Patch Set: Created 4 years, 4 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 | « no previous file | net/quic/core/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/core/quic_connection.h" 5 #include "net/quic/core/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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 } 683 }
684 684
685 // Only migrate connection to a new peer address if a change is not underway. 685 // Only migrate connection to a new peer address if a change is not underway.
686 PeerAddressChangeType peer_migration_type = 686 PeerAddressChangeType peer_migration_type =
687 QuicUtils::DetermineAddressChangeType(peer_address_, 687 QuicUtils::DetermineAddressChangeType(peer_address_,
688 last_packet_source_address_); 688 last_packet_source_address_);
689 // Do not migrate connection if the changed address packet is a reordered 689 // Do not migrate connection if the changed address packet is a reordered
690 // packet. 690 // packet.
691 if (active_peer_migration_type_ == NO_CHANGE && 691 if (active_peer_migration_type_ == NO_CHANGE &&
692 peer_migration_type != NO_CHANGE && 692 peer_migration_type != NO_CHANGE &&
693 (!FLAGS_quic_do_not_migrate_on_old_packet || 693 header.packet_number > received_packet_manager_.GetLargestObserved()) {
694 header.packet_number > received_packet_manager_.GetLargestObserved())) {
695 StartPeerMigration(header.path_id, peer_migration_type); 694 StartPeerMigration(header.path_id, peer_migration_type);
696 } 695 }
697 696
698 --stats_.packets_dropped; 697 --stats_.packets_dropped;
699 DVLOG(1) << ENDPOINT << "Received packet header: " << header; 698 DVLOG(1) << ENDPOINT << "Received packet header: " << header;
700 last_header_ = header; 699 last_header_ = header;
701 DCHECK(connected_); 700 DCHECK(connected_);
702 return true; 701 return true;
703 } 702 }
704 703
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 // the sender and a signaling mechanism -- if the sender uses a 2516 // the sender and a signaling mechanism -- if the sender uses a
2518 // different MinRTO, we may get spurious retransmissions. May not have 2517 // different MinRTO, we may get spurious retransmissions. May not have
2519 // any benefits, but if the delayed ack becomes a significant source 2518 // any benefits, but if the delayed ack becomes a significant source
2520 // of (likely, tail) latency, then consider such a mechanism. 2519 // of (likely, tail) latency, then consider such a mechanism.
2521 const QuicTime::Delta QuicConnection::DelayedAckTime() { 2520 const QuicTime::Delta QuicConnection::DelayedAckTime() {
2522 return QuicTime::Delta::FromMilliseconds( 2521 return QuicTime::Delta::FromMilliseconds(
2523 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); 2522 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2));
2524 } 2523 }
2525 2524
2526 } // namespace net 2525 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698