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