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/08/31 02:45:12 UTC

[trafficserver] branch quic-latest updated (2621a07 -> 4094f6b)

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 2621a07  Acquire mutex lock before handleEvent() call
     new 5b9a089  The smallest bidi stream id is 0
     new 68b9428  Const Correctness
     new 4094f6b  Acquire mutex lock before handleEvent() call in unit test of QUICStream

The 3 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/QUICFlowController.cc   | 6 +++---
 iocore/net/quic/QUICFlowController.h    | 6 +++---
 iocore/net/quic/QUICStream.cc           | 4 ++--
 iocore/net/quic/QUICStream.h            | 4 ++--
 iocore/net/quic/QUICStreamManager.cc    | 3 +--
 iocore/net/quic/test/test_QUICStream.cc | 3 +++
 6 files changed, 14 insertions(+), 12 deletions(-)


[trafficserver] 03/03: Acquire mutex lock before handleEvent() call in unit test of QUICStream

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 4094f6b7bbe2fc8242b879444aa2773fb9f6eed4
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Aug 31 11:44:07 2018 +0900

    Acquire mutex lock before handleEvent() call in unit test of QUICStream
---
 iocore/net/quic/test/test_QUICStream.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/iocore/net/quic/test/test_QUICStream.cc b/iocore/net/quic/test/test_QUICStream.cc
index 535b89b..b88abd3 100644
--- a/iocore/net/quic/test/test_QUICStream.cc
+++ b/iocore/net/quic/test/test_QUICStream.cc
@@ -188,6 +188,8 @@ TEST_CASE("QUICStream", "[quic]")
     IOBufferReader *write_buffer_reader = write_buffer->alloc_reader();
 
     std::unique_ptr<QUICStream> stream(new QUICStream(new MockQUICRTTProvider(), new MockQUICConnectionInfoProvider(), stream_id));
+    SCOPED_MUTEX_LOCK(lock, stream->mutex, this_ethread());
+
     stream->init_flow_control_params(4096, 4096);
     MockContinuation mock_cont(stream->mutex);
     stream->do_io_read(nullptr, INT64_MAX, read_buffer);
@@ -197,6 +199,7 @@ TEST_CASE("QUICStream", "[quic]")
 
     const char data[1024] = {0};
     QUICFrameUPtr frame   = QUICFrameFactory::create_null_frame();
+
     write_buffer->write(data, 1024);
     stream->handleEvent(VC_EVENT_WRITE_READY, nullptr);
     CHECK(stream->will_generate_frame(level) == true);


[trafficserver] 01/03: The smallest bidi stream id is 0

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 5b9a089f1261fb8d6558dcd589310e5dc6b1477c
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Thu Aug 30 15:03:32 2018 +0900

    The smallest bidi stream id is 0
---
 iocore/net/quic/QUICStreamManager.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/iocore/net/quic/QUICStreamManager.cc b/iocore/net/quic/QUICStreamManager.cc
index fd0690b..1dff812 100644
--- a/iocore/net/quic/QUICStreamManager.cc
+++ b/iocore/net/quic/QUICStreamManager.cc
@@ -36,8 +36,7 @@ QUICStreamManager::QUICStreamManager(QUICConnectionInfoProvider *info, QUICRTTPr
   : _info(info), _rtt_provider(rtt_provider), _app_map(app_map)
 {
   if (this->_info->direction() == NET_VCONNECTION_OUT) {
-    // stream 0 is for handshake, smallest client bidi stream id is 4
-    this->_next_stream_id_bidi = static_cast<uint32_t>(QUICStreamType::CLIENT_BIDI) + 4;
+    this->_next_stream_id_bidi = static_cast<uint32_t>(QUICStreamType::CLIENT_BIDI);
     this->_next_stream_id_uni  = static_cast<uint32_t>(QUICStreamType::CLIENT_UNI);
   } else {
     this->_next_stream_id_bidi = static_cast<uint32_t>(QUICStreamType::SERVER_BIDI);


[trafficserver] 02/03: Const Correctness

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 68b9428e7e99f8b6c58694a153ec8edc3a66e6e9
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Fri Aug 31 11:33:59 2018 +0900

    Const Correctness
---
 iocore/net/quic/QUICFlowController.cc | 6 +++---
 iocore/net/quic/QUICFlowController.h  | 6 +++---
 iocore/net/quic/QUICStream.cc         | 4 ++--
 iocore/net/quic/QUICStream.h          | 4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/iocore/net/quic/QUICFlowController.cc b/iocore/net/quic/QUICFlowController.cc
index 70ff181..4cbca28 100644
--- a/iocore/net/quic/QUICFlowController.cc
+++ b/iocore/net/quic/QUICFlowController.cc
@@ -46,19 +46,19 @@ QUICRateAnalyzer::expect_recv_bytes(ink_hrtime time)
 // QUICFlowController
 //
 uint64_t
-QUICFlowController::credit()
+QUICFlowController::credit() const
 {
   return this->current_limit() - this->current_offset();
 }
 
 QUICOffset
-QUICFlowController::current_offset()
+QUICFlowController::current_offset() const
 {
   return this->_offset;
 }
 
 QUICOffset
-QUICFlowController::current_limit()
+QUICFlowController::current_limit() const
 {
   return this->_limit;
 }
diff --git a/iocore/net/quic/QUICFlowController.h b/iocore/net/quic/QUICFlowController.h
index 8f9e387..2f36fd9 100644
--- a/iocore/net/quic/QUICFlowController.h
+++ b/iocore/net/quic/QUICFlowController.h
@@ -43,9 +43,9 @@ private:
 class QUICFlowController : public QUICFrameGenerator
 {
 public:
-  uint64_t credit();
-  QUICOffset current_offset();
-  QUICOffset current_limit();
+  uint64_t credit() const;
+  QUICOffset current_offset() const;
+  QUICOffset current_limit() const;
 
   /*
    * Returns 0 if succeed
diff --git a/iocore/net/quic/QUICStream.cc b/iocore/net/quic/QUICStream.cc
index 18f3f73..a4d22ef 100644
--- a/iocore/net/quic/QUICStream.cc
+++ b/iocore/net/quic/QUICStream.cc
@@ -585,13 +585,13 @@ QUICStream::reset(QUICStreamErrorUPtr error)
 }
 
 QUICOffset
-QUICStream::largest_offset_received()
+QUICStream::largest_offset_received() const
 {
   return this->_local_flow_controller.current_offset();
 }
 
 QUICOffset
-QUICStream::largest_offset_sent()
+QUICStream::largest_offset_sent() const
 {
   return this->_remote_flow_controller.current_offset();
 }
diff --git a/iocore/net/quic/QUICStream.h b/iocore/net/quic/QUICStream.h
index e70cbd9..e9defc7 100644
--- a/iocore/net/quic/QUICStream.h
+++ b/iocore/net/quic/QUICStream.h
@@ -83,8 +83,8 @@ public:
 
   void reset(QUICStreamErrorUPtr error);
 
-  QUICOffset largest_offset_received();
-  QUICOffset largest_offset_sent();
+  QUICOffset largest_offset_received() const;
+  QUICOffset largest_offset_sent() const;
 
   LINK(QUICStream, link);