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

Unified Diff: net/quic/quic_connection.cc

Issue 1784903003: Remove FEC from send path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@114770052
Patch Set: Restore accidentally removed OnRttChanged call 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 75640a3fd9dd6a3658b6d6b4d3928a9883c32fb3..af10c61c320a73a53c2559bdafad6db7de81dbd2 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -188,23 +188,6 @@ class MtuDiscoveryAlarm : public QuicAlarm::Delegate {
DISALLOW_COPY_AND_ASSIGN(MtuDiscoveryAlarm);
};
-// This alarm may be scheduled when an FEC protected packet is sent out.
-class FecAlarm : public QuicAlarm::Delegate {
- public:
- explicit FecAlarm(QuicPacketGenerator* packet_generator)
- : packet_generator_(packet_generator) {}
-
- QuicTime OnAlarm() override {
- packet_generator_->OnFecTimeout();
- return QuicTime::Zero();
- }
-
- private:
- QuicPacketGenerator* packet_generator_;
-
- DISALLOW_COPY_AND_ASSIGN(FecAlarm);
-};
-
// Listens for acks of MTU discovery packets and raises the maximum packet size
// of the connection if the probe succeeds.
class MtuDiscoveryAckListener : public QuicAckListenerInterface {
@@ -304,8 +287,6 @@ QuicConnection::QuicConnection(QuicConnectionId connection_id,
random_generator_,
helper->GetBufferAllocator(),
this),
- fec_alarm_(helper->CreateAlarm(arena_.New<FecAlarm>(&packet_generator_),
- &arena_)),
idle_network_timeout_(QuicTime::Delta::Infinite()),
handshake_timeout_(QuicTime::Delta::Infinite()),
time_of_last_received_packet_(clock_->ApproximateNow()),
@@ -397,16 +378,6 @@ void QuicConnection::SetFromConfig(const QuicConfig& config) {
}
max_undecryptable_packets_ = config.max_undecryptable_packets();
- if (config.HasClientSentConnectionOption(kFSPA, perspective_)) {
- packet_generator_.set_fec_send_policy(FecSendPolicy::FEC_ALARM_TRIGGER);
- }
- if (config.HasClientSentConnectionOption(kFRTT, perspective_)) {
- // TODO(rtenneti): Delete this code after the 0.25 RTT FEC experiment.
- const float kFecTimeoutRttMultiplier = 0.25;
- packet_generator_.set_rtt_multiplier_for_fec_timeout(
- kFecTimeoutRttMultiplier);
- }
-
if (config.HasClientSentConnectionOption(kMTUH, perspective_)) {
SetMtuDiscoveryTarget(kMtuDiscoveryTargetPacketSizeHigh);
}
@@ -476,17 +447,6 @@ void QuicConnection::OnError(QuicFramer* framer) {
SendConnectionCloseWithDetails(framer->error(), framer->detailed_error());
}
-void QuicConnection::MaybeSetFecAlarm(QuicPacketNumber packet_number) {
- if (fec_alarm_->IsSet()) {
- return;
- }
- QuicTime::Delta timeout = packet_generator_.GetFecTimeout(packet_number);
- if (!timeout.IsInfinite()) {
- fec_alarm_->Update(clock_->ApproximateNow().Add(timeout),
- QuicTime::Delta::FromMilliseconds(1));
- }
-}
-
void QuicConnection::OnPacket() {
last_packet_decrypted_ = false;
last_packet_revived_ = false;
@@ -1182,7 +1142,6 @@ QuicConsumedData QuicConnection::SendStreamData(
QuicIOVector iov,
QuicStreamOffset offset,
bool fin,
- FecProtection fec_protection,
QuicAckListenerInterface* listener) {
if (!fin && iov.total_length == 0) {
QUIC_BUG << "Attempt to send empty stream frame";
@@ -1204,8 +1163,7 @@ QuicConsumedData QuicConnection::SendStreamData(
// processing left that may cause received_info_ to change.
ScopedRetransmissionScheduler alarm_delayer(this);
ScopedPacketBundler ack_bundler(this, BUNDLE_PENDING_ACK);
- return packet_generator_.ConsumeData(id, iov, offset, fin, fec_protection,
- listener);
+ return packet_generator_.ConsumeData(id, iov, offset, fin, listener);
}
void QuicConnection::SendRstStream(QuicStreamId id,
@@ -1519,7 +1477,6 @@ void QuicConnection::WritePendingRetransmissions() {
}
// Re-packetize the frames with a new packet number for retransmission.
- // Retransmitted data packets do not use FEC, even when it's enabled.
// Retransmitted packets use the same packet number length as the
// original.
// Flush the packet generator before making a new packet.
@@ -1690,7 +1647,6 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) {
}
}
SetPingAlarm();
- MaybeSetFecAlarm(packet_number);
MaybeSetMtuAlarm();
DVLOG(1) << ENDPOINT << "time we began writing last sent packet: "
<< packet_send_time.ToDebuggingValue();
@@ -1778,10 +1734,6 @@ void QuicConnection::OnSerializedPacket(SerializedPacket* serialized_packet) {
CloseConnection(QUIC_ENCRYPTION_FAILURE, ConnectionCloseSource::FROM_SELF);
return;
}
- if (serialized_packet->is_fec_packet && fec_alarm_->IsSet()) {
- // If an FEC packet is serialized with the FEC alarm set, cancel the alarm.
- fec_alarm_->Cancel();
- }
SendOrQueuePacket(serialized_packet);
}
@@ -1792,17 +1744,7 @@ void QuicConnection::OnUnrecoverableError(QuicErrorCode error,
CloseConnection(error, source);
}
-void QuicConnection::OnResetFecGroup() {
- if (!fec_alarm_->IsSet()) {
- return;
- }
- // If an FEC Group is closed with the FEC alarm set, cancel the alarm.
- fec_alarm_->Cancel();
-}
-
void QuicConnection::OnCongestionWindowChange() {
- packet_generator_.OnCongestionWindowChange(
- sent_packet_manager_.EstimateMaxPacketsInFlight(max_packet_length()));
visitor_->OnCongestionWindowChange(clock_->ApproximateNow());
}
@@ -1813,9 +1755,9 @@ void QuicConnection::OnRttChange() {
rtt = QuicTime::Delta::FromMicroseconds(
sent_packet_manager_.GetRttStats()->initial_rtt_us());
}
+
if (debug_visitor_)
debug_visitor_->OnRttChanged(rtt);
- packet_generator_.OnRttChange(rtt);
}
void QuicConnection::OnPathDegrading() {
@@ -2115,7 +2057,6 @@ void QuicConnection::CloseConnection(QuicErrorCode error,
// connection is closed.
ack_alarm_->Cancel();
ping_alarm_->Cancel();
- fec_alarm_->Cancel();
resume_writes_alarm_->Cancel();
retransmission_alarm_->Cancel();
send_alarm_->Cancel();
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698