Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: net/quic/quic_stream_factory.h

Issue 1025573002: QUIC - disable QUIC if packet loss rate is bad for a connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments for Patch Set 7 Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.h
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index c55059002be1edb4185c311b53eb601d59f0a3b4..48e9996a7308dd0d1e3677d9836009a0b717c03e 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -108,6 +108,8 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
bool enable_connection_racing,
bool enable_non_blocking_io,
bool disable_disk_cache,
+ int max_number_of_lossy_connections,
+ float packet_loss_threshold,
int socket_receive_buffer_size,
const QuicTagVector& connection_options);
~QuicStreamFactory() override;
@@ -124,6 +126,15 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
const BoundNetLog& net_log,
QuicStreamRequest* request);
+ // Returns false if |packet_loss_rate| is less than |packet_loss_threshold_|
+ // otherwise it returns true and closes the session and marks QUIC as recently
+ // broken for the port of the session. Increments
+ // |number_of_lossy_connections_| by port.
+ bool OnHandshakeConfirmed(QuicClientSession* session, float packet_loss_rate);
+
+ // Returns true if QUIC is disabled for this port.
+ bool IsQuicDisabled(uint16 port);
+
// Called by a session when it becomes idle.
void OnIdleSession(QuicClientSession* session);
@@ -327,6 +338,16 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
// Set if we do not want to load server config from the disk cache.
bool disable_disk_cache_;
+ // Set if we want to disable QUIC when there is high packet loss rate.
+ // Specifies the maximum number of connections with high packet loss in a row
+ // after which QUIC will be disabled.
+ int max_number_of_lossy_connections_;
+ // Specifies packet loss rate in franction after which a connection is closed
+ // and is considered as a lossy connection.
+ float packet_loss_threshold_;
+ // Count number of lossy connections by port.
+ std::map<uint16, int> number_of_lossy_connections_;
+
// Size of the UDP receive buffer.
int socket_receive_buffer_size_;
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698