You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/06/19 06:00:50 UTC

[trafficserver] branch quic-latest updated (c64b476 -> f48b47b)

This is an automated email from the ASF dual-hosted git repository.

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


    from c64b476  Fix key pahses for PNE tests
     new 9ba6ff7  [draft-11] Initialize min_rtt with INT64_MAX
     new f48b47b  [draft-11] Add time_of_last_sent_handshake_packet

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 iocore/net/quic/QUICConfig.h                |  4 +--
 iocore/net/quic/QUICCongestionController.cc |  2 +-
 iocore/net/quic/QUICLossDetector.cc         | 18 +++++++++----
 iocore/net/quic/QUICLossDetector.h          | 41 +++++++++++++++--------------
 4 files changed, 37 insertions(+), 28 deletions(-)


[trafficserver] 01/02: [draft-11] Initialize min_rtt with INT64_MAX

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9ba6ff7af72a68b470d361092825dfa196fa64f9
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Mon Jun 18 16:17:57 2018 +0900

    [draft-11] Initialize min_rtt with INT64_MAX
---
 iocore/net/quic/QUICConfig.h                |  4 ++--
 iocore/net/quic/QUICCongestionController.cc |  2 +-
 iocore/net/quic/QUICLossDetector.cc         |  1 +
 iocore/net/quic/QUICLossDetector.h          | 10 +++++-----
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/iocore/net/quic/QUICConfig.h b/iocore/net/quic/QUICConfig.h
index 204cc18..1c0d466 100644
--- a/iocore/net/quic/QUICConfig.h
+++ b/iocore/net/quic/QUICConfig.h
@@ -98,7 +98,7 @@ private:
   SSL_CTX *_server_ssl_ctx = nullptr;
   SSL_CTX *_client_ssl_ctx = nullptr;
 
-  // [draft-10 recovery] - 3.4.1.  Constants of interest
+  // [draft-11 recovery] 3.5.1.  Constants of interest
   uint32_t _ld_max_tlps              = 2;
   uint32_t _ld_reordering_threshold  = 3;
   float _ld_time_reordering_fraction = 0.125;
@@ -108,7 +108,7 @@ private:
   ink_hrtime _ld_delayed_ack_timeout = HRTIME_MSECONDS(25);
   ink_hrtime _ld_default_initial_rtt = HRTIME_MSECONDS(100);
 
-  // [draft-10 recovery] - 4.7.1.  Constants of interest
+  // [draft-11 recovery] 4.7.1.  Constants of interest
   uint32_t _cc_default_mss          = 1460;
   uint32_t _cc_initial_window_scale = 10; // Actual initial window size is this value multiplied by the _cc_default_mss
   uint32_t _cc_minimum_window_scale = 2;  // Actual minimum window size is this value multiplied by the _cc_default_mss
diff --git a/iocore/net/quic/QUICCongestionController.cc b/iocore/net/quic/QUICCongestionController.cc
index fa580e6..098809d 100644
--- a/iocore/net/quic/QUICCongestionController.cc
+++ b/iocore/net/quic/QUICCongestionController.cc
@@ -46,7 +46,7 @@ QUICCongestionController::QUICCongestionController(QUICConnectionInfoProvider *i
   this->_k_minimum_window        = params->cc_minimum_window();
   this->_k_loss_reduction_factor = params->cc_loss_reduction_factor();
 
-  // 4.7.3.  Initialization
+  // [draft-11 recovery] 4.7.3.  Initialization
   this->_congestion_window = this->_k_initial_window;
 }
 
diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index b19b133..89ce1f7 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -47,6 +47,7 @@ QUICLossDetector::QUICLossDetector(QUICPacketTransmitter *transmitter, QUICConne
   this->_k_delayed_ack_timeout       = params->ld_delayed_ack_timeout();
   this->_k_default_initial_rtt       = params->ld_default_initial_rtt();
 
+  // [draft-11 recovery] 3.5.3.  Initialization
   if (this->_k_using_time_loss_detection) {
     this->_reordering_threshold     = UINT32_MAX;
     this->_time_reordering_fraction = this->_k_time_reordering_fraction;
diff --git a/iocore/net/quic/QUICLossDetector.h b/iocore/net/quic/QUICLossDetector.h
index c8a1deb..156db8c 100644
--- a/iocore/net/quic/QUICLossDetector.h
+++ b/iocore/net/quic/QUICLossDetector.h
@@ -72,14 +72,14 @@ public:
   uint32_t current_ssthresh() const;
 
 private:
-  // 4.7.1. Constants of interest (draft-10)
+  // [draft-11 recovery] 4.7.1. Constants of interest
   // Values will be loaded from records.config via QUICConfig at constructor
   uint32_t _k_default_mss        = 0;
   uint32_t _k_initial_window     = 0;
   uint32_t _k_minimum_window     = 0;
   float _k_loss_reduction_factor = 0.0;
 
-  // 4.7.2. Variables of interest
+  // [draft-11 recovery] 4.7.2. Variables of interest
   uint32_t _bytes_in_flight         = 0;
   uint32_t _congestion_window       = 0;
   QUICPacketNumber _end_of_recovery = 0;
@@ -111,7 +111,7 @@ private:
 
   // TODO QUICCongestionController *cc = nullptr;
 
-  // 3.4.1.  Constants of interest (draft-10)
+  // [draft-11 recovery] 3.5.1.  Constants of interest
   // Values will be loaded from records.config via QUICConfig at constructor
   uint32_t _k_max_tlps              = 0;
   uint32_t _k_reordering_threshold  = 0;
@@ -122,7 +122,7 @@ private:
   ink_hrtime _k_delayed_ack_timeout = 0;
   ink_hrtime _k_default_initial_rtt = 0;
 
-  // 3.4.2.  Variables of interest (draft-10)
+  // [draft-11 recovery] 3.5.2.  Variables of interest
   // Keep the order as the same as the spec so that we can see the difference easily.
   Action *_loss_detection_alarm        = nullptr;
   uint32_t _handshake_count            = 0;
@@ -135,7 +135,7 @@ private:
   ink_hrtime _latest_rtt               = 0;
   ink_hrtime _smoothed_rtt             = 0;
   ink_hrtime _rttvar                   = 0;
-  ink_hrtime _min_rtt                  = 0;
+  ink_hrtime _min_rtt                  = INT64_MAX;
   ink_hrtime _max_ack_delay            = 0;
   uint32_t _reordering_threshold       = 0;
   double _time_reordering_fraction     = 0.0;


[trafficserver] 02/02: [draft-11] Add time_of_last_sent_handshake_packet

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f48b47bdbf22ce37958bf7b23a7df5be6e5357c6
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Jun 19 14:59:28 2018 +0900

    [draft-11] Add time_of_last_sent_handshake_packet
---
 iocore/net/quic/QUICLossDetector.cc | 17 ++++++++++++-----
 iocore/net/quic/QUICLossDetector.h  | 33 +++++++++++++++++----------------
 2 files changed, 29 insertions(+), 21 deletions(-)

diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index 89ce1f7..36d6279 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -170,14 +170,19 @@ QUICLossDetector::_on_packet_sent(QUICPacketNumber packet_number, bool is_ack_on
                                   QUICPacketUPtr packet)
 {
   SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
-  this->_time_of_last_sent_packet = Thread::get_hrtime();
-  this->_largest_sent_packet      = packet_number;
+  ink_hrtime now             = Thread::get_hrtime();
+  this->_largest_sent_packet = packet_number;
   // FIXME Should we really keep actual packet object?
 
   std::unique_ptr<PacketInfo> packet_info(
-    new PacketInfo({packet_number, this->_time_of_last_sent_packet, is_ack_only, is_handshake, sent_bytes, std::move(packet)}));
+    new PacketInfo({packet_number, now, is_ack_only, is_handshake, sent_bytes, std::move(packet)}));
   this->_add_to_sent_packet_list(packet_number, std::move(packet_info));
+
   if (!is_ack_only) {
+    if (is_handshake) {
+      this->_time_of_last_sent_handshake_packet = now;
+    }
+    this->_time_of_last_sent_retransmittable_packet = now;
     this->_cc->on_packet_sent(sent_bytes);
     this->_set_loss_detection_alarm();
   }
@@ -293,10 +298,12 @@ QUICLossDetector::_set_loss_detection_alarm()
     }
     alarm_duration = std::max(alarm_duration + this->_max_ack_delay, this->_k_min_tlp_timeout);
     alarm_duration = alarm_duration * (1 << this->_handshake_count);
+
+    this->_loss_detection_alarm_at = this->_time_of_last_sent_handshake_packet + alarm_duration;
     QUICLDDebug("Handshake retransmission alarm will be set");
   } else if (this->_loss_time != 0) {
     // Early retransmit timer or time loss detection.
-    alarm_duration = this->_loss_time - this->_time_of_last_sent_packet;
+    alarm_duration = this->_loss_time - this->_time_of_last_sent_retransmittable_packet;
     QUICLDDebug("Early retransmit timer or time loss detection will be set");
   } else if (this->_tlp_count < this->_k_max_tlps) {
     // Tail Loss Probe
@@ -321,7 +328,7 @@ QUICLossDetector::_set_loss_detection_alarm()
   if (this->_loss_detection_alarm_at) {
     this->_loss_detection_alarm_at = std::min(this->_loss_detection_alarm_at, Thread::get_hrtime() + alarm_duration);
   } else {
-    this->_loss_detection_alarm_at = this->_time_of_last_sent_packet + alarm_duration;
+    this->_loss_detection_alarm_at = this->_time_of_last_sent_retransmittable_packet + alarm_duration;
   }
   QUICLDDebug("Loss detection alarm has been set to %" PRId64 "ms", alarm_duration / HRTIME_MSECOND);
 
diff --git a/iocore/net/quic/QUICLossDetector.h b/iocore/net/quic/QUICLossDetector.h
index 156db8c..69f811f 100644
--- a/iocore/net/quic/QUICLossDetector.h
+++ b/iocore/net/quic/QUICLossDetector.h
@@ -124,22 +124,23 @@ private:
 
   // [draft-11 recovery] 3.5.2.  Variables of interest
   // Keep the order as the same as the spec so that we can see the difference easily.
-  Action *_loss_detection_alarm        = nullptr;
-  uint32_t _handshake_count            = 0;
-  uint32_t _tlp_count                  = 0;
-  uint32_t _rto_count                  = 0;
-  uint32_t _largest_sent_before_rto    = 0;
-  ink_hrtime _time_of_last_sent_packet = 0;
-  uint32_t _largest_sent_packet        = 0;
-  uint32_t _largest_acked_packet       = 0;
-  ink_hrtime _latest_rtt               = 0;
-  ink_hrtime _smoothed_rtt             = 0;
-  ink_hrtime _rttvar                   = 0;
-  ink_hrtime _min_rtt                  = INT64_MAX;
-  ink_hrtime _max_ack_delay            = 0;
-  uint32_t _reordering_threshold       = 0;
-  double _time_reordering_fraction     = 0.0;
-  ink_hrtime _loss_time                = 0;
+  Action *_loss_detection_alarm                        = nullptr;
+  uint32_t _handshake_count                            = 0;
+  uint32_t _tlp_count                                  = 0;
+  uint32_t _rto_count                                  = 0;
+  uint32_t _largest_sent_before_rto                    = 0;
+  ink_hrtime _time_of_last_sent_retransmittable_packet = 0;
+  ink_hrtime _time_of_last_sent_handshake_packet       = 0;
+  uint32_t _largest_sent_packet                        = 0;
+  uint32_t _largest_acked_packet                       = 0;
+  ink_hrtime _latest_rtt                               = 0;
+  ink_hrtime _smoothed_rtt                             = 0;
+  ink_hrtime _rttvar                                   = 0;
+  ink_hrtime _min_rtt                                  = INT64_MAX;
+  ink_hrtime _max_ack_delay                            = 0;
+  uint32_t _reordering_threshold                       = 0;
+  double _time_reordering_fraction                     = 0.0;
+  ink_hrtime _loss_time                                = 0;
   std::map<QUICPacketNumber, std::unique_ptr<PacketInfo>> _sent_packets;
 
   // These are not defined on the spec but expected to be count