[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 | |
rtenneti | d39bd76 | 2015-06-12 01:05:52 | [diff] [blame] | 46 | // If true, flow controller may grow the receive window size if necessary. |
| 47 | bool FLAGS_quic_auto_tune_receive_window = true; |
| 48 | |
rtenneti | 581b6ae8 | 2015-07-20 20:48:01 | [diff] [blame] | 49 | // Limits QUIC's max CWND to 200 packets. |
| 50 | bool FLAGS_quic_limit_max_cwnd = true; |
rtenneti | 852d6fb4 | 2015-07-24 23:09:22 | [diff] [blame] | 51 | |
rtenneti | 44f4a2e | 2015-08-07 14:00:07 | [diff] [blame] | 52 | // If true, require handshake confirmation for QUIC connections, functionally |
| 53 | // disabling 0-rtt handshakes. |
rtenneti | 5ca6eee | 2015-10-15 21:54:30 | [diff] [blame] | 54 | // TODO(rtenneti): Enable this flag after CryptoServerTest's are fixed. |
rtenneti | 44f4a2e | 2015-08-07 14:00:07 | [diff] [blame] | 55 | bool FLAGS_quic_require_handshake_confirmation = false; |
rtenneti | 9bd5d4b | 2015-08-21 05:44:52 | [diff] [blame] | 56 | |
rtenneti | 48f371c68 | 2015-08-27 05:34:26 | [diff] [blame] | 57 | // If true, after a server silo receives a packet from a migrated QUIC |
| 58 | // client, a GO_AWAY frame is sent to the client. |
| 59 | bool FLAGS_send_goaway_after_client_migration = true; |
rtenneti | a8fb60cb | 2015-09-10 18:17:57 | [diff] [blame] | 60 | |
rtenneti | 33106d1c | 2015-09-16 16:53:24 | [diff] [blame] | 61 | // QUIC-specific flag. If true, Cubic's epoch is reset when the sender is |
| 62 | // application-limited. |
| 63 | bool FLAGS_reset_cubic_epoch_when_app_limited = true; |
rtenneti | 4efd55dd | 2015-09-18 01:12:04 | [diff] [blame] | 64 | |
| 65 | // If true, use an interval set as the internal representation of a packet queue |
| 66 | // instead of a set. |
| 67 | bool FLAGS_quic_packet_queue_use_interval_set = true; |
rtenneti | 159828f | 2015-10-13 06:58:09 | [diff] [blame] | 68 | |
| 69 | // If true, Cubic's epoch is shifted when the sender is application-limited. |
| 70 | bool FLAGS_shift_quic_cubic_epoch_when_app_limited = true; |
| 71 | |
| 72 | // If true, accounts for available (implicitly opened) streams under a separate |
| 73 | // quota from open streams, which is 10 times larger. |
| 74 | bool FLAGS_allow_many_available_streams = true; |
rtenneti | 5ca6eee | 2015-10-15 21:54:30 | [diff] [blame] | 75 | |
| 76 | // If true, QuicPacketReader::ReadAndDispatchPackets will only return true if |
| 77 | // recvmmsg fills all of the passed in messages. Otherwise, it will return true |
| 78 | // if recvmmsg read any messages. |
| 79 | bool FLAGS_quic_read_packets_full_recvmmsg = true; |
ckrasic | 99850b3 | 2015-10-16 21:15:58 | [diff] [blame] | 80 | |
| 81 | // If true, QUIC will measure head of line (HOL) blocking due between |
| 82 | // streams due to packet losses on the headers stream. The |
| 83 | // measurements will be surfaced via UMA histogram |
| 84 | // Net.QuicSession.HeadersHOLBlockedTime. |
| 85 | bool FLAGS_quic_measure_headers_hol_blocking_time = true; |
rtenneti | 8a4a073 | 2015-10-18 00:45:51 | [diff] [blame] | 86 | |
| 87 | // If true, skip a check for mismatched stream IDs inside |
| 88 | // ReliableQuicStream::OnStreamFrame. |
| 89 | bool FLAGS_quic_stop_checking_for_mismatch_ids = true; |
rtenneti | 7113320 | 2015-10-19 20:24:01 | [diff] [blame] | 90 | |
| 91 | // Disable QUIC's userspace pacing. |
| 92 | bool FLAGS_quic_disable_pacing = false; |
rtenneti | 1535e3a | 2015-10-20 06:14:20 | [diff] [blame] | 93 | |
| 94 | // If true, a FIN received on a stream with read_side_closed_ true will be |
| 95 | // recorded correctly. |
| 96 | bool FLAGS_quic_fix_fin_accounting = true; |
| 97 | |
| 98 | // If true, ReliableQuicStream::StopReading (formerly CloseReadSide) causes |
| 99 | // incoming data to be ignored but the read side of the stream object is not |
| 100 | // closed. |
| 101 | bool FLAGS_quic_implement_stop_reading = true; |
rtenneti | 8dd12b2 | 2015-10-21 01:26:38 | [diff] [blame] | 102 | |
| 103 | // Invoke the QuicAckListener directly, instead of going through the AckNotifier |
| 104 | // and AckNotifierManager. |
| 105 | bool FLAGS_quic_no_ack_notifier = true; |
ckrasic | ea295fe | 2015-10-31 05:03:27 | [diff] [blame^] | 106 | |
| 107 | // If true, QuicSession::GetNumOpenStreams will count unfinished |
| 108 | // streams as open streams, QuicSession::PostProcessAfterData will not |
| 109 | // check the quota of unifinished streams. |
| 110 | bool FLAGS_quic_count_unfinished_as_open_streams = true; |
| 111 | |
| 112 | // If true, use the unrolled prefetch path in QuicPacketCreator::CopyToBuffer. |
| 113 | bool FLAGS_quic_packet_creator_prefetch = false; |