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

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

Issue 2239033002: Revert FLAGS_quic_least_unacked_packet_number_length so that it can be landed completely and then m… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/core/quic_flags.h » ('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/core/quic_connection.h" 5 #include "net/quic/core/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 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 } 1680 }
1681 SetPingAlarm(); 1681 SetPingAlarm();
1682 MaybeSetMtuAlarm(); 1682 MaybeSetMtuAlarm();
1683 DVLOG(1) << ENDPOINT << "time we began writing last sent packet: " 1683 DVLOG(1) << ENDPOINT << "time we began writing last sent packet: "
1684 << packet_send_time.ToDebuggingValue(); 1684 << packet_send_time.ToDebuggingValue();
1685 1685
1686 if (!FLAGS_quic_simple_packet_number_length) { 1686 if (!FLAGS_quic_simple_packet_number_length) {
1687 // TODO(ianswett): Change the packet number length and other packet creator 1687 // TODO(ianswett): Change the packet number length and other packet creator
1688 // options by a more explicit API than setting a struct value directly, 1688 // options by a more explicit API than setting a struct value directly,
1689 // perhaps via the NetworkChangeVisitor. 1689 // perhaps via the NetworkChangeVisitor.
1690 if (FLAGS_quic_least_unacked_packet_number_length) { 1690 packet_generator_.UpdateSequenceNumberLength(
1691 packet_generator_.UpdateSequenceNumberLength( 1691 sent_packet_manager_->GetLeastPacketAwaitedByPeer(packet->path_id),
1692 sent_packet_manager_->GetLeastUnacked(packet->path_id), 1692 sent_packet_manager_->EstimateMaxPacketsInFlight(max_packet_length()));
1693 sent_packet_manager_->EstimateMaxPacketsInFlight(
1694 max_packet_length()));
1695 } else {
1696 packet_generator_.UpdateSequenceNumberLength(
1697 sent_packet_manager_->GetLeastPacketAwaitedByPeer(packet->path_id),
1698 sent_packet_manager_->EstimateMaxPacketsInFlight(
1699 max_packet_length()));
1700 }
1701 } 1693 }
1702 1694
1703 bool reset_retransmission_alarm = sent_packet_manager_->OnPacketSent( 1695 bool reset_retransmission_alarm = sent_packet_manager_->OnPacketSent(
1704 packet, packet->original_path_id, packet->original_packet_number, 1696 packet, packet->original_path_id, packet->original_packet_number,
1705 packet_send_time, packet->transmission_type, IsRetransmittable(*packet)); 1697 packet_send_time, packet->transmission_type, IsRetransmittable(*packet));
1706 1698
1707 if (reset_retransmission_alarm || !retransmission_alarm_->IsSet()) { 1699 if (reset_retransmission_alarm || !retransmission_alarm_->IsSet()) {
1708 SetRetransmissionAlarm(); 1700 SetRetransmissionAlarm();
1709 } 1701 }
1710 1702
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 // the sender and a signaling mechanism -- if the sender uses a 2509 // the sender and a signaling mechanism -- if the sender uses a
2518 // different MinRTO, we may get spurious retransmissions. May not have 2510 // different MinRTO, we may get spurious retransmissions. May not have
2519 // any benefits, but if the delayed ack becomes a significant source 2511 // any benefits, but if the delayed ack becomes a significant source
2520 // of (likely, tail) latency, then consider such a mechanism. 2512 // of (likely, tail) latency, then consider such a mechanism.
2521 const QuicTime::Delta QuicConnection::DelayedAckTime() { 2513 const QuicTime::Delta QuicConnection::DelayedAckTime() {
2522 return QuicTime::Delta::FromMilliseconds( 2514 return QuicTime::Delta::FromMilliseconds(
2523 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); 2515 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2));
2524 } 2516 }
2525 2517
2526 } // namespace net 2518 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698