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

Unified Diff: net/tools/quic/quic_dispatcher.cc

Issue 2390773005: short circuit QUIC packets to packet buffer if there is already a CHLO on same connection buffered … (Closed)
Patch Set: Created 4 years, 2 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/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher.cc
diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc
index 0d558694418f84c74ddabd2696a2d179cfd53a7f..b43b8e1664fe6018ad07090588982f900da4e52d 100644
--- a/net/tools/quic/quic_dispatcher.cc
+++ b/net/tools/quic/quic_dispatcher.cc
@@ -273,6 +273,12 @@ bool QuicDispatcher::OnUnauthenticatedPublicHeader(
return false;
}
+ if (FLAGS_quic_buffer_packets_after_chlo &&
+ buffered_packets_.HasChloForConnection(connection_id)) {
+ BufferEarlyPacket(connection_id);
+ return false;
+ }
+
if (!OnUnauthenticatedUnknownPublicHeader(header)) {
return false;
}
@@ -692,7 +698,10 @@ void QuicDispatcher::ProcessChlo() {
new_sessions_allowed_per_event_loop_ <= 0) {
// Can't create new session any more. Wait till next event loop.
if (!buffered_packets_.HasChloForConnection(current_connection_id_)) {
- // Only buffer one CHLO per connection.
+ // Only buffer one CHLO per connection. Remove this condition check when
+ // --gfe2_reloadable_flag_quic_buffer_packets_after_chlo
+ // is deprecated because after that retransmitted CHLO should be buffered
+ // earlier in OnUnauthenticatedPublicHeader().
bool is_new_connection =
!buffered_packets_.HasBufferedPackets(current_connection_id_);
EnqueuePacketResult rs = buffered_packets_.EnqueuePacket(
« no previous file with comments | « net/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698