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 <masa...@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;

Reply via email to