• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // NOLINT(build/header_guard)
6 // This file intentionally does not have header guards, it's intended to be
7 // included multiple times, each time with a different definition of
8 // QUIC_PROTOCOL_FLAG.
9 
10 #if defined(QUIC_PROTOCOL_FLAG)
11 
12 QUIC_PROTOCOL_FLAG(
13     bool, quic_allow_chlo_buffering, true,
14     "If true, allows packets to be buffered in anticipation of a "
15     "future CHLO, and allow CHLO packets to be buffered until next "
16     "iteration of the event loop.")
17 
18 QUIC_PROTOCOL_FLAG(bool, quic_disable_pacing_for_perf_tests, false,
19                    "If true, disable pacing in QUIC")
20 
21 // Note that single-packet CHLOs are only enforced for Google QUIC versions that
22 // do not use CRYPTO frames. This currently means only Q043 and Q046. All other
23 // versions of QUIC (both Google QUIC and IETF) allow multi-packet CHLOs
24 // regardless of the value of this flag.
25 QUIC_PROTOCOL_FLAG(bool, quic_enforce_single_packet_chlo, true,
26                    "If true, enforce that sent QUIC CHLOs fit in one packet. "
27                    "Only applies to Q043 and Q046.")
28 
29 // Currently, this number is quite conservative.  At a hypothetical 1000 qps,
30 // this means that the longest time-wait list we should see is:
31 //   200 seconds * 1000 qps = 200000.
32 // Of course, there are usually many queries per QUIC connection, so we allow a
33 // factor of 3 leeway.
34 QUIC_PROTOCOL_FLAG(int64_t, quic_time_wait_list_max_connections, 600000,
35                    "Maximum number of connections on the time-wait list.  "
36                    "A negative value implies no configured limit.")
37 
38 QUIC_PROTOCOL_FLAG(int64_t, quic_time_wait_list_seconds, 200,
39                    "Time period for which a given connection_id should live in "
40                    "the time-wait state.")
41 
42 // This number is relatively conservative. For example, there are at most 1K
43 // queued stateless resets, which consume 1K * 21B = 21KB.
44 QUIC_PROTOCOL_FLAG(
45     uint64_t, quic_time_wait_list_max_pending_packets, 1024,
46     "Upper limit of pending packets in time wait list when writer is blocked.")
47 
48 // Stop sending a reset if the recorded number of addresses that server has
49 // recently sent stateless reset to exceeds this limit.
50 QUIC_PROTOCOL_FLAG(uint64_t, quic_max_recent_stateless_reset_addresses, 1024,
51                    "Max number of recorded recent reset addresses.")
52 
53 // After this timeout, recent reset addresses will be cleared.
54 // FLAGS_quic_max_recent_stateless_reset_addresses * (1000ms /
55 // FLAGS_quic_recent_stateless_reset_addresses_lifetime_ms) is roughly the max
56 // reset per second. For example, 1024 * (1000ms / 1000ms) = 1K reset per
57 // second.
58 QUIC_PROTOCOL_FLAG(
59     uint64_t, quic_recent_stateless_reset_addresses_lifetime_ms, 1000,
60     "Max time that a client address lives in recent reset addresses set.")
61 
62 QUIC_PROTOCOL_FLAG(double, quic_bbr_cwnd_gain, 2.0f,
63                    "Congestion window gain for QUIC BBR during PROBE_BW phase.")
64 
65 QUIC_PROTOCOL_FLAG(
66     int32_t, quic_buffered_data_threshold, 8 * 1024,
67     "If buffered data in QUIC stream is less than this "
68     "threshold, buffers all provided data or asks upper layer for more data")
69 
70 QUIC_PROTOCOL_FLAG(
71     uint64_t, quic_send_buffer_max_data_slice_size, 4 * 1024,
72     "Max size of data slice in bytes for QUIC stream send buffer.")
73 
74 QUIC_PROTOCOL_FLAG(
75     int32_t, quic_lumpy_pacing_size, 2,
76     "Number of packets that the pacing sender allows in bursts during "
77     "pacing. This flag is ignored if a flow's estimated bandwidth is "
78     "lower than 1200 kbps.")
79 
80 QUIC_PROTOCOL_FLAG(
81     double, quic_lumpy_pacing_cwnd_fraction, 0.25f,
82     "Congestion window fraction that the pacing sender allows in bursts "
83     "during pacing.")
84 
85 QUIC_PROTOCOL_FLAG(
86     int32_t, quic_lumpy_pacing_min_bandwidth_kbps, 1200,
87     "The minimum estimated client bandwidth below which the pacing sender will "
88     "not allow bursts.")
89 
90 QUIC_PROTOCOL_FLAG(int32_t, quic_max_pace_time_into_future_ms, 10,
91                    "Max time that QUIC can pace packets into the future in ms.")
92 
93 QUIC_PROTOCOL_FLAG(
94     double, quic_pace_time_into_future_srtt_fraction,
95     0.125f,  // One-eighth smoothed RTT
96     "Smoothed RTT fraction that a connection can pace packets into the future.")
97 
98 QUIC_PROTOCOL_FLAG(bool, quic_export_write_path_stats_at_server, false,
99                    "If true, export detailed write path statistics at server.")
100 
101 QUIC_PROTOCOL_FLAG(bool, quic_disable_version_negotiation_grease_randomness,
102                    false,
103                    "If true, use predictable version negotiation versions.")
104 
105 QUIC_PROTOCOL_FLAG(bool, quic_enable_http3_grease_randomness, true,
106                    "If true, use random greased settings and frames.")
107 
108 QUIC_PROTOCOL_FLAG(int64_t, quic_max_tracked_packet_count, 10000,
109                    "Maximum number of tracked packets.")
110 
111 QUIC_PROTOCOL_FLAG(
112     bool, quic_client_convert_http_header_name_to_lowercase, true,
113     "If true, HTTP request header names sent from QuicSpdyClientBase(and "
114     "descendents) will be automatically converted to lower case.")
115 
116 QUIC_PROTOCOL_FLAG(
117     int32_t, quic_bbr2_default_probe_bw_base_duration_ms, 2000,
118     "The default minimum duration for BBRv2-native probes, in milliseconds.")
119 
120 QUIC_PROTOCOL_FLAG(
121     int32_t, quic_bbr2_default_probe_bw_max_rand_duration_ms, 1000,
122     "The default upper bound of the random amount of BBRv2-native "
123     "probes, in milliseconds.")
124 
125 QUIC_PROTOCOL_FLAG(
126     int32_t, quic_bbr2_default_probe_rtt_period_ms, 10000,
127     "The default period for entering PROBE_RTT, in milliseconds.")
128 
129 QUIC_PROTOCOL_FLAG(
130     double, quic_bbr2_default_loss_threshold, 0.02,
131     "The default loss threshold for QUIC BBRv2, should be a value "
132     "between 0 and 1.")
133 
134 QUIC_PROTOCOL_FLAG(
135     int32_t, quic_bbr2_default_startup_full_loss_count, 8,
136     "The default minimum number of loss marking events to exit STARTUP.")
137 
138 QUIC_PROTOCOL_FLAG(
139     int32_t, quic_bbr2_default_probe_bw_full_loss_count, 2,
140     "The default minimum number of loss marking events to exit PROBE_UP phase.")
141 
142 QUIC_PROTOCOL_FLAG(
143     double, quic_bbr2_default_inflight_hi_headroom, 0.15,
144     "The default fraction of unutilized headroom to try to leave in path "
145     "upon high loss.")
146 
147 QUIC_PROTOCOL_FLAG(
148     int32_t, quic_bbr2_default_initial_ack_height_filter_window, 10,
149     "The default initial value of the max ack height filter's window length.")
150 
151 QUIC_PROTOCOL_FLAG(
152     double, quic_ack_aggregation_bandwidth_threshold, 1.0,
153     "If the bandwidth during ack aggregation is smaller than (estimated "
154     "bandwidth * this flag), consider the current aggregation completed "
155     "and starts a new one.")
156 
157 QUIC_PROTOCOL_FLAG(
158     int32_t, quic_anti_amplification_factor, 3,
159     "Anti-amplification factor. Before address validation, server will "
160     "send no more than factor times bytes received.")
161 
162 QUIC_PROTOCOL_FLAG(
163     int32_t, quic_max_buffered_crypto_bytes,
164     16 * 1024,  // 16 KB
165     "The maximum amount of CRYPTO frame data that can be buffered.")
166 
167 QUIC_PROTOCOL_FLAG(
168     int32_t, quic_max_aggressive_retransmittable_on_wire_ping_count, 5,
169     "Maximum number of consecutive pings that can be sent with the "
170     "aggressive initial retransmittable on the wire timeout if there is "
171     "no new stream data received. After this limit, the timeout will be "
172     "doubled each ping until it exceeds the default ping timeout.")
173 
174 QUIC_PROTOCOL_FLAG(
175     int32_t, quic_max_retransmittable_on_wire_ping_count, 1000,
176     "Maximum number of pings that can be sent with the retransmittable "
177     "on the wire timeout, over the lifetime of a connection. After this "
178     "limit, the timeout will be the default ping timeout.")
179 
180 QUIC_PROTOCOL_FLAG(int32_t, quic_max_congestion_window, 2000,
181                    "The maximum congestion window in packets.")
182 
183 QUIC_PROTOCOL_FLAG(
184     int32_t, quic_max_streams_window_divisor, 2,
185     "The divisor that controls how often MAX_STREAMS frame is sent.")
186 
187 QUIC_PROTOCOL_FLAG(
188     uint64_t, quic_key_update_confidentiality_limit, 0,
189     "If non-zero and key update is allowed, the maximum number of "
190     "packets sent for each key phase before initiating a key update.")
191 
192 QUIC_PROTOCOL_FLAG(bool, quic_disable_client_tls_zero_rtt, false,
193                    "If true, QUIC client with TLS will not try 0-RTT.")
194 
195 QUIC_PROTOCOL_FLAG(bool, quic_disable_server_tls_resumption, false,
196                    "If true, QUIC server will disable TLS resumption by not "
197                    "issuing or processing session tickets.")
198 
199 QUIC_PROTOCOL_FLAG(bool, quic_defer_send_in_response, true,
200                    "If true, QUIC servers will defer sending in response to "
201                    "incoming packets by default.")
202 
203 QUIC_PROTOCOL_FLAG(
204     bool, quic_header_size_limit_includes_overhead, true,
205     "If true, QUIC QPACK decoder includes 32-bytes overheader per entry while "
206     "comparing request/response header size against its upper limit.")
207 
208 QUIC_PROTOCOL_FLAG(
209     bool, quic_reject_retry_token_in_initial_packet, false,
210     "If true, always reject retry_token received in INITIAL packets")
211 
212 QUIC_PROTOCOL_FLAG(bool, quic_use_lower_server_response_mtu_for_test, false,
213                    "If true, cap server response packet size at 1250.")
214 
215 QUIC_PROTOCOL_FLAG(bool, quic_enforce_strict_amplification_factor, false,
216                    "If true, enforce strict amplification factor")
217 
218 QUIC_PROTOCOL_FLAG(bool, quic_bounded_crypto_send_buffer, false,
219                    "If true, close the connection if a crypto send buffer "
220                    "exceeds its size limit.")
221 
222 QUIC_PROTOCOL_FLAG(bool, quic_interval_set_enable_add_optimization, true,
223                    "If true, enable an optimization in QuicIntervalSet")
224 
225 QUIC_PROTOCOL_FLAG(
226     bool, quic_enable_chaos_protection, true,
227     "If true, use chaos protection to randomize client initials.")
228 
229 #endif
230