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: More rename
Date Fri, 01 Feb 2019 07:26:12 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 e87727f  More rename
e87727f is described below

commit e87727f84a95ae6b3075455e2c5a3b90f9c14d71
Author: Masakazu Kitajo <maskit@apache.org>
AuthorDate: Fri Feb 1 16:25:45 2019 +0900

    More rename
---
 iocore/net/quic/QUICFlowController.cc          |  2 +-
 iocore/net/quic/QUICFrame.cc                   |  9 +++++----
 iocore/net/quic/QUICFrame.h                    |  2 +-
 iocore/net/quic/test/test_QUICStreamManager.cc |  8 ++++----
 iocore/net/quic/test/test_QUICStreamState.cc   | 26 +++++++++++++-------------
 5 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/iocore/net/quic/QUICFlowController.cc b/iocore/net/quic/QUICFlowController.cc
index 078f09b..e5162ac 100644
--- a/iocore/net/quic/QUICFlowController.cc
+++ b/iocore/net/quic/QUICFlowController.cc
@@ -241,7 +241,7 @@ QUICLocalConnectionFlowController::_create_frame()
 QUICFrameUPtr
 QUICRemoteStreamFlowController::_create_frame()
 {
-  auto frame = QUICFrameFactory::create_stream_blocked_frame(this->_stream_id, this->_offset,
this->_issue_frame_id(), this);
+  auto frame = QUICFrameFactory::create_stream_data_blocked_frame(this->_stream_id, this->_offset,
this->_issue_frame_id(), this);
   QUICFrameInformationUPtr info                 = QUICFrameInformationUPtr(quicFrameInformationAllocator.alloc());
   info->type                                    = frame->type();
   info->level                                   = QUICEncryptionLevel::NONE;
diff --git a/iocore/net/quic/QUICFrame.cc b/iocore/net/quic/QUICFrame.cc
index 4c78b67..2ae36a0 100644
--- a/iocore/net/quic/QUICFrame.cc
+++ b/iocore/net/quic/QUICFrame.cc
@@ -1735,7 +1735,7 @@ QUICMaxStreamsFrame::maximum_streams() const
 }
 
 //
