diff options
author | rtenneti <rtenneti@chromium.org> | 2014-10-29 18:49:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-30 01:49:49 +0000 |
commit | 2318668785bae416e25ee3ffff0dd72308f075a9 (patch) | |
tree | 37a3a65441b5f4e6b2470a1c1fcf5e5dadf3e1d9 /net/quic/quic_config.cc | |
parent | 31e90adac9fd24f1b451bbe936406fbc0fe7345d (diff) | |
download | chromium_src-2318668785bae416e25ee3ffff0dd72308f075a9.zip chromium_src-2318668785bae416e25ee3ffff0dd72308f075a9.tar.gz chromium_src-2318668785bae416e25ee3ffff0dd72308f075a9.tar.bz2 |
Land Recent QUIC Changes.
Refactor Cubic congestion control to separate out PRR into a distinct
class.
Merge internal change: 78703144
https://codereview.chromium.org/688593002/
Move receive_window_ from BbrTcpSender and TcpCubicSender to
QuicSentPacketManager, since it's not specific to a congestion
algorithm.
Merge internal change: 78692549
https://codereview.chromium.org/687093002/
Gathering ClientConnectionStats at suitable times (near the end of
request handling and after receiving final ACK).
Exported kNumberOfNacksBeforeRetransmission for gathering
ClientConnectionStats.
Merge internal change: 78688302
https://codereview.chromium.org/687083002/
Deprecate rolled out flag FLAGS_close_quic_connection_unfinished_streams_2
Merge internal change: 78683497
https://codereview.chromium.org/639823010/
Close the QUIC connection if too many sent or received packets are
outstanding.
Protected by FLAGS_quic_too_many_outstanding_packets.
Merge internal change: 78666674
https://codereview.chromium.org/682413002/
Remove QUIC_VERSION_21 from supported versions.
Will remove it entirely later, after QUIC_VERSION_19 is removed.
Merge internal change: 78604601
https://codereview.chromium.org/682383003/
Turning off CID truncation for proxied connections.
Turning on CID truncation by default, since chrome will do it by
default.
Turning off CID truncation for proxied connections for QUIC.
Merge internal change: 78599095
https://codereview.chromium.org/683263003/
Protect UpdateRTT from negative send deltas
Prevent negative send_deltas from being incorporated into the various
RTT calculations. AFAIK, it's not happening now, but it doesn't hurt to
be vigilant against future bugs.
If we're getting such RTTs, it's due to some pathological error that
we'd like to know about.
Added a unittest for these corner cases.
Low-impact. Don't use negative samples in QUIC rtt calculation.
Merge internal change: 78580114
https://codereview.chromium.org/687883002/
Protect against the divide by zero error in QuicBandwidth::TransferTime.
Currently some send algorithms may return QuicBandwidth::Zero.
Merge internal change: 78578198
https://codereview.chromium.org/684043002/
Add a QUIC connection option, 'NTLP', to disable tail loss probes by
setting max_tail_loss_probes_ to 0, in order to evaluate it's
performance benefit.
Merge internal change: 78465187
https://codereview.chromium.org/682283003/
Adding an option for peers to negotiate the length of the QUIC
connection ID sent to them. This is a functional no-op until Chrome
starts sending this configuration option, at which point it can still be
turned off via FLAGS_allow_truncated_connection_ids_for_quic
Also fixing quic config to not have protected member variables while I'm
in there, because it was irritating me.
Allowing truncated QUIC connection IDs. Off by default.
Merge internal change: 78462599
https://codereview.chromium.org/687033002/
R=rch@chromium.org
Review URL: https://codereview.chromium.org/691483003
Cr-Commit-Position: refs/heads/master@{#302014}
Diffstat (limited to 'net/quic/quic_config.cc')
-rw-r--r-- | net/quic/quic_config.cc | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/net/quic/quic_config.cc b/net/quic/quic_config.cc index 7b7976c..b1b7343 100644 --- a/net/quic/quic_config.cc +++ b/net/quic/quic_config.cc @@ -76,7 +76,7 @@ void QuicNegotiableUint32::set(uint32 max, uint32 default_value) { } uint32 QuicNegotiableUint32::GetUint32() const { - if (negotiated_) { + if (negotiated()) { return negotiated_value_; } return default_value_; @@ -84,7 +84,7 @@ uint32 QuicNegotiableUint32::GetUint32() const { void QuicNegotiableUint32::ToHandshakeMessage( CryptoHandshakeMessage* out) const { - if (negotiated_) { + if (negotiated()) { out->SetValue(tag_, negotiated_value_); } else { out->SetValue(tag_, max_value_); @@ -95,7 +95,7 @@ QuicErrorCode QuicNegotiableUint32::ProcessPeerHello( const CryptoHandshakeMessage& peer_hello, HelloType hello_type, string* error_details) { - DCHECK(!negotiated_); + DCHECK(!negotiated()); DCHECK(error_details != nullptr); uint32 value; QuicErrorCode error = ReadUint32(peer_hello, @@ -113,7 +113,7 @@ QuicErrorCode QuicNegotiableUint32::ProcessPeerHello( return QUIC_INVALID_NEGOTIATED_VALUE; } - negotiated_ = true; + set_negotiated(true); negotiated_value_ = min(value, max_value_); return QUIC_NO_ERROR; } @@ -134,14 +134,14 @@ void QuicNegotiableTag::set(const QuicTagVector& possible, } QuicTag QuicNegotiableTag::GetTag() const { - if (negotiated_) { + if (negotiated()) { return negotiated_tag_; } return default_value_; } void QuicNegotiableTag::ToHandshakeMessage(CryptoHandshakeMessage* out) const { - if (negotiated_) { + if (negotiated()) { // Because of the way we serialize and parse handshake messages we can // serialize this as value and still parse it as a vector. out->SetValue(tag_, negotiated_tag_); @@ -180,7 +180,7 @@ QuicErrorCode QuicNegotiableTag::ProcessPeerHello( const CryptoHandshakeMessage& peer_hello, HelloType hello_type, string* error_details) { - DCHECK(!negotiated_); + DCHECK(!negotiated()); DCHECK(error_details != nullptr); const QuicTag* received_tags; size_t received_tags_length; @@ -211,7 +211,7 @@ QuicErrorCode QuicNegotiableTag::ProcessPeerHello( negotiated_tag_ = negotiated_tag; } - negotiated_ = true; + set_negotiated(true); return QUIC_NO_ERROR; } @@ -433,6 +433,7 @@ QuicConfig::QuicConfig() idle_connection_state_lifetime_seconds_(kICSL, PRESENCE_REQUIRED), keepalive_timeout_seconds_(kKATO, PRESENCE_OPTIONAL), max_streams_per_connection_(kMSPC, PRESENCE_REQUIRED), + bytes_for_connection_id_(kTCID, PRESENCE_OPTIONAL), initial_congestion_window_(kSWND, PRESENCE_OPTIONAL), initial_round_trip_time_us_(kIRTT, PRESENCE_OPTIONAL), // TODO(rjshade): Remove this when retiring QUIC_VERSION_19. @@ -507,6 +508,22 @@ uint32 QuicConfig::MaxStreamsPerConnection() const { return max_streams_per_connection_.GetUint32(); } +bool QuicConfig::HasSetBytesForConnectionIdToSend() const { + return bytes_for_connection_id_.HasSendValue(); +} + +void QuicConfig::SetBytesForConnectionIdToSend(uint32 bytes) { + bytes_for_connection_id_.SetSendValue(bytes); +} + +bool QuicConfig::HasReceivedBytesForConnectionId() const { + return bytes_for_connection_id_.HasReceivedValue(); +} + +uint32 QuicConfig::ReceivedBytesForConnectionId() const { + return bytes_for_connection_id_.GetReceivedValue(); +} + void QuicConfig::SetInitialCongestionWindowToSend(size_t initial_window) { initial_congestion_window_.SetSendValue(initial_window); } @@ -657,6 +674,7 @@ void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const { idle_connection_state_lifetime_seconds_.ToHandshakeMessage(out); keepalive_timeout_seconds_.ToHandshakeMessage(out); max_streams_per_connection_.ToHandshakeMessage(out); + bytes_for_connection_id_.ToHandshakeMessage(out); initial_congestion_window_.ToHandshakeMessage(out); initial_round_trip_time_us_.ToHandshakeMessage(out); initial_flow_control_window_bytes_.ToHandshakeMessage(out); @@ -690,6 +708,10 @@ QuicErrorCode QuicConfig::ProcessPeerHello( peer_hello, hello_type, error_details); } if (error == QUIC_NO_ERROR) { + error = bytes_for_connection_id_.ProcessPeerHello( + peer_hello, hello_type, error_details); + } + if (error == QUIC_NO_ERROR) { error = initial_congestion_window_.ProcessPeerHello( peer_hello, hello_type, error_details); } |