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