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

Side by Side Diff: net/quic/quic_connection.h

Issue 1777293002: Add a new QUIC Ack Decimation mode that is reordering tolerant. Protected by FLAG_quic_ack_decimati… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115844136
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The entity that handles framing writes for a Quic client or server. 5 // The entity that handles framing writes for a Quic client or server.
6 // Each QuicSession will have a connection associated with it. 6 // Each QuicSession will have a connection associated with it.
7 // 7 //
8 // On the server side, the Dispatcher handles the raw reads, and hands off 8 // On the server side, the Dispatcher handles the raw reads, and hands off
9 // packets via ProcessUdpPacket for framing and processing. 9 // packets via ProcessUdpPacket for framing and processing.
10 // 10 //
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 public QuicBlockedWriterInterface, 300 public QuicBlockedWriterInterface,
301 public QuicPacketGenerator::DelegateInterface, 301 public QuicPacketGenerator::DelegateInterface,
302 public QuicSentPacketManager::NetworkChangeVisitor { 302 public QuicSentPacketManager::NetworkChangeVisitor {
303 public: 303 public:
304 enum AckBundling { 304 enum AckBundling {
305 NO_ACK = 0, 305 NO_ACK = 0,
306 SEND_ACK = 1, 306 SEND_ACK = 1,
307 BUNDLE_PENDING_ACK = 2, 307 BUNDLE_PENDING_ACK = 2,
308 }; 308 };
309 309
310 enum AckMode { TCP_ACKING, ACK_DECIMATION, ACK_DECIMATION_WITH_REORDERING };
311
310 // Constructs a new QuicConnection for |connection_id| and |address| using 312 // Constructs a new QuicConnection for |connection_id| and |address| using
311 // |writer| to write packets. |owns_writer| specifies whether the connection 313 // |writer| to write packets. |owns_writer| specifies whether the connection
312 // takes ownership of |writer|. |helper| must outlive this connection. 314 // takes ownership of |writer|. |helper| must outlive this connection.
313 QuicConnection(QuicConnectionId connection_id, 315 QuicConnection(QuicConnectionId connection_id,
314 IPEndPoint address, 316 IPEndPoint address,
315 QuicConnectionHelperInterface* helper, 317 QuicConnectionHelperInterface* helper,
316 QuicPacketWriter* writer, 318 QuicPacketWriter* writer,
317 bool owns_writer, 319 bool owns_writer,
318 Perspective perspective, 320 Perspective perspective,
319 const QuicVersionVector& supported_versions); 321 const QuicVersionVector& supported_versions);
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 914
913 FecGroupMap group_map_; 915 FecGroupMap group_map_;
914 916
915 QuicReceivedPacketManager received_packet_manager_; 917 QuicReceivedPacketManager received_packet_manager_;
916 QuicSentEntropyManager sent_entropy_manager_; 918 QuicSentEntropyManager sent_entropy_manager_;
917 919
918 // Indicates whether an ack should be sent the next time we try to write. 920 // Indicates whether an ack should be sent the next time we try to write.
919 bool ack_queued_; 921 bool ack_queued_;
920 // How many retransmittable packets have arrived without sending an ack. 922 // How many retransmittable packets have arrived without sending an ack.
921 QuicPacketCount num_retransmittable_packets_received_since_last_ack_sent_; 923 QuicPacketCount num_retransmittable_packets_received_since_last_ack_sent_;
924 // Whether there were missing packets in the last sent ack.
925 bool last_ack_had_missing_packets_;
922 // How many consecutive packets have arrived without sending an ack. 926 // How many consecutive packets have arrived without sending an ack.
923 QuicPacketCount num_packets_received_since_last_ack_sent_; 927 QuicPacketCount num_packets_received_since_last_ack_sent_;
924 // Indicates how many consecutive times an ack has arrived which indicates 928 // Indicates how many consecutive times an ack has arrived which indicates
925 // the peer needs to stop waiting for some packets. 929 // the peer needs to stop waiting for some packets.
926 int stop_waiting_count_; 930 int stop_waiting_count_;
927 // When true, ack only every 10 packets as long as they arrive close together. 931 // Indicates the current ack mode, defaults to acking every 2 packets.
928 bool ack_decimation_enabled_; 932 AckMode ack_mode_;
929 933
930 // Indicates the retransmit alarm is going to be set by the 934 // Indicates the retransmit alarm is going to be set by the
931 // ScopedRetransmitAlarmDelayer 935 // ScopedRetransmitAlarmDelayer
932 bool delay_setting_retransmission_alarm_; 936 bool delay_setting_retransmission_alarm_;
933 // Indicates the retransmission alarm needs to be set. 937 // Indicates the retransmission alarm needs to be set.
934 bool pending_retransmission_alarm_; 938 bool pending_retransmission_alarm_;
935 939
936 // Arena to store class implementations within the QuicConnection. 940 // Arena to store class implementations within the QuicConnection.
937 QuicConnectionArena arena_; 941 QuicConnectionArena arena_;
938 942
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 1057
1054 // If true, multipath is enabled for this connection. 1058 // If true, multipath is enabled for this connection.
1055 bool multipath_enabled_; 1059 bool multipath_enabled_;
1056 1060
1057 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 1061 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
1058 }; 1062 };
1059 1063
1060 } // namespace net 1064 } // namespace net
1061 1065
1062 #endif // NET_QUIC_QUIC_CONNECTION_H_ 1066 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698