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

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

Issue 2185163002: Ignore RTT measurements greater than 30 seconds in QUIC and limit the LOG(WARNING) to 10. Protected… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@128366346
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 | 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 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 QUIC_BUG << "Acked packet has zero sent time, largest_observed:" 746 QUIC_BUG << "Acked packet has zero sent time, largest_observed:"
747 << ack_frame.largest_observed; 747 << ack_frame.largest_observed;
748 return false; 748 return false;
749 } 749 }
750 750
751 QuicTime::Delta send_delta = ack_receive_time - transmission_info.sent_time; 751 QuicTime::Delta send_delta = ack_receive_time - transmission_info.sent_time;
752 const int kMaxSendDeltaSeconds = 30; 752 const int kMaxSendDeltaSeconds = 30;
753 if (FLAGS_quic_socket_walltimestamps && 753 if (FLAGS_quic_socket_walltimestamps &&
754 send_delta.ToSeconds() > kMaxSendDeltaSeconds) { 754 send_delta.ToSeconds() > kMaxSendDeltaSeconds) {
755 // send_delta can be very high if local clock is changed mid-connection. 755 // send_delta can be very high if local clock is changed mid-connection.
756 LOG(WARNING) << "Excessive send delta: " << send_delta.ToSeconds() 756 LOG(WARNING)
757 << ", setting to: " << kMaxSendDeltaSeconds; 757 << "Excessive send delta: " << send_delta.ToSeconds()
758 send_delta = QuicTime::Delta::FromSeconds(kMaxSendDeltaSeconds); 758 << ", setting to: " << kMaxSendDeltaSeconds
759 << " largest_observed:" << ack_frame.largest_observed
760 << " ack_receive_time:" << ack_receive_time.ToDebuggingValue()
761 << " sent_time:" << transmission_info.sent_time.ToDebuggingValue();
762 return false;
759 } 763 }
760 rtt_stats_.UpdateRtt(send_delta, ack_frame.ack_delay_time, ack_receive_time); 764 rtt_stats_.UpdateRtt(send_delta, ack_frame.ack_delay_time, ack_receive_time);
761 765
762 return true; 766 return true;
763 } 767 }
764 768
765 QuicTime::Delta QuicSentPacketManager::TimeUntilSend( 769 QuicTime::Delta QuicSentPacketManager::TimeUntilSend(
766 QuicTime now, 770 QuicTime now,
767 HasRetransmittableData retransmittable, 771 HasRetransmittableData retransmittable,
768 QuicPathId* path_id) { 772 QuicPathId* path_id) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( 994 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo(
991 QuicPacketNumber packet_number) { 995 QuicPacketNumber packet_number) {
992 return unacked_packets_.GetMutableTransmissionInfo(packet_number); 996 return unacked_packets_.GetMutableTransmissionInfo(packet_number);
993 } 997 }
994 998
995 void QuicSentPacketManager::RemoveObsoletePackets() { 999 void QuicSentPacketManager::RemoveObsoletePackets() {
996 unacked_packets_.RemoveObsoletePackets(); 1000 unacked_packets_.RemoveObsoletePackets();
997 } 1001 }
998 1002
999 } // namespace net 1003 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698