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

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

Issue 867033002: Replace the map in QuicAckNotifier with a counter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Change_AckNotifier_datastructures_84156430
Patch Set: Created 5 years, 11 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_ack_notifier_test.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 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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 } else { 569 } else {
570 PendingRetransmissionMap::iterator it = 570 PendingRetransmissionMap::iterator it =
571 pending_retransmissions_.find(original_sequence_number); 571 pending_retransmissions_.find(original_sequence_number);
572 if (it != pending_retransmissions_.end()) { 572 if (it != pending_retransmissions_.end()) {
573 pending_retransmissions_.erase(it); 573 pending_retransmissions_.erase(it);
574 } else { 574 } else {
575 DLOG(DFATAL) << "Expected sequence number to be in " 575 DLOG(DFATAL) << "Expected sequence number to be in "
576 << "pending_retransmissions_. sequence_number: " 576 << "pending_retransmissions_. sequence_number: "
577 << original_sequence_number; 577 << original_sequence_number;
578 } 578 }
579 // A notifier may be waiting to hear about ACKs for the original sequence 579 // Inform the ack notifier of retransmissions so it can calculate the
580 // number. Inform them that the sequence number has changed. 580 // retransmit rate.
581 ack_notifier_manager_.UpdateSequenceNumber(original_sequence_number, 581 ack_notifier_manager_.OnPacketRetransmitted(original_sequence_number,
582 sequence_number); 582 sequence_number, bytes);
583 } 583 }
584 584
585 if (pending_timer_transmission_count_ > 0) { 585 if (pending_timer_transmission_count_ > 0) {
586 --pending_timer_transmission_count_; 586 --pending_timer_transmission_count_;
587 } 587 }
588 588
589 if (unacked_packets_.bytes_in_flight() == 0) { 589 if (unacked_packets_.bytes_in_flight() == 0) {
590 // TODO(ianswett): Consider being less aggressive to force a new 590 // TODO(ianswett): Consider being less aggressive to force a new
591 // recent_min_rtt, likely by not discarding a relatively new sample. 591 // recent_min_rtt, likely by not discarding a relatively new sample.
592 DVLOG(1) << "Sampling a new recent min rtt within 2 samples. currently:" 592 DVLOG(1) << "Sampling a new recent min rtt within 2 samples. currently:"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as 1010 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as
1011 // the default granularity of the Linux kernel's FQ qdisc. 1011 // the default granularity of the Linux kernel's FQ qdisc.
1012 using_pacing_ = true; 1012 using_pacing_ = true;
1013 send_algorithm_.reset( 1013 send_algorithm_.reset(
1014 new PacingSender(send_algorithm_.release(), 1014 new PacingSender(send_algorithm_.release(),
1015 QuicTime::Delta::FromMilliseconds(1), 1015 QuicTime::Delta::FromMilliseconds(1),
1016 kInitialUnpacedBurst)); 1016 kInitialUnpacedBurst));
1017 } 1017 }
1018 1018
1019 } // namespace net 1019 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_ack_notifier_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698