| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_flags.h" | 5 #include "net/quic/core/quic_flags.h" |
| 6 | 6 |
| 7 // If true, it will return as soon as an error is detected while validating | 7 #define QUIC_FLAG(type, flag, value) type flag = value; |
| 8 // CHLO. | 8 #include "net/quic/core/quic_flags_list.h" |
| 9 bool FLAGS_use_early_return_when_verifying_chlo = true; | 9 #undef QUIC_FLAG |
| 10 | |
| 11 // If true, QUIC BBR congestion control may be enabled via Finch and/or via QUIC | |
| 12 // connection options. | |
| 13 bool FLAGS_quic_allow_bbr = false; | |
| 14 | |
| 15 // Time period for which a given connection_id should live in the time-wait | |
| 16 // state. | |
| 17 int64_t FLAGS_quic_time_wait_list_seconds = 200; | |
| 18 | |
| 19 // Currently, this number is quite conservative. The max QPS limit for an | |
| 20 // individual server silo is currently set to 1000 qps, though the actual max | |
| 21 // that we see in the wild is closer to 450 qps. Regardless, this means that | |
| 22 // the longest time-wait list we should see is 200 seconds * 1000 qps = 200000. | |
| 23 // Of course, there are usually many queries per QUIC connection, so we allow a | |
| 24 // factor of 3 leeway. | |
| 25 // | |
| 26 // Maximum number of connections on the time-wait list. A negative value implies | |
| 27 // no configured limit. | |
| 28 int64_t FLAGS_quic_time_wait_list_max_connections = 600000; | |
| 29 | |
| 30 // Enables server-side support for QUIC stateless rejects. | |
| 31 bool FLAGS_enable_quic_stateless_reject_support = true; | |
| 32 | |
| 33 // This flag is not in use, just to keep consistency for shared code. | |
| 34 bool FLAGS_quic_always_log_bugs_for_tests = true; | |
| 35 | |
| 36 // If true, multipath is enabled for the connection. | |
| 37 bool FLAGS_quic_enable_multipath = false; | |
| 38 | |
| 39 // If true, require handshake confirmation for QUIC connections, functionally | |
| 40 // disabling 0-rtt handshakes. | |
| 41 // TODO(rtenneti): Enable this flag after CryptoServerTest's are fixed. | |
| 42 bool FLAGS_quic_require_handshake_confirmation = false; | |
| 43 | |
| 44 // If true, Cubic's epoch is shifted when the sender is application-limited. | |
| 45 bool FLAGS_shift_quic_cubic_epoch_when_app_limited = true; | |
| 46 | |
| 47 // If true, QUIC will measure head of line (HOL) blocking due between | |
| 48 // streams due to packet losses on the headers stream. The | |
| 49 // measurements will be surfaced via UMA histogram | |
| 50 // Net.QuicSession.HeadersHOLBlockedTime. | |
| 51 bool FLAGS_quic_measure_headers_hol_blocking_time = true; | |
| 52 | |
| 53 // If true, disable pacing in QUIC. | |
| 54 bool FLAGS_quic_disable_pacing_for_perf_tests = false; | |
| 55 | |
| 56 // If true, Close the connection instead of writing unencrypted stream data. | |
| 57 bool FLAGS_quic_never_write_unencrypted_data = true; | |
| 58 | |
| 59 // If true, QUIC connections can do bandwidth resumption with an initial window | |
| 60 // of < 10 packets. | |
| 61 bool FLAGS_quic_no_lower_bw_resumption_limit = true; | |
| 62 | |
| 63 // Use largest acked in the most recent ack instead of largest acked ever in | |
| 64 // loss recovery. | |
| 65 bool FLAGS_quic_loss_recovery_use_largest_acked = true; | |
| 66 | |
| 67 // Only set one alarm for sending at once, either the send alarm or | |
| 68 // retransmission alarm. Disabled because it breaks QUIC time loss detection. | |
| 69 bool FLAGS_quic_only_one_sending_alarm = false; | |
| 70 | |
| 71 // If true, QUIC public reset packets will have the \"pre-v33\" public header | |
| 72 // flags. | |
| 73 bool FLAGS_quic_use_old_public_reset_packets = true; | |
| 74 | |
| 75 // If true, QUIC will use cheap stateless rejects without creating a full | |
| 76 // connection. | |
| 77 bool FLAGS_quic_use_cheap_stateless_rejects = false; | |
| 78 | |
| 79 // If true, QUIC respect HTTP2 SETTINGS frame rather than always close the | |
| 80 // connection. | |
| 81 bool FLAGS_quic_respect_http2_settings_frame = true; | |
| 82 | |
| 83 // If true, enables QUIC_VERSION_35. | |
| 84 bool FLAGS_quic_enable_version_35 = true; | |
| 85 | |
| 86 // If true, re-enables QUIC_VERSION_36. | |
| 87 bool FLAGS_quic_enable_version_36 = true; | |
| 88 | |
| 89 // If true, enables QUIC_VERSION_36. | |
| 90 bool FLAGS_quic_enable_version_36_v2 = false; | |
| 91 | |
| 92 // If true, use async codepaths to invoke ProofSource::GetProof. | |
| 93 bool FLAGS_enable_async_get_proof = false; | |
| 94 | |
| 95 // If true, neuter null encrypted packets before sending the next handshake | |
| 96 // message. | |
| 97 bool FLAGS_quic_neuter_unencrypted_when_sending = true; | |
| 98 | |
| 99 // If true, QuicAlarm::Update will call a faster UpdateImpl implementation | |
| 100 // instead of canceling and reregistering the alarm. | |
| 101 bool FLAGS_quic_change_alarms_efficiently = true; | |
| 102 | |
| 103 // If true, requires handshake confirmations for all QUIC handshakes with | |
| 104 // versions less than 33. | |
| 105 bool FLAGS_quic_require_handshake_confirmation_pre33 = false; | |
| 106 | |
| 107 // If true, fix a bug with which QuicStreamSequencerBuffer can\'t release block | |
| 108 // memory in time. | |
| 109 bool FLAGS_quic_sequencer_buffer_retire_block_in_time = true; | |
| 110 | |
| 111 // Remove obsolete code to force QUIC to go forward secure, now that the server | |
| 112 // immediately goes forward secure. | |
| 113 bool FLAGS_quic_remove_obsolete_forward_secure = true; | |
| 114 | |
| 115 // If true, close QUIC connection explicitly on write error due to packet being | |
| 116 // too large. | |
| 117 bool FLAGS_quic_close_connection_on_packet_too_large = true; | |
| 118 | |
| 119 // If true, close the write side of a QUIC spdy stream when all queued bytes | |
| 120 // have been written and a FIN has been sent. | |
| 121 bool FLAGS_quic_close_stream_after_writing_queued_data = true; | |
| 122 | |
| 123 // If true, close connection with QUIC_TOO_MANY_FRAME_GAPS error when number of | |
| 124 // gaps in QuicStreamSequenceBuffer exceeds allowed limit. | |
| 125 bool FLAGS_quic_limit_frame_gaps_in_buffer = true; | |
| 126 | |
| 127 // If true, v33 QUIC client uses 1 bit to specify 8-byte connection id in public | |
| 128 // flag. | |
| 129 bool FLAGS_quic_remove_v33_hacks = true; | |
| 130 | |
| 131 // If true, use the CHLO packet size, not message size when determining how | |
| 132 // large a REJ can be. | |
| 133 bool FLAGS_quic_use_chlo_packet_size = false; | |
| 134 | |
| 135 // If true, defer creation of new connection till its CHLO arrives. | |
| 136 bool FLAGS_quic_buffer_packet_till_chlo = false; | |
| 137 | |
| 138 // If true, the connection will check whether it is application-limited, and | |
| 139 // notify the congestion controller about it. | |
| 140 bool FLAGS_quic_enable_app_limited_check = true; | |
| 141 | |
| 142 // Deprecate QuicPacketCreator::next_packet_number_length_ because it's no | |
| 143 // longer necessary. | |
| 144 bool FLAGS_quic_simple_packet_number_length_2 = true; | |
| 145 | |
| 146 // If true, disables QUIC version less than 32. | |
| 147 bool FLAGS_quic_disable_pre_32 = false; | |
| 148 | |
| 149 // If true, QUIC will enforce the MTU limit for connections that may require a | |
| 150 // small MTU. | |
| 151 bool FLAGS_quic_enforce_mtu_limit = false; | |
| 152 | |
| 153 // Disable MTU probing if MTU probe causes ERR_MSG_TOO_BIG instead of aborting | |
| 154 // the connection. | |
| 155 bool FLAGS_graceful_emsgsize_on_mtu_probe = true; | |
| 156 | |
| 157 // If true, do not force sending ack when connection is closed because of | |
| 158 // message too long (EMSGSIZE) write error. | |
| 159 bool FLAGS_quic_do_not_send_ack_on_emsgsize = true; | |
| 160 | |
| 161 // If true, postpone multipath flag validation to ProcessValidatedPacket. | |
| 162 bool FLAGS_quic_postpone_multipath_flag_validation = true; | |
| 163 | |
| 164 // If true, set a QUIC connection's last_sent_for_timeout_ to the send time of | |
| 165 // the first packet sent after receiving a packet, even if the sent packet is | |
| 166 // a retransmission | |
| 167 bool FLAGS_quic_better_last_send_for_timeout = true; | |
| OLD | NEW |