-// BLOCKED frame
+// DATA_BLOCKED frame
 //
 QUICDataBlockedFrame::QUICDataBlockedFrame(const uint8_t *buf, size_t len)
 {
@@ -1772,7 +1772,7 @@ QUICDataBlockedFrame::parse(const uint8_t *buf, size_t len)
 int
 QUICDataBlockedFrame::debug_msg(char *msg, size_t msg_len) const
 {
-  return snprintf(msg, msg_len, "| BLOCKED size=%zu offset=%" PRIu64, this->size(), this->offset());
+  return snprintf(msg, msg_len, "| DATA_BLOCKED size=%zu offset=%" PRIu64, this->size(),
this->offset());
 }
 
 QUICFrameUPtr
@@ -1872,7 +1872,7 @@ QUICStreamDataBlockedFrame::debug_msg(char *msg, size_t msg_len) const
 QUICFrameUPtr
 QUICStreamDataBlockedFrame::clone() const
 {
-  return QUICFrameFactory::create_stream_blocked_frame(this->stream_id(), this->offset(),
this->_id, this->_owner);
+  return QUICFrameFactory::create_stream_data_blocked_frame(this->stream_id(), this->offset(),
this->_id, this->_owner);
 }
 
 QUICFrameType
@@ -2899,7 +2899,8 @@ QUICFrameFactory::create_data_blocked_frame(QUICOffset offset, QUICFrameId
id, Q
 }
 
 std::unique_ptr<QUICStreamDataBlockedFrame, QUICFrameDeleterFunc>
-QUICFrameFactory::create_stream_blocked_frame(QUICStreamId stream_id, QUICOffset offset,
QUICFrameId id, QUICFrameGenerator *owner)
+QUICFrameFactory::create_stream_data_blocked_frame(QUICStreamId stream_id, QUICOffset offset,
QUICFrameId id,
+                                                   QUICFrameGenerator *owner)
 {
   QUICStreamDataBlockedFrame *frame = quicStreamBlockedFrameAllocator.alloc();
   new (frame) QUICStreamDataBlockedFrame(stream_id, offset, id, owner);
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index db97e06..ddb94bd 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -1021,7 +1021,7 @@ public:
   /*
    * Creates a STREAM_DATA_BLOCKED frame.
    */
-  static std::unique_ptr<QUICStreamDataBlockedFrame, QUICFrameDeleterFunc> create_stream_blocked_frame(
+  static std::unique_ptr<QUICStreamDataBlockedFrame, QUICFrameDeleterFunc> create_stream_data_blocked_frame(
     QUICStreamId stream_id, QUICOffset offset, QUICFrameId id = 0, QUICFrameGenerator *owner
= nullptr);
 
   /*
diff --git a/iocore/net/quic/test/test_QUICStreamManager.cc b/iocore/net/quic/test/test_QUICStreamManager.cc
index 8188d22..9470df9 100644
--- a/iocore/net/quic/test/test_QUICStreamManager.cc
+++ b/iocore/net/quic/test/test_QUICStreamManager.cc
@@ -89,13 +89,13 @@ TEST_CASE("QUICStreamManager_NewStream", "[quic]")
   CHECK(sm.stream_count() == 4);
 
   // STREAM_DATA_BLOCKED frames create new streams
-  std::shared_ptr<QUICFrame> stream_blocked_frame = QUICFrameFactory::create_stream_blocked_frame(0x10,
0);
+  std::shared_ptr<QUICFrame> stream_blocked_frame = QUICFrameFactory::create_stream_data_blocked_frame(0x10,
0);
   sm.handle_frame(level, *stream_blocked_frame);
   CHECK(sm.stream_count() == 5);
 
   // Set local maximum stream id
   sm.set_max_streams_bidi(100);
-  std::shared_ptr<QUICFrame> stream_blocked_frame_x = QUICFrameFactory::create_stream_blocked_frame(0x18,
0);
+  std::shared_ptr<QUICFrame> stream_blocked_frame_x = QUICFrameFactory::create_stream_data_blocked_frame(0x18,
0);
   sm.handle_frame(level, *stream_blocked_frame_x);
   CHECK(sm.stream_count() == 5);
 }
@@ -167,8 +167,8 @@ TEST_CASE("QUICStreamManager_total_offset_received", "[quic]")
   sm.init_flow_control_params(local_tp, remote_tp);
 
   // Create a stream with STREAM_DATA_BLOCKED (== noop)
-  std::shared_ptr<QUICFrame> stream_blocked_frame_0 = QUICFrameFactory::create_stream_blocked_frame(0,
0);
-  std::shared_ptr<QUICFrame> stream_blocked_frame_1 = QUICFrameFactory::create_stream_blocked_frame(4,
0);
+  std::shared_ptr<QUICFrame> stream_blocked_frame_0 = QUICFrameFactory::create_stream_data_blocked_frame(0,
0);
+  std::shared_ptr<QUICFrame> stream_blocked_frame_1 = QUICFrameFactory::create_stream_data_blocked_frame(4,
0);
   sm.handle_frame(level, *stream_blocked_frame_0);
   sm.handle_frame(level, *stream_blocked_frame_1);
   CHECK(sm.stream_count() == 2);
diff --git a/iocore/net/quic/test/test_QUICStreamState.cc b/iocore/net/quic/test/test_QUICStreamState.cc
index 985d7e7..ad5119f 100644
--- a/iocore/net/quic/test/test_QUICStreamState.cc
+++ b/iocore/net/quic/test/test_QUICStreamState.cc
@@ -37,10 +37,10 @@ TEST_CASE("QUICSendStreamState", "[quic]")
   block_4->fill(4);
   CHECK(block_4->read_avail() == 4);
 
-  auto stream_frame          = QUICFrameFactory::create_stream_frame(block_4, 1, 0);
-  auto stream_frame_with_fin = QUICFrameFactory::create_stream_frame(block_4, 1, 0, true);
-  auto rst_stream_frame      = QUICFrameFactory::create_rst_stream_frame(0, static_cast<QUICAppErrorCode>(0x01),
0);
-  auto stream_blocked_frame  = QUICFrameFactory::create_stream_blocked_frame(0, 0);
+  auto stream_frame              = QUICFrameFactory::create_stream_frame(block_4, 1, 0);
+  auto stream_frame_with_fin     = QUICFrameFactory::create_stream_frame(block_4, 1, 0, true);
+  auto rst_stream_frame          = QUICFrameFactory::create_rst_stream_frame(0, static_cast<QUICAppErrorCode>(0x01),
0);
+  auto stream_data_blocked_frame = QUICFrameFactory::create_stream_data_blocked_frame(0,
0);
   MockQUICTransferProgressProvider pp;
 
   SECTION("Ready -> Send -> Data Sent -> Data Recvd")
@@ -56,7 +56,7 @@ TEST_CASE("QUICSendStreamState", "[quic]")
 
     // Case3. Send STREAM_DATA_BLOCKED
     CHECK(ss.is_allowed_to_send(QUICFrameType::STREAM_DATA_BLOCKED));
-    ss.update_with_sending_frame(*stream_blocked_frame);
+    ss.update_with_sending_frame(*stream_data_blocked_frame);
     CHECK(ss.get() == QUICStreamState::State::Send);
 
     // Case3. Send FIN in a STREAM
@@ -81,7 +81,7 @@ TEST_CASE("QUICSendStreamState", "[quic]")
 
     // Case2. Send STREAM_DATA_BLOCKED
     CHECK(ss.is_allowed_to_send(QUICFrameType::STREAM_DATA_BLOCKED));
-    ss.update_with_sending_frame(*stream_blocked_frame);
+    ss.update_with_sending_frame(*stream_data_blocked_frame);
     CHECK(ss.get() == QUICStreamState::State::Send);
   }
 
@@ -147,7 +147,7 @@ TEST_CASE("QUICSendStreamState", "[quic]")
 
     // Case3. Send STREAM_DATA_BLOCKED
     CHECK(ss.is_allowed_to_send(QUICFrameType::STREAM_DATA_BLOCKED));
-    ss.update_with_sending_frame(*stream_blocked_frame);
+    ss.update_with_sending_frame(*stream_data_blocked_frame);
     CHECK(ss.get() == QUICStreamState::State::Send);
 
     // Case3. Send FIN in a STREAM
@@ -182,11 +182,11 @@ TEST_CASE("QUICReceiveStreamState", "[quic]")
   block_4->fill(4);
   CHECK(block_4->read_avail() == 4);
 
-  auto stream_frame          = QUICFrameFactory::create_stream_frame(block_4, 1, 0);
-  auto stream_frame_delayed  = QUICFrameFactory::create_stream_frame(block_4, 1, 1);
-  auto stream_frame_with_fin = QUICFrameFactory::create_stream_frame(block_4, 1, 2, true);
-  auto rst_stream_frame      = QUICFrameFactory::create_rst_stream_frame(0, static_cast<QUICAppErrorCode>(0x01),
0);
-  auto stream_blocked_frame  = QUICFrameFactory::create_stream_blocked_frame(0, 0);
+  auto stream_frame              = QUICFrameFactory::create_stream_frame(block_4, 1, 0);
+  auto stream_frame_delayed      = QUICFrameFactory::create_stream_frame(block_4, 1, 1);
+  auto stream_frame_with_fin     = QUICFrameFactory::create_stream_frame(block_4, 1, 2, true);
+  auto rst_stream_frame          = QUICFrameFactory::create_rst_stream_frame(0, static_cast<QUICAppErrorCode>(0x01),
0);
+  auto stream_data_blocked_frame = QUICFrameFactory::create_stream_data_blocked_frame(0,
0);
 
   SECTION("Recv -> Size Known -> Data Recvd -> Data Read")
   {
@@ -201,7 +201,7 @@ TEST_CASE("QUICReceiveStreamState", "[quic]")
 
     // Case2. Recv STREAM_DATA_BLOCKED
     CHECK(ss.is_allowed_to_receive(QUICFrameType::STREAM_DATA_BLOCKED));
-    ss.update_with_receiving_frame(*stream_blocked_frame);
+    ss.update_with_receiving_frame(*stream_data_blocked_frame);
     CHECK(ss.get() == QUICStreamState::State::Recv);
 
     // Case3. Recv FIN in a STREAM


Mime
View raw message