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

Side by Side Diff: net/quic/quic_unacked_packet_map.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 | « net/quic/quic_sent_packet_manager.cc ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_unacked_packet_map.h" 5 #include "net/quic/quic_unacked_packet_map.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/quic/quic_bug_tracker.h" 9 #include "net/quic/quic_bug_tracker.h"
10 #include "net/quic/quic_connection_stats.h" 10 #include "net/quic/quic_connection_stats.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 unacked_packets_.pop_front(); 83 unacked_packets_.pop_front();
84 ++least_unacked_; 84 ++least_unacked_;
85 } 85 }
86 } 86 }
87 87
88 void QuicUnackedPacketMap::TransferRetransmissionInfo( 88 void QuicUnackedPacketMap::TransferRetransmissionInfo(
89 QuicPacketNumber old_packet_number, 89 QuicPacketNumber old_packet_number,
90 QuicPacketNumber new_packet_number, 90 QuicPacketNumber new_packet_number,
91 TransmissionType transmission_type, 91 TransmissionType transmission_type,
92 TransmissionInfo* info) { 92 TransmissionInfo* info) {
93 if (old_packet_number < least_unacked_ || 93 if (old_packet_number < least_unacked_) {
94 old_packet_number > largest_sent_packet_) { 94 if (!FLAGS_quic_always_write_queued_retransmissions) {
95 QUIC_BUG << "Old TransmissionInfo no longer exists for:" 95 QUIC_BUG << "Old TransmissionInfo no longer exists for:"
96 << old_packet_number << " least_unacked:" << least_unacked_ 96 << old_packet_number << " least_unacked:" << least_unacked_;
97 }
98 // This can happen when a retransmission packet is queued because of write
99 // blocked socket, and the original packet gets acked before the
100 // retransmission gets sent.
101 return;
102 }
103 if (old_packet_number > largest_sent_packet_) {
104 QUIC_BUG << "Old TransmissionInfo never existed for :" << old_packet_number
97 << " largest_sent:" << largest_sent_packet_; 105 << " largest_sent:" << largest_sent_packet_;
98 return; 106 return;
99 } 107 }
100 DCHECK_GE(new_packet_number, least_unacked_ + unacked_packets_.size()); 108 DCHECK_GE(new_packet_number, least_unacked_ + unacked_packets_.size());
101 DCHECK_NE(NOT_RETRANSMISSION, transmission_type); 109 DCHECK_NE(NOT_RETRANSMISSION, transmission_type);
102 110
103 TransmissionInfo* transmission_info = 111 TransmissionInfo* transmission_info =
104 &unacked_packets_.at(old_packet_number - least_unacked_); 112 &unacked_packets_.at(old_packet_number - least_unacked_);
105 QuicFrames* frames = &transmission_info->retransmittable_frames; 113 QuicFrames* frames = &transmission_info->retransmittable_frames;
106 for (AckListenerWrapper& wrapper : transmission_info->ack_listeners) { 114 for (AckListenerWrapper& wrapper : transmission_info->ack_listeners) {
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 351 }
344 } 352 }
345 return false; 353 return false;
346 } 354 }
347 355
348 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const { 356 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const {
349 return least_unacked_; 357 return least_unacked_;
350 } 358 }
351 359
352 } // namespace net 360 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698