[email protected] | 9bb57c7 | 2014-03-31 20:36:04 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "net/quic/quic_flags.h" |
| 6 | |
[email protected] | 9bb57c7 | 2014-03-31 20:36:04 | [diff] [blame] | 7 | bool FLAGS_quic_allow_oversized_packets_for_test = false; |
[email protected] | 6d9ca3b | 2014-05-13 07:44:22 | [diff] [blame] | 8 | |
[email protected] | c5cc9bd | 2014-03-31 23:17:14 | [diff] [blame] | 9 | // When true, the use time based loss detection instead of nack. |
| 10 | bool FLAGS_quic_use_time_loss_detection = false; |
[email protected] | 6d9ca3b | 2014-05-13 07:44:22 | [diff] [blame] | 11 | |
[email protected] | 19886aaf | 2014-06-19 23:03:18 | [diff] [blame] | 12 | // If true, it will return as soon as an error is detected while validating |
| 13 | // CHLO. |
| 14 | bool FLAGS_use_early_return_when_verifying_chlo = true; |
| 15 | |
[email protected] | cc1aa27 | 2014-06-30 19:48:22 | [diff] [blame] | 16 | // If true, QUIC connections will support FEC protection of data while sending |
| 17 | // packets, to reduce latency of data delivery to the application. The client |
| 18 | // must also request FEC protection for the server to use FEC. |
| 19 | bool FLAGS_enable_quic_fec = false; |
[email protected] | 9693157b | 2014-08-08 11:13:49 | [diff] [blame] | 20 | |
[email protected] | 672631c | 2014-08-16 06:11:45 | [diff] [blame] | 21 | // When true, defaults to BBR congestion control instead of Cubic. |
| 22 | bool FLAGS_quic_use_bbr_congestion_control = false; |
rtenneti | 31e9fd6 | 2014-09-16 05:22:15 | [diff] [blame] | 23 | |
rtenneti | 08b01438 | 2014-10-29 14:03:19 | [diff] [blame] | 24 | // If true, QUIC BBR congestion control may be enabled via Finch and/or via QUIC |
| 25 | // connection options. |
| 26 | bool FLAGS_quic_allow_bbr = false; |
rtenneti | 2318668 | 2014-10-30 01:49:33 | [diff] [blame] | 27 | |
rtenneti | f4bdb54 | 2015-01-21 14:33:05 | [diff] [blame] | 28 | // Time period for which a given connection_id should live in the time-wait |
| 29 | // state. |
rtenneti | 581b6ae8 | 2015-07-20 20:48:01 | [diff] [blame] | 30 | int64 FLAGS_quic_time_wait_list_seconds = 200; |
rtenneti | f4bdb54 | 2015-01-21 14:33:05 | [diff] [blame] | 31 | |
| 32 | // Currently, this number is quite conservative. The max QPS limit for an |
| 33 | // individual server silo is currently set to 1000 qps, though the actual max |
rtenneti | 581b6ae8 | 2015-07-20 20:48:01 | [diff] [blame] | 34 | // that we see in the wild is closer to 450 qps. Regardless, this means that |
| 35 | // the longest time-wait list we should see is 200 seconds * 1000 qps = 200000. |
| 36 | // Of course, there are usually many queries per QUIC connection, so we allow a |
| 37 | // factor of 3 leeway. |
rtenneti | f4bdb54 | 2015-01-21 14:33:05 | [diff] [blame] | 38 | // |
| 39 | // Maximum number of connections on the time-wait list. A negative value implies |
| 40 | // no configured limit. |
rtenneti | 581b6ae8 | 2015-07-20 20:48:01 | [diff] [blame] | 41 | int64 FLAGS_quic_time_wait_list_max_connections = 600000; |
rtenneti | f4bdb54 | 2015-01-21 14:33:05 | [diff] [blame] | 42 | |
rtenneti | e0ee6eb | 2015-05-01 00:55:09 | [diff] [blame] | 43 | // Enables server-side support for QUIC stateless rejects. |
rtenneti | 1ab11fb | 2015-07-01 17:29:54 | [diff] [blame] | 44 | bool FLAGS_enable_quic_stateless_reject_support = true; |
rtenneti | a2ea916 | 2015-05-15 19:26:44 | [diff] [blame] | 45 | |
zhongyi | b867702 | 2015-12-01 05:51:30 | [diff] [blame^] | 46 | // If ture, allow Ack Decimation to be used for QUIC when requested by the |
| 47 | // client connection option ACKD. |
| 48 | bool FLAGS_quic_ack_decimation = true; |
| 49 | |
rtenneti | d39bd76 | 2015-06-12 01:05:52 | [diff] [blame] | 50 | // If true, flow controller may grow the receive window size if necessary. |
| 51 | bool FLAGS_quic_auto_tune_receive_window = true; |
| 52 | |
zhongyi | b867702 | 2015-12-01 05:51:30 | [diff] [blame^] | 53 | // If true, record received connection options to TransportConnectionStats. |
| 54 | bool FLAGS_quic_connection_options_to_transport_stats = true; |
| 55 | |
rtenneti | 581b6ae8 | 2015-07-20 20:48:01 | [diff] [blame] | 56 | // Limits QUIC's max CWND to 200 packets. |
| 57 | bool FLAGS_quic_limit_max_cwnd = true; |
rtenneti | 852d6fb4 | 2015-07-24 23:09:22 | [diff] [blame] | 58 | |
rtenneti | 44f4a2e | 2015-08-07 14:00:07 | [diff] [blame] | 59 | // If true, require handshake confirmation for QUIC connections, functionally |
| 60 | // disabling 0-rtt handshakes. |
rtenneti | 5ca6eee | 2015-10-15 21:54:30 | [diff] [blame] | 61 | // TODO(rtenneti): Enable this flag after CryptoServerTest's are fixed. |
rtenneti | 44f4a2e | 2015-08-07 14:00:07 | [diff] [blame] | 62 | bool FLAGS_quic_require_handshake_confirmation = false; |
rtenneti | 9bd5d4b | 2015-08-21 05:44:52 | [diff] [blame] | 63 | |
rtenneti | 48f371c68 | 2015-08-27 05:34:26 | [diff] [blame] | 64 | // If true, after a server silo receives a packet from a migrated QUIC |
| 65 | // client, a GO_AWAY frame is sent to the client. |
| 66 | bool FLAGS_send_goaway_after_client_migration = true; |
rtenneti | a8fb60cb | 2015-09-10 18:17:57 | [diff] [blame] | 67 | |
rtenneti | 4efd55dd | 2015-09-18 01:12:04 | [diff] [blame] | 68 | // If true, use an interval set as the internal representation of a packet queue |
| 69 | // instead of a set. |
| 70 | bool FLAGS_quic_packet_queue_use_interval_set = true; |
rtenneti | 159828f | 2015-10-13 06:58:09 | [diff] [blame] | 71 | |
| 72 | // If true, Cubic's epoch is shifted when the sender is application-limited. |
| 73 | bool FLAGS_shift_quic_cubic_epoch_when_app_limited = true; |
| 74 | |
ckrasic | 99850b3 | 2015-10-16 21:15:58 | [diff] [blame] | 75 | // If true, QUIC will measure head of line (HOL) blocking due between |
| 76 | // streams due to packet losses on the headers stream. The |
| 77 | // measurements will be surfaced via UMA histogram |
| 78 | // Net.QuicSession.HeadersHOLBlockedTime. |
| 79 | bool FLAGS_quic_measure_headers_hol_blocking_time = true; |
rtenneti | 8a4a073 | 2015-10-18 00:45:51 | [diff] [blame] | 80 | |
rtenneti | 7113320 | 2015-10-19 20:24:01 | [diff] [blame] | 81 | // Disable QUIC's userspace pacing. |
| 82 | bool FLAGS_quic_disable_pacing = false; |
rtenneti | 1535e3a | 2015-10-20 06:14:20 | [diff] [blame] | 83 | |
zhongyi | 1fb9bc5 | 2015-11-24 23:09:42 | [diff] [blame] | 84 | // If true, Use QUIC's GeneralLossAlgorithm implementation instead of |
| 85 | // TcpLossAlgorithm or TimeLossAlgorithm. |
| 86 | bool FLAGS_quic_general_loss_algorithm = true; |
| 87 | |
rtenneti | 8dd12b2 | 2015-10-21 01:26:38 | [diff] [blame] | 88 | // Invoke the QuicAckListener directly, instead of going through the AckNotifier |
| 89 | // and AckNotifierManager. |
| 90 | bool FLAGS_quic_no_ack_notifier = true; |
ckrasic | ea295fe | 2015-10-31 05:03:27 | [diff] [blame] | 91 | |
ckrasic | ea295fe | 2015-10-31 05:03:27 | [diff] [blame] | 92 | // If true, use the unrolled prefetch path in QuicPacketCreator::CopyToBuffer. |
| 93 | bool FLAGS_quic_packet_creator_prefetch = false; |
rch | 99b644c | 2015-11-04 05:25:28 | [diff] [blame] | 94 | |
| 95 | // If true, only migrate QUIC connections when client address changes are |
| 96 | // considered to be caused by NATs. |
| 97 | bool FLAGS_quic_disable_non_nat_address_migration = true; |
rch | 8a71b7e | 2015-11-06 23:58:19 | [diff] [blame] | 98 | |
| 99 | // If true, QUIC connections will timeout when packets are not being recieved, |
| 100 | // even if they are being sent. |
| 101 | bool FLAGS_quic_use_new_idle_timeout = true; |
rjshade | c86dbfa | 2015-11-12 20:16:25 | [diff] [blame] | 102 | |
| 103 | // If true, replace QuicFrameList with StreamSequencerBuffer as underlying data |
| 104 | // structure for QuicStreamSequencer bufferring. |
| 105 | bool FLAGS_quic_use_stream_sequencer_buffer = true; |
| 106 | |
| 107 | // If true, don't send QUIC packets if the send alarm is set. |
ianswett | 0888cff | 2015-11-24 17:42:16 | [diff] [blame] | 108 | bool FLAGS_quic_respect_send_alarm = true; |
| 109 | |
zhongyi | b867702 | 2015-12-01 05:51:30 | [diff] [blame^] | 110 | // If ture, sets callback pointer to nullptr after calling Cancel() in |
| 111 | // QuicCryptoServerStream::CancelOutstandingCallbacks. |
| 112 | bool FLAGS_quic_set_client_hello_cb_nullptr = true; |
| 113 | |
zhongyi | 1fb9bc5 | 2015-11-24 23:09:42 | [diff] [blame] | 114 | // If treu, Only track a single retransmission in QUIC's TransmissionInfo |
| 115 | // struct. |
| 116 | bool FLAGS_quic_track_single_retransmission = true; |
| 117 | |
ianswett | 0888cff | 2015-11-24 17:42:16 | [diff] [blame] | 118 | // If true, allow each quic stream to write 16k blocks rather than doing a round |
| 119 | // robin of one packet per session when ack clocked or paced. |
| 120 | bool FLAGS_quic_batch_writes = true; |