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

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

Issue 2065463002: Always send queued retransmission packets, because of write blocked socket, once the socket gets un… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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/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/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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 QuicPacketNumber packet_number = packet.packet_number; 1730 QuicPacketNumber packet_number = packet.packet_number;
1731 if (encryption_level_ == ENCRYPTION_FORWARD_SECURE && 1731 if (encryption_level_ == ENCRYPTION_FORWARD_SECURE &&
1732 packet.encryption_level == ENCRYPTION_NONE) { 1732 packet.encryption_level == ENCRYPTION_NONE) {
1733 // Drop packets that are NULL encrypted since the peer won't accept them 1733 // Drop packets that are NULL encrypted since the peer won't accept them
1734 // anymore. 1734 // anymore.
1735 DVLOG(1) << ENDPOINT << "Dropping NULL encrypted packet: " << packet_number 1735 DVLOG(1) << ENDPOINT << "Dropping NULL encrypted packet: " << packet_number
1736 << " since the connection is forward secure."; 1736 << " since the connection is forward secure.";
1737 return true; 1737 return true;
1738 } 1738 }
1739 1739
1740 // TODO(fayang): Remove IsUnacked and HasRetransmittableFrames from
1741 // QuicSentPacketManagerInterface when deprecating
1742 // gfe2_reloadable_flag_quic_always_write_queued_retransmissions.
1743 if (FLAGS_quic_always_write_queued_retransmissions) {
1744 return false;
1745 }
1746
1740 // If a retransmission has been acked before sending, don't send it. 1747 // If a retransmission has been acked before sending, don't send it.
1741 // This occurs if a packet gets serialized, queued, then discarded. 1748 // This occurs if a packet gets serialized, queued, then discarded.
1742 if (packet.transmission_type != NOT_RETRANSMISSION && 1749 if (packet.transmission_type != NOT_RETRANSMISSION &&
1743 (!sent_packet_manager_->IsUnacked(packet.original_path_id, 1750 (!sent_packet_manager_->IsUnacked(packet.original_path_id,
1744 packet.original_packet_number) || 1751 packet.original_packet_number) ||
1745 !sent_packet_manager_->HasRetransmittableFrames( 1752 !sent_packet_manager_->HasRetransmittableFrames(
1746 packet.original_path_id, packet.original_packet_number))) { 1753 packet.original_path_id, packet.original_packet_number))) {
1747 DVLOG(1) << ENDPOINT << "Dropping unacked packet: " << packet_number 1754 DVLOG(1) << ENDPOINT << "Dropping unacked packet: " << packet_number
1748 << " A previous transmission was acked while write blocked."; 1755 << " A previous transmission was acked while write blocked.";
1749 return true; 1756 return true;
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2506 // the sender and a signaling mechanism -- if the sender uses a 2513 // the sender and a signaling mechanism -- if the sender uses a
2507 // different MinRTO, we may get spurious retransmissions. May not have 2514 // different MinRTO, we may get spurious retransmissions. May not have
2508 // any benefits, but if the delayed ack becomes a significant source 2515 // any benefits, but if the delayed ack becomes a significant source
2509 // of (likely, tail) latency, then consider such a mechanism. 2516 // of (likely, tail) latency, then consider such a mechanism.
2510 const QuicTime::Delta QuicConnection::DelayedAckTime() { 2517 const QuicTime::Delta QuicConnection::DelayedAckTime() {
2511 return QuicTime::Delta::FromMilliseconds( 2518 return QuicTime::Delta::FromMilliseconds(
2512 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); 2519 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2));
2513 } 2520 }
2514 2521
2515 } // namespace net 2522 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698