trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From masa...@apache.org
Subject [trafficserver] branch quic-latest updated: Delete QUICFlowController class
Date Wed, 23 Aug 2017 05:58:22 GMT
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


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 970d637  Delete QUICFlowController class
970d637 is described below

commit 970d63786d0711ecf283f7d719a9b5f725c42caf
Author: Masaori Koshiba <masaori@apache.org>
AuthorDate: Wed Aug 23 14:58:04 2017 +0900

    Delete QUICFlowController class
---
 iocore/net/P_QUICNetVConnection.h                |  2 -
 iocore/net/QUICNetVConnection.cc                 |  3 --
 iocore/net/quic/Makefile.am                      |  1 -
 iocore/net/quic/Mock.h                           | 44 ----------------------
 iocore/net/quic/QUICFlowController.cc            | 48 ------------------------
 iocore/net/quic/QUICFlowController.h             | 37 ------------------
 iocore/net/quic/QUICFrameDispatcher.cc           |  1 -
 iocore/net/quic/test/Makefile.am                 |  2 -
 iocore/net/quic/test/test_QUICFrameDispatcher.cc |  5 ---
 9 files changed, 143 deletions(-)

diff --git a/iocore/net/P_QUICNetVConnection.h b/iocore/net/P_QUICNetVConnection.h
index b4e07de..8e5586c 100644
--- a/iocore/net/P_QUICNetVConnection.h
+++ b/iocore/net/P_QUICNetVConnection.h
@@ -54,7 +54,6 @@
 #include "quic/QUICAckFrameCreator.h"
 #include "quic/QUICLossDetector.h"
 #include "quic/QUICStreamManager.h"
-#include "quic/QUICFlowController.h"
 #include "quic/QUICCongestionController.h"
 #include "quic/QUICApplicationMap.h"
 
@@ -205,7 +204,6 @@ private:
   QUICLossDetector *_loss_detector                 = nullptr;
   QUICFrameDispatcher *_frame_dispatcher           = nullptr;
   QUICStreamManager *_stream_manager               = nullptr;
-  QUICFlowController *_flow_controller             = nullptr;
   QUICCongestionController *_congestion_controller = nullptr;
 
   Queue<QUICPacket> _packet_recv_queue;
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 7e92e60..e34f13c 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -95,13 +95,11 @@ QUICNetVConnection::start(SSL_CTX *ssl_ctx)
   // Create frame handlers
   this->_stream_manager = new QUICStreamManager();
   this->_stream_manager->init(this, this, &this->_application_map);
-  this->_flow_controller       = new QUICFlowController();
   this->_congestion_controller = new QUICCongestionController();
   this->_loss_detector         = new QUICLossDetector(this);
 
   this->_frame_dispatcher->add_handler(this);
   this->_frame_dispatcher->add_handler(this->_stream_manager);
-  this->_frame_dispatcher->add_handler(this->_flow_controller);
   this->_frame_dispatcher->add_handler(this->_congestion_controller);
   this->_frame_dispatcher->add_handler(this->_loss_detector);
 
@@ -145,7 +143,6 @@ QUICNetVConnection::free(EThread *t)
   delete this->_loss_detector;
   delete this->_frame_dispatcher;
   delete this->_stream_manager;
-  delete this->_flow_controller;
   delete this->_congestion_controller;
 
   // TODO: clear member variables like `UnixNetVConnection::free(EThread *t)`
diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am
index 9d0ae8d..fda10cd 100644
--- a/iocore/net/quic/Makefile.am
+++ b/iocore/net/quic/Makefile.am
@@ -48,7 +48,6 @@ libquic_a_SOURCES = \
   QUICVersionNegotiator.cc \
   QUICLossDetector.cc \
   QUICStreamManager.cc \
-  QUICFlowController.cc \
   QUICCongestionController.cc \
   QUICStreamState.cc \
   QUICStream.cc \
diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index 195b285..b697954 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -22,7 +22,6 @@
  */
 
 #include "QUICStreamManager.h"
-#include "QUICFlowController.h"
 #include "QUICCongestionController.h"
 #include "QUICLossDetector.h"
 #include "QUICEvents.h"
@@ -343,49 +342,6 @@ private:
   int _frameCount[256] = {0};
 };
 
-class MockQUICFlowController : public QUICFlowController
-{
-public:
-  MockQUICFlowController() {}
-
-  // Override
-  virtual void
-  handle_frame(std::shared_ptr<const QUICFrame> f) override
-  {
-    ++_frameCount[static_cast<int>(f->type())];
-    ++_totalFrameCount;
-  }
-
-  // for Test
-  int
-  getStreamFrameCount()
-  {
-    return _frameCount[static_cast<int>(QUICFrameType::STREAM)];
-  }
-
-  int
-  getAckFrameCount()
-  {
-    return _frameCount[static_cast<int>(QUICFrameType::ACK)];
-  }
-
-  int
-  getPingFrameCount()
-  {
-    return _frameCount[static_cast<int>(QUICFrameType::PING)];
-  }
-
-  int
-  getTotalFrameCount()
-  {
-    return _totalFrameCount;
-  }
-
-private:
-  int _totalFrameCount = 0;
-  int _frameCount[256] = {0};
-};
-
 void NetVConnection::cancel_OOB(){};
 Action *
 NetVConnection::send_OOB(Continuation *, char *, int)
