trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mas...@apache.org
Subject [trafficserver] branch quic-latest updated: Retransmit all lost packets without congestion control
Date Wed, 10 Jan 2018 03:32:21 GMT
This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 56b8ac2  Retransmit all lost packets without congestion control
56b8ac2 is described below

commit 56b8ac248f8c45cf63154db896041794a224c67a
Author: Masakazu Kitajo <maskit@apache.org>
AuthorDate: Wed Jan 10 12:31:35 2018 +0900

    Retransmit all lost packets without congestion control
---
 iocore/net/QUICNetVConnection.cc    |  1 +
 iocore/net/quic/QUICLossDetector.cc | 15 +++++++++++++++
 iocore/net/quic/QUICLossDetector.h  |  1 +
 3 files changed, 17 insertions(+)

diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 770ebc6..8744bff 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -786,6 +786,7 @@ QUICNetVConnection::_packetize_frames()
   QUICFrameUPtr frame(nullptr, nullptr);
   bool retransmittable = false;
 
+  SCOPED_MUTEX_LOCK(packet_transmitter_lock, this->_packet_transmitter_mutex, this_ethread());
   SCOPED_MUTEX_LOCK(frame_transmitter_lock, this->_frame_transmitter_mutex, this_ethread());
 
   QUICFrameUPtr ack_frame = QUICFrameFactory::create_null_ack_frame();
diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index 3b793ba..8b55569 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -325,6 +325,7 @@ QUICLossDetector::_on_loss_detection_alarm()
 void
 QUICLossDetector::_detect_lost_packets(QUICPacketNumber largest_acked_packet_number)
 {
+  SCOPED_MUTEX_LOCK(transmitter_lock, this->_transmitter->get_packet_transmitter_mutex().get(),
this_ethread());
   SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
   this->_loss_time = 0;
   std::map<QUICPacketNumber, PacketInfo &> lost_packets;
@@ -357,6 +358,12 @@ QUICLossDetector::_detect_lost_packets(QUICPacketNumber largest_acked_packet_num
   if (!lost_packets.empty()) {
     this->_cc->on_packets_lost(lost_packets);
     for (auto lost_packet : lost_packets) {
+      // ADDITIONAL CODE
+      // Not sure how we can get feedback from congestion control and when we should retransmit
the lost packets but we need to send
+      // them somewhere.
+      // I couldn't find the place so just send them here for now.
+      this->_retransmit_lost_packet(*lost_packet.second.packet);
+      // END OF ADDITIONAL CODE
       this->_remove_from_sent_packet_list(lost_packet.first);
     }
   }
@@ -416,6 +423,14 @@ QUICLossDetector::_send_two_packets()
 
 // ===== Functions below are helper functions =====
 
+void
+QUICLossDetector::_retransmit_lost_packet(const QUICPacket &packet)
+{
+  SCOPED_MUTEX_LOCK(transmitter_lock, this->_transmitter->get_packet_transmitter_mutex().get(),
this_ethread());
+  SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
+  this->_transmitter->retransmit_packet(packet);
+}
+
 std::set<QUICPacketNumber>
 QUICLossDetector::_determine_newly_acked_packets(const QUICAckFrame &ack_frame)
 {
diff --git a/iocore/net/quic/QUICLossDetector.h b/iocore/net/quic/QUICLossDetector.h
index 94b707d..6b253c9 100644
--- a/iocore/net/quic/QUICLossDetector.h
+++ b/iocore/net/quic/QUICLossDetector.h
@@ -125,6 +125,7 @@ private:
   void _detect_lost_packets(QUICPacketNumber largest_acked);
   void _set_loss_detection_alarm();
   void _on_loss_detection_alarm();
+  void _retransmit_lost_packet(const QUICPacket &packet);
 
   std::set<QUICPacketNumber> _determine_newly_acked_packets(const QUICAckFrame &ack_frame);
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message