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/01/09 08:10:10 UTC

[trafficserver] branch quic-latest updated (666e7d6 -> 11c2769)

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

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


    from 666e7d6  Replace QUICDebugNames::vc_event(int) with get_vc_event_name(int)
     new 40c7522  Fix a bug that floating values are actually calculated as integers
     new 11c2769  Fix a testcase for LossDetector

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/QUICLossDetector.cc           | 10 +++++-----
 iocore/net/quic/test/test_QUICLossDetector.cc |  4 +++-
 2 files changed, 8 insertions(+), 6 deletions(-)

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

[trafficserver] 02/02: Fix a testcase for LossDetector

Posted by ma...@apache.org.
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

commit 11c27699e97f8d0ad806f7be190772e4e698dd1c
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Jan 9 17:06:48 2018 +0900

    Fix a testcase for LossDetector
---
 iocore/net/quic/test/test_QUICLossDetector.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iocore/net/quic/test/test_QUICLossDetector.cc b/iocore/net/quic/test/test_QUICLossDetector.cc
index 17f6029..5cfdfc0 100644
--- a/iocore/net/quic/test/test_QUICLossDetector.cc
+++ b/iocore/net/quic/test/test_QUICLossDetector.cc
@@ -126,7 +126,7 @@ TEST_CASE("QUICLossDetector_Loss", "[quic]")
     detector.on_packet_sent(std::move(packet8));
     detector.on_packet_sent(std::move(packet9));
 
-    ink_hrtime_sleep(HRTIME_MSECONDS(10000));
+    ink_hrtime_sleep(HRTIME_MSECONDS(1000));
 
     // Receive an ACK for (1) (4) (5) (7) (8) (9)
     afc->update(pn1, true);
@@ -135,8 +135,10 @@ TEST_CASE("QUICLossDetector_Loss", "[quic]")
     afc->update(pn7, true);
     afc->update(pn8, true);
     afc->update(pn9, true);
+    ink_hrtime_sleep(HRTIME_MSECONDS(1000));
     frame = afc->create();
     detector.handle_frame(frame);
+    ink_hrtime_sleep(HRTIME_MSECONDS(5000));
 
     CHECK(cc->lost_packets.size() == 3);
 

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

[trafficserver] 01/02: Fix a bug that floating values are actually calculated as integers

Posted by ma...@apache.org.
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

commit 40c752228dc97ce0ccadfd3a70506b6b586a9a9a
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Jan 9 17:05:04 2018 +0900

    Fix a bug that floating values are actually calculated as integers
---
 iocore/net/quic/QUICLossDetector.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc
index c1bd993..9b25f52 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -32,7 +32,7 @@
 // Keep the order as the same as the spec so that we can see the difference easily.
 constexpr static uint32_t MAX_TLPS               = 2;
 constexpr static uint32_t REORDERING_THRESHOLD   = 3;
-constexpr static double TIME_REORDERING_FRACTION = 1 / 8;
+constexpr static double TIME_REORDERING_FRACTION = 1.0 / 8.0;
 constexpr static ink_hrtime MIN_TLP_TIMEOUT      = HRTIME_MSECONDS(10);
 constexpr static ink_hrtime MIN_RTO_TIMEOUT      = HRTIME_MSECONDS(200);
 // This is defined on the spec but not used
@@ -210,10 +210,10 @@ QUICLossDetector::_update_rtt(ink_hrtime latest_rtt, ink_hrtime ack_delay, QUICP
   // Based on {{RFC6298}}.
   if (this->_smoothed_rtt == 0) {
     this->_smoothed_rtt = latest_rtt;
-    this->_rttvar       = latest_rtt / 2;
+    this->_rttvar       = latest_rtt / 2.0;
   } else {
-    this->_rttvar       = 3 / 4 * this->_rttvar + 1 / 4 * ABS(this->_smoothed_rtt - latest_rtt);
-    this->_smoothed_rtt = 7 / 8 * this->_smoothed_rtt + 1 / 8 * latest_rtt;
+    this->_rttvar       = 3.0 / 4.0 * this->_rttvar + 1.0 / 4.0 * ABS(this->_smoothed_rtt - latest_rtt);
+    this->_smoothed_rtt = 7.0 / 8.0 * this->_smoothed_rtt + 1.0 / 8.0 * latest_rtt;
   }
 }
 
@@ -326,7 +326,7 @@ QUICLossDetector::_detect_lost_packets(QUICPacketNumber largest_acked_packet_num
     delay_until_lost = (1 + this->_time_reordering_fraction) * std::max(this->_latest_rtt, this->_smoothed_rtt);
   } else if (largest_acked_packet_number == this->_largest_sent_packet) {
     // Early retransmit alarm.
-    delay_until_lost = 5 / 4 * std::max(this->_latest_rtt, this->_smoothed_rtt);
+    delay_until_lost = 5.0 / 4.0 * std::max(this->_latest_rtt, this->_smoothed_rtt);
   }
 
   for (auto &unacked : this->_sent_packets) {

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