Commit 6c576c24 authored by rjshade@google.com's avatar rjshade@google.com

Rename FLAGS_enable_quic_connection_flow_control to...

Rename FLAGS_enable_quic_connection_flow_control to FLAGS_enable_quic_connection_flow_control_2, and set it to true.

Merge internal change: 69327440

BUG=

Review URL: https://codereview.chromium.org/324283004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278117 0039d316-1c4b-4281-b951-d872f2087c98
parent 30aa0a34
......@@ -422,7 +422,8 @@ TEST_P(QuicDataStreamTest, ConnectionFlowControlWindowUpdate) {
return;
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
Initialize(kShouldProcessData);
......@@ -510,7 +511,8 @@ TEST_P(QuicDataStreamTest, ConnectionFlowControlViolation) {
return;
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
// Stream should not process data, so that data gets buffered in the
// sequencer, triggering flow control limits.
......
......@@ -379,14 +379,14 @@ QuicConnection* QuicDispatcher::CreateQuicConnection(
const IPEndPoint& server_address,
const IPEndPoint& client_address) {
if (FLAGS_enable_quic_stream_flow_control_2 &&
FLAGS_enable_quic_connection_flow_control) {
FLAGS_enable_quic_connection_flow_control_2) {
DVLOG(1) << "Creating QuicDispatcher with all versions.";
return new QuicConnection(connection_id, client_address, helper_,
writer_.get(), true, supported_versions_);
}
if (FLAGS_enable_quic_stream_flow_control_2 &&
!FLAGS_enable_quic_connection_flow_control) {
!FLAGS_enable_quic_connection_flow_control_2) {
DVLOG(1) << "Connection flow control disabled, creating QuicDispatcher "
<< "WITHOUT version 19 or higher.";
return new QuicConnection(connection_id, client_address, helper_,
......
......@@ -211,7 +211,7 @@ class QuicDispatcher : public QuicServerSessionVisitor {
// This is used to construct new QuicConnections when connection flow control
// is disabled via flag.
// TODO(rjshade): Remove this when
// FLAGS_enable_quic_connection_flow_control is removed.
// FLAGS_enable_quic_connection_flow_control_2 is removed.
QuicVersionVector supported_versions_no_connection_flow_control_;
// Information about the packet currently being handled.
......
......@@ -23,15 +23,14 @@ bool FLAGS_enable_quic_pacing = true;
// If true, turns on stream flow control in QUIC.
// If this is disabled, all in flight QUIC connections talking QUIC_VERSION_17
// or higher will timeout. New connections will be fine.
// If disabling this flag, also disable enable_quic_connection_flow_control.
// If disabling this flag, also disable enable_quic_connection_flow_control_2.
bool FLAGS_enable_quic_stream_flow_control_2 = true;
// Do not remove this flag until b/11792453 is marked as Fixed.
// If true, turns on connection level flow control in QUIC.
// If this is disabled, all in flight QUIC connections talking QUIC_VERSION_19
// or higher will timeout. New connections will be fine.
// Disabled due to b/15084203.
bool FLAGS_enable_quic_connection_flow_control = false;
bool FLAGS_enable_quic_connection_flow_control_2 = true;
bool FLAGS_quic_allow_oversized_packets_for_test = false;
......
......@@ -10,7 +10,7 @@
NET_EXPORT_PRIVATE extern bool FLAGS_track_retransmission_history;
NET_EXPORT_PRIVATE extern bool FLAGS_enable_quic_pacing;
NET_EXPORT_PRIVATE extern bool FLAGS_enable_quic_stream_flow_control_2;
NET_EXPORT_PRIVATE extern bool FLAGS_enable_quic_connection_flow_control;
NET_EXPORT_PRIVATE extern bool FLAGS_enable_quic_connection_flow_control_2;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_allow_oversized_packets_for_test;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_use_time_loss_detection;
NET_EXPORT_PRIVATE extern bool FLAGS_quic_allow_port_migration;
......
......@@ -181,7 +181,7 @@ void QuicFlowController::Disable() {
bool QuicFlowController::IsEnabled() const {
bool connection_flow_control_enabled =
(id_ == kConnectionLevelId &&
FLAGS_enable_quic_connection_flow_control);
FLAGS_enable_quic_connection_flow_control_2);
bool stream_flow_control_enabled =
(id_ != kConnectionLevelId &&
FLAGS_enable_quic_stream_flow_control_2);
......
......@@ -253,7 +253,7 @@ void QuicSession::OnWindowUpdateFrames(
DVLOG(1) << ENDPOINT
<< "Received connection level flow control window update with "
"byte offset: " << frames[i].byte_offset;
if (FLAGS_enable_quic_connection_flow_control &&
if (FLAGS_enable_quic_connection_flow_control_2 &&
flow_controller_->UpdateSendWindowOffset(frames[i].byte_offset)) {
connection_window_updated = true;
}
......@@ -413,7 +413,7 @@ void QuicSession::CloseStreamInner(QuicStreamId stream_id,
// received, for accurate connection level flow control accounting.
if (!stream->HasFinalReceivedByteOffset() &&
stream->flow_controller()->IsEnabled() &&
FLAGS_enable_quic_connection_flow_control) {
FLAGS_enable_quic_connection_flow_control_2) {
locally_closed_streams_highest_offset_[stream_id] =
stream->flow_controller()->highest_received_byte_offset();
}
......@@ -424,7 +424,7 @@ void QuicSession::CloseStreamInner(QuicStreamId stream_id,
void QuicSession::UpdateFlowControlOnFinalReceivedByteOffset(
QuicStreamId stream_id, QuicStreamOffset final_byte_offset) {
if (!FLAGS_enable_quic_connection_flow_control) {
if (!FLAGS_enable_quic_connection_flow_control_2) {
return;
}
......
......@@ -521,7 +521,8 @@ TEST_P(QuicSessionTest, OnCanWriteLimitsNumWritesIfFlowControlBlocked) {
return;
}
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
// Ensure connection level flow control blockage.
QuicFlowControllerPeer::SetSendWindowOffset(session_.flow_controller(), 0);
EXPECT_TRUE(session_.flow_controller()->IsBlocked());
......@@ -670,7 +671,8 @@ TEST_P(QuicSessionTest, ConnectionFlowControlAccountingRstOutOfOrder) {
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
// Test that when we receive an out of order stream RST we correctly adjust
// our connection level flow control receive window.
// On close, the stream should mark as consumed all bytes between the highest
......@@ -698,7 +700,8 @@ TEST_P(QuicSessionTest, ConnectionFlowControlAccountingFinAndLocalReset) {
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
// Test the situation where we receive a FIN on a stream, and before we fully
// consume all the data from the sequencer buffer we locally RST the stream.
// The bytes between highest consumed byte, and the final byte offset that we
......@@ -739,7 +742,8 @@ TEST_P(QuicSessionTest, ConnectionFlowControlAccountingFinAfterRst) {
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
// Connection starts with some non-zero highest received byte offset,
// due to other active streams.
const uint64 kInitialConnectionBytesConsumed = 567;
......@@ -783,7 +787,8 @@ TEST_P(QuicSessionTest, ConnectionFlowControlAccountingRstAfterRst) {
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
// Connection starts with some non-zero highest received byte offset,
// due to other active streams.
const uint64 kInitialConnectionBytesConsumed = 567;
......@@ -819,7 +824,8 @@ TEST_P(QuicSessionTest, FlowControlWithInvalidFinalOffset) {
return;
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
const uint64 kLargeOffset = kInitialFlowControlWindowForTest + 1;
EXPECT_CALL(*connection_,
......@@ -846,7 +852,8 @@ TEST_P(QuicSessionTest, VersionNegotiationDisablesFlowControl) {
}
ValueRestore<bool> old_flag2(&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control, true);
ValueRestore<bool> old_flag(&FLAGS_enable_quic_connection_flow_control_2,
true);
// Test that after successful version negotiation, flow control is disabled
// appropriately at both the connection and stream level.
......
......@@ -471,7 +471,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithQuicAckNotifier) {
// Set a large flow control send window so this doesn't interfere with test.
stream_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
if (FLAGS_enable_quic_connection_flow_control) {
if (FLAGS_enable_quic_connection_flow_control_2) {
session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
}
......@@ -526,7 +526,7 @@ TEST_F(ReliableQuicStreamTest, WriteOrBufferDataAckNotificationBeforeFlush) {
// Set a large flow control send window so this doesn't interfere with test.
stream_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
if (FLAGS_enable_quic_connection_flow_control) {
if (FLAGS_enable_quic_connection_flow_control_2) {
session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
}
......@@ -637,7 +637,7 @@ TEST_F(ReliableQuicStreamTest,
ValueRestore<bool> old_stream_flag(
&FLAGS_enable_quic_stream_flow_control_2, true);
ValueRestore<bool> old_connection_flag(
&FLAGS_enable_quic_connection_flow_control, true);
&FLAGS_enable_quic_connection_flow_control_2, true);
Initialize(kShouldProcessData);
......
......@@ -173,7 +173,7 @@ class EndToEndTest : public ::testing::TestWithParam<TestParams> {
FLAGS_enable_quic_stream_flow_control_2 = true;
}
if (negotiated_version_ >= QUIC_VERSION_19) {
FLAGS_enable_quic_connection_flow_control = true;
FLAGS_enable_quic_connection_flow_control_2 = true;
}
VLOG(1) << "Using Configuration: " << GetParam();
......
......@@ -390,14 +390,14 @@ QuicConnection* QuicDispatcher::CreateQuicConnection(
const IPEndPoint& server_address,
const IPEndPoint& client_address) {
if (FLAGS_enable_quic_stream_flow_control_2 &&
FLAGS_enable_quic_connection_flow_control) {
FLAGS_enable_quic_connection_flow_control_2) {
DLOG(INFO) << "Creating QuicDispatcher with all versions.";
return new QuicConnection(connection_id, client_address, helper_.get(),
writer_.get(), true, supported_versions_);
}
if (FLAGS_enable_quic_stream_flow_control_2 &&
!FLAGS_enable_quic_connection_flow_control) {
!FLAGS_enable_quic_connection_flow_control_2) {
DLOG(INFO) << "Connection flow control disabled, creating QuicDispatcher "
<< "WITHOUT version 19 or higher.";
return new QuicConnection(connection_id, client_address, helper_.get(),
......
......@@ -222,7 +222,7 @@ class QuicDispatcher : public QuicServerSessionVisitor {
// This is used to construct new QuicConnections when connection flow control
// is disabled via flag.
// TODO(rjshade): Remove this when
// FLAGS_enable_quic_connection_flow_control is removed.
// FLAGS_enable_quic_connection_flow_control_2 is removed.
QuicVersionVector supported_versions_no_connection_flow_control_;
// Information about the packet currently being handled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment