summaryrefslogtreecommitdiffstats
path: root/net/tools/quic
diff options
context:
space:
mode:
authorrtenneti <rtenneti@chromium.org>2014-10-13 15:38:41 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-13 22:38:53 +0000
commit93bce7ece7f312875a9a2fd20c25c7f769e7a7e6 (patch)
tree49bf488756e41ab835a1a9b01b9d1779096d8b36 /net/tools/quic
parentda7e64810f0305512cd20f0301c2ac1b21d8bc70 (diff)
downloadchromium_src-93bce7ece7f312875a9a2fd20c25c7f769e7a7e6.zip
chromium_src-93bce7ece7f312875a9a2fd20c25c7f769e7a7e6.tar.gz
chromium_src-93bce7ece7f312875a9a2fd20c25c7f769e7a7e6.tar.bz2
Land Recent QUIC Changes.
Add more information to LOG(DFATAL) in QUIC's tcp_loss_algorithm. Merge internal change: 77370712 https://codereview.chromium.org/644123003/ Fix a bug where packet received times aren't sent if the approximate now time is less than the packet's actual receive time. Merge internal change: 77056400 https://codereview.chromium.org/643313003/ Change the pacing sender to always pacing the initial burst, even when an RTT sample hasn't been taken. Merge internal change: 77004656 https://codereview.chromium.org/644233002/ Set the server's idle timeout to 2s longer than the negotiated value(30s by default) instead of 1s, in order to prevent failed requests. Merge internal change: 76821863 https://codereview.chromium.org/651463004/ Call SetDefaults from the QuicConfig constructor instead of requiring all callers to do so. Merge internal change: 76709273 https://codereview.chromium.org/647933002 Allow the number of undecryptable QUIC packets buffered before the CHLO/SHLO to be configured in QuicConfig. Merge internal change: 76707156 On chromium side: set max undecryptable packets to the initial congestion window size in QuicStreamFactory. https://codereview.chromium.org/647923002/ QUIC - Minor formatting changes to keep in sync with internal source. Found these changes while merging changes from chromium CLs: 605733006, 605163004 Chromium code review URL: https://codereview.chromium.org/605733006/ https://codereview.chromium.org/605163004/ Merge internal change: 76636673 https://codereview.chromium.org/651513002/ Remove QuicSentPacketManager::DebugVisitor's OnSentPacket, since it's redundant to QuicConnection::DebugVisitor's OnPacketSent. Refactored QuicConnection::DebugVisitor's OnPacketSent in order to add necessary fields for the trace... visitor. Merge internal change: 76595983 https://codereview.chromium.org/627583002/ QUIC: if client provides an STK which includes CachedNetworkParams, then store these and echo them back in future STKs if we have no newer estimate to send. Flag protected behind disabled FLAGS_quic_store_cached_network_params_from_chlo. This is the followup to adding timestamp to the SourceAddressToken proto. This allowed us to copy a previously provided CachedNetworkParams into new STKs without losing timestamp data. It also paves the way for recording BW estimate accuracy in the server: we now have the client's provided BW estimate stored per connection, so we can compare against BW that we see on the new connection (this will be in a future CL). Merge internal change: 76455340 chromium: this code doesn't impact client side code because we don't parse SourceAddressToken (we keep it as a string). For QUIC server, we are not parsing optional cached_network_params. Added a TODO to convert SourcAddressToken and CachedNetworkParams to protobuf. https://codereview.chromium.org/623003002/ R=rch@chromium.org Review URL: https://codereview.chromium.org/648933003 Cr-Commit-Position: refs/heads/master@{#299380}
Diffstat (limited to 'net/tools/quic')
-rw-r--r--net/tools/quic/end_to_end_test.cc3
-rw-r--r--net/tools/quic/quic_client.cc2
-rw-r--r--net/tools/quic/quic_client_bin.cc1
-rw-r--r--net/tools/quic/quic_client_session_test.cc5
-rw-r--r--net/tools/quic/quic_server.cc2
-rw-r--r--net/tools/quic/quic_server_session.cc2
-rw-r--r--net/tools/quic/quic_server_session_test.cc9
-rw-r--r--net/tools/quic/quic_spdy_client_stream_test.cc1
8 files changed, 7 insertions, 18 deletions
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 024f467..f29af96 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -198,9 +198,6 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
VLOG(1) << "Using Configuration: " << GetParam();
- client_config_.SetDefaults();
- server_config_.SetDefaults();
-
// Use different flow control windows for client/server.
client_config_.SetInitialFlowControlWindowToSend(
2 * kInitialSessionFlowControlWindowForTest);
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index e70d8b8..7b2c994 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -49,7 +49,6 @@ QuicClient::QuicClient(IPEndPoint server_address,
overflow_supported_(false),
supported_versions_(supported_versions),
print_response_(print_response) {
- config_.SetDefaults();
}
QuicClient::QuicClient(IPEndPoint server_address,
@@ -86,7 +85,6 @@ bool QuicClient::Initialize() {
DCHECK(!initialized_);
epoll_server_->set_timeout_in_us(50 * 1000);
- crypto_config_.SetDefaults();
if (!CreateUDPSocket()) {
return false;
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
index 4f76624..0f5c746 100644
--- a/net/tools/quic/quic_client_bin.cc
+++ b/net/tools/quic/quic_client_bin.cc
@@ -118,7 +118,6 @@ int main(int argc, char *argv[]) {
<< QuicVersionVectorToString(versions);
net::EpollServer epoll_server;
net::QuicConfig config;
- config.SetDefaults();
// The default flow control window of 16 Kb is too small for practical
// purposes. Set it to the specified value, which has a large default.
diff --git a/net/tools/quic/quic_client_session_test.cc b/net/tools/quic/quic_client_session_test.cc
index 2bd4315..467e29a 100644
--- a/net/tools/quic/quic_client_session_test.cc
+++ b/net/tools/quic/quic_client_session_test.cc
@@ -42,12 +42,10 @@ class ToolsQuicClientSessionTest
ToolsQuicClientSessionTest()
: connection_(new PacketSavingConnection(false,
SupportedVersions(GetParam()))) {
- crypto_config_.SetDefaults();
session_.reset(new QuicClientSession(DefaultQuicConfig(), connection_));
session_->InitializeSession(
QuicServerId(kServerHostname, kPort, false, PRIVACY_MODE_DISABLED),
&crypto_config_);
- session_->config()->SetDefaults();
}
void CompleteCryptoHandshake() {
@@ -74,8 +72,7 @@ TEST_P(ToolsQuicClientSessionTest, MaxNumStreams) {
// Initialize crypto before the client session will create a stream.
CompleteCryptoHandshake();
- QuicSpdyClientStream* stream =
- session_->CreateOutgoingDataStream();
+ QuicSpdyClientStream* stream = session_->CreateOutgoingDataStream();
ASSERT_TRUE(stream);
EXPECT_FALSE(session_->CreateOutgoingDataStream());
diff --git a/net/tools/quic/quic_server.cc b/net/tools/quic/quic_server.cc
index 34beb3f..9d36909 100644
--- a/net/tools/quic/quic_server.cc
+++ b/net/tools/quic/quic_server.cc
@@ -48,8 +48,6 @@ QuicServer::QuicServer()
use_recvmmsg_(false),
crypto_config_(kSourceAddressTokenSecret, QuicRandom::GetInstance()),
supported_versions_(QuicSupportedVersions()) {
- // Use hardcoded crypto parameters for now.
- config_.SetDefaults();
Initialize();
}
diff --git a/net/tools/quic/quic_server_session.cc b/net/tools/quic/quic_server_session.cc
index cb56329..842c6ef 100644
--- a/net/tools/quic/quic_server_session.cc
+++ b/net/tools/quic/quic_server_session.cc
@@ -134,7 +134,7 @@ void QuicServerSession::OnCongestionWindowChange(QuicTime now) {
cached_network_params.set_serving_region(serving_region_);
}
- crypto_stream_->SendServerConfigUpdate(&cached_network_params);
+ crypto_stream_->SendServerConfigUpdate(&cached_network_params, false);
last_server_config_update_time_ = now;
}
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index 4fc4157..72c65a8 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -68,7 +68,6 @@ class QuicServerSessionTest : public ::testing::TestWithParam<QuicVersion> {
QuicServerSessionTest()
: crypto_config_(QuicCryptoServerConfig::TESTING,
QuicRandom::GetInstance()) {
- config_.SetDefaults();
config_.SetMaxStreamsPerConnection(kMaxStreamsForTest,
kMaxStreamsForTest);
config_.SetInitialFlowControlWindowToSend(
@@ -295,8 +294,10 @@ class MockQuicCryptoServerStream : public QuicCryptoServerStream {
: QuicCryptoServerStream(crypto_config, session) {}
virtual ~MockQuicCryptoServerStream() {}
- MOCK_METHOD1(SendServerConfigUpdate,
- void(const CachedNetworkParameters* cached_network_parameters));
+ MOCK_METHOD2(SendServerConfigUpdate,
+ void(const CachedNetworkParameters* cached_network_parameters,
+ bool on_handshake_complete));
+
private:
DISALLOW_COPY_AND_ASSIGN(MockQuicCryptoServerStream);
};
@@ -365,7 +366,7 @@ TEST_P(QuicServerSessionTest, BandwidthEstimates) {
expected_network_params.set_serving_region(serving_region);
EXPECT_CALL(*crypto_stream,
- SendServerConfigUpdate(EqualsProto(expected_network_params)))
+ SendServerConfigUpdate(EqualsProto(expected_network_params), _))
.Times(1);
session_->OnCongestionWindowChange(now);
}
diff --git a/net/tools/quic/quic_spdy_client_stream_test.cc b/net/tools/quic/quic_spdy_client_stream_test.cc
index 058b204..090e2da 100644
--- a/net/tools/quic/quic_spdy_client_stream_test.cc
+++ b/net/tools/quic/quic_spdy_client_stream_test.cc
@@ -34,7 +34,6 @@ class QuicSpdyClientStreamTest : public TestWithParam<QuicVersion> {
session_.InitializeSession(
QuicServerId("example.com", 80, false, PRIVACY_MODE_DISABLED),
&crypto_config_);
- crypto_config_.SetDefaults();
headers_.SetResponseFirstlineFromStringPieces("HTTP/1.1", "200", "Ok");
headers_.ReplaceOrAppendHeader("content-length", "11");