OLD | NEW |
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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 LOG(WARNING) << ENDPOINT | 867 LOG(WARNING) << ENDPOINT |
868 << "Peer sent missing packet: " << incoming_ack.packets.Min() | 868 << "Peer sent missing packet: " << incoming_ack.packets.Min() |
869 << " which is smaller than least_packet_awaited_by_peer_: " | 869 << " which is smaller than least_packet_awaited_by_peer_: " |
870 << sent_packet_manager_->GetLeastPacketAwaitedByPeer( | 870 << sent_packet_manager_->GetLeastPacketAwaitedByPeer( |
871 incoming_ack.path_id); | 871 incoming_ack.path_id); |
872 return "Missing packet smaller than least awaited."; | 872 return "Missing packet smaller than least awaited."; |
873 } | 873 } |
874 if (!sent_entropy_manager_.IsValidEntropy(incoming_ack.largest_observed, | 874 if (!sent_entropy_manager_.IsValidEntropy(incoming_ack.largest_observed, |
875 incoming_ack.packets, | 875 incoming_ack.packets, |
876 incoming_ack.entropy_hash)) { | 876 incoming_ack.entropy_hash)) { |
877 LOG(WARNING) << ENDPOINT << "Peer sent invalid entropy." | 877 DLOG(WARNING) << ENDPOINT << "Peer sent invalid entropy." |
878 << " largest_observed:" << incoming_ack.largest_observed | 878 << " largest_observed:" << incoming_ack.largest_observed |
879 << " last_received:" << last_header_.packet_number; | 879 << " last_received:" << last_header_.packet_number; |
880 return "Invalid entropy."; | 880 return "Invalid entropy."; |
881 } | 881 } |
882 } else { | 882 } else { |
883 if (!incoming_ack.packets.Empty() && | 883 if (!incoming_ack.packets.Empty() && |
884 incoming_ack.packets.Max() != incoming_ack.largest_observed) { | 884 incoming_ack.packets.Max() != incoming_ack.largest_observed) { |
885 QUIC_BUG << ENDPOINT | 885 QUIC_BUG << ENDPOINT |
886 << "Peer last received packet: " << incoming_ack.packets.Max() | 886 << "Peer last received packet: " << incoming_ack.packets.Max() |
887 << " which is not equal to largest observed: " | 887 << " which is not equal to largest observed: " |
888 << incoming_ack.largest_observed; | 888 << incoming_ack.largest_observed; |
889 return "Last received packet not equal to largest observed."; | 889 return "Last received packet not equal to largest observed."; |
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 // the sender and a signaling mechanism -- if the sender uses a | 2511 // the sender and a signaling mechanism -- if the sender uses a |
2512 // different MinRTO, we may get spurious retransmissions. May not have | 2512 // different MinRTO, we may get spurious retransmissions. May not have |
2513 // any benefits, but if the delayed ack becomes a significant source | 2513 // any benefits, but if the delayed ack becomes a significant source |
2514 // of (likely, tail) latency, then consider such a mechanism. | 2514 // of (likely, tail) latency, then consider such a mechanism. |
2515 const QuicTime::Delta QuicConnection::DelayedAckTime() { | 2515 const QuicTime::Delta QuicConnection::DelayedAckTime() { |
2516 return QuicTime::Delta::FromMilliseconds( | 2516 return QuicTime::Delta::FromMilliseconds( |
2517 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); | 2517 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); |
2518 } | 2518 } |
2519 | 2519 |
2520 } // namespace net | 2520 } // namespace net |
OLD | NEW |