summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_packet_generator.h
diff options
context:
space:
mode:
authorrtenneti <rtenneti@chromium.org>2015-01-05 10:51:07 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-05 18:52:32 +0000
commit7652bf3120ec2e16f0083a715dfaec5b5fdffc68 (patch)
tree9112af408fde4eb094ce661b9fb4a94fd2f1ce11 /net/quic/quic_packet_generator.h
parent0a69defef6c4de84db795a6d7ba0067c315250ef (diff)
downloadchromium_src-7652bf3120ec2e16f0083a715dfaec5b5fdffc68.zip
chromium_src-7652bf3120ec2e16f0083a715dfaec5b5fdffc68.tar.gz
chromium_src-7652bf3120ec2e16f0083a715dfaec5b5fdffc68.tar.bz2
Land Recent QUIC Changes.
Test tidyup. Remove some blank lines, add comments. Merge internal change: 82513767 https://codereview.chromium.org/798783005/ Rename of a constant, otherwise doesn't touch prod code. Set initial flow control windows to sensible values for client (10 MB) and server (1 MB session, 64 KB stream). Running with the 16 KB default has caused problems in loadtests, and for external people running QUIC performance tests. It's not fair to have a public client/server crippled by the small default values. Merge internal change: 82509991 https://codereview.chromium.org/832553002/ Adds RTT change notifier to QUIC's NetworkChangeVisitor, to enable delaying of FEC packet. This CL makes no changes to FEC behavior. Merge internal change: 82480364 https://codereview.chromium.org/827143002/ If no min_rtt or srtt measurement is available, then set these to initial_rtt in QuicConnection::GetStats. Protected with FLAGS_quic_use_initial_rtt_for_stats These fields (min_rtt, srtt) are initially zero, and are used to populate the frontline info header rtt/srtt fields. With this change, a 0RTT QUIC request results in these header fields being populated. Merge internal change: 82363110 https://codereview.chromium.org/827113002/ Move creation/deletion of the QuicAckNotifier into the PacketGenerator. Not flag protected. Merge internal change: 82356073 https://codereview.chromium.org/829823002/ Fix QUIC's pacing sender so it can pace at rates faster than 1 packet per configured alarm granularity. Merge internal change: 82332014 https://codereview.chromium.org/806663005/ Don't try to create a QUIC stream frame with no data and no FIN. Protected by ENABLEd FLAGS_quic_empty_data_no_fin_early_return. I *suspect* that a call to SendStreamData with empty data + !FIN is the cause of the AckNotifier crash in b/18594622 but I can't quite figure out how it could happen. However this seems like a reasonable early return to add in any case. Without this new early return a QuicAckNotifier will be created, attached to an (empty) stream frame in the packet creator, stored by the AckNotifierManager when the packet is serialized, and then promptly deleted because no data was consumed (later in SendStreamData). Now, when an ACK comes in for the packet, the AckNofitierManager will try to inform the QuicAckNotifier which no longer exists. The new test fails under ASAN without the new return. Merge internal change: 82328921 https://codereview.chromium.org/785113003/ More cleanups of the QUIC source address token tests. Cleanup based on code review changes for https://codereview.chromium.org/809903003/ Merge internal change: 82257112 Merge internal change: 82283430 https://codereview.chromium.org/815133003/ R=rch@chromium.org Review URL: https://codereview.chromium.org/810593006 Cr-Commit-Position: refs/heads/master@{#309926}
Diffstat (limited to 'net/quic/quic_packet_generator.h')
-rw-r--r--net/quic/quic_packet_generator.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/net/quic/quic_packet_generator.h b/net/quic/quic_packet_generator.h
index 2882aab..f35f9bd 100644
--- a/net/quic/quic_packet_generator.h
+++ b/net/quic/quic_packet_generator.h
@@ -53,6 +53,7 @@
#ifndef NET_QUIC_QUIC_PACKET_GENERATOR_H_
#define NET_QUIC_QUIC_PACKET_GENERATOR_H_
+#include "net/quic/quic_ack_notifier.h"
#include "net/quic/quic_packet_creator.h"
#include "net/quic/quic_sent_packet_manager.h"
#include "net/quic/quic_types.h"
@@ -63,8 +64,6 @@ namespace test {
class QuicPacketGeneratorPeer;
} // namespace test
-class QuicAckNotifier;
-
class NET_EXPORT_PRIVATE QuicPacketGenerator {
public:
class NET_EXPORT_PRIVATE DelegateInterface {
@@ -102,6 +101,9 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// Called by the connection in the event of the congestion window changing.
void OnCongestionWindowChange(QuicPacketCount max_packets_in_flight);
+ // Called by the connection when the RTT may have changed.
+ void OnRttChange(QuicTime::Delta rtt);
+
// Indicates that an ACK frame should be sent. If |also_send_feedback| is
// true, then it also indicates a CONGESTION_FEEDBACK frame should be sent.
// If |also_send_stop_waiting| is true, then it also indicates that a
@@ -118,17 +120,15 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// Given some data, may consume part or all of it and pass it to the
// packet creator to be serialized into packets. If not in batch
- // mode, these packets will also be sent during this call. Also
- // attaches a QuicAckNotifier to any created stream frames, which
- // will be called once the frame is ACKed by the peer. The
- // QuicAckNotifier is owned by the QuicConnection. |notifier| may
- // be nullptr.
+ // mode, these packets will also be sent during this call.
+ // |delegate| (if not nullptr) will be informed once all packets sent as a
+ // result of this call are ACKed by the peer.
QuicConsumedData ConsumeData(QuicStreamId id,
const IOVector& data,
QuicStreamOffset offset,
bool fin,
FecProtection fec_protection,
- QuicAckNotifier* notifier);
+ QuicAckNotifier::DelegateInterface* delegate);
// Indicates whether batch mode is currently enabled.
bool InBatchMode();
@@ -185,6 +185,8 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
debug_delegate_ = debug_delegate;
}
+ QuicTime::Delta fec_timeout() { return fec_timeout_; }
+
private:
friend class test::QuicPacketGeneratorPeer;
@@ -226,6 +228,9 @@ class NET_EXPORT_PRIVATE QuicPacketGenerator {
// True if batch mode is currently enabled.
bool batch_mode_;
+ // Timeout used for FEC alarm. Can be set to zero.
+ QuicTime::Delta fec_timeout_;
+
// True if FEC protection is on. The creator may have an open FEC group even
// if this variable is false.
bool should_fec_protect_;