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

Unified Diff: net/quic/congestion_control/prr_sender.cc

Issue 972033002: Change QUIC's PrrSender::TimeUntilSend to accept bytes instead of packets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Discard_acks_87419283
Patch Set: Created 5 years, 10 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/congestion_control/prr_sender.h ('k') | net/quic/congestion_control/prr_sender_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/prr_sender.cc
diff --git a/net/quic/congestion_control/prr_sender.cc b/net/quic/congestion_control/prr_sender.cc
index 588a2fe0c879532e8517f6048d645397704d8d66..51b32d34fe81e083173b45616ce5ed67dbfef194 100644
--- a/net/quic/congestion_control/prr_sender.cc
+++ b/net/quic/congestion_control/prr_sender.cc
@@ -39,7 +39,7 @@ void PrrSender::OnPacketAcked(QuicByteCount acked_bytes) {
QuicTime::Delta PrrSender::TimeUntilSend(
QuicByteCount congestion_window,
QuicByteCount bytes_in_flight,
- QuicPacketCount slowstart_threshold) const {
+ QuicByteCount slowstart_threshold) const {
// Return QuicTime::Zero In order to ensure limited transmit always works.
if (bytes_sent_since_loss_ == 0 || bytes_in_flight < kMaxSegmentSize) {
return QuicTime::Delta::Zero();
@@ -50,7 +50,7 @@ QuicTime::Delta PrrSender::TimeUntilSend(
// when more packets are lost than the CWND reduction.
// limit = MAX(prr_delivered - prr_out, DeliveredData) + MSS
if (bytes_delivered_since_loss_ + ack_count_since_loss_ * kMaxSegmentSize <=
- bytes_sent_since_loss_) {
+ bytes_sent_since_loss_) {
return QuicTime::Delta::Infinite();
}
return QuicTime::Delta::Zero();
@@ -59,8 +59,8 @@ QuicTime::Delta PrrSender::TimeUntilSend(
// Checks a simplified version of the PRR formula that doesn't use division:
// AvailableSendWindow =
// CEIL(prr_delivered * ssthresh / BytesInFlightAtLoss) - prr_sent
- if (bytes_delivered_since_loss_ * slowstart_threshold * kMaxSegmentSize >
- bytes_sent_since_loss_ * bytes_in_flight_before_loss_) {
+ if (bytes_delivered_since_loss_ * slowstart_threshold >
+ bytes_sent_since_loss_ * bytes_in_flight_before_loss_) {
return QuicTime::Delta::Zero();
}
return QuicTime::Delta::Infinite();
« no previous file with comments | « net/quic/congestion_control/prr_sender.h ('k') | net/quic/congestion_control/prr_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698