summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrtenneti <rtenneti@chromium.org>2015-08-24 13:13:16 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-24 20:13:55 +0000
commitf8a6a21341f2ad560a0b1c21b071ca33bbf36d22 (patch)
treeebebe19c6193e47363b1d7657678f0a3999d30ae /net
parent5cef3149df4759c7fb83e9b5b1318dd7dea40760 (diff)
downloadchromium_src-f8a6a21341f2ad560a0b1c21b071ca33bbf36d22.zip
chromium_src-f8a6a21341f2ad560a0b1c21b071ca33bbf36d22.tar.gz
chromium_src-f8a6a21341f2ad560a0b1c21b071ca33bbf36d22.tar.bz2
relnote: QUIC - Added 'TLPR' connection option to run a finch based
experiment that sets the TailLossProbe delay to 0.5 RTT. Merge internal change: 101265841 R=rch@chromium.org Review URL: https://codereview.chromium.org/1310043002 Cr-Commit-Position: refs/heads/master@{#345160}
Diffstat (limited to 'net')
-rw-r--r--net/quic/crypto/crypto_protocol.h2
-rw-r--r--net/quic/quic_sent_packet_manager.cc12
-rw-r--r--net/quic/quic_sent_packet_manager.h2
-rw-r--r--net/quic/quic_sent_packet_manager_test.cc29
-rw-r--r--net/quic/test_tools/quic_sent_packet_manager_peer.cc6
-rw-r--r--net/quic/test_tools/quic_sent_packet_manager_peer.h3
6 files changed, 52 insertions, 2 deletions
diff --git a/net/quic/crypto/crypto_protocol.h b/net/quic/crypto/crypto_protocol.h
index 607dc25..79e49c9 100644
--- a/net/quic/crypto/crypto_protocol.h
+++ b/net/quic/crypto/crypto_protocol.h
@@ -82,6 +82,8 @@ const QuicTag kTIME = TAG('T', 'I', 'M', 'E'); // Time based loss detection
const QuicTag kMIN1 = TAG('M', 'I', 'N', '1'); // Min CWND of 1 packet
const QuicTag kMIN4 = TAG('M', 'I', 'N', '4'); // Min CWND of 4 packets,
// with a min rate of 1 BDP.
+const QuicTag kTLPR = TAG('T', 'L', 'P', 'R'); // Tail loss probe delay of
+ // 0.5RTT.
// Optional support of truncated Connection IDs. If sent by a peer, the value
// is the minimum number of bytes allowed for the connection ID sent to the
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index aa3423a..da14e4b 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -93,10 +93,10 @@ QuicSentPacketManager::QuicSentPacketManager(
consecutive_crypto_retransmission_count_(0),
pending_timer_transmission_count_(0),
max_tail_loss_probes_(kDefaultMaxTailLossProbes),
+ enable_half_rtt_tail_loss_probe_(false),
using_pacing_(false),
use_new_rto_(false),
- handshake_confirmed_(false) {
-}
+ handshake_confirmed_(false) {}
QuicSentPacketManager::~QuicSentPacketManager() {
}
@@ -155,6 +155,9 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
if (config.HasClientSentConnectionOption(kNTLP, perspective_)) {
max_tail_loss_probes_ = 0;
}
+ if (config.HasClientSentConnectionOption(kTLPR, perspective_)) {
+ enable_half_rtt_tail_loss_probe_ = true;
+ }
if (config.HasClientSentConnectionOption(kNRTO, perspective_)) {
use_new_rto_ = true;
}
@@ -859,6 +862,11 @@ const QuicTime::Delta QuicSentPacketManager::GetTailLossProbeDelay() const {
if (srtt.IsZero()) {
srtt = QuicTime::Delta::FromMicroseconds(rtt_stats_.initial_rtt_us());
}
+ if (enable_half_rtt_tail_loss_probe_ && consecutive_tlp_count_ == 0u) {
+ return QuicTime::Delta::FromMilliseconds(
+ max(kMinTailLossProbeTimeoutMs,
+ static_cast<int64>(0.5 * srtt.ToMilliseconds())));
+ }
if (!unacked_packets_.HasMultipleInFlightPackets()) {
return QuicTime::Delta::Max(
srtt.Multiply(2), srtt.Multiply(1.5).Add(
diff --git a/net/quic/quic_sent_packet_manager.h b/net/quic/quic_sent_packet_manager.h
index 4b2a59e..336c7ea 100644
--- a/net/quic/quic_sent_packet_manager.h
+++ b/net/quic/quic_sent_packet_manager.h
@@ -386,6 +386,8 @@ class NET_EXPORT_PRIVATE QuicSentPacketManager {
size_t pending_timer_transmission_count_;
// Maximum number of tail loss probes to send before firing an RTO.
size_t max_tail_loss_probes_;
+ // If true, send the TLP at 0.5 RTT.
+ bool enable_half_rtt_tail_loss_probe_;
bool using_pacing_;
// If true, use the new RTO with loss based CWND reduction instead of the send
// algorithms's OnRetransmissionTimeout to reduce the congestion window.
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 51d618a..fe76de0 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -1553,6 +1553,35 @@ TEST_F(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtClient) {
EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetMaxTailLossProbes(&manager_));
}
+TEST_F(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtServer) {
+ QuicConfig config;
+ QuicTagVector options;
+
+ options.push_back(kTLPR);
+ QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*network_change_visitor_, OnRttChange());
+ EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
+ manager_.SetFromConfig(config);
+ EXPECT_TRUE(
+ QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
+}
+
+TEST_F(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtClient) {
+ QuicConfig client_config;
+ QuicTagVector options;
+
+ options.push_back(kTLPR);
+ QuicSentPacketManagerPeer::SetPerspective(&manager_, Perspective::IS_CLIENT);
+ client_config.SetConnectionOptionsToSend(options);
+ EXPECT_CALL(*network_change_visitor_, OnCongestionWindowChange());
+ EXPECT_CALL(*network_change_visitor_, OnRttChange());
+ EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
+ manager_.SetFromConfig(client_config);
+ EXPECT_TRUE(
+ QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
+}
+
TEST_F(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtServer) {
EXPECT_FALSE(QuicSentPacketManagerPeer::GetUseNewRto(&manager_));
QuicConfig config;
diff --git a/net/quic/test_tools/quic_sent_packet_manager_peer.cc b/net/quic/test_tools/quic_sent_packet_manager_peer.cc
index add97bb..ea729fb 100644
--- a/net/quic/test_tools/quic_sent_packet_manager_peer.cc
+++ b/net/quic/test_tools/quic_sent_packet_manager_peer.cc
@@ -26,6 +26,12 @@ void QuicSentPacketManagerPeer::SetMaxTailLossProbes(
}
// static
+bool QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(
+ QuicSentPacketManager* sent_packet_manager) {
+ return sent_packet_manager->enable_half_rtt_tail_loss_probe_;
+}
+
+// static
bool QuicSentPacketManagerPeer::GetUseNewRto(
QuicSentPacketManager* sent_packet_manager) {
return sent_packet_manager->use_new_rto_;
diff --git a/net/quic/test_tools/quic_sent_packet_manager_peer.h b/net/quic/test_tools/quic_sent_packet_manager_peer.h
index e0686e1..eba5c2e 100644
--- a/net/quic/test_tools/quic_sent_packet_manager_peer.h
+++ b/net/quic/test_tools/quic_sent_packet_manager_peer.h
@@ -22,6 +22,9 @@ class QuicSentPacketManagerPeer {
static void SetMaxTailLossProbes(
QuicSentPacketManager* sent_packet_manager, size_t max_tail_loss_probes);
+ static bool GetEnableHalfRttTailLossProbe(
+ QuicSentPacketManager* sent_packet_manager);
+
static bool GetUseNewRto(QuicSentPacketManager* sent_packet_manager);
static QuicByteCount GetReceiveWindow(