diff --git a/iocore/net/quic/QUICFlowController.cc b/iocore/net/quic/QUICFlowController.cc
deleted file mode 100644
index a160867..0000000
--- a/iocore/net/quic/QUICFlowController.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/** @file
- *
- *  A brief file description
- *
- *  @section license License
- *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-#include <QUICFlowController.h>
-
-const static char *tag = "quic_flow_controller";
-
-std::vector<QUICFrameType>
-QUICFlowController::interests()
-{
-  return {QUICFrameType::MAX_DATA, QUICFrameType::MAX_STREAM_DATA, QUICFrameType::BLOCKED,
QUICFrameType::STREAM};
-}
-
-void
-QUICFlowController::handle_frame(std::shared_ptr<const QUICFrame> frame)
-{
-  switch (frame->type()) {
-  case QUICFrameType::MAX_DATA:
-  case QUICFrameType::MAX_STREAM_DATA:
-  case QUICFrameType::BLOCKED:
-  case QUICFrameType::STREAM:
-    break;
-  default:
-    Debug(tag, "Unexpected frame type: %02x", static_cast<unsigned int>(frame->type()));
-    ink_assert(false);
-    break;
-  }
-}
diff --git a/iocore/net/quic/QUICFlowController.h b/iocore/net/quic/QUICFlowController.h
deleted file mode 100644
index 5ede6cd..0000000
--- a/iocore/net/quic/QUICFlowController.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/** @file
- *
- *  A brief file description
- *
- *  @section license License
- *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-#pragma once
-
-#include <QUICFrameHandler.h>
-
-// TODO Implement flow controll
-// Flow controll will be required for the 2nd implementation draft
-class QUICFlowController : public QUICFrameHandler
-{
-public:
-  virtual std::vector<QUICFrameType> interests() override;
-  virtual void handle_frame(std::shared_ptr<const QUICFrame>) override;
-
-private:
-};
diff --git a/iocore/net/quic/QUICFrameDispatcher.cc b/iocore/net/quic/QUICFrameDispatcher.cc
index e5ba11e..0799f22 100644
--- a/iocore/net/quic/QUICFrameDispatcher.cc
+++ b/iocore/net/quic/QUICFrameDispatcher.cc
@@ -24,7 +24,6 @@
 #include "QUICFrameDispatcher.h"
 #include "QUICConnection.h"
 #include "QUICStreamManager.h"
-#include "QUICFlowController.h"
 #include "QUICCongestionController.h"
 #include "QUICLossDetector.h"
 #include "QUICEvents.h"
diff --git a/iocore/net/quic/test/Makefile.am b/iocore/net/quic/test/Makefile.am
index d58b46e..b51245a 100644
--- a/iocore/net/quic/test/Makefile.am
+++ b/iocore/net/quic/test/Makefile.am
@@ -148,7 +148,6 @@ test_QUICFrameDispatcher_SOURCES = \
   ../QUICTransportParameters.cc \
   ../QUICStreamManager.cc \
   ../QUICApplicationMap.cc \
-  ../QUICFlowController.cc \
   ../QUICCongestionController.cc \
   ../QUICLossDetector.cc \
   ../QUICFrame.cc \
@@ -208,7 +207,6 @@ test_QUICStream_SOURCES = \
   ../QUICStream.cc \
   ../QUICFrameDispatcher.cc \
   ../QUICStreamManager.cc \
-  ../QUICFlowController.cc \
   ../QUICApplicationMap.cc \
   ../QUICCongestionController.cc
 
diff --git a/iocore/net/quic/test/test_QUICFrameDispatcher.cc b/iocore/net/quic/test/test_QUICFrameDispatcher.cc
index 35c6058..5b15819 100644
--- a/iocore/net/quic/test/test_QUICFrameDispatcher.cc
+++ b/iocore/net/quic/test/test_QUICFrameDispatcher.cc
@@ -34,20 +34,17 @@ TEST_CASE("QUICFrameHandler", "[quic]")
 
   auto connection           = new MockQUICConnection();
   auto streamManager        = new MockQUICStreamManager();
-  auto flowController       = new MockQUICFlowController();
   auto congestionController = new MockQUICCongestionController();
   auto lossDetector         = new MockQUICLossDetector();
   QUICFrameDispatcher quicFrameDispatcher;
   quicFrameDispatcher.add_handler(connection);
   quicFrameDispatcher.add_handler(streamManager);
-  quicFrameDispatcher.add_handler(flowController);
   quicFrameDispatcher.add_handler(congestionController);
   quicFrameDispatcher.add_handler(lossDetector);
 
   // Initial state
   CHECK(connection->getTotalFrameCount() == 0);
   CHECK(streamManager->getTotalFrameCount() == 0);
-  CHECK(flowController->getTotalFrameCount() == 0);
   CHECK(congestionController->getTotalFrameCount() == 0);
 
   // STREAM frame
@@ -57,7 +54,6 @@ TEST_CASE("QUICFrameHandler", "[quic]")
   quicFrameDispatcher.receive_frames(buf, len);
   CHECK(connection->getTotalFrameCount() == 0);
   CHECK(streamManager->getTotalFrameCount() == 1);
-  CHECK(flowController->getTotalFrameCount() == 1);
   CHECK(congestionController->getTotalFrameCount() == 1);
 
   // CONNECTION_CLOSE frame
@@ -66,6 +62,5 @@ TEST_CASE("QUICFrameHandler", "[quic]")
   quicFrameDispatcher.receive_frames(buf, len);
   CHECK(connection->getTotalFrameCount() == 1);
   CHECK(streamManager->getTotalFrameCount() == 1);
-  CHECK(flowController->getTotalFrameCount() == 1);
   CHECK(congestionController->getTotalFrameCount() == 1);
 }

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

Mime
View raw message