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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 306013009: Remove the TransmissionType argument from QuicConnection CanWrite and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index e8a6edd2851b9cfe68e78146d63bd864a477e151..a23959763c0928a74536e02aee882370a9d0a8c8 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -69,6 +69,7 @@ QuicSentPacketManager::QuicSentPacketManager(bool is_server,
consecutive_rto_count_(0),
consecutive_tlp_count_(0),
consecutive_crypto_retransmission_count_(0),
+ pending_tlp_transmission_(false),
max_tail_loss_probes_(kDefaultMaxTailLossProbes),
using_pacing_(false) {
}
@@ -402,6 +403,7 @@ bool QuicSentPacketManager::OnPacketSent(
HasRetransmittableData has_retransmittable_data) {
DCHECK_LT(0u, sequence_number);
LOG_IF(DFATAL, bytes == 0) << "Cannot send empty packets.";
+ pending_tlp_transmission_ = false;
// In rare circumstances, the packet could be serialized, sent, and then acked
// before OnPacketSent is called.
if (!unacked_packets_.IsUnacked(sequence_number)) {
@@ -452,6 +454,7 @@ void QuicSentPacketManager::OnRetransmissionTimeout() {
// If no tail loss probe can be sent, because there are no retransmittable
// packets, execute a conventional RTO to abandon old packets.
++stats_->tlp_count;
+ pending_tlp_transmission_ = true;
RetransmitOldestPacket();
return;
case RTO_MODE:
@@ -503,12 +506,8 @@ void QuicSentPacketManager::RetransmitOldestPacket() {
}
void QuicSentPacketManager::RetransmitAllPackets() {
- // Abandon all retransmittable packets and packets older than the
- // retransmission delay.
-
- DVLOG(1) << "OnRetransmissionTimeout() fired with "
+ DVLOG(1) << "RetransmitAllPackets() called with "
<< unacked_packets_.GetNumUnackedPackets() << " unacked packets.";
-
// Request retransmission of all retransmittable packets when the RTO
// fires, and let the congestion manager decide how many to send
// immediately and the remaining packets will be queued.
@@ -611,11 +610,10 @@ bool QuicSentPacketManager::MaybeUpdateRTT(
QuicTime::Delta QuicSentPacketManager::TimeUntilSend(
QuicTime now,
- TransmissionType transmission_type,
HasRetransmittableData retransmittable) {
// The TLP logic is entirely contained within QuicSentPacketManager, so the
// send algorithm does not need to be consulted.
- if (transmission_type == TLP_RETRANSMISSION) {
+ if (pending_tlp_transmission_) {
return QuicTime::Delta::Zero();
}
return send_algorithm_->TimeUntilSend(
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698