[trafficserver] branch master updated (549c626 -> f205570)

2020-07-26 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 549c626  Make tls_conn_timeout test more reliable in CI (#7018)
 add f205570  Fix a typo (#7043)

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/QUICResetTokenTable.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[trafficserver] branch master updated (be23454 -> 159f25c)

2020-07-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from be23454  Fixes use after free when boringssl is used (#6985)
 add 159f25c  Fix typo in Http2ConnectionState (#6991)

No new revisions were added by this update.

Summary of changes:
 proxy/http2/Http2ConnectionState.cc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)



[trafficserver] branch master updated (be23454 -> 159f25c)

2020-07-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from be23454  Fixes use after free when boringssl is used (#6985)
 add 159f25c  Fix typo in Http2ConnectionState (#6991)

No new revisions were added by this update.

Summary of changes:
 proxy/http2/Http2ConnectionState.cc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)



[trafficserver] branch master updated (be23454 -> 159f25c)

2020-07-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from be23454  Fixes use after free when boringssl is used (#6985)
 add 159f25c  Fix typo in Http2ConnectionState (#6991)

No new revisions were added by this update.

Summary of changes:
 proxy/http2/Http2ConnectionState.cc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)



[trafficserver] branch master updated (be23454 -> 159f25c)

2020-07-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from be23454  Fixes use after free when boringssl is used (#6985)
 add 159f25c  Fix typo in Http2ConnectionState (#6991)

No new revisions were added by this update.

Summary of changes:
 proxy/http2/Http2ConnectionState.cc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)



[trafficserver] branch master updated (be23454 -> 159f25c)

2020-07-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from be23454  Fixes use after free when boringssl is used (#6985)
 add 159f25c  Fix typo in Http2ConnectionState (#6991)

No new revisions were added by this update.

Summary of changes:
 proxy/http2/Http2ConnectionState.cc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)



[trafficserver] branch quic-latest updated (5d3cecf -> fbc8d4a)

2020-06-26 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 5d3cecf  Update tests
 add fbc8d4a  Document qlog_dir configuration (#6935)

No new revisions were added by this update.

Summary of changes:
 doc/admin-guide/files/records.config.en.rst | 6 ++
 1 file changed, 6 insertions(+)



[trafficserver] branch quic-latest updated (a2e788b -> 5c50ff3)

2020-06-16 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from a2e788b  Merge branch 'master' into quic-latest
 add da958f1  QUIC: add qlog support
 add 82b5107  make qlog configurable
 add a126b84  remove useless INCLUDE_YAML
 add 1a5669a  add metrics update
 add 511ac7e  make qlog configurable
 add 344ede3  Chang qlog_file configuration to qlog_dir
 add 5c50ff3  make compiler happy

No new revisions were added by this update.

Summary of changes:
 iocore/net/P_QUICNetVConnection.h  |5 +-
 iocore/net/QUICNetVConnection.cc   |   25 +-
 iocore/net/quic/Makefile.am|7 +-
 iocore/net/quic/QUICConfig.cc  |7 +
 iocore/net/quic/QUICConfig.h   |2 +
 iocore/net/quic/QUICCongestionController.h |   13 +
 iocore/net/quic/QUICContext.cc |   20 +-
 iocore/net/quic/QUICContext.h  |  176 +++-
 iocore/net/quic/QUICFrame.cc   |   16 +
 iocore/net/quic/QUICFrame.h|3 +
 iocore/net/quic/QUICFrameDispatcher.cc |7 +-
 iocore/net/quic/QUICFrameDispatcher.h  |3 +-
 iocore/net/quic/QUICLossDetector.cc|3 +-
 iocore/net/quic/QUICLossDetector.h |   14 +-
 iocore/net/quic/QUICNewRenoCongestionController.cc |8 +-
 iocore/net/quic/QUICStreamManager.cc   |2 +-
 iocore/net/quic/QUICStreamManager.h|4 +-
 iocore/net/quic/QUICTypes.cc   |   27 +
 iocore/net/quic/QUICTypes.h|8 +
 iocore/net/quic/qlog/QLog.cc   |  103 ++
 iocore/net/quic/qlog/QLog.h|  145 +++
 iocore/net/quic/qlog/QLogEvent.cc  |  317 ++
 iocore/net/quic/qlog/QLogEvent.h   | 1013 
 iocore/net/quic/qlog/QLogFrame.cc  |  282 ++
 iocore/net/quic/qlog/QLogFrame.h   |  309 ++
 iocore/net/quic/qlog/QLogListener.h|  119 +++
 iocore/net/quic/qlog/QLogUtils.h   |   80 ++
 mgmt/RecordsConfig.cc  |2 +
 proxy/http/Makefile.am |3 +-
 proxy/http3/Makefile.am|3 +-
 src/traffic_quic/Makefile.inc  |2 +-
 31 files changed, 2651 insertions(+), 77 deletions(-)
 create mode 100644 iocore/net/quic/qlog/QLog.cc
 create mode 100644 iocore/net/quic/qlog/QLog.h
 create mode 100644 iocore/net/quic/qlog/QLogEvent.cc
 create mode 100644 iocore/net/quic/qlog/QLogEvent.h
 create mode 100644 iocore/net/quic/qlog/QLogFrame.cc
 create mode 100644 iocore/net/quic/qlog/QLogFrame.h
 create mode 100644 iocore/net/quic/qlog/QLogListener.h
 create mode 100644 iocore/net/quic/qlog/QLogUtils.h



[trafficserver] 01/01: QUIC: add qlog support

2020-05-29 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch qlog
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 1d9cf486ba9b4c960aa605616938a2537b70fe19
Author: scw00 
AuthorDate: Mon May 25 13:54:49 2020 +0800

QUIC: add qlog support
---
 iocore/cache/Makefile.am   |   3 +-
 iocore/dns/Makefile.am |   3 +-
 iocore/hostdb/Makefile.am  |   3 +-
 iocore/net/P_QUICNetVConnection.h  |   4 +
 iocore/net/QUICNetVConnection.cc   |  22 +-
 iocore/net/quic/Makefile.am|   7 +-
 iocore/net/quic/QUICCongestionController.h |   2 +
 iocore/net/quic/QUICContext.cc |  11 +-
 iocore/net/quic/QUICContext.h  |  11 +-
 iocore/net/quic/QUICFrame.cc   |  18 +-
 iocore/net/quic/QUICFrame.h|   5 +-
 iocore/net/quic/QUICFrameDispatcher.cc |  10 +-
 iocore/net/quic/QUICFrameDispatcher.h  |   4 +-
 iocore/net/quic/QUICLog.cc |  76 +++
 iocore/net/quic/QUICLog.h  | 113 
 iocore/net/quic/QUICLogEvent.cc| 294 +
 iocore/net/quic/QUICLogEvent.h | 984 +
 iocore/net/quic/QUICLogFrame.cc| 258 
 iocore/net/quic/QUICLogFrame.h | 286 +
 iocore/net/quic/QUICLogUtils.h |  40 ++
 iocore/net/quic/QUICLossDetector.cc|   3 +
 iocore/net/quic/QUICTypes.cc   |  27 +
 iocore/net/quic/QUICTypes.h|   8 +
 iocore/net/quic/test/test_QUICType.cc  |  32 +
 mgmt/Makefile.am   |   3 +-
 proxy/hdrs/Makefile.am |   3 +-
 proxy/http/Makefile.am |   3 +-
 proxy/http2/Makefile.am|   3 +-
 proxy/http3/Makefile.am|   3 +-
 proxy/shared/Makefile.am   |   3 +-
 src/traffic_quic/Makefile.inc  |   3 +-
 src/traffic_server/Makefile.inc|   3 +-
 32 files changed, 2224 insertions(+), 24 deletions(-)

diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index 307f05b..e7a8803 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -27,7 +27,8 @@ AM_CPPFLAGS += \
-I$(abs_top_srcdir)/proxy/http/remap \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/utils \
-   $(TS_INCLUDES)
+   $(TS_INCLUDES) \
+   @YAMLCPP_INCLUDES@
 
 noinst_LIBRARIES = libinkcache.a
 
diff --git a/iocore/dns/Makefile.am b/iocore/dns/Makefile.am
index a7287d2..8507b90 100644
--- a/iocore/dns/Makefile.am
+++ b/iocore/dns/Makefile.am
@@ -25,7 +25,8 @@ AM_CPPFLAGS += \
-I$(abs_top_srcdir)/proxy/hdrs \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/utils \
-   $(TS_INCLUDES)
+   $(TS_INCLUDES) \
+   @YAMLCPP_INCLUDES@
 
 noinst_LIBRARIES = libinkdns.a
 
diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am
index 8f49b12..5ecc4dc 100644
--- a/iocore/hostdb/Makefile.am
+++ b/iocore/hostdb/Makefile.am
@@ -25,7 +25,8 @@ AM_CPPFLAGS += \
-I$(abs_top_srcdir)/proxy/http \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/utils \
-   $(TS_INCLUDES)
+   $(TS_INCLUDES) \
+  @YAMLCPP_INCLUDES@
 
 EXTRA_DIST = I_HostDB.h
 
diff --git a/iocore/net/P_QUICNetVConnection.h 
b/iocore/net/P_QUICNetVConnection.h
index f603dfe..cc2901c 100644
--- a/iocore/net/P_QUICNetVConnection.h
+++ b/iocore/net/P_QUICNetVConnection.h
@@ -69,6 +69,7 @@
 #include "quic/QUICPacketProtectionKeyInfo.h"
 #include "quic/QUICContext.h"
 #include "quic/QUICTokenCreator.h"
+#include "quic/QUICLog.h"
 
 // Size of connection ids for debug log : e.g. -\0
 static constexpr size_t MAX_CIDS_SIZE = 8 + 1 + 8 + 1;
@@ -372,6 +373,9 @@ private:
   QUICAddrVerifyState _verified_state;
 
   std::unique_ptr _context;
+
+  QLog::QUICLog _qlog;
+  QLog::Trace *_trace;
 };
 
 typedef int (QUICNetVConnection::*QUICNetVConnHandler)(int, void *);
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 7940ae4..32cf1ab 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -42,6 +42,7 @@
 #include "QUICHandshake.h"
 #include "QUICConfig.h"
 #include "QUICIntUtil.h"
+#include "QUICLogUtils.h"
 
 using namespace std::literals;
 static constexpr std::string_view QUIC_DEBUG_TAG = "quic_net"sv;
@@ -247,6 +248,8 @@ QUICNetVConnection::init(QUICConnectionId peer_cid, 
QUICConnectionId original_ci
 
   this->_update_cids();
 
+  this->_trace = >_qlog.new_trace({"ats", 
QLog::Trace::VantagePointType::client, QLog::Trace::VantagePointType::client},
+
this->_original_quic_connection_id.hex());
   if (is_debug_tag_set(QUIC_DEBUG_TAG.data())) {
 QUICC

[trafficserver] branch qlog created (now 1d9cf48)

2020-05-29 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch qlog
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


  at 1d9cf48  QUIC: add qlog support

This branch includes the following new commits:

 new 1d9cf48  QUIC: add qlog support

The 1 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.




[trafficserver] branch master updated: Fix typos in comments

2020-05-06 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new ad89f72  Fix typos in comments
ad89f72 is described below

commit ad89f720fa1bc769db5f0aac9897ff2689c74051
Author: takkitano 
AuthorDate: Wed May 6 18:09:17 2020 +0900

Fix typos in comments
---
 iocore/eventsystem/I_EThread.h | 2 +-
 lib/records/RecConfigParse.cc  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/iocore/eventsystem/I_EThread.h b/iocore/eventsystem/I_EThread.h
index 45afc73..d8ee534 100644
--- a/iocore/eventsystem/I_EThread.h
+++ b/iocore/eventsystem/I_EThread.h
@@ -118,7 +118,7 @@ public:
 
 @param c Continuation to be called back as soon as possible.
 @param callback_event Event code to be passed back to the
-  continuation's handler. See the the EventProcessor class.
+  continuation's handler. See the EventProcessor class.
 @param cookie User-defined value or pointer to be passed back
   in the Event's object cookie field.
 @return Reference to an Event object representing the scheduling
diff --git a/lib/records/RecConfigParse.cc b/lib/records/RecConfigParse.cc
index f81d271..d8272f8 100644
--- a/lib/records/RecConfigParse.cc
+++ b/lib/records/RecConfigParse.cc
@@ -193,7 +193,7 @@ RecConfigFileParse(const char *path, RecConfigEntryCallback 
handler)
 if (ln) {
   // 'ln' will point to either the next token or a bunch of spaces
   // if the user didn't supply a value (e.g. 'STRING   ').  First
-  // scan past all of the spaces.  If we hit a '\0', then we we
+  // scan past all of the spaces.  If we hit a '\0', then we
   // know we didn't have a valid value.  If not, set 'data_str' to
   // the start of the token and scan until we find the end.  Once
   // the end is found, back-peddle to remove any trailing spaces.



[trafficserver] branch master updated: Fix lost fragments when update object

2020-04-25 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new c35efb3  Fix lost fragments when update object
c35efb3 is described below

commit c35efb328a4052d368924b3d13901ba819d8a96e
Author: scw00 
AuthorDate: Wed Sep 11 16:30:31 2019 +0800

Fix lost fragments when update object
---
 iocore/cache/CacheWrite.cc  | 4 +++-
 iocore/cache/test/test_Update_L_to_S.cc | 1 +
 iocore/cache/test/test_Update_S_to_L.cc | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index c619592..cff1818 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -105,7 +105,9 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * 
/* e ATS_UNUSED */)
  called iff the update is a header only update so the fragment
  data should remain valid.
   */
-  if (alternate_index >= 0) {
+  // If we are not in header only updating case. Don't copy fragments.
+  if (alternate_index >= 0 &&
+  ((total_len == 0 && alternate.get_frag_offset_count() == 0) && 
!(f.allow_empty_doc && this->vio.nbytes == 0))) {
 alternate.copy_frag_offsets_from(write_vector->get(alternate_index));
   }
   alternate_index = write_vector->insert(, alternate_index);
diff --git a/iocore/cache/test/test_Update_L_to_S.cc 
b/iocore/cache/test/test_Update_L_to_S.cc
index 7ace4ac..9b4ea8e 100644
--- a/iocore/cache/test/test_Update_L_to_S.cc
+++ b/iocore/cache/test/test_Update_L_to_S.cc
@@ -51,6 +51,7 @@ public:
 switch (event) {
 case CACHE_EVENT_OPEN_READ:
   base->do_io_read();
+  REQUIRE(base->vc->alternate.get_frag_offset_count() < 5);
   break;
 case VC_EVENT_READ_READY:
   base->reenable();
diff --git a/iocore/cache/test/test_Update_S_to_L.cc 
b/iocore/cache/test/test_Update_S_to_L.cc
index def645d..5b0f6d1 100644
--- a/iocore/cache/test/test_Update_S_to_L.cc
+++ b/iocore/cache/test/test_Update_S_to_L.cc
@@ -51,6 +51,7 @@ public:
 switch (event) {
 case CACHE_EVENT_OPEN_READ:
   base->do_io_read();
+  REQUIRE(base->vc->alternate.get_frag_offset_count() > 8);
   break;
 case VC_EVENT_READ_READY:
   base->reenable();



[trafficserver] branch master updated: Fix crash when folloing redirect

2020-04-22 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 36ebb2d  Fix crash when folloing redirect
36ebb2d is described below

commit 36ebb2d2a5cfdf794ea2661ed5f6e55090918d81
Author: YuanYingdong <1975643...@qq.com>
AuthorDate: Wed Mar 25 20:45:10 2020 +0800

Fix crash when folloing redirect

When doing redirect  and get cache read miss, we need to get cache write  
lock first other than directly do cache write directly.
---
 proxy/http/HttpSM.cc   | 7 +++
 proxy/http/HttpTransact.cc | 7 ++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 9b14343..1bf7500 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -7859,10 +7859,9 @@ HttpSM::redirect_request(const char *arg_redirect_url, 
const int arg_redirect_le
   // will do that in handle_api_return under the
   // HttpTransact::SM_ACTION_REDIRECT_READ state
   t_state.parent_result.reset();
-  t_state.request_sent_time   = 0;
-  t_state.response_received_time  = 0;
-  t_state.cache_info.write_lock_state = HttpTransact::CACHE_WL_INIT;
-  t_state.next_action = HttpTransact::SM_ACTION_REDIRECT_READ;
+  t_state.request_sent_time  = 0;
+  t_state.response_received_time = 0;
+  t_state.next_action= HttpTransact::SM_ACTION_REDIRECT_READ;
   // we have a new OS and need to have DNS lookup the new OS
   t_state.dns_info.lookup_success = false;
   t_state.force_dns   = false;
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index b62fcc2..026870a 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -2106,7 +2106,12 @@ HttpTransact::DecideCacheLookup(State *s)
 if (s->redirect_info.redirect_in_process) {
   // without calling out the CACHE_LOOKUP_COMPLETE_HOOK
   if (s->txn_conf->cache_http) {
-s->cache_info.action = CACHE_DO_WRITE;
+if (s->cache_info.write_lock_state == CACHE_WL_FAIL) {
+  s->cache_info.action   = CACHE_PREPARE_TO_WRITE;
+  s->cache_info.write_lock_state = HttpTransact::CACHE_WL_INIT;
+} else if (s->cache_info.write_lock_state == CACHE_WL_SUCCESS) {
+  s->cache_info.action = CACHE_DO_WRITE;
+}
   }
   LookupSkipOpenServer(s);
 } else {



[trafficserver] branch quic-latest updated (bfbea17 -> 8bfdc08)

2020-02-24 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from bfbea17  Add -r option for stateless reset excersice to traffic_quic
 add 8bfdc08  Using std::string for QUICConnectionId::hex

No new revisions were added by this update.

Summary of changes:
 iocore/net/QUICNetVConnection.cc| 39 +
 iocore/net/QUICPacketHandler.cc | 12 +++--
 iocore/net/quic/QUICAltConnectionManager.cc |  4 +--
 iocore/net/quic/QUICFrame.cc|  9 +++
 iocore/net/quic/QUICTLS.cc  |  4 +--
 iocore/net/quic/QUICTransportParameters.cc  |  4 +--
 iocore/net/quic/QUICTypes.cc| 16 +---
 iocore/net/quic/QUICTypes.h |  3 ++-
 8 files changed, 30 insertions(+), 61 deletions(-)



[trafficserver] branch master updated: Cleanup RamCacheCLFUS

2020-02-16 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new c0d29f3  Cleanup RamCacheCLFUS
c0d29f3 is described below

commit c0d29f333a8e92641f72c4a1b53b832c30d45edb
Author: scw00 
AuthorDate: Wed Sep 11 14:45:03 2019 +0800

Cleanup RamCacheCLFUS
---
 iocore/cache/P_RamCache.h |   4 +-
 iocore/cache/RamCacheCLFUS.cc | 294 +-
 2 files changed, 153 insertions(+), 145 deletions(-)

diff --git a/iocore/cache/P_RamCache.h b/iocore/cache/P_RamCache.h
index ec47197..7bece04 100644
--- a/iocore/cache/P_RamCache.h
+++ b/iocore/cache/P_RamCache.h
@@ -27,7 +27,9 @@
 
 // Generic Ram Cache interface
 
-struct RamCache {
+class RamCache
+{
+public:
   // returns 1 on found/stored, 0 on not found/stored, if provided auxkey1 and 
auxkey2 must match
   virtual int get(CryptoHash *key, Ptr *ret_data, uint32_t 
auxkey1 = 0, uint32_t auxkey2 = 0) = 0;
   virtual int put(CryptoHash *key, IOBufferData *data, uint32_t len, bool copy 
= false, uint32_t auxkey1 = 0,
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 2ff8018..6e5c96c 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -70,10 +70,10 @@ struct RamCacheCLFUSEntry {
   Ptr data;
 };
 
-struct RamCacheCLFUS : public RamCache {
-  int64_t max_bytes = 0;
-  int64_t bytes = 0;
-  int64_t objects   = 0;
+class RamCacheCLFUS : public RamCache
+{
+public:
+  RamCacheCLFUS() {}
 
   // returns 1 on found/stored, 0 on not found/stored, if provided auxkey1 and 
auxkey2 must match
   int get(CryptoHash *key, Ptr *ret_data, uint32_t auxkey1 = 0, 
uint32_t auxkey2 = 0) override;
@@ -84,25 +84,31 @@ struct RamCacheCLFUS : public RamCache {
 
   void init(int64_t max_bytes, Vol *vol) override;
 
-  // private
-  Vol *vol = nullptr; // for stats
-  double average_value = 0;
-  int64_t history  = 0;
-  int ibuckets = 0;
-  int nbuckets = 0;
-  DList(RamCacheCLFUSEntry, hash_link) * bucket;
-  Que(RamCacheCLFUSEntry, lru_link) lru[2];
-  uint16_t *seen = nullptr;
-  int ncompressed= 0;
-  RamCacheCLFUSEntry *compressed = nullptr; // first uncompressed lru[0] entry
   void compress_entries(EThread *thread, int do_at_most = INT_MAX);
-  void resize_hashtable();
-  void victimize(RamCacheCLFUSEntry *e);
-  void move_compressed(RamCacheCLFUSEntry *e);
-  RamCacheCLFUSEntry *destroy(RamCacheCLFUSEntry *e);
-  void requeue_victims(Que(RamCacheCLFUSEntry, lru_link) & victims);
-  void tick(); // move CLOCK on history
-  RamCacheCLFUS() : bucket(nullptr) {}
+
+  // TODO move it to private.
+  Vol *vol = nullptr; // for stats
+private:
+  int64_t _max_bytes = 0;
+  int64_t _bytes = 0;
+  int64_t _objects   = 0;
+
+  double _average_value = 0;
+  int64_t _history  = 0;
+  int _ibuckets = 0;
+  int _nbuckets = 0;
+  DList(RamCacheCLFUSEntry, hash_link) *_bucket = nullptr;
+  Que(RamCacheCLFUSEntry, lru_link) _lru[2];
+  uint16_t *_seen = nullptr;
+  int _ncompressed= 0;
+  RamCacheCLFUSEntry *_compressed = nullptr; // first uncompressed lru[0] entry
+
+  void _resize_hashtable();
+  void _victimize(RamCacheCLFUSEntry *e);
+  void _move_compressed(RamCacheCLFUSEntry *e);
+  RamCacheCLFUSEntry *_destroy(RamCacheCLFUSEntry *e);
+  void _requeue_victims(Que(RamCacheCLFUSEntry, lru_link) & victims);
+  void _tick(); // move CLOCK on history
 };
 
 int64_t
@@ -110,7 +116,7 @@ RamCacheCLFUS::size() const
 {
   int64_t s = 0;
   for (int i = 0; i < 2; i++) {
-forl_LL(RamCacheCLFUSEntry, e, lru[i])
+forl_LL(RamCacheCLFUSEntry, e, this->_lru[i])
 {
   s += sizeof(*e);
   if (e->data) {
@@ -164,29 +170,29 @@ static const int bucket_sizes[] = {127,  251,  
509,   1021,  203
33554393, 67108859, 134217689, 268435399, 
536870909, 1073741789, 2147483647};
 
 void
-RamCacheCLFUS::resize_hashtable()
+RamCacheCLFUS::_resize_hashtable()
 {
-  int anbuckets = bucket_sizes[ibuckets];
+  int anbuckets = bucket_sizes[this->_ibuckets];
   DDebug("ram_cache", "resize hashtable %d", anbuckets);
   int64_t s= anbuckets * 
sizeof(DList(RamCacheCLFUSEntry, hash_link));
   DList(RamCacheCLFUSEntry, hash_link) *new_bucket = 
static_cast(ats_malloc(s));
   memset(static_cast(new_bucket), 0, s);
-  if (bucket) {
-for (int64_t i = 0; i < nbuckets; i++) {
+  if (this->_bucket) {
+for (int64_t i = 0; i < this->_nbuckets; i++) {
   RamCacheCLFUSEntry *e = nullptr;
-  while ((e = bucket[i].pop())) {
+  while ((e = this->_b

[trafficserver] branch master updated (f2716fa -> bd72eae)

2020-01-08 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from f2716fa  Doc bugs
 add bd72eae  Fix closed flag from #6287

No new revisions were added by this update.

Summary of changes:
 iocore/net/NetEvent.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[trafficserver] branch master updated (0ad8519 -> f630275)

2020-01-06 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


from 0ad8519  Reduce process duration of test_Http2FrequencyCounter
 add f630275  Introduce NetEvent to split UnixNetVConnection and NetHandler

No new revisions were added by this update.

Summary of changes:
 iocore/net/NetEvent.h |  92 +++
 iocore/net/P_UnixNet.h| 198 +++
 iocore/net/P_UnixNetState.h   |   6 +-
 iocore/net/P_UnixNetVConnection.h |  75 +
 iocore/net/QUICNetVConnection.cc  |   2 +-
 iocore/net/UnixNet.cc | 319 +++---
 iocore/net/UnixNetPages.cc|  12 +-
 iocore/net/UnixNetVConnection.cc  |  19 ++-
 8 files changed, 417 insertions(+), 306 deletions(-)
 create mode 100644 iocore/net/NetEvent.h



[trafficserver] branch master updated: Adjust the refcounts to avoid Mutex leak

2019-12-03 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 4a503c8  Adjust the refcounts to avoid Mutex leak
4a503c8 is described below

commit 4a503c817766fcad3b9eab3ff3a8e9e73d483ae7
Author: Susan Hinrichs 
AuthorDate: Tue Nov 26 17:06:30 2019 +

Adjust the refcounts to avoid Mutex leak
---
 iocore/eventsystem/I_Lock.h| 40 +++---
 src/traffic_server/InkIOCoreAPI.cc | 19 ++
 2 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/iocore/eventsystem/I_Lock.h b/iocore/eventsystem/I_Lock.h
index 4850199..c5b8373 100644
--- a/iocore/eventsystem/I_Lock.h
+++ b/iocore/eventsystem/I_Lock.h
@@ -256,7 +256,7 @@ Mutex_trylock(
 #ifdef DEBUG
   const SourceLocation , const char *ahandler,
 #endif
-  Ptr , EThread *t)
+  ProxyMutex *m, EThread *t)
 {
   ink_assert(t != nullptr);
   ink_assert(t == reinterpret_cast(this_thread()));
@@ -295,12 +295,26 @@ Mutex_trylock(
   return true;
 }
 
+inline bool
+Mutex_trylock(
+#ifdef DEBUG
+  const SourceLocation , const char *ahandler,
+#endif
+  Ptr , EThread *t)
+{
+  return Mutex_trylock(
+#ifdef DEBUG
+location, ahandler,
+#endif
+m.get(), t);
+}
+
 inline int
 Mutex_lock(
 #ifdef DEBUG
   const SourceLocation , const char *ahandler,
 #endif
-  Ptr , EThread *t)
+  ProxyMutex *m, EThread *t)
 {
   ink_assert(t != nullptr);
   if (m->thread_holding != t) {
@@ -327,8 +341,22 @@ Mutex_lock(
   return true;
 }
 
+inline int
+Mutex_lock(
+#ifdef DEBUG
+  const SourceLocation , const char *ahandler,
+#endif
+  Ptr , EThread *t)
+{
+  return Mutex_lock(
+#ifdef DEBUG
+location, ahandler,
+#endif
+m.get(), t);
+}
+
 inline void
-Mutex_unlock(Ptr , EThread *t)
+Mutex_unlock(ProxyMutex *m, EThread *t)
 {
   if (m->nthread_holding) {
 ink_assert(t == m->thread_holding);
@@ -351,6 +379,12 @@ Mutex_unlock(Ptr , EThread *t)
   }
 }
 
+inline void
+Mutex_unlock(Ptr , EThread *t)
+{
+  Mutex_unlock(m.get(), t);
+}
+
 class WeakMutexLock
 {
 private:
diff --git a/src/traffic_server/InkIOCoreAPI.cc 
b/src/traffic_server/InkIOCoreAPI.cc
index 25618ef..1740ee1 100644
--- a/src/traffic_server/InkIOCoreAPI.cc
+++ b/src/traffic_server/InkIOCoreAPI.cc
@@ -235,14 +235,17 @@ TSEventThreadSelf(void)
 
 
 //
-// Mutexes
+// Mutexes:  For TSMutexCreate and TSMutexDestroy, the refcount of the
+// ProxyMutex object is not incremented or decremented.  If the resulting
+// ProxyMutex is passed to a INKContInternal, it's mutex smart pointer
+// will take ownership of the ProxyMutex and delete it when the last
+// reference is removed.  TSMutexDestroy should not be called in that case.
 //
 
 TSMutex
 TSMutexCreate()
 {
   ProxyMutex *mutexp = new_ProxyMutex();
-  mutexp->refcount_inc();
 
   // TODO: Remove this when allocations can never fail.
   sdk_assert(sdk_sanity_check_mutex((TSMutex)mutexp) == TS_SUCCESS);
@@ -255,9 +258,9 @@ TSMutexDestroy(TSMutex m)
 {
   sdk_assert(sdk_sanity_check_mutex(m) == TS_SUCCESS);
   ProxyMutex *mutexp = reinterpret_cast(m);
-  // Decrement the refcount added in TSMutexCreate.  Delete if this
-  // was the last ref count
-  if (mutexp && mutexp->refcount_dec() == 0) {
+
+  if (mutexp) {
+ink_release_assert(mutexp->refcount() == 0);
 mutexp->free();
   }
 }
@@ -296,7 +299,7 @@ void
 TSMutexLock(TSMutex mutexp)
 {
   sdk_assert(sdk_sanity_check_mutex(mutexp) == TS_SUCCESS);
-  Ptr proxy_mutex(reinterpret_cast(mutexp));
+  ProxyMutex *proxy_mutex = reinterpret_cast(mutexp);
   MUTEX_TAKE_LOCK(proxy_mutex, this_ethread());
 }
 
@@ -304,7 +307,7 @@ TSReturnCode
 TSMutexLockTry(TSMutex mutexp)
 {
   sdk_assert(sdk_sanity_check_mutex(mutexp) == TS_SUCCESS);
-  Ptr proxy_mutex(reinterpret_cast(mutexp));
+  ProxyMutex *proxy_mutex = reinterpret_cast(mutexp);
   return (MUTEX_TAKE_TRY_LOCK(proxy_mutex, this_ethread()) ? TS_SUCCESS : 
TS_ERROR);
 }
 
@@ -312,7 +315,7 @@ void
 TSMutexUnlock(TSMutex mutexp)
 {
   sdk_assert(sdk_sanity_check_mutex(mutexp) == TS_SUCCESS);
-  Ptr proxy_mutex(reinterpret_cast(mutexp));
+  ProxyMutex *proxy_mutex(reinterpret_cast(mutexp));
   MUTEX_UNTAKE_LOCK(proxy_mutex, this_ethread());
 }
 



[trafficserver] branch quic-latest updated (91d7b74 -> ba48f6b)

2019-11-25 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 91d7b74  Merge branch 'master' into quic-latest
 add ba48f6b  Fix build error in QUICTypes.cc

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/QUICTypes.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



[trafficserver] branch master updated: Cleanup: Remove useless UDPConnection function

2019-11-20 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 0ec8ca4  Cleanup: Remove useless UDPConnection function
0ec8ca4 is described below

commit 0ec8ca4baa933fb0484e7767a0864fb5522b6734
Author: scw00 
AuthorDate: Tue Nov 19 09:18:53 2019 +0800

Cleanup: Remove useless UDPConnection function
---
 iocore/net/I_UDPConnection.h |  4 +---
 iocore/net/P_UDPConnection.h | 50 +---
 iocore/net/P_UnixUDPConnection.h |  3 +--
 3 files changed, 13 insertions(+), 44 deletions(-)

diff --git a/iocore/net/I_UDPConnection.h b/iocore/net/I_UDPConnection.h
index d06920f..4a17973 100644
--- a/iocore/net/I_UDPConnection.h
+++ b/iocore/net/I_UDPConnection.h
@@ -49,7 +49,7 @@ public:
   SOCKET getFd();
   void setBinding(struct sockaddr const *);
   void setBinding(const IpAddr &, in_port_t);
-  inkcoreapi int getBinding(struct sockaddr *);
+  inkcoreapi bool getBinding(struct sockaddr *);
 
   void destroy();
   int shouldDestroy();
@@ -86,8 +86,6 @@ public:
   int getPortNum();
 
   int GetSendGenerationNumber(); // const
-  void SetLastSentPktTSSeqNum(int64_t sentSeqNum);
-  int64_t cancel();
   void setContinuation(Continuation *c);
 
   /**
diff --git a/iocore/net/P_UDPConnection.h b/iocore/net/P_UDPConnection.h
index ef69b31..10e57c2 100644
--- a/iocore/net/P_UDPConnection.h
+++ b/iocore/net/P_UDPConnection.h
@@ -35,19 +35,17 @@
 class UDPConnectionInternal : public UDPConnection
 {
 public:
-  UDPConnectionInternal();
+  UDPConnectionInternal() = default;
   ~UDPConnectionInternal() override;
 
   Continuation *continuation = nullptr;
-  int recvActive = 0; // interested in receiving
   int refcount   = 0; // public for assertion
 
-  SOCKET fd;
-  IpEndpoint binding;
-  int binding_valid = 0;
-  int tobedestroyed = 0;
-  int sendGenerationNum;
-  int64_t lastSentPktTSSeqNum;
+  SOCKET fd = -1;
+  IpEndpoint binding{};
+  bool binding_valid= false;
+  int tobedestroyed = 0;
+  int sendGenerationNum = 0;
 
   // this is for doing packet scheduling: we keep two values so that we can
   // implement cancel.  The first value tracks the startTime of the last
@@ -55,21 +53,11 @@ public:
   // startTime of the last packet when we are doing scheduling;  whenever the
   // associated continuation cancels a packet, we rest lastPktStartTime to be
   // the same as the lastSentPktStartTime.
-  uint64_t lastSentPktStartTime;
-  uint64_t lastPktStartTime;
+  uint64_t lastSentPktStartTime = 0;
+  uint64_t lastPktStartTime = 0;
 };
 
 TS_INLINE
-UDPConnectionInternal::UDPConnectionInternal() : fd(-1)
-{
-  sendGenerationNum= 0;
-  lastSentPktTSSeqNum  = -1;
-  lastSentPktStartTime = 0;
-  lastPktStartTime = 0;
-  memset(, 0, sizeof binding);
-}
-
-TS_INLINE
 UDPConnectionInternal::~UDPConnectionInternal()
 {
   continuation = nullptr;
@@ -87,7 +75,7 @@ UDPConnection::setBinding(struct sockaddr const *s)
 {
   UDPConnectionInternal *p = static_cast(this);
   ats_ip_copy(>binding, s);
-  p->binding_valid = 1;
+  p->binding_valid = true;
 }
 
 TS_INLINE void
@@ -97,10 +85,10 @@ UDPConnection::setBinding(IpAddr const , in_port_t port)
   IpEndpoint addr;
   addr.assign(ip, htons(port));
   ats_ip_copy(>binding, addr);
-  p->binding_valid = 1;
+  p->binding_valid = true;
 }
 
-TS_INLINE int
+TS_INLINE bool
 UDPConnection::getBinding(struct sockaddr *s)
 {
   UDPConnectionInternal *p = static_cast(this);
@@ -144,22 +132,6 @@ UDPConnection::getPortNum()
   return ats_ip_port_host_order(_cast(this)->binding);
 }
 
-TS_INLINE int64_t
-UDPConnection::cancel()
-{
-  UDPConnectionInternal *p = static_cast(this);
-
-  p->sendGenerationNum++;
-  p->lastPktStartTime = p->lastSentPktStartTime;
-  return p->lastSentPktTSSeqNum;
-}
-
-TS_INLINE void
-UDPConnection::SetLastSentPktTSSeqNum(int64_t sentSeqNum)
-{
-  static_cast(this)->lastSentPktTSSeqNum = sentSeqNum;
-}
-
 TS_INLINE void
 UDPConnection::setContinuation(Continuation *c)
 {
diff --git a/iocore/net/P_UnixUDPConnection.h b/iocore/net/P_UnixUDPConnection.h
index 9e3c2f2..37ad8bd 100644
--- a/iocore/net/P_UnixUDPConnection.h
+++ b/iocore/net/P_UnixUDPConnection.h
@@ -97,8 +97,7 @@ UDPConnection::recv(Continuation *c)
   // register callback interest.
   p->continuation = c;
   ink_assert(c != nullptr);
-  mutex = c->mutex;
-  p->recvActive = 1;
+  mutex = c->mutex;
   return ACTION_RESULT_NONE;
 }
 



[trafficserver] branch master updated: Check Range header for stale content

2019-11-20 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new a59f1df  Check Range header for stale content
a59f1df is described below

commit a59f1dfa9fc2840bbdca1e69fcb84b3e2ed470a9
Author: ydyuan <1975643...@qq.com>
AuthorDate: Wed Nov 6 12:26:44 2019 +0800

Check Range header for stale content

 Fix bug:
1. Ats cached a stale content
2. Then we set cache.config  making  this content never-cache
3. We send a request to ats for this content with a Range header
4. ATS send a request to os with ims header
5. The os returned 304 to ats
6. ATS return 200  to client.
---
 proxy/http/HttpTransact.cc | 4 
 1 file changed, 4 insertions(+)

diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index c9ca406..80d61ea 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -4188,6 +4188,10 @@ 
HttpTransact::handle_cache_operation_on_forward_server_response(State *s)
   s->cache_info.action = CACHE_DO_DELETE;
   s->next_action   = SM_ACTION_SERVER_READ;
 } else {
+  if (s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE)) {
+s->state_machine->do_range_setup_if_necessary();
+// Check client request range header if we cached a stealed 
content with cacheable=false
+  }
   s->cache_info.action = CACHE_DO_SERVE_AND_DELETE;
   s->next_action   = SM_ACTION_SERVE_FROM_CACHE;
 }



[trafficserver] branch master updated: Remove unimplement UDP function

2019-11-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new e93da34  Remove unimplement UDP function
e93da34 is described below

commit e93da34cb76c4a4c6b826ea9c257e6ca0eba094a
Author: scw00 
AuthorDate: Fri Nov 15 14:46:51 2019 +0800

Remove unimplement UDP function
---
 iocore/net/P_UDPPacket.h | 69 
 1 file changed, 69 deletions(-)

diff --git a/iocore/net/P_UDPPacket.h b/iocore/net/P_UDPPacket.h
index d6473aa..a9f015b 100644
--- a/iocore/net/P_UDPPacket.h
+++ b/iocore/net/P_UDPPacket.h
@@ -38,8 +38,6 @@ public:
   UDPPacketInternal();
   ~UDPPacketInternal() override;
 
-  void append_block_internal(IOBufferBlock *block);
-
   void free() override;
 
   SLINK(UDPPacketInternal, alink); // atomic link
@@ -164,47 +162,6 @@ UDPPacket::getConnection()
 }
 
 TS_INLINE UDPPacket *
-new_UDPPacket(struct sockaddr const *to, ink_hrtime when, char *buf, int len)
-{
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap   = 0;
-  p->delivery_time = when;
-  ats_ip_copy(>to, to);
-
-  if (buf) {
-IOBufferBlock *body = new_IOBufferBlock();
-body->alloc(iobuffer_size_to_index(len));
-memcpy(body->end(), buf, len);
-body->fill(len);
-p->append_block(body);
-  }
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
-new_UDPPacket(struct sockaddr const *to, ink_hrtime when, IOBufferBlock *buf, 
int len)
-{
-  (void)len;
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap   = 0;
-  p->delivery_time = when;
-  ats_ip_copy(>to, to);
-
-  while (buf) {
-IOBufferBlock *body = buf->clone();
-p->append_block(body);
-buf = buf->next.get();
-  }
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
 new_UDPPacket(struct sockaddr const *to, ink_hrtime when, Ptr 
)
 {
   UDPPacketInternal *p = udpPacketAllocator.alloc();
@@ -219,32 +176,6 @@ new_UDPPacket(struct sockaddr const *to, ink_hrtime when, 
Ptr 
 }
 
 TS_INLINE UDPPacket *
-new_UDPPacket(ink_hrtime when, Ptr buf)
-{
-  return new_UDPPacket(nullptr, when, buf);
-}
-
-TS_INLINE UDPPacket *
-new_incoming_UDPPacket(struct sockaddr *from, struct sockaddr *to, char *buf, 
int len)
-{
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap   = 0;
-  p->delivery_time = 0;
-  ats_ip_copy(>from, from);
-  ats_ip_copy(>to, to);
-
-  IOBufferBlock *body = new_IOBufferBlock();
-  body->alloc(iobuffer_size_to_index(len));
-  memcpy(body->end(), buf, len);
-  body->fill(len);
-  p->append_block(body);
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
 new_incoming_UDPPacket(struct sockaddr *from, struct sockaddr *to, 
Ptr )
 {
   UDPPacketInternal *p = udpPacketAllocator.alloc();



[trafficserver] branch quic-latest updated (95717cd -> 8d59375)

2019-10-24 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 95717cd  Merge branch 'master' into quic-latest
 add 8d59375  QUIC: Every two ack-elicting packet one ack frame

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/QUICAckFrameCreator.cc   |  9 +++--
 iocore/net/quic/QUICAckFrameCreator.h|  2 +-
 iocore/net/quic/test/test_QUICAckFrameCreator.cc | 23 +++
 3 files changed, 27 insertions(+), 7 deletions(-)



[trafficserver] branch quic-latest updated (cbbc6a5 -> 95717cd)

2019-10-24 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from cbbc6a5  QUIC: add Context to QUICStreamManager
 add 173173f  Removed hardcoded logging.yaml filename in logs
 add c8ef428  Updating the default cipher-suite lists for the 9.x release.
 add 8dc7cce  a general autoconf cleanup
 add 752f5e6  add some documentation to the action class to avoid confusion
 add 7572561  Cache SSL EC explicitly
 add 0ee48a0  Cleanup: do not re-define _proxy_ssn variable in local
 add 3a44862  ProxySession cleanup: moving inline functions to .h
 add cbc46ac  clang-analyzer: Add a null check
 add 482e30a  Destroy MIMEFieldBlockImpl that doesn't have fields in use
 add c498f05  Fix our doc build system to handle non-source dir configure 
locations.
 add 9ca5abc  Mark host as partial when subdmains are more than default 
table depth
 add cd14854  do not reload configs periodically
 add a591c95  These are the current settings we're running on docs
 add 03aee4c  Fix dynamic update for conntrack (HttpConnectionCount) 
configuration variables.
 add 54b8caf  Fix TSHttpTxnReenable to schedule back to original SM thread
 add a80d779  Add QUIC draft-23 support
 add fd59013  Minor cleanup of proxy/logging/Log.h .
 add 52944ce  Update TSVConnSslConnectionGet name to match others in the 
TSVConnSsl* family
 add 0808910  make proxy.config.http.request_buffer_enabled configurable 
and bug fix
 add b271b85  url_sig: fix memory leak with urlParse and pristine flag
 add 26a51a0  Revert "Optimize: If failed on migrateToCurrentThread, put 
the server session back to global server session pool"
 add db8cd14  cachekey: allow multiple values for `--key-type`
 add 64595af  Cleanup: unifdef TRACK_BUFFER_USER
 add c7a4ffa  Remove obsolete 4-2-0-fixup
 add d970c37  do not schedule stuff during shutdown
 add 78c7c0c  "Plugin (un)used" post reload notification
 add 89cf5af  Log H2 priority information
 add d52c64a  Restore the MIOBufferWriter unit tests.
 add ee5a7a4  Doc: clean up build errors.
 add 7895de8  Doc: Fix :units: options for statistics.
 add 2d0233f  Doc: improve documentation for event loop statistics.
 add 180f723  Enhance Connection Collapse in ATS core
 add f211041  Doc: Fixed the logging mode of pipe to be ascii_pipe
 add a42e61f  Rewrote remap_stats plugin to use C++
 add f3942fe  Adding connection close headers to regex_remap test.
 add 3632eb7  Add Example URI Signer Python Script
 add 69a0f98  Remove obsolete pipeline_max variable
 add 5936dcd  Ignore MgmtMessageHdr if ProcessManager is not running
 add 2888052  Clarify relation of nameservers and resolv.conf
 add 7317cde  Add tests for MIMEHdr::get_host_port_values
 add 9c05e64  Add a config for internal HPACK header table size limit
 add 95717cd  Merge branch 'master' into quic-latest

No new revisions were added by this update.

Summary of changes:
 build/ax_check_openssl.m4  |   2 +-
 build/hiredis.m4   |  10 +-
 build/jemalloc.m4  |   9 +-
 ci/jenkins/ats_conf.pl |  77 -
 configs/records.config.default.in  |   1 -
 configure.ac   |   4 +-
 doc/Makefile.am|   2 +-
 doc/admin-guide/files/logging.yaml.en.rst  |   4 +-
 doc/admin-guide/files/records.config.en.rst|  49 --
 doc/admin-guide/logging/examples.en.rst|   6 +-
 doc/admin-guide/logging/formatting.en.rst  |   6 +
 doc/admin-guide/logging/understanding.en.rst   |   2 +-
 .../monitoring/statistics/core-statistics.en.rst   |   1 +
 .../monitoring/statistics/core/eventloop.en.rst| 146 +
 .../monitoring/statistics/core/misc.en.rst |  30 
 doc/admin-guide/monitoring/statistics/index.en.rst |   1 -
 doc/admin-guide/plugins/cachekey.en.rst|  25 ++-
 doc/admin-guide/plugins/lua.en.rst |   8 +-
 doc/conf.py|   3 +-
 .../api/functions/TSActionCancel.en.rst|   6 +
 .../api/functions/TSActionDone.en.rst  |   3 +
 doc/developer-guide/api/functions/TSRemap.en.rst   |  20 ++-
 doc/developer-guide/plugins/remap-plugins.en.rst   |  32 ++--
 doc/ext/traffic-server.py  |  16 +-
 doc/uml/Makefile.am|   2 +-
 .../plugins/c-api/disable_http2/disable_http2.cc   |   2 +-
 example/plugins/c-api/ssl_sni/ssl_sni.cc   |   2 +-
 .../c-api/ssl_sni_whitelist/ssl_sni_whitelist.cc   |   2 +-
 example/plugins/c-api/verify_cert/verify_cert.cc   |   2 +-
 include/ts/remap.h 

[trafficserver] branch quic-latest updated (4db0088 -> cbbc6a5)

2019-10-22 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 4db0088  Use h3 if the both h3 and hq are offered
 add 4ef3d3a  QUIC: sink path manager to stream manager
 add cbbc6a5  QUIC: add Context to QUICStreamManager

No new revisions were added by this update.

Summary of changes:
 iocore/net/QUICNetVConnection.cc | 37 +++-
 iocore/net/quic/Mock.h   | 56 +++-
 iocore/net/quic/QUICContext.cc   |  9 +++-
 iocore/net/quic/QUICContext.h| 18 +++-
 iocore/net/quic/QUICPathManager.cc   | 10 ++---
 iocore/net/quic/QUICPathManager.h| 20 ++---
 iocore/net/quic/QUICStreamManager.cc | 19 +---
 iocore/net/quic/QUICStreamManager.h  |  6 ++-
 iocore/net/quic/test/test_QUICFrameDispatcher.cc |  2 +-
 iocore/net/quic/test/test_QUICStreamManager.cc   | 10 +++--
 10 files changed, 128 insertions(+), 59 deletions(-)



[trafficserver] branch quic-latest updated (e62f4af -> fa82338)

2019-09-29 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from e62f4af  Fix a compile warning
 add fa82338  QUIC: Fix test_QUICKeyGenerator

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/test/test_QUICKeyGenerator.cc | 27 ---
 1 file changed, 8 insertions(+), 19 deletions(-)



[trafficserver] branch quic-latest updated (edc4b67 -> a786041)

2019-09-18 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from edc4b67  QUIC: Rename QUICCongestionController.cc to 
QUICNewRenoCongestionController.cc
 add a786041  QUIC: Remove useless default constructor in QUICStreamManager

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/QUICStreamManager.h | 1 -
 1 file changed, 1 deletion(-)



[trafficserver] branch quic-latest updated (45c3f13 -> edc4b67)

2019-09-17 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 45c3f13  QUIC: Remove unnecessary allocator
 add edc4b67  QUIC: Rename QUICCongestionController.cc to 
QUICNewRenoCongestionController.cc

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/Makefile.am | 2 +-
 .../{QUICCongestionController.cc => QUICNewRenoCongestionController.cc} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename iocore/net/quic/{QUICCongestionController.cc => 
QUICNewRenoCongestionController.cc} (100%)



[trafficserver] branch quic-latest updated (256a74c -> 45c3f13)

2019-09-11 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 256a74c  QUIC: Add Token Creator
 add 45c3f13  QUIC: Remove unnecessary allocator

No new revisions were added by this update.

Summary of changes:
 iocore/eventsystem/I_Thread.h| 2 --
 iocore/net/quic/QUICStreamManager.cc | 2 --
 2 files changed, 4 deletions(-)



[trafficserver] branch quic-latest updated (5980fa4 -> 256a74c)

2019-09-11 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 5980fa4  QUIC: add more infomation to QUICPacketProtectionKeyInfo
 add 256a74c  QUIC: Add Token Creator

No new revisions were added by this update.

Summary of changes:
 iocore/net/P_QUICNetVConnection.h  | 21 ++-
 iocore/net/QUICNetVConnection.cc   | 51 +---
 iocore/net/quic/Makefile.am|  3 +-
 iocore/net/quic/QUICContext.h  |  3 +-
 iocore/net/quic/QUICTokenCreator.cc| 71 ++
 .../net/quic/{QUICPinger.h => QUICTokenCreator.h}  | 28 +++--
 6 files changed, 91 insertions(+), 86 deletions(-)
 create mode 100644 iocore/net/quic/QUICTokenCreator.cc
 copy iocore/net/quic/{QUICPinger.h => QUICTokenCreator.h} (58%)



[trafficserver] branch quic-latest updated (fecacfb -> 5980fa4)

2019-09-10 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from fecacfb  Stabilize unit tests
 add 814f39e  QUIC: Hidden more pp_key_info detail in QUICContext
 add 5980fa4  QUIC: add more infomation to QUICPacketProtectionKeyInfo

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/QUICContext.cc|  5 +-
 iocore/net/quic/QUICContext.h | 18 
 iocore/net/quic/QUICPacketProtectionKeyInfo.h | 66 +++
 3 files changed, 60 insertions(+), 29 deletions(-)



[trafficserver] branch quic-latest updated (5b04932 -> e8565bb)

2019-09-05 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 5b04932  Merge branch 'master' into quic-latest
 add e8565bb  QUIC: Adds QUICContext to wrap some common params

No new revisions were added by this update.

Summary of changes:
 iocore/net/P_QUICNetVConnection.h|   3 +
 iocore/net/QUICNetVConnection.cc |  86 +---
 iocore/net/quic/Makefile.am  |   3 +-
 iocore/net/quic/Mock.h   | 258 +++
 iocore/net/quic/QUICCongestionController.cc  |  73 +++
 iocore/net/quic/QUICCongestionController.h   |  53 +
 iocore/net/quic/QUICConnection.h |   1 +
 iocore/net/quic/QUICContext.cc   | 146 +
 iocore/net/quic/QUICContext.h|  83 
 iocore/net/quic/QUICLossDetector.cc  |  27 +--
 iocore/net/quic/QUICLossDetector.h   |  62 ++
 iocore/net/quic/QUICPacketProtectionKeyInfo.h|   2 +
 iocore/net/quic/QUICTypes.h  |   2 +
 iocore/net/quic/test/test_QUICFrameDispatcher.cc |   8 +-
 iocore/net/quic/test/test_QUICLossDetector.cc|  19 +-
 15 files changed, 547 insertions(+), 279 deletions(-)
 create mode 100644 iocore/net/quic/QUICCongestionController.h
 create mode 100644 iocore/net/quic/QUICContext.cc
 create mode 100644 iocore/net/quic/QUICContext.h



[trafficserver] branch quic-latest updated (e7a6cd6 -> 0e4622e)

2019-08-23 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from e7a6cd6  Merge branch 'master' into quic-latest
 add 72b1f79  Send PING only on Short packets
 add 0e4622e  Assert sending a frame that is allowed on the encryption level

No new revisions were added by this update.

Summary of changes:
 iocore/net/QUICNetVConnection.cc| 13 -
 iocore/net/quic/QUICLossDetector.cc | 12 +---
 iocore/net/quic/QUICPinger.cc   | 32 ++--
 iocore/net/quic/QUICPinger.h|  9 -
 4 files changed, 39 insertions(+), 27 deletions(-)



[trafficserver] branch master updated: Initialize EventIO

2019-07-30 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 75283bc  Initialize EventIO
75283bc is described below

commit 75283bc379a2529032fcd463d72183048f3649cd
Author: Masaori Koshiba 
AuthorDate: Tue Jul 30 16:18:13 2019 +0900

Initialize EventIO
---
 iocore/net/UnixNet.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index 63721b9..2efc69e 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -234,7 +234,8 @@ initialize_thread_for_net(EThread *thread)
   thread->schedule_every(inactivityCop, HRTIME_SECONDS(cop_freq));
 
   thread->set_tail_handler(nh);
-  thread->ep   = (EventIO *)ats_malloc(sizeof(EventIO));
+  thread->ep = (EventIO *)ats_malloc(sizeof(EventIO));
+  new (thread->ep) EventIO();
   thread->ep->type = EVENTIO_ASYNC_SIGNAL;
 #if HAVE_EVENTFD
   thread->ep->start(pd, thread->evfd, nullptr, EVENTIO_READ);



[trafficserver] branch master updated: Update UDPNet for QUIC

2019-07-22 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new c815b17  Update UDPNet for QUIC
c815b17 is described below

commit c815b17d3a855618620c9c9bcc491c0e68bcc4c1
Author: scw00 
AuthorDate: Thu May 30 14:38:42 2019 +0800

Update UDPNet for QUIC
---
 iocore/net/P_UDPNet.h|  2 ++
 iocore/net/P_UnixNet.h   | 20 
 iocore/net/UnixUDPNet.cc |  2 +-
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/iocore/net/P_UDPNet.h b/iocore/net/P_UDPNet.h
index be2d896..f53c823 100644
--- a/iocore/net/P_UDPNet.h
+++ b/iocore/net/P_UDPNet.h
@@ -58,6 +58,8 @@ extern UDPNetProcessorInternal udpNetInternal;
 #define SLOT_TIME HRTIME_MSECONDS(SLOT_TIME_MSEC)
 #define N_SLOTS 2048
 
+constexpr int UDP_PERIOD = 9;
+
 class PacketQueue
 {
 public:
diff --git a/iocore/net/P_UnixNet.h b/iocore/net/P_UnixNet.h
index 7d591b0..a29cd7f 100644
--- a/iocore/net/P_UnixNet.h
+++ b/iocore/net/P_UnixNet.h
@@ -82,6 +82,7 @@ struct EventIO {
   int events = 0;
 #endif
   EventLoop event_loop = nullptr;
+  bool syscall = true;
   int type = 0;
   union {
 Continuation *c;
@@ -556,6 +557,10 @@ EventIO::start(EventLoop l, UnixUDPConnection *vc, int 
events)
 TS_INLINE int
 EventIO::close()
 {
+  if (!this->syscall) {
+return 0;
+  }
+
   stop();
   switch (type) {
   default:
@@ -577,6 +582,10 @@ EventIO::close()
 TS_INLINE int
 EventIO::start(EventLoop l, int afd, Continuation *c, int e)
 {
+  if (!this->syscall) {
+return 0;
+  }
+
   data.c = c;
   fd = afd;
   event_loop = l;
@@ -612,6 +621,10 @@ EventIO::start(EventLoop l, int afd, Continuation *c, int 
e)
 TS_INLINE int
 EventIO::modify(int e)
 {
+  if (!this->syscall) {
+return 0;
+  }
+
   ink_assert(event_loop);
 #if TS_USE_EPOLL && !defined(USE_EDGE_TRIGGER)
   struct epoll_event ev;
@@ -691,6 +704,10 @@ EventIO::modify(int e)
 TS_INLINE int
 EventIO::refresh(int e)
 {
+  if (!this->syscall) {
+return 0;
+  }
+
   ink_assert(event_loop);
 #if TS_USE_KQUEUE && defined(USE_EDGE_TRIGGER)
   e = e & events;
@@ -732,6 +749,9 @@ EventIO::refresh(int e)
 TS_INLINE int
 EventIO::stop()
 {
+  if (!this->syscall) {
+return 0;
+  }
   if (event_loop) {
 int retval = 0;
 #if TS_USE_EPOLL
diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index 13ac3af..8215cde 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -925,7 +925,7 @@ UDPNetHandler::startNetEvent(int event, Event *e)
   (void)event;
   SET_HANDLER((UDPNetContHandler)::mainNetEvent);
   trigger_event = e;
-  e->schedule_every(-HRTIME_MSECONDS(9));
+  e->schedule_every(-HRTIME_MSECONDS(UDP_PERIOD));
   return EVENT_CONT;
 }
 



[trafficserver] branch master updated: fix If-Match and If-Unmodified-Since priority problem, about rfc https://tools.ietf.org/html/rfc7232#section-3.3

2019-07-19 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new edd6ae4  fix If-Match and If-Unmodified-Since priority problem,about 
rfc https://tools.ietf.org/html/rfc7232#section-3.3
edd6ae4 is described below

commit edd6ae44ab791fe88947995edba280db75a2d41e
Author: chenggang7 
AuthorDate: Tue Jul 9 11:07:52 2019 +0800

fix If-Match and If-Unmodified-Since priority problem,about rfc 
https://tools.ietf.org/html/rfc7232#section-3.3
---
 proxy/http/HttpTransactCache.cc | 35 ++-
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc
index eb51039..56b574f 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/proxy/http/HttpTransactCache.cc
@@ -1269,7 +1269,6 @@ 
HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
   // sub-ranges, we can do a weak validation.   //
   
   if (do_strings_match_weakly(raw_etags, raw_etags_len, 
comma_sep_tag_list, comma_sep_tag_list_len)) {
-// the response already failed If-modified-since (if one exists)
 return HTTP_STATUS_NOT_MODIFIED;
   } else {
 return response->status_get();
@@ -1313,24 +1312,6 @@ 
HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
 return response_code;
   }
 
-  // return PRECONDITIONAL_FAILED if either If-unmodified-since
-  // or If-match fails
-  // BUT, return the original response code only if both pass
-
-  // If-Unmodified-Since //
-  if (request->presence(MIME_PRESENCE_IF_UNMODIFIED_SINCE)) {
-// lm_value is zero if Last-modified not exists
-ink_time_t lm_value = response->get_last_modified();
-
-// Condition fails if Last-modified not exists
-if ((request->get_if_unmodified_since() < lm_value) || (lm_value == 0)) {
-  return HTTP_STATUS_PRECONDITION_FAILED;
-} else {
-  // we cannot return yet, need to check If-match
-  response_code = response->status_get();
-}
-  }
-
   // If-Match: must match strongly //
   if (request->presence(MIME_PRESENCE_IF_MATCH)) {
 int raw_etags_len, comma_sep_tag_list_len;
@@ -1352,13 +1333,25 @@ 
HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
 }
 
 if (do_strings_match_strongly(raw_etags, raw_etags_len, 
comma_sep_tag_list, comma_sep_tag_list_len)) {
-  // at the point, the response passed both If-unmodified-since
-  // and If-match, so we can return the original response code
   return response->status_get();
 } else {
   return HTTP_STATUS_PRECONDITION_FAILED;
 }
   }
+
+  // If-Unmodified-Since //
+  if (request->presence(MIME_PRESENCE_IF_UNMODIFIED_SINCE)) {
+// lm_value is zero if Last-modified not exists
+ink_time_t lm_value = response->get_last_modified();
+
+// Condition fails if Last-modified not exists
+if ((request->get_if_unmodified_since() < lm_value) || (lm_value == 0)) {
+  return HTTP_STATUS_PRECONDITION_FAILED;
+} else {
+  response_code = response->status_get();
+}
+  }
+
   // There is no If-match, and If-unmodified-since passed,
   // so return the original response code
   if (response_code != HTTP_STATUS_NONE) {



[trafficserver] branch quic-latest updated (ec333e7 -> 10805ba)

2019-07-07 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from ec333e7  Fix build issues on macOS
 add 1eeb804  QUIC: Split QUICFrameGenerator into two queue
 add 8163058  QUIC: Using weight for QUICFrameGenerators
 add fdff5b9  QUIC: Fix test
 add b76299f  QUIC: Add QUICPinger test
 add b0f2483  QUIC: Add inline generators into QUICFrameGenerator
 add 10805ba  QUIC: remove useless params in padder

No new revisions were added by this update.

Summary of changes:
 iocore/net/P_QUICNetVConnection.h|  10 +--
 iocore/net/QUICNetVConnection.cc |  52 ++--
 iocore/net/quic/Makefile.am  |  10 ++-
 iocore/net/quic/Mock.h   |   2 +-
 iocore/net/quic/QUICAckFrameCreator.cc   |   3 +-
 iocore/net/quic/QUICAckFrameCreator.h|   2 +-
 iocore/net/quic/QUICAltConnectionManager.cc  |   3 +-
 iocore/net/quic/QUICAltConnectionManager.h   |   2 +-
 iocore/net/quic/QUICBidirectionalStream.cc   |   7 +-
 iocore/net/quic/QUICBidirectionalStream.h|   2 +-
 iocore/net/quic/QUICCryptoStream.cc  |   2 +-
 iocore/net/quic/QUICCryptoStream.h   |   2 +-
 iocore/net/quic/QUICFlowController.cc|   2 +-
 iocore/net/quic/QUICFlowController.h |   2 +-
 iocore/net/quic/QUICFrameGenerator.cc|  29 +++
 iocore/net/quic/QUICFrameGenerator.h |  54 +++-
 iocore/net/quic/QUICHandshake.cc |   4 +-
 iocore/net/quic/QUICHandshake.h  |   2 +-
 iocore/net/quic/QUICPadder.cc|  17 ++--
 iocore/net/quic/QUICPadder.h |  16 ++--
 iocore/net/quic/QUICPathValidator.cc |   2 +-
 iocore/net/quic/QUICPathValidator.h  |   2 +-
 iocore/net/quic/QUICPinger.cc|  35 
 iocore/net/quic/QUICPinger.h |  13 +--
 iocore/net/quic/QUICStreamManager.cc |   4 +-
 iocore/net/quic/QUICStreamManager.h  |   2 +-
 iocore/net/quic/QUICUnidirectionalStream.cc  |   6 +-
 iocore/net/quic/QUICUnidirectionalStream.h   |   4 +-
 iocore/net/quic/test/test_QUICAckFrameCreator.cc |  48 +--
 iocore/net/quic/test/test_QUICFlowController.cc  |   4 +-
 iocore/net/quic/test/test_QUICPathValidator.cc   |   8 +-
 iocore/net/quic/test/test_QUICPinger.cc  | 101 +++
 iocore/net/quic/test/test_QUICStream.cc  |  76 -
 33 files changed, 353 insertions(+), 175 deletions(-)
 create mode 100644 iocore/net/quic/test/test_QUICPinger.cc



[trafficserver] branch quic-latest updated (f694ead -> 4084cc5)

2019-06-23 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from f694ead  QUIC:: Fixed crypto error
 add 2c9fc9e  QUIC: Adds quic recovery 20
 add 3195b94  QUIC: Add cc 20 support
 add b748f63  QUIC: Remove 
QUICPacketProtectionKeyInfo::is_one_rtt_key_available
 add 4084cc5  QUIC: Fixes test cases for quic recovery 20

No new revisions were added by this update.

Summary of changes:
 iocore/net/QUICNetVConnection.cc  |   3 +-
 iocore/net/quic/Mock.h|   6 +-
 iocore/net/quic/QUICConfig.h  |   4 +-
 iocore/net/quic/QUICCongestionController.cc   |  24 ++-
 iocore/net/quic/QUICLossDetector.cc   | 257 --
 iocore/net/quic/QUICLossDetector.h|  48 +++--
 iocore/net/quic/test/test_QUICLossDetector.cc |   9 +-
 mgmt/RecordsConfig.cc |   4 +-
 8 files changed, 216 insertions(+), 139 deletions(-)



[trafficserver] branch quic-latest updated (c123e88 -> f694ead)

2019-06-23 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from c123e88  QUIC: Stop sending PING when nothing to generate
 add f694ead  QUIC:: Fixed crypto error

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/QUICLossDetector.cc  | 6 +++---
 iocore/net/quic/QUICPacketFactory.cc | 6 +++---
 iocore/net/quic/QUICPadder.cc| 6 +-
 3 files changed, 7 insertions(+), 11 deletions(-)



[trafficserver] branch quic-latest updated (306d8c3 -> c123e88)

2019-06-23 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 306d8c3  Pad INITIAL frames
 add c123e88  QUIC: Stop sending PING when nothing to generate

No new revisions were added by this update.

Summary of changes:
 iocore/net/QUICNetVConnection.cc | 30 +++---
 1 file changed, 11 insertions(+), 19 deletions(-)



[trafficserver] branch quic-latest updated (f2f36c7 -> 59a1d8e)

2019-06-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from f2f36c7  QUIC: change timestamp to sequence number
 add 59a1d8e  QUIC: Adds QUICPadder to padding quic packets

No new revisions were added by this update.

Summary of changes:
 iocore/net/P_QUICNetVConnection.h|   5 +-
 iocore/net/QUICNetVConnection.cc |  52 +++---
 iocore/net/quic/Makefile.am  |   3 +-
 iocore/net/quic/Mock.h   |   9 +-
 iocore/net/quic/QUICAckFrameCreator.cc   |   2 +-
 iocore/net/quic/QUICAckFrameCreator.h|   2 +-
 iocore/net/quic/QUICAltConnectionManager.cc  |   2 +-
 iocore/net/quic/QUICAltConnectionManager.h   |   2 +-
 iocore/net/quic/QUICBidirectionalStream.cc   |   7 +-
 iocore/net/quic/QUICBidirectionalStream.h|   2 +-
 iocore/net/quic/QUICCryptoStream.cc  |   2 +-
 iocore/net/quic/QUICCryptoStream.h   |   2 +-
 iocore/net/quic/QUICFlowController.cc|   2 +-
 iocore/net/quic/QUICFlowController.h |   2 +-
 iocore/net/quic/QUICFrame.cc |  29 +-
 iocore/net/quic/QUICFrame.h  |  13 ++-
 iocore/net/quic/QUICFrameGenerator.h |   2 +-
 iocore/net/quic/QUICHandshake.cc |   6 +-
 iocore/net/quic/QUICHandshake.h  |   2 +-
 iocore/net/quic/QUICPadder.cc| 121 +++
 iocore/net/quic/{QUICPinger.h => QUICPadder.h}   |  19 ++--
 iocore/net/quic/QUICPathValidator.cc |   2 +-
 iocore/net/quic/QUICPathValidator.h  |   2 +-
 iocore/net/quic/QUICPinger.cc|   2 +-
 iocore/net/quic/QUICPinger.h |   2 +-
 iocore/net/quic/QUICStreamManager.cc |   4 +-
 iocore/net/quic/QUICStreamManager.h  |   2 +-
 iocore/net/quic/QUICUnidirectionalStream.cc  |   9 +-
 iocore/net/quic/QUICUnidirectionalStream.h   |   4 +-
 iocore/net/quic/test/test_QUICAckFrameCreator.cc |  42 
 iocore/net/quic/test/test_QUICFlowController.cc  |  52 +-
 iocore/net/quic/test/test_QUICFrame.cc   |  10 +-
 iocore/net/quic/test/test_QUICLossDetector.cc|  10 +-
 iocore/net/quic/test/test_QUICStream.cc  |  72 +++---
 iocore/net/quic/test/test_QUICStreamManager.cc   |   4 +-
 35 files changed, 321 insertions(+), 182 deletions(-)
 create mode 100644 iocore/net/quic/QUICPadder.cc
 copy iocore/net/quic/{QUICPinger.h => QUICPadder.h} (71%)



[trafficserver] branch quic-latest updated (2805b74 -> f2f36c7)

2019-06-02 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 2805b74  Skip running test_QPACK when qif dir is not found
 add cf6c7e5  QUIC: Send ping packets out if pto fired
 add f2f36c7  QUIC: change timestamp to sequence number

No new revisions were added by this update.

Summary of changes:
 iocore/net/P_QUICNetVConnection.h   |  9 +++--
 iocore/net/QUICNetVConnection.cc| 42 +--
 iocore/net/quic/QUICAckFrameCreator.cc  |  4 +--
 iocore/net/quic/QUICAckFrameCreator.h   |  4 +--
 iocore/net/quic/QUICAltConnectionManager.cc |  4 +--
 iocore/net/quic/QUICAltConnectionManager.h  |  4 +--
 iocore/net/quic/QUICBidirectionalStream.cc  | 10 +++---
 iocore/net/quic/QUICBidirectionalStream.h   |  4 +--
 iocore/net/quic/QUICCongestionController.cc | 38 +++--
 iocore/net/quic/QUICCryptoStream.cc |  4 +--
 iocore/net/quic/QUICCryptoStream.h  |  4 +--
 iocore/net/quic/QUICFlowController.cc   |  4 +--
 iocore/net/quic/QUICFlowController.h|  4 +--
 iocore/net/quic/QUICFrameGenerator.h|  4 +--
 iocore/net/quic/QUICHandshake.cc|  8 ++---
 iocore/net/quic/QUICHandshake.h |  4 +--
 iocore/net/quic/QUICLossDetector.cc | 52 -
 iocore/net/quic/QUICLossDetector.h  |  8 -
 iocore/net/quic/QUICPathValidator.cc|  8 ++---
 iocore/net/quic/QUICPathValidator.h |  6 ++--
 iocore/net/quic/QUICPinger.cc   | 27 ---
 iocore/net/quic/QUICPinger.h| 11 --
 iocore/net/quic/QUICStreamManager.cc|  8 ++---
 iocore/net/quic/QUICStreamManager.h |  4 +--
 iocore/net/quic/QUICTypes.h |  7 ++--
 iocore/net/quic/QUICUnidirectionalStream.cc | 14 
 iocore/net/quic/QUICUnidirectionalStream.h  |  8 ++---
 27 files changed, 198 insertions(+), 106 deletions(-)



[trafficserver] branch quic-latest updated (4cf8850 -> c517e0e)

2019-05-15 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 4cf8850  Merge branch 'master' into quic-latest
 add c517e0e  Http3: close connection when buffer release

No new revisions were added by this update.

Summary of changes:
 proxy/http3/Http3ClientTransaction.cc | 1 +
 1 file changed, 1 insertion(+)



[trafficserver] branch master updated: Corret the clear range when cache restart

2019-05-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new ba2f3e1  Corret the clear range when cache restart
ba2f3e1 is described below

commit ba2f3e1eab440087a16129e3edbbe2de213fa3ba
Author: scw00 
AuthorDate: Tue May 14 06:30:38 2019 +

Corret the clear range when cache restart
---
 iocore/cache/Cache.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index d28fa4c..98eb09b 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -1625,8 +1625,8 @@ Ldone : {
   if (clear_start <= clear_end) {
 dir_clear_range(clear_start, clear_end, this);
   } else {
-dir_clear_range(clear_end, DIR_OFFSET_MAX, this);
-dir_clear_range(1, clear_start, this);
+dir_clear_range(clear_start, DIR_OFFSET_MAX, this);
+dir_clear_range(1, clear_end, this);
   }
 
   Note("recovery clearing offsets of Vol %s : [%" PRIu64 ", %" PRIu64 "] 
sync_serial %d next %d\n", hash_text.get(),



[trafficserver] branch quic-latest updated (9e593ff -> 919183e)

2019-05-13 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 9e593ff  Update code for NUM_PLACEHOLDERS
 add 919183e  QUIC: Fix test for pervious changes

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/Mock.h  |  2 +-
 iocore/net/quic/test/test_QUICFlowController.cc |  6 +
 iocore/net/quic/test/test_QUICFrame.cc  |  2 +-
 iocore/net/quic/test/test_QUICStream.cc | 32 -
 iocore/net/quic/test/test_QUICStreamManager.cc  | 10 
 5 files changed, 30 insertions(+), 22 deletions(-)



[trafficserver] branch quic-latest updated (a9e0b8b -> b7bf658)

2019-05-13 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from a9e0b8b  Fix checking progress of write vio
 add 509eef0  QUIC: recovery-19 combine loss detector into one
 add 2432f39  Fixed coredump in Loss Detector
 add 97c9898  QUIC: Update CC to draft 19
 add f51845b  QUIC: Fixed test changed by loss_detector
 add 41ae20a  QUIC: remove pn_space and remove the dependency with ld
 add 6562700  QUIC: Fix test due to pre commits
 add b7bf658  QUIC: Make congestion period in QUICRTTProvider

No new revisions were added by this update.

Summary of changes:
 iocore/net/P_QUICNetVConnection.h|   2 +-
 iocore/net/QUICNetVConnection.cc |  58 ++--
 iocore/net/quic/Mock.h   |  24 +-
 iocore/net/quic/QUICAckFrameCreator.cc   |  37 +-
 iocore/net/quic/QUICAckFrameCreator.h|   4 +-
 iocore/net/quic/QUICCongestionController.cc  |  74 +++-
 iocore/net/quic/QUICDebugNames.cc|  16 +-
 iocore/net/quic/QUICDebugNames.h |   2 +-
 iocore/net/quic/QUICLossDetector.cc  | 419 ++-
 iocore/net/quic/QUICLossDetector.h   | 118 ---
 iocore/net/quic/QUICPacketFactory.cc |  20 +-
 iocore/net/quic/QUICPinger.cc|   2 +-
 iocore/net/quic/QUICTypes.cc |  15 +-
 iocore/net/quic/QUICTypes.h  |  14 +-
 iocore/net/quic/test/test_QUICAckFrameCreator.cc |   3 +-
 iocore/net/quic/test/test_QUICFlowController.cc  |  12 +
 iocore/net/quic/test/test_QUICFrameDispatcher.cc |   2 +-
 iocore/net/quic/test/test_QUICLossDetector.cc| 115 ---
 18 files changed, 569 insertions(+), 368 deletions(-)



[trafficserver] branch master updated: Check nullptr before call netvc->do_io_close

2019-05-06 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 0596eda  Check nullptr before call netvc->do_io_close
0596eda is described below

commit 0596edada988e937502c805f67c0c5ea22c9b5da
Author: scw00 
AuthorDate: Sat May 4 08:36:44 2019 +

Check nullptr before call netvc->do_io_close
---
 iocore/net/SSLNextProtocolAccept.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iocore/net/SSLNextProtocolAccept.cc 
b/iocore/net/SSLNextProtocolAccept.cc
index cdcbf4a..ed3fc5a 100644
--- a/iocore/net/SSLNextProtocolAccept.cc
+++ b/iocore/net/SSLNextProtocolAccept.cc
@@ -139,7 +139,9 @@ SSLNextProtocolAccept::mainEvent(int event, void *edata)
 netvc->do_io_read(new SSLNextProtocolTrampoline(this, netvc->mutex), 0, 
this->buffer);
 return EVENT_CONT;
   default:
-netvc->do_io_close();
+if (netvc) {
+  netvc->do_io_close();
+}
 return EVENT_DONE;
   }
 }



[trafficserver] branch master updated: Adds update header only test case

2019-05-06 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new ee0ce71  Adds update header only test case
ee0ce71 is described below

commit ee0ce71fed73ae5092da12ced4e11556ecaced36
Author: scw00 
AuthorDate: Sat May 4 08:17:04 2019 +

Adds update header only test case
---
 iocore/cache/Makefile.am|  10 +-
 iocore/cache/test/test_Update_header.cc | 185 
 2 files changed, 194 insertions(+), 1 deletion(-)

diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index b2161f0..e9c9df3 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -128,7 +128,8 @@ check_PROGRAMS = \
   test_Alternate_S_to_L_remove_S \
   test_Alternate_S_to_L_remove_L \
   test_Update_L_to_S \
-  test_Update_S_to_L
+  test_Update_S_to_L \
+  test_Update_header
 
 test_main_SOURCES = \
   ./test/main.cc \
@@ -205,6 +206,13 @@ test_Update_S_to_L_SOURCES = \
   $(test_main_SOURCES) \
   ./test/test_Update_S_to_L.cc
 
+test_Update_header_CPPFLAGS = $(test_CPPFLAGS)
+test_Update_header_LDFLAGS = @AM_LDFLAGS@
+test_Update_header_LDADD = $(test_LDADD)
+test_Update_header_SOURCES = \
+  $(test_main_SOURCES) \
+  ./test/test_Update_header.cc
+
 include $(top_srcdir)/build/tidy.mk
 
 clang-tidy-local: $(DIST_SOURCES)
diff --git a/iocore/cache/test/test_Update_header.cc 
b/iocore/cache/test/test_Update_header.cc
new file mode 100644
index 000..7a69adb
--- /dev/null
+++ b/iocore/cache/test/test_Update_header.cc
@@ -0,0 +1,185 @@
+/** @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.
+ */
+
+#define LARGE_FILE 10 * 1024 * 1024
+#define SMALL_FILE 10 * 1024
+
+#include "main.h"
+
+class CacheUpdateReadAgain : public CacheTestHandler
+{
+public:
+  CacheUpdateReadAgain(size_t size, const char *url) : CacheTestHandler()
+  {
+auto rt   = new CacheReadTest(size, this, url);
+rt->mutex = this->mutex;
+
+rt->info.destroy();
+rt->info.create();
+build_hdrs(rt->info, url, "application/x-javascript");
+
+this->_rt = rt;
+
+SET_HANDLER(::start_test);
+  }
+
+  int
+  start_test(int event, void *e)
+  {
+REQUIRE(event == EVENT_IMMEDIATE);
+this_ethread()->schedule_imm(this->_rt);
+return 0;
+  }
+
+  virtual void
+  handle_cache_event(int event, CacheTestBase *base)
+  {
+switch (event) {
+case CACHE_EVENT_OPEN_READ:
+  base->do_io_read();
+  this->validate_content_type(base);
+  this->check_fragment_table(base);
+  break;
+case VC_EVENT_READ_READY:
+  base->reenable();
+  break;
+case VC_EVENT_READ_COMPLETE:
+  base->close();
+  delete this;
+  break;
+default:
+  REQUIRE(false);
+  break;
+}
+  }
+
+  void
+  validate_content_type(CacheTestBase *base)
+  {
+auto rt = dynamic_cast(base);
+REQUIRE(rt);
+MIMEField *field = 
rt->read_http_info->m_alt->m_response_hdr.field_find(MIME_FIELD_CONTENT_TYPE, 
MIME_LEN_CONTENT_TYPE);
+REQUIRE(field);
+int len;
+const char *value = field->value_get();
+REQUIRE(memcmp(value, "application/x-javascript", len) == 0);
+  }
+
+  void
+  check_fragment_table(CacheTestBase *base)
+  {
+REQUIRE(base->vc->alternate.get_frag_table() != nullptr);
+REQUIRE(base->vc->alternate.get_frag_offset_count() != 0);
+  }
+};
+
+class CacheUpdateHeader : public CacheTestHandler
+{
+public:
+  CacheUpdateHeader(size_t read_size, const char *url)
+  {
+auto rt = new CacheReadTest(read_size, this, url);
+auto wt = new CacheWriteTest(read_size, this, url);
+
+wt->info.destroy();
+wt->info.create();
+build_hdrs(wt->info, url, "application/x-javascript");
+
+this->_rt = rt;
+this->_wt = wt;
+
+this->_rt->mutex = this->mutex;
+this->_wt->mutex = this->mutex;
+
+SET_HANDLER(::start_test);
+  }
+
+  int
+  start_test(int event, void *e)
+  {

[trafficserver] branch master updated: Move setsockopt from UnixNetProcessor to Server::setup_fd_for_listen

2019-05-04 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 00c11d0  Move setsockopt from UnixNetProcessor to 
Server::setup_fd_for_listen
00c11d0 is described below

commit 00c11d0666ab3a03144d2c4cfab1772745353a64
Author: scw00 
AuthorDate: Thu May 2 06:49:58 2019 +

Move setsockopt from UnixNetProcessor to Server::setup_fd_for_listen
---
 iocore/net/Connection.cc  | 19 ++-
 iocore/net/I_NetProcessor.h   |  8 
 iocore/net/UnixNetProcessor.cc| 26 --
 proxy/http/HttpProxyServerMain.cc |  4 
 4 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/iocore/net/Connection.cc b/iocore/net/Connection.cc
index a8370a6..0b6d14d 100644
--- a/iocore/net/Connection.cc
+++ b/iocore/net/Connection.cc
@@ -140,7 +140,8 @@ Server::setup_fd_for_listen(bool non_blocking, const 
NetProcessor::AcceptOptions
 
   ink_assert(fd != NO_FD);
 
-  if (http_accept_filter) {
+  if (opt.etype == ET_NET && opt.defer_accept > 0) {
+http_accept_filter = true;
 add_http_filter(fd);
   }
 
@@ -253,6 +254,22 @@ Server::setup_fd_for_listen(bool non_blocking, const 
NetProcessor::AcceptOptions
   }
 #endif
 
+#ifdef TCP_DEFER_ACCEPT
+  // set tcp defer accept timeout if it is configured, this will not trigger 
an accept until there is
+  // data on the socket ready to be read
+  if (opt.defer_accept > 0 && (res = setsockopt(fd, IPPROTO_TCP, 
TCP_DEFER_ACCEPT, _accept, sizeof(int))) < 0) {
+// FIXME: should we go to the error
+// goto error;
+Error("[Server::listen] Defer accept is configured but set failed: %d", 
errno);
+  }
+#endif
+
+#ifdef TCP_INIT_CWND
+  if (opt.init_cwnd > 0 && (res = setsockopt(fd, IPPROTO_TCP, TCP_INIT_CWND, 
_cwnd, sizeof(int))) < 0) {
+Error("[Server::listen] Cannot set initial congestion window to %d error: 
%d", tcp_init_cwnd, errno);
+  }
+#endif
+
   if (non_blocking) {
 if ((res = safe_nonblocking(fd)) < 0) {
   goto Lerror;
diff --git a/iocore/net/I_NetProcessor.h b/iocore/net/I_NetProcessor.h
index 5f94cd6..04dedf3 100644
--- a/iocore/net/I_NetProcessor.h
+++ b/iocore/net/I_NetProcessor.h
@@ -80,6 +80,14 @@ public:
 /// Socket transmit buffer size.
 /// 0 => OS default.
 int send_bufsize;
+/// defer accpet for @c sockopt.
+/// 0 => OS default.
+int defer_accept;
+#ifdef TCP_INIT_CWND
+/// tcp init cwnd for @c sockopt
+/// OS default
+int init_cwnd;
+#endif
 /// Socket options for @c sockopt.
 /// 0 => do not set options.
 uint32_t sockopt_flags;
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index 488f6db..c55b618 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -129,13 +129,6 @@ UnixNetProcessor::accept_internal(Continuation *cont, int 
fd, AcceptOptions cons
 Debug("http_tproxy", "Marked accept server %p on port %d for proxy 
protocol", na, opt.local_port);
   }
 
-  int should_filter_int = 0;
-  na->server.http_accept_filter = false;
-  REC_ReadConfigInteger(should_filter_int, "proxy.config.net.defer_accept");
-  if (should_filter_int > 0 && opt.etype == ET_NET) {
-na->server.http_accept_filter = true;
-  }
-
   SessionAccept *sa = dynamic_cast(cont);
   na->proxyPort = sa ? sa->proxyPort : nullptr;
   na->snpa  = dynamic_cast(cont);
@@ -173,25 +166,6 @@ UnixNetProcessor::accept_internal(Continuation *cont, int 
fd, AcceptOptions cons
 naVec.push_back(na);
   }
 
-#ifdef TCP_DEFER_ACCEPT
-  // set tcp defer accept timeout if it is configured, this will not trigger 
an accept until there is
-  // data on the socket ready to be read
-  if (should_filter_int > 0) {
-setsockopt(na->server.fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, 
_filter_int, sizeof(int));
-  }
-#endif
-
-#ifdef TCP_INIT_CWND
-  int tcp_init_cwnd = 0;
-  REC_ReadConfigInteger(tcp_init_cwnd, 
"proxy.config.http.server_tcp_init_cwnd");
-  if (tcp_init_cwnd > 0) {
-Debug("net", "Setting initial congestion window to %d", tcp_init_cwnd);
-if (setsockopt(na->server.fd, IPPROTO_TCP, TCP_INIT_CWND, _init_cwnd, 
sizeof(int)) != 0) {
-  Error("Cannot set initial congestion window to %d", tcp_init_cwnd);
-}
-  }
-#endif
-
   return na->action_.get();
 }
 
diff --git a/proxy/http/HttpProxyServerMain.cc 
b/proxy/http/HttpProxyServerMain.cc
index 11abf90..631d542 100644
--- a/proxy/http/HttpProxyServerMain.cc
+++ b/proxy/http/HttpProxyServerMain.cc
@@ -151,6 +151,10 @@ make_net_accept_options(const HttpProxyPort *port, 
unsigned nthreads)
   REC_ReadConfigInteger(net.recv_bufsiz

[trafficserver] branch master updated: Fixes logging after collation removal

2019-04-29 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 2050aae  Fixes logging after collation removal
2050aae is described below

commit 2050aae3cf5efe938d796ae5422a6522de99a89d
Author: Randall Meyer 
AuthorDate: Mon Apr 29 13:36:03 2019 -0700

Fixes logging after collation removal

A followup to 82d564486e058ead160bfb8ad15e40b0507ff8aa
---
 proxy/logging/YamlLogConfig.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/logging/YamlLogConfig.cc b/proxy/logging/YamlLogConfig.cc
index 3e8d408..db3580f 100644
--- a/proxy/logging/YamlLogConfig.cc
+++ b/proxy/logging/YamlLogConfig.cc
@@ -183,8 +183,8 @@ YamlLogConfig::decodeLogObject(const YAML::Node )
   }
 
   auto logObject = new LogObject(fmt, Log::config->logfile_dir, 
filename.c_str(), file_type, header.c_str(),
- 
(Log::RollingEnabledValues)obj_rolling_enabled, obj_rolling_interval_sec, 
obj_rolling_offset_hr,
- obj_rolling_size_mb);
+ 
(Log::RollingEnabledValues)obj_rolling_enabled, Log::config->preproc_threads,
+ obj_rolling_interval_sec, 
obj_rolling_offset_hr, obj_rolling_size_mb);
 
   // Generate LogDeletingInfo entry for later use
   std::string ext;



[trafficserver] branch master updated: cppcheck: minimize variable scopes

2019-04-24 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 4b0d979  cppcheck: minimize variable scopes
4b0d979 is described below

commit 4b0d979aeb442b0a124e07cb9dfc1b6adb560cf3
Author: Masakazu Kitajo 
AuthorDate: Wed Apr 24 13:58:36 2019 +0800

cppcheck: minimize variable scopes
---
 iocore/net/P_UDPNet.h | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/iocore/net/P_UDPNet.h b/iocore/net/P_UDPNet.h
index 99ca615..e54ba6c 100644
--- a/iocore/net/P_UDPNet.h
+++ b/iocore/net/P_UDPNet.h
@@ -167,12 +167,12 @@ public:
   void
   FreeCancelledPackets(int numSlots)
   {
-UDPPacketInternal *p;
 Queue tempQ;
-int i, s;
+int i;
 
 for (i = 0; i < numSlots; i++) {
-  s = (now_slot + i) % N_SLOTS;
+  int s = (now_slot + i) % N_SLOTS;
+  UDPPacketInternal *p;
   while (nullptr != (p = bucket[s].dequeue())) {
 if (IsCancelledPacket(p)) {
   p->free();
@@ -191,7 +191,6 @@ public:
   advanceNow(ink_hrtime t)
   {
 int s = now_slot;
-int prev;
 
 if (ink_hrtime_to_msec(t - lastPullLongTermQ) >= SLOT_TIME_MSEC * 
((N_SLOTS - 1) / 2)) {
   Queue tempQ;
@@ -208,6 +207,8 @@ public:
 }
 
 while (!bucket[s].head && (t > delivery_time[s] + SLOT_TIME)) {
+  int prev;
+
   prev = (s + N_SLOTS - 1) % N_SLOTS;
   delivery_time[s] = delivery_time[prev] + SLOT_TIME;
   s= (s + 1) % N_SLOTS;



[trafficserver] branch master updated: cppcheck: Remove an unused private function

2019-04-24 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 09b02b4  cppcheck: Remove an unused private function
09b02b4 is described below

commit 09b02b49991dd6675a151703c2c85da21661737b
Author: Masakazu Kitajo 
AuthorDate: Wed Apr 24 13:44:44 2019 +0800

cppcheck: Remove an unused private function
---
 iocore/net/P_UDPNet.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/iocore/net/P_UDPNet.h b/iocore/net/P_UDPNet.h
index e54ba6c..9368cbb 100644
--- a/iocore/net/P_UDPNet.h
+++ b/iocore/net/P_UDPNet.h
@@ -270,12 +270,6 @@ public:
 }
 return HRTIME_FOREVER;
   }
-
-private:
-  void
-  kill_cancelled_events()
-  {
-  }
 };
 
 class UDPQueue



[trafficserver] branch master updated: cppcheck: fixes issues found in example/thread_pool

2019-04-23 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 962ccb3  cppcheck: fixes issues found in example/thread_pool
962ccb3 is described below

commit 962ccb3c119df0ee2f11bf510cb89d046276633a
Author: Randall Meyer 
AuthorDate: Wed Apr 24 10:52:39 2019 +0800

cppcheck: fixes issues found in example/thread_pool

(style) The scope of the variable 'X' can be reduced.
(style) Variable 'psi' is assigned a value that is never used.
---
 example/thread_pool/psi.c | 38 +++
 example/thread_pool/test/SDKTest/psi_server.c |  6 ++---
 example/thread_pool/thread.c  | 11 +++-
 3 files changed, 20 insertions(+), 35 deletions(-)

diff --git a/example/thread_pool/psi.c b/example/thread_pool/psi.c
index 29db012..c21eefc 100644
--- a/example/thread_pool/psi.c
+++ b/example/thread_pool/psi.c
@@ -449,7 +449,6 @@ psi_include(TSCont contp, void *edata ATS_UNUSED)
 #define BUFFER_SIZE 1024
   ContData *data;
   TSFile filep;
-  char buf[BUFFER_SIZE];
   char inc_file[PSI_PATH_MAX_SIZE + PSI_FILENAME_MAX_SIZE];
 
   /* We manipulate plugin continuation data from a separate thread.
@@ -472,19 +471,19 @@ psi_include(TSCont contp, void *edata ATS_UNUSED)
   if ((filep = TSfopen(inc_file, "r")) != NULL) {
 TSDebug(PLUGIN_NAME, "Reading include file %s", inc_file);
 
+char buf[BUFFER_SIZE];
 while (TSfgets(filep, buf, BUFFER_SIZE) != NULL) {
-  TSIOBufferBlock block;
-  int64_t len, avail, ndone, ntodo, towrite;
-  char *ptr_block;
+  int64_t len, ndone, ntodo;
 
   len   = strlen(buf);
   ndone = 0;
   ntodo = len;
   while (ntodo > 0) {
 /* TSIOBufferStart allocates more blocks if required */
-block = TSIOBufferStart(data->psi_buffer);
-ptr_block = TSIOBufferBlockWriteStart(block, );
-towrite   = MIN(ntodo, avail);
+TSIOBufferBlock block = TSIOBufferStart(data->psi_buffer);
+int64_t avail;
+char *ptr_block = TSIOBufferBlockWriteStart(block, );
+int64_t towrite = MIN(ntodo, avail);
 
 memcpy(ptr_block, buf + ndone, towrite);
 TSIOBufferProduce(data->psi_buffer, towrite);
@@ -579,8 +578,7 @@ handle_transform(TSCont contp)
   TSVConn output_conn;
   TSVIO input_vio;
   ContData *data;
-  TSIOBufferReader input_reader;
-  int toread, avail, psi, toconsume = 0, towrite = 0;
+  int toread, toconsume = 0, towrite = 0;
 
   /* Get the output (downstream) vconnection where we'll write data to. */
   output_conn = TSTransformOutputVConnGet(contp);
@@ -610,11 +608,12 @@ handle_transform(TSCont contp)
   toread = TSVIONTodoGet(input_vio);
 
   if (toread > 0) {
-input_reader = TSVIOReaderGet(input_vio);
-avail= TSIOBufferReaderAvail(input_reader);
+TSIOBufferReader input_reader = TSVIOReaderGet(input_vio);
+int avail = TSIOBufferReaderAvail(input_reader);
 
 /* There are some data available for reading. Let's parse it */
 if (avail > 0) {
+  int psi;
   /* No need to parse data if there are too few bytes left to contain
  an include command... */
   if (toread > (PSI_START_TAG_LEN + PSI_END_TAG_LEN)) {
@@ -685,20 +684,13 @@ static int
 dump_psi(TSCont contp)
 {
   ContData *data;
-  int psi_output_len;
-
-/* TODO: This is odd, do we need to get the input_vio, but never use it ?? */
-#if 0
-  TSVIO input_vio;
-  input_vio = TSVConnWriteVIOGet(contp);
-#endif
 
   data = TSContDataGet(contp);
   TSAssert(data->magic == MAGIC_ALIVE);
 
   /* If script exec succeeded, copy its output to the downstream vconn */
   if (data->psi_success == 1) {
-psi_output_len = TSIOBufferReaderAvail(data->psi_reader);
+int psi_output_len = TSIOBufferReaderAvail(data->psi_reader);
 
 if (psi_output_len > 0) {
   data->transform_bytes += psi_output_len;
@@ -733,7 +725,6 @@ dump_psi(TSCont contp)
 static int
 transform_handler(TSCont contp, TSEvent event, void *edata ATS_UNUSED)
 {
-  TSVIO input_vio;
   ContData *data;
   int state, retval;
 
@@ -773,6 +764,7 @@ transform_handler(TSCont contp, TSEvent event, void *edata 
ATS_UNUSED)
   return 1;
 }
   } else {
+TSVIO input_vio;
 switch (event) {
 case TS_EVENT_ERROR:
   input_vio = TSVConnWriteVIOGet(contp);
@@ -853,9 +845,8 @@ transformable(TSHttpTxn txnp)
   /*  We are only interested in transforming "200 OK" responses
  with a Content-Type: text/ header and with X-Psi header */
   TSMBuffer bufp;
-  TSMLoc hdr_loc, field_loc;
+  TSMLoc hdr_loc;
   TSHttpStatus resp_status;
-  const char *value;
 
   if (TS_SUCCESS == TSHttpTxnServerRespGet(txnp, , _loc)) {
 resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
@@ -864,6 +855,7 @

[trafficserver] branch master updated: A recipient MUST ignore If-Modified-Since if the request contains an If-None-Match header field, about rfc https://tools.ietf.org/html/rfc7232#section-3.3

2019-04-17 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 91b0559   A recipient MUST ignore If-Modified-Since if the request 
contains anIf-None-Match header field, about rfc 
https://tools.ietf.org/html/rfc7232#section-3.3
91b0559 is described below

commit 91b05598bc07d4e8a97281f4d5a556b7956d803e
Author: chenggang7 
AuthorDate: Sun Apr 14 21:27:12 2019 +0800

 A recipient MUST ignore If-Modified-Since if the request contains an
   If-None-Match header field, about rfc 
https://tools.ietf.org/html/rfc7232#section-3.3
---
 proxy/http/HttpTransactCache.cc | 59 +++--
 1 file changed, 27 insertions(+), 32 deletions(-)

diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc
index 0b5ecdf..56adb7b 100644
--- a/proxy/http/HttpTransactCache.cc
+++ b/proxy/http/HttpTransactCache.cc
@@ -1288,6 +1288,33 @@ 
HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
 return response->status_get();
   }
 
+  // If-None-Match: may match weakly //
+  if (request->presence(MIME_PRESENCE_IF_NONE_MATCH)) {
+int raw_etags_len, comma_sep_tag_list_len;
+const char *raw_etags  = response->value_get(MIME_FIELD_ETAG, 
MIME_LEN_ETAG, _etags_len);
+const char *comma_sep_tag_list = nullptr;
+
+if (raw_etags) {
+  comma_sep_tag_list = request->value_get(MIME_FIELD_IF_NONE_MATCH, 
MIME_LEN_IF_NONE_MATCH, _sep_tag_list_len);
+  if (!comma_sep_tag_list) {
+comma_sep_tag_list = "";
+comma_sep_tag_list_len = 0;
+  }
+
+  
+  // If we have an etag and a if-none-match, we are talking to someone  //
+  // who is doing a 1.1 revalidate. Since this is a GET request with no //
+  // sub-ranges, we can do a weak validation.   //
+  
+  if (do_strings_match_weakly(raw_etags, raw_etags_len, 
comma_sep_tag_list, comma_sep_tag_list_len)) {
+// the response already failed If-modified-since (if one exists)
+return HTTP_STATUS_NOT_MODIFIED;
+  } else {
+return response->status_get();
+  }
+}
+  }
+
   // If-Modified-Since //
   if (request->presence(MIME_PRESENCE_IF_MODIFIED_SINCE)) {
 if (response->presence(MIME_PRESENCE_LAST_MODIFIED)) {
@@ -1316,38 +1343,6 @@ 
HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
 
   response_code = HTTP_STATUS_NOT_MODIFIED;
 }
-
-// we cannot return NOT_MODIFIED yet, need to check If-none-match
-if (!request->presence(MIME_PRESENCE_IF_NONE_MATCH)) {
-  return response_code;
-}
-  }
-
-  // If-None-Match: may match weakly //
-  if (request->presence(MIME_PRESENCE_IF_NONE_MATCH)) {
-int raw_etags_len, comma_sep_tag_list_len;
-const char *raw_etags  = response->value_get(MIME_FIELD_ETAG, 
MIME_LEN_ETAG, _etags_len);
-const char *comma_sep_tag_list = nullptr;
-
-if (raw_etags) {
-  comma_sep_tag_list = request->value_get(MIME_FIELD_IF_NONE_MATCH, 
MIME_LEN_IF_NONE_MATCH, _sep_tag_list_len);
-  if (!comma_sep_tag_list) {
-comma_sep_tag_list = "";
-comma_sep_tag_list_len = 0;
-  }
-
-  
-  // If we have an etag and a if-none-match, we are talking to someone  //
-  // who is doing a 1.1 revalidate. Since this is a GET request with no //
-  // sub-ranges, we can do a weak validation.   //
-  
-  if (do_strings_match_weakly(raw_etags, raw_etags_len, 
comma_sep_tag_list, comma_sep_tag_list_len)) {
-// the response already failed If-modified-since (if one exists)
-return HTTP_STATUS_NOT_MODIFIED;
-  } else {
-return response->status_get();
-  }
-}
   }
 
   // There is no If-none-match, and If-modified-since failed,



[trafficserver] branch quic-latest updated: QUIC: Uses unidirectional stream to send HTTP3 SETTINGS frames

2019-04-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 4180a95  QUIC: Uses unidirectional stream to send HTTP3 SETTINGS frames
4180a95 is described below

commit 4180a956490350c9fb4ab2a9f07224b989cc1a59
Author: scw00 
AuthorDate: Wed Apr 10 06:50:29 2019 +

QUIC: Uses unidirectional stream to send HTTP3 SETTINGS frames
---
 iocore/eventsystem/I_Thread.h  |  2 +
 iocore/net/quic/Makefile.am|  3 +-
 iocore/net/quic/QUICApplication.cc | 17 +-
 iocore/net/quic/QUICBidirectionalStream.h  |  2 +
 iocore/net/quic/QUICStream.cc  |  8 ++-
 iocore/net/quic/QUICStream.h   |  1 +
 iocore/net/quic/QUICStreamFactory.cc   | 84 ++
 iocore/net/quic/QUICStreamFactory.h| 46 
 iocore/net/quic/QUICStreamManager.cc   | 15 +++---
 iocore/net/quic/QUICStreamManager.h|  9 ++--
 iocore/net/quic/QUICTypes.cc   | 22 
 iocore/net/quic/QUICTypes.h| 12 +
 iocore/net/quic/QUICUnidirectionalStream.h |  5 ++
 13 files changed, 209 insertions(+), 17 deletions(-)

diff --git a/iocore/eventsystem/I_Thread.h b/iocore/eventsystem/I_Thread.h
index 8691206..8153acf 100644
--- a/iocore/eventsystem/I_Thread.h
+++ b/iocore/eventsystem/I_Thread.h
@@ -125,6 +125,8 @@ public:
   ProxyAllocator quicClientSessionAllocator;
   ProxyAllocator quicHandshakeAllocator;
   ProxyAllocator quicBidiStreamAllocator;
+  ProxyAllocator quicSendStreamAllocator;
+  ProxyAllocator quicReceiveStreamAllocator;
   ProxyAllocator quicStreamManagerAllocator;
   ProxyAllocator httpServerSessionAllocator;
   ProxyAllocator hdrHeapAllocator;
diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am
index 4a80697..9fd6b27 100644
--- a/iocore/net/quic/Makefile.am
+++ b/iocore/net/quic/Makefile.am
@@ -89,7 +89,8 @@ libquic_a_SOURCES = \
   QUICAddrVerifyState.cc \
   QUICBidirectionalStream.cc \
   QUICCryptoStream.cc \
-  QUICUnidirectionalStream.cc
+  QUICUnidirectionalStream.cc \
+  QUICStreamFactory.cc
 
 #
 # Check Programs
diff --git a/iocore/net/quic/QUICApplication.cc 
b/iocore/net/quic/QUICApplication.cc
index 9b02b8c..9039b99 100644
--- a/iocore/net/quic/QUICApplication.cc
+++ b/iocore/net/quic/QUICApplication.cc
@@ -42,8 +42,21 @@ QUICStreamIO::QUICStreamIO(QUICApplication *app, 
QUICStreamVConnection *stream_v
   this->_read_buffer_reader  = this->_read_buffer->alloc_reader();
   this->_write_buffer_reader = this->_write_buffer->alloc_reader();
 
-  this->_read_vio  = stream_vc->do_io_read(app, INT64_MAX, this->_read_buffer);
-  this->_write_vio = stream_vc->do_io_write(app, INT64_MAX, 
this->_write_buffer_reader);
+  switch (stream_vc->direction()) {
+  case QUICStreamDirection::BIDIRECTIONAL:
+this->_read_vio  = stream_vc->do_io_read(app, INT64_MAX, 
this->_read_buffer);
+this->_write_vio = stream_vc->do_io_write(app, INT64_MAX, 
this->_write_buffer_reader);
+break;
+  case QUICStreamDirection::SEND:
+this->_write_vio = stream_vc->do_io_write(app, INT64_MAX, 
this->_write_buffer_reader);
+break;
+  case QUICStreamDirection::RECEIVE:
+this->_read_vio = stream_vc->do_io_read(app, INT64_MAX, 
this->_read_buffer);
+break;
+  default:
+ink_assert(false);
+break;
+  }
 }
 
 QUICStreamIO::~QUICStreamIO()
diff --git a/iocore/net/quic/QUICBidirectionalStream.h 
b/iocore/net/quic/QUICBidirectionalStream.h
index b756f21..ed583bd 100644
--- a/iocore/net/quic/QUICBidirectionalStream.h
+++ b/iocore/net/quic/QUICBidirectionalStream.h
@@ -38,6 +38,8 @@ public:
   {
   }
 
+  ~QUICBidirectionalStream() {}
+
   int state_stream_open(int event, void *data);
   int state_stream_closed(int event, void *data);
 
diff --git a/iocore/net/quic/QUICStream.cc b/iocore/net/quic/QUICStream.cc
index 3c98ef4..334b9f4 100644
--- a/iocore/net/quic/QUICStream.cc
+++ b/iocore/net/quic/QUICStream.cc
@@ -37,6 +37,12 @@ QUICStream::id() const
   return this->_id;
 }
 
+QUICStreamDirection
+QUICStream::direction() const
+{
+  return QUICTypeUtil::detect_stream_direction(this->_id, 
this->_connection_info->direction());
+}
+
 const QUICConnectionInfoProvider *
 QUICStream::connection_info() const
 {
@@ -46,7 +52,7 @@ QUICStream::connection_info() const
 bool
 QUICStream::is_bidirectional() const
 {
-  return (this->_id & 0x03) < 0x02;
+  return ((this->_id & 0x03) < 0x02);
 }
 
 QUICOffset
diff --git a/iocore/net/quic/QUICStream.h b/iocore/net/quic/QUICStream.h
index fda00bf..bff660a 100644
--- a/iocore/net/quic/QUICStream.h
+++ b/iocore/net/quic/QUICStream.h
@@ -49,6 +49,7 @@ public:
   virtual ~QUICStream();
 
   QUICStreamId id() const;
+  QUICStreamDirectio

[trafficserver] branch quic-latest updated: Fixed compilation with ubuntu 18.04

2019-04-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 039e4a0  Fixed compilation with ubuntu 18.04
039e4a0 is described below

commit 039e4a0e850f0bbcf17a98505455486cf10c4810
Author: scw00 
AuthorDate: Tue Apr 9 09:11:43 2019 +

Fixed compilation with ubuntu 18.04
---
 src/traffic_quic/Makefile.inc | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/traffic_quic/Makefile.inc b/src/traffic_quic/Makefile.inc
index 18b466f..4b2dbe6 100644
--- a/src/traffic_quic/Makefile.inc
+++ b/src/traffic_quic/Makefile.inc
@@ -47,17 +47,18 @@ traffic_quic_traffic_quic_LDADD = \
$(top_builddir)/iocore/aio/libinkaio.a \
$(top_builddir)/iocore/net/quic/libquic.a \
$(top_builddir)/iocore/eventsystem/libinkevent.a \
-   $(top_builddir)/mgmt/libmgmt_p.la \
$(top_builddir)/lib/records/librecords_p.a \
+   $(top_builddir)/mgmt/libmgmt_p.la \
$(top_builddir)/src/tscore/libtscore.la \
$(top_builddir)/src/tscpp/util/libtscpputil.la \
$(top_builddir)/lib/tsconfig/libtsconfig.la \
$(top_builddir)/proxy/ParentSelectionStrategy.o \
+   $(top_builddir)/proxy/http3/libhttp3.a \
+   $(top_builddir)/proxy/http2/libhttp2.a \
$(top_builddir)/proxy/libproxy.a \
$(top_builddir)/proxy/hdrs/libhdrs.a \
-   $(top_builddir)/proxy/http2/libhttp2.a \
-   $(top_builddir)/proxy/http3/libhttp3.a \
@HWLOC_LIBS@ \
@YAMLCPP_LIBS@ \
@OPENSSL_LIBS@ \
@LIBPCRE@
+



[trafficserver] branch master updated: Adds Cache test suits

2019-04-05 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 768bcf8  Adds Cache test suits
768bcf8 is described below

commit 768bcf8cf9b7d6fc36ec9145aed0ae1d9879e056
Author: scw00 
AuthorDate: Fri Mar 15 22:21:12 2019 +0800

Adds Cache test suits
---
 .gitignore |   3 +
 iocore/cache/Makefile.am   | 124 ++
 iocore/cache/test/CacheTestHandler.cc  |  76 
 iocore/cache/test/CacheTestHandler.h   |  99 +
 iocore/cache/test/main.cc  | 273 +
 iocore/cache/test/main.h   | 232 +++
 iocore/cache/test/storage.config   | Bin 0 -> 24 bytes
 iocore/cache/test/stub.cc  | 264 +
 iocore/cache/test/test_Alternate_L_to_S.cc | 191 +
 .../cache/test/test_Alternate_L_to_S_remove_L.cc   | 260 +
 .../cache/test/test_Alternate_L_to_S_remove_S.cc   | 261 +
 iocore/cache/test/test_Alternate_S_to_L.cc | 191 +
 .../cache/test/test_Alternate_S_to_L_remove_L.cc   | 264 +
 .../cache/test/test_Alternate_S_to_L_remove_S.cc   | 262 +
 iocore/cache/test/test_Cache.cc|  55 +++
 iocore/cache/test/test_RWW.cc  | 429 +
 iocore/cache/test/var/trafficserver/guard.txt  |  24 ++
 17 files changed, 3008 insertions(+)

diff --git a/.gitignore b/.gitignore
index 0c7f285..3b85d10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -178,3 +178,6 @@ RELEASE
 
 # autest
 tests/env-test/
+
+iocore/cache/test_*
+iocore/cache/test/var/trafficserver/cache.db
diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index ed05579..a9993a3 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -66,6 +66,130 @@ libinkcache_a_SOURCES += \
P_CacheTest.h
 endif
 
+TESTS = $(check_PROGRAMS)
+
+test_CPPFLAGS = \
+   $(AM_CPPFLAGS) \
+   $(iocore_include_dirs) \
+   -I$(abs_top_srcdir)/include \
+   -I$(abs_top_srcdir)/lib \
+   -I$(abs_top_srcdir)/proxy \
+   -I$(abs_top_srcdir)/proxy/http \
+   -I$(abs_top_srcdir)/proxy/http2 \
+   -I$(abs_top_srcdir)/proxy/http3 \
+   -I$(abs_top_srcdir)/proxy/logging \
+   -I$(abs_top_srcdir)/proxy/http/remap \
+   -I$(abs_top_srcdir)/proxy/hdrs \
+   -I$(abs_top_srcdir)/proxy/shared \
+   -I$(abs_top_srcdir)/mgmt \
+   -I$(abs_top_srcdir)/mgmt/utils \
+   -I$(abs_top_srcdir)/tests/include \
+   $(TS_INCLUDES) \
+   @OPENSSL_INCLUDES@
+
+test_LDADD = \
+   $(top_builddir)/src/tscpp/util/libtscpputil.la \
+   $(top_builddir)/iocore/cache/libinkcache.a \
+   $(top_builddir)/proxy/libproxy.a \
+   $(top_builddir)/proxy/http/libhttp.a \
+   $(top_builddir)/proxy/http/remap/libhttp_remap.a \
+   $(top_builddir)/proxy/libproxy.a \
+   $(top_builddir)/iocore/net/libinknet.a \
+   $(top_builddir)/iocore/dns/libinkdns.a \
+   $(top_builddir)/iocore/hostdb/libinkhostdb.a \
+   $(top_builddir)/proxy/logging/liblogging.a \
+   $(top_builddir)/proxy/hdrs/libhdrs.a \
+   $(top_builddir)/proxy/logging/liblogcollation.a \
+   $(top_builddir)/proxy/shared/libdiagsconfig.a \
+   $(top_builddir)/mgmt/libmgmt_p.la \
+   $(top_builddir)/iocore/utils/libinkutils.a \
+   $(top_builddir)/iocore/aio/libinkaio.a \
+   $(top_builddir)/src/tscore/libtscore.la \
+   $(top_builddir)/lib/records/librecords_p.a \
+   $(top_builddir)/iocore/eventsystem/libinkevent.a \
+   $(top_builddir)/lib/tsconfig/libtsconfig.la \
+   @HWLOC_LIBS@ \
+   @LIBPCRE@ \
+   @LIBRESOLV@ \
+   @LIBZ@ \
+   @LIBLZMA@ \
+   @LIBPROFILER@ \
+   @OPENSSL_LIBS@ \
+   @YAMLCPP_LIBS@ \
+   -lm
+
+
+check_PROGRAMS = \
+  test_Cache \
+  test_RWW \
+  test_Alternate_L_to_S \
+  test_Alternate_S_to_L \
+  test_Alternate_L_to_S_remove_L \
+  test_Alternate_L_to_S_remove_S \
+  test_Alternate_S_to_L_remove_S \
+  test_Alternate_S_to_L_remove_L
+
+test_main_SOURCES = \
+  ./test/main.cc \
+  ./test/stub.cc \
+  ./test/CacheTestHandler.cc
+
+test_Cache_CPPFLAGS = $(test_CPPFLAGS)
+test_Cache_LDFLAGS = @AM_LDFLAGS@
+test_Cache_LDADD = $(test_LDADD)
+test_Cache_SOURCES = \
+  $(test_main_SOURCES) \
+  ./test/test_Cache.cc
+
+test_RWW_CPPFLAGS = $(test_CPPFLAGS)
+test_RWW_LDFLAGS = @AM_LDFLAGS@
+test_RWW_LDADD = $(test_LDADD)
+test_RWW_SOURCES = \
+  $(test_main_SOURCES) \
+  ./test/test_RWW.cc
+
+test_Alternate_L_to_S_CPPFLAGS = $(test_CPPFLAGS)
+test_Alternate_L_to_S_LDFLAGS = @AM_LDFLAGS@
+test_Alternate_L_to_S_LDADD = $(test_LDADD)
+test_Alternate_L_to_S_SOURCES = \
+  $(test_main_SOURCES) \
+  ./test/test_Alternate_L_to_S

[trafficserver] branch quic-latest updated: QUIC: Fixed building and test_QUICStream

2019-03-12 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 eb2a9ff  QUIC: Fixed building and test_QUICStream
eb2a9ff is described below

commit eb2a9ff588f948d97da06dc2f9f59e198454d5e2
Author: scw00 
AuthorDate: Wed Mar 13 10:03:48 2019 +0800

QUIC: Fixed building and test_QUICStream
---
 iocore/net/quic/Makefile.am | 2 +-
 iocore/net/quic/QUICUnidirectionalStream.cc | 2 +-
 iocore/net/quic/test/test_QUICStream.cc | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am
index c03eca0..4a80697 100644
--- a/iocore/net/quic/Makefile.am
+++ b/iocore/net/quic/Makefile.am
@@ -89,7 +89,7 @@ libquic_a_SOURCES = \
   QUICAddrVerifyState.cc \
   QUICBidirectionalStream.cc \
   QUICCryptoStream.cc \
-  QUICUnbidirectionalStream.cc
+  QUICUnidirectionalStream.cc
 
 #
 # Check Programs
diff --git a/iocore/net/quic/QUICUnidirectionalStream.cc 
b/iocore/net/quic/QUICUnidirectionalStream.cc
index cec9617..2cd27d9 100644
--- a/iocore/net/quic/QUICUnidirectionalStream.cc
+++ b/iocore/net/quic/QUICUnidirectionalStream.cc
@@ -21,7 +21,7 @@
  *  limitations under the License.
  */
 
-#include "QUICUnbidirectionalStream.h"
+#include "QUICUnidirectionalStream.h"
 
 //
 // QUICSendStream
diff --git a/iocore/net/quic/test/test_QUICStream.cc 
b/iocore/net/quic/test/test_QUICStream.cc
index 14faae8..4f2553e 100644
--- a/iocore/net/quic/test/test_QUICStream.cc
+++ b/iocore/net/quic/test/test_QUICStream.cc
@@ -24,7 +24,7 @@
 #include "catch.hpp"
 
 #include "quic/QUICBidirectionalStream.h"
-#include "quic/QUICUnbidirectionalStream.h"
+#include "quic/QUICUnidirectionalStream.h"
 #include "quic/Mock.h"
 
 TEST_CASE("QUICBidiStream", "[quic]")



[trafficserver] branch quic-latest updated: QUIC Rename unbidirectional to unidirectional and fixed test

2019-03-12 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 fd6b9c9  QUIC Rename unbidirectional to unidirectional and fixed test
fd6b9c9 is described below

commit fd6b9c91c4ccc769acb313ab02d2da26c3443407
Author: scw00 
AuthorDate: Wed Mar 13 09:52:54 2019 +0800

QUIC Rename unbidirectional to unidirectional and fixed test
---
 .../quic/{QUICUnbidirectionalStream.cc => QUICUnidirectionalStream.cc}  | 0
 .../quic/{QUICUnbidirectionalStream.h => QUICUnidirectionalStream.h}| 0
 iocore/net/quic/test/test_QUICIncomingFrameBuffer.cc| 2 +-
 3 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/quic/QUICUnbidirectionalStream.cc 
b/iocore/net/quic/QUICUnidirectionalStream.cc
similarity index 100%
rename from iocore/net/quic/QUICUnbidirectionalStream.cc
rename to iocore/net/quic/QUICUnidirectionalStream.cc
diff --git a/iocore/net/quic/QUICUnbidirectionalStream.h 
b/iocore/net/quic/QUICUnidirectionalStream.h
similarity index 100%
rename from iocore/net/quic/QUICUnbidirectionalStream.h
rename to iocore/net/quic/QUICUnidirectionalStream.h
diff --git a/iocore/net/quic/test/test_QUICIncomingFrameBuffer.cc 
b/iocore/net/quic/test/test_QUICIncomingFrameBuffer.cc
index 32eee34..6d8c9f5 100644
--- a/iocore/net/quic/test/test_QUICIncomingFrameBuffer.cc
+++ b/iocore/net/quic/test/test_QUICIncomingFrameBuffer.cc
@@ -24,7 +24,7 @@
 #include "catch.hpp"
 
 #include "quic/QUICIncomingFrameBuffer.h"
-#include "quic/QUICStream.h"
+#include "quic/QUICBidirectionalStream.h"
 #include 
 
 TEST_CASE("QUICIncomingStreamFrameBuffer_fin_offset", "[quic]")



[trafficserver] branch quic-latest updated (08bcbdc -> 4aaae87)

2019-03-12 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 08bcbdc  Add virtual destructor to HQClientSession / 
HQClientTransaction
 new 0f10526  QUIC: split out QUICBidiredirectionalStream
 new f93d492  QUIC: Split  out QUICCryptoStream
 new dc9485e  QUIC: Sink records_xxx_frame function to QUICStream
 new cb279cf  QUIC: Moves some functions to base QUICStream structure
 new 4adefcc  QUIC: Add Send only stream
 new 2db3613   QUIC: Add receive only stream
 new 2bf10ce  QUIC: Adds unbidirectional stream test
 new 4aaae87  QUIC: Move max_crypto_frame into QUICCryptoStream.cc

The 12914 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/QUICNetVConnection.cc   |  10 +-
 iocore/net/quic/Makefile.am|   5 +-
 .../{QUICStream.cc => QUICBidirectionalStream.cc}  | 467 +--
 iocore/net/quic/QUICBidirectionalStream.h  | 105 +++
 iocore/net/quic/QUICCryptoStream.cc| 167 
 iocore/net/quic/QUICCryptoStream.h |  76 ++
 iocore/net/quic/QUICHandshake.cc   |   1 -
 iocore/net/quic/QUICHandshake.h|   2 +-
 iocore/net/quic/QUICStream.cc  | 883 ++---
 iocore/net/quic/QUICStream.h   | 169 +---
 iocore/net/quic/QUICStreamManager.h|   2 +-
 iocore/net/quic/QUICUnbidirectionalStream.cc   | 760 ++
 iocore/net/quic/QUICUnbidirectionalStream.h| 132 +++
 iocore/net/quic/test/test_QUICStream.cc| 438 +-
 14 files changed, 1793 insertions(+), 1424 deletions(-)
 copy iocore/net/quic/{QUICStream.cc => QUICBidirectionalStream.cc} (58%)
 create mode 100644 iocore/net/quic/QUICBidirectionalStream.h
 create mode 100644 iocore/net/quic/QUICCryptoStream.cc
 create mode 100644 iocore/net/quic/QUICCryptoStream.h
 create mode 100644 iocore/net/quic/QUICUnbidirectionalStream.cc
 create mode 100644 iocore/net/quic/QUICUnbidirectionalStream.h



[trafficserver] branch quic-latest updated: QUIC: Bring back retransmittion test case

2019-03-10 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 d0c9aed  QUIC: Bring back retransmittion test case
d0c9aed is described below

commit d0c9aed68f83519b8b9c9a385f031089bdbf8eed
Author: scw00 
AuthorDate: Mon Mar 11 11:16:15 2019 +0800

QUIC: Bring back retransmittion test case
---
 iocore/net/quic/QUICFrameRetransmitter.cc |  6 +
 iocore/net/quic/QUICFrameRetransmitter.h  |  1 +
 iocore/net/quic/QUICStream.cc |  5 ++--
 iocore/net/quic/test/test_QUICStream.cc   | 40 ++-
 4 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/iocore/net/quic/QUICFrameRetransmitter.cc 
b/iocore/net/quic/QUICFrameRetransmitter.cc
index 008b72c..bedc654 100644
--- a/iocore/net/quic/QUICFrameRetransmitter.cc
+++ b/iocore/net/quic/QUICFrameRetransmitter.cc
@@ -175,3 +175,9 @@ QUICFrameRetransmitter::_create_crypto_frame(uint8_t *buf, 
QUICFrameInformationU
   ink_assert(frame != nullptr);
   return frame;
 }
+
+bool
+QUICFrameRetransmitter::is_retransmited_frame_queue_empty() const
+{
+  return this->_lost_frame_info_queue.empty();
+}
diff --git a/iocore/net/quic/QUICFrameRetransmitter.h 
b/iocore/net/quic/QUICFrameRetransmitter.h
index bbd53c3..9f45dd5 100644
--- a/iocore/net/quic/QUICFrameRetransmitter.h
+++ b/iocore/net/quic/QUICFrameRetransmitter.h
@@ -74,6 +74,7 @@ public:
   virtual QUICFrame *create_retransmitted_frame(uint8_t *buf, 
QUICEncryptionLevel level, uint16_t maximum_frame_size,
 QUICFrameId id = 0, 
QUICFrameGenerator *owner = nullptr);
   virtual void save_frame_info(QUICFrameInformationUPtr info);
+  bool is_retransmited_frame_queue_empty() const;
 
 private:
   QUICFrame *_create_stream_frame(uint8_t *buf, QUICFrameInformationUPtr 
, uint16_t maximum_frame_size,
diff --git a/iocore/net/quic/QUICStream.cc b/iocore/net/quic/QUICStream.cc
index 1e977b7..9c08765 100644
--- a/iocore/net/quic/QUICStream.cc
+++ b/iocore/net/quic/QUICStream.cc
@@ -585,7 +585,8 @@ QUICBidirectionalStream::reenable(VIO *vio)
 bool
 QUICBidirectionalStream::will_generate_frame(QUICEncryptionLevel level, 
ink_hrtime timestamp)
 {
-  return this->_local_flow_controller.will_generate_frame(level, timestamp) || 
(this->_write_vio.get_reader()->read_avail() > 0);
+  return this->_local_flow_controller.will_generate_frame(level, timestamp) || 
!this->is_retransmited_frame_queue_empty() ||
+ (this->_write_vio.get_reader()->read_avail() > 0);
 }
 
 QUICFrame *
@@ -914,7 +915,7 @@ QUICCryptoStream::write(const uint8_t *buf, int64_t len)
 bool
 QUICCryptoStream::will_generate_frame(QUICEncryptionLevel level, ink_hrtime 
timestamp)
 {
-  return this->_write_buffer_reader->is_read_avail_more_than(0);
+  return this->_write_buffer_reader->is_read_avail_more_than(0) || 
!this->is_retransmited_frame_queue_empty();
 }
 
 /**
diff --git a/iocore/net/quic/test/test_QUICStream.cc 
b/iocore/net/quic/test/test_QUICStream.cc
index 468e73c..46374d0 100644
--- a/iocore/net/quic/test/test_QUICStream.cc
+++ b/iocore/net/quic/test/test_QUICStream.cc
@@ -301,49 +301,55 @@ TEST_CASE("QUICStream", "[quic]")
 
   /*
* This test does not pass now
-   *
+   */
   SECTION("Retransmit STREAM frame")
   {
-MIOBuffer *write_buffer = new_MIOBuffer(BUFFER_SIZE_INDEX_8K);
+MIOBuffer *write_buffer = new_MIOBuffer(BUFFER_SIZE_INDEX_8K);
 IOBufferReader *write_buffer_reader = write_buffer->alloc_reader();
 
 MockQUICRTTProvider rtt_provider;
 MockQUICConnectionInfoProvider cinfo_provider;
-std::unique_ptr stream(new 
QUICBidirectionalStream(_provider, _provider, stream_id,
-  UINT64_MAX, UINT64_MAX)); SCOPED_MUTEX_LOCK(lock, stream->mutex, 
this_ethread());
+std::unique_ptr stream(
+  new QUICBidirectionalStream(_provider, _provider, stream_id, 
UINT64_MAX, UINT64_MAX));
+SCOPED_MUTEX_LOCK(lock, stream->mutex, this_ethread());
 
 MockContinuation mock_cont(stream->mutex);
 stream->do_io_write(_cont, INT64_MAX, write_buffer_reader);
 
 QUICEncryptionLevel level = QUICEncryptionLevel::ONE_RTT;
-const char data1[] = "this is a test data";
-const char data2[] = "THIS IS ANOTHER TEST DATA";
-QUICFrameUPtr frame   = QUICFrameFactory::create_null_frame();
-
-QUICFrameUPtr frame1 = QUICFrameFactory::create_null_frame();
-QUICFrameUPtr frame2 = QUICFrameFactory::create_null_frame();
+const char data1[]= "this is a test data";
+const char data2[]= "THIS IS ANOTHER TEST DATA";
+QUICFrame *frame  = nullptr;
+QUICStreamFrame *frame1   = nullptr;
+QUICStreamFrame *frame2   = nullptr;
+uint8_t frame_buf2[

[trafficserver] branch quic-latest updated: QUIC: Fixed test_QUICLossDetector crash

2019-03-10 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 9533aed  QUIC: Fixed test_QUICLossDetector crash
9533aed is described below

commit 9533aede1b808ba16d3b31d4af78a0cf465adff2
Author: scw00 
AuthorDate: Mon Mar 11 10:43:36 2019 +0800

QUIC: Fixed test_QUICLossDetector crash
---
 iocore/net/quic/QUICLossDetector.cc | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/iocore/net/quic/QUICLossDetector.cc 
b/iocore/net/quic/QUICLossDetector.cc
index 4cb727c..7f9915e 100644
--- a/iocore/net/quic/QUICLossDetector.cc
+++ b/iocore/net/quic/QUICLossDetector.cc
@@ -141,13 +141,14 @@ QUICLossDetector::on_packet_sent(QUICPacketInfoUPtr 
packet_info, bool in_flight)
 
   SCOPED_MUTEX_LOCK(lock, this->_loss_detection_mutex, this_ethread());
 
-  bool ack_eliciting = packet_info->ack_eliciting;
-  bool is_crypto_packet  = packet_info->is_crypto_packet;
-  ink_hrtime now = packet_info->time_sent;
-  size_t sent_bytes  = packet_info->sent_bytes;
-  this->_largest_sent_packet = packet_info->packet_number;
-
-  this->_add_to_sent_packet_list(packet_info->packet_number, 
std::move(packet_info));
+  QUICPacketNumber packet_number = packet_info->packet_number;
+  bool ack_eliciting = packet_info->ack_eliciting;
+  bool is_crypto_packet  = packet_info->is_crypto_packet;
+  ink_hrtime now = packet_info->time_sent;
+  size_t sent_bytes  = packet_info->sent_bytes;
+  this->_largest_sent_packet = packet_info->packet_number;
+
+  this->_add_to_sent_packet_list(packet_number, std::move(packet_info));
 
   if (in_flight) {
 if (is_crypto_packet) {



[trafficserver] branch quic-latest updated: QUIC: Fixed compiler error in test_QUICStream

2019-03-10 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 e8eb00b  QUIC: Fixed compiler error in test_QUICStream
e8eb00b is described below

commit e8eb00b0ce9987f4538542edfad111240853400d
Author: scw00 
AuthorDate: Mon Mar 11 10:23:04 2019 +0800

QUIC: Fixed compiler error in test_QUICStream
---
 iocore/net/quic/Makefile.am | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am
index ceddc26..ae4a93a 100644
--- a/iocore/net/quic/Makefile.am
+++ b/iocore/net/quic/Makefile.am
@@ -122,15 +122,14 @@ test_CPPFLAGS = \
   -I$(abs_top_srcdir)/tests/include
 
 test_LDADD = \
+  $(top_builddir)/iocore/net/libinknet.a \
   libquic.a \
+  $(top_builddir)/iocore/eventsystem/libinkevent.a \
+  $(top_builddir)/mgmt/libmgmt_p.la \
   $(top_builddir)/lib/records/librecords_p.a \
-  $(top_builddir)/lib/tsconfig/libtsconfig.la \
   $(top_builddir)/src/tscore/libtscore.la \
   $(top_builddir)/src/tscpp/util/libtscpputil.la \
-  $(top_builddir)/iocore/eventsystem/libinkevent.a \
-  $(top_builddir)/iocore/net/libinknet.a \
-  $(top_builddir)/mgmt/libmgmt_p.la \
-  $(top_builddir)/proxy/shared/libUglyLogStubs.a \
+  $(top_builddir)/lib/tsconfig/libtsconfig.la \
   $(top_builddir)/proxy/ParentSelectionStrategy.o \
   @HWLOC_LIBS@ @OPENSSL_LIBS@ @LIBPCRE@ @YAMLCPP_LIBS@
 



[trafficserver] branch master updated: Fixed the compatibility with previous cache verison

2019-03-09 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new cb2382d  Fixed the compatibility with previous cache verison
cb2382d is described below

commit cb2382dbcaf0a3be8fd0ca391d3aa24343f69614
Author: scw00 
AuthorDate: Tue Feb 26 16:38:17 2019 +0800

Fixed the compatibility with previous cache verison
---
 iocore/cache/Cache.cc  | 12 ++-
 iocore/cache/I_CacheDefs.h |  2 +-
 proxy/hdrs/HTTP.cc | 81 ++
 proxy/hdrs/HTTP.h  |  1 +
 4 files changed, 94 insertions(+), 2 deletions(-)

diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 87b6f18..dd408c9 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -2139,10 +2139,20 @@ CacheVC::is_pread_capable()
 static void
 unmarshal_helper(Doc *doc, Ptr , int )
 {
+  using UnmarshalFunc   = int(char *buf, int len, RefCountObj 
*block_ref);
+  UnmarshalFunc *unmarshal_func = ::unmarshal;
+  ts::VersionNumber version(doc->v_major, doc->v_minor);
+
+  // introduced by https://github.com/apache/trafficserver/pull/4874, this is 
used to distinguish the doc version
+  // before and after #4847
+  if (version < CACHE_DB_VERSION) {
+unmarshal_func = ::unmarshal_v24_1;
+  }
+
   char *tmp = doc->hdr();
   int len   = doc->hlen;
   while (len > 0) {
-int r = HTTPInfo::unmarshal(tmp, len, buf.get());
+int r = unmarshal_func(tmp, len, buf.get());
 if (r < 0) {
   ink_assert(!"CacheVC::handleReadDone unmarshal failed");
   okay = 0;
diff --git a/iocore/cache/I_CacheDefs.h b/iocore/cache/I_CacheDefs.h
index 619d20c..cdd39bb 100644
--- a/iocore/cache/I_CacheDefs.h
+++ b/iocore/cache/I_CacheDefs.h
@@ -33,7 +33,7 @@
 #define CACHE_ALT_REMOVED -2
 
 static const uint8_t CACHE_DB_MAJOR_VERSION = 24;
-static const uint8_t CACHE_DB_MINOR_VERSION = 1;
+static const uint8_t CACHE_DB_MINOR_VERSION = 2;
 // This is used in various comparisons because otherwise if the minor version 
is 0,
 // the compile fails because the condition is always true or false. Running it 
through
 // VersionNumber prevents that.
diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc
index 8faf57e..50726d0 100644
--- a/proxy/hdrs/HTTP.cc
+++ b/proxy/hdrs/HTTP.cc
@@ -2136,6 +2136,87 @@ HTTPInfo::unmarshal(char *buf, int len, RefCountObj 
*block_ref)
   return alt->m_unmarshal_len;
 }
 
+int
+HTTPInfo::unmarshal_v24_1(char *buf, int len, RefCountObj *block_ref)
+{
+  HTTPCacheAlt *alt = (HTTPCacheAlt *)buf;
+  int orig_len  = len;
+
+  if (alt->m_magic == CACHE_ALT_MAGIC_ALIVE) {
+// Already unmarshaled, must be a ram cache
+//  it
+ink_assert(alt->m_unmarshal_len > 0);
+ink_assert(alt->m_unmarshal_len <= len);
+return alt->m_unmarshal_len;
+  } else if (alt->m_magic != CACHE_ALT_MAGIC_MARSHALED) {
+ink_assert(!"HTTPInfo::unmarshal bad magic");
+return -1;
+  }
+
+  ink_assert(alt->m_unmarshal_len < 0);
+  alt->m_magic = CACHE_ALT_MAGIC_ALIVE;
+  ink_assert(alt->m_writeable == 0);
+  len -= HTTP_ALT_MARSHAL_SIZE;
+
+  if (alt->m_frag_offset_count > HTTPCacheAlt::N_INTEGRAL_FRAG_OFFSETS) {
+// stuff that didn't fit in the integral slots.
+int extra   = sizeof(FragOffset) * alt->m_frag_offset_count - 
sizeof(alt->m_integral_frag_offsets);
+char *extra_src = buf + reinterpret_cast(alt->m_frag_offsets);
+// Actual buffer size, which must be a power of two.
+// Well, technically not, because we never modify an unmarshalled fragment
+// offset table, but it would be a nasty bug should that be done in the
+// future.
+int bcount = HTTPCacheAlt::N_INTEGRAL_FRAG_OFFSETS * 2;
+
+while (bcount < alt->m_frag_offset_count) {
+  bcount *= 2;
+}
+alt->m_frag_offsets =
+  static_cast(ats_malloc(bcount * sizeof(FragOffset))); // 
WRONG - must round up to next power of 2.
+memcpy(alt->m_frag_offsets, alt->m_integral_frag_offsets, 
sizeof(alt->m_integral_frag_offsets));
+memcpy(alt->m_frag_offsets + HTTPCacheAlt::N_INTEGRAL_FRAG_OFFSETS, 
extra_src, extra);
+len -= extra;
+  } else if (alt->m_frag_offset_count > 0) {
+alt->m_frag_offsets = alt->m_integral_frag_offsets;
+  } else {
+alt->m_frag_offsets = nullptr; // should really already be zero.
+  }
+
+  HdrHeap *heap   = (HdrHeap *)(alt->m_request_hdr.m_heap ? (buf + 
(intptr_t)alt->m_request_hdr.m_heap) : nullptr);
+  HTTPHdrImpl *hh = nullptr;
+  int tmp;
+  if (heap != nullptr) {
+tmp = heap->unmarshal(len, HDR_HEAP_OBJ_HTTP_HEADER, (HdrHeapObjImpl 
**), block_ref);
+if (hh == nullptr || tmp < 0) {
+  ink_assert(!"HTTPInfo::request unmarshal failed");
+  return -1;
+}
+len -= tmp;

[trafficserver] branch quic-latest updated (2c53847 -> f9b26d2)

2019-03-07 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 2c53847  Rename QUICSimpleApp to Http09App
 new 7532912  QUIC: recovery draft-18
 new f9b26d2  QUIC: Moving log in appropriate position

The 12878 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 | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)



[trafficserver] branch master updated: fix crash in CacheVC::openReadFromWriter

2019-03-06 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new d91ca9e  fix crash in CacheVC::openReadFromWriter
d91ca9e is described below

commit d91ca9ee43973fcce9cfccbb146788eb95ae6ffc
Author: rienzi2012 <51553...@qq.com>
AuthorDate: Wed Mar 6 11:54:33 2019 +0800

fix crash in CacheVC::openReadFromWriter
---
 proxy/hdrs/HTTP.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc
index 74e79df..8faf57e 100644
--- a/proxy/hdrs/HTTP.cc
+++ b/proxy/hdrs/HTTP.cc
@@ -2035,8 +2035,7 @@ HTTPInfo::marshal(char *buf, int len)
 buf += m_alt->m_frag_offset_count * sizeof(FragOffset);
 used += m_alt->m_frag_offset_count * sizeof(FragOffset);
   } else {
-// the data stored in intergral buffer
-m_alt->m_frag_offsets = nullptr;
+marshal_alt->m_frag_offsets = nullptr;
   }
 
   // The m_{request,response}_hdr->m_heap pointers are converted



[trafficserver] branch quic-latest updated (a52ad8d -> 01ed38c)

2019-03-01 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from a52ad8d  QUIC: Fixed warning in Mock.h
 add 01ed38c  QUIC: Fixed build error under ubuntu 16.04

No new revisions were added by this update.

Summary of changes:
 src/traffic_quic/traffic_quic.cc | 7 +++
 1 file changed, 7 insertions(+)



[trafficserver] branch quic-latest updated (5da8f67 -> a52ad8d)

2019-02-28 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 5da8f67  Merge branch 'master' into quic-latest
 add a52ad8d  QUIC: Fixed warning in Mock.h

No new revisions were added by this update.

Summary of changes:
 iocore/net/quic/Mock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[trafficserver] branch quic-latest created (now 5da8f67)

2019-02-28 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


  at 5da8f67  Merge branch 'master' into quic-latest

No new revisions were added by this update.



[trafficserver] branch master updated: Fixed memory leaking introduced by 4873

2019-02-27 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 5e2d175  Fixed memory leaking introduced by 4873
5e2d175 is described below

commit 5e2d175071190331ec7e13f05938fa0de936f6d9
Author: scw00 
AuthorDate: Thu Feb 21 14:38:21 2019 +0800

Fixed memory leaking introduced by 4873
---
 proxy/http/HttpSM.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 17bc572..05fa35c 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -3288,7 +3288,6 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer 
*c)
 
 vc_table.remove_entry(this->ua_entry);
 ua_txn->do_io_close();
-ua_txn = nullptr;
   } else {
 ink_assert(ua_buffer_reader != nullptr);
 ua_txn->release(ua_buffer_reader);



[trafficserver] branch master updated: Assertion when cache_config_target_fragment_size is large than MAX_FRAG_SIZE

2019-02-26 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 763cd6d  Assertion when cache_config_target_fragment_size is large 
than MAX_FRAG_SIZE
763cd6d is described below

commit 763cd6d0140f53eb149e944c0a9e7198fcc80624
Author: scw00 
AuthorDate: Sat Feb 23 09:53:27 2019 +0800

Assertion when cache_config_target_fragment_size is large than MAX_FRAG_SIZE
---
 iocore/cache/Cache.cc  | 19 +--
 iocore/cache/CacheWrite.cc |  4 +++-
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index e1416fa..87b6f18 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -3154,6 +3154,18 @@ register_cache_stats(RecRawStatBlock *rsb, const char 
*prefix)
   REG_INT("span.online", cache_span_online_stat);
 }
 
+int
+FragmentSizeUpdateCb(const char * /* name ATS_UNUSED */, RecDataT /* data_type 
ATS_UNUSED */, RecData data, void *cookie)
+{
+  if (sizeof(Doc) >= static_cast(data.rec_int) || 
static_cast(data.rec_int) - sizeof(Doc) > MAX_FRAG_SIZE) {
+Warning("The fragments size exceed the limitation, ignore: %" PRId64 ", 
%d", data.rec_int, cache_config_target_fragment_size);
+return 0;
+  }
+
+  cache_config_target_fragment_size = data.rec_int;
+  return 0;
+}
+
 void
 ink_cache_init(ts::ModuleVersion v)
 {
@@ -3206,9 +3218,12 @@ ink_cache_init(ts::ModuleVersion v)
   Debug("cache_init", "proxy.config.cache.hit_evacuate_size_limit = %d", 
cache_config_hit_evacuate_size_limit);
 
   REC_EstablishStaticConfigInt32(cache_config_force_sector_size, 
"proxy.config.cache.force_sector_size");
-  REC_EstablishStaticConfigInt32(cache_config_target_fragment_size, 
"proxy.config.cache.target_fragment_size");
 
-  if (cache_config_target_fragment_size == 0) {
+  
ink_assert(REC_RegisterConfigUpdateFunc("proxy.config.cache.target_fragment_size",
 FragmentSizeUpdateCb, nullptr) !=
+ REC_ERR_FAIL);
+  REC_ReadConfigInt32(cache_config_target_fragment_size, 
"proxy.config.cache.target_fragment_size");
+
+  if (cache_config_target_fragment_size == 0 || 
cache_config_target_fragment_size - sizeof(Doc) > MAX_FRAG_SIZE) {
 cache_config_target_fragment_size = DEFAULT_TARGET_FRAGMENT_SIZE;
   }
 
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index f81cf8d..178ec08 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -1369,7 +1369,9 @@ CacheVC::openWriteWriteDone(int event, Event *e)
 static inline int
 target_fragment_size()
 {
-  return cache_config_target_fragment_size - sizeof(Doc);
+  uint64_t value = cache_config_target_fragment_size - sizeof(Doc);
+  ink_release_assert(value <= MAX_FRAG_SIZE);
+  return value;
 }
 
 int



[trafficserver] branch master updated: Fixed compiler error with std::string_view

2019-02-26 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new 3b611dc  Fixed compiler error with std::string_view
3b611dc is described below

commit 3b611dcefe2f0362db7ecbcd233ea828a74faa3b
Author: scw00 
AuthorDate: Thu Feb 21 18:40:57 2019 +0800

Fixed compiler error with std::string_view
---
 mgmt/MgmtDefs.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mgmt/MgmtDefs.h b/mgmt/MgmtDefs.h
index 6932868..868ec25 100644
--- a/mgmt/MgmtDefs.h
+++ b/mgmt/MgmtDefs.h
@@ -31,6 +31,7 @@
 
 #include "tscore/ink_defs.h"
 #include "tscpp/util/MemSpan.h"
+#include "tscpp/util/TextView.h"
 
 typedef int64_t MgmtIntCounter;
 typedef int64_t MgmtInt;
@@ -142,4 +143,4 @@ inline MgmtConverter::MgmtConverter(MgmtInt 
(*_load_int)(void *), void (*_store_
 {
 }
 
-constexpr std::string_view LM_CONNECTION_SERVER{"processerver.sock"};
+constexpr ts::TextView LM_CONNECTION_SERVER{"processerver.sock"};



[trafficserver] branch master updated: Frees disk_vols when volume create failed

2019-02-18 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new c2a9189  Frees disk_vols when volume create failed
c2a9189 is described below

commit c2a91894585bd84ec14ae367762dcadb55e0f645
Author: scw00 
AuthorDate: Mon Feb 18 16:55:54 2019 +0800

Frees disk_vols when volume create failed
---
 iocore/cache/Cache.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 4933727..e1416fa 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -2865,6 +2865,8 @@ cplist_reconfigure()
 new_cp->disk_vols = (DiskVol **)ats_malloc(gndisks * sizeof(DiskVol 
*));
 memset(new_cp->disk_vols, 0, gndisks * sizeof(DiskVol *));
 if (create_volume(config_vol->number, size_in_blocks, 
config_vol->scheme, new_cp)) {
+  ats_free(new_cp->disk_vols);
+  new_cp->disk_vols = nullptr;
   delete new_cp;
   return -1;
 }



[trafficserver] branch quic-latest updated (6b2773c -> f4b4625)

2019-02-18 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 6b2773c  QUIC: Fixed crash when records connection id frame
 new 38600d4  QUIC: Refactor QUICStream State
 new 1ccd18d  QUIC: Do not discard frame in StreamState
 new 8535ce7  Clang-Format and signal user event only on consuming all data
 new c9552ad  QUIC: Bring back QUICTransferProgressProvider
 new 914ffb3  QUIC: Fixed test cases
 new f4b4625  QUIC: Fixed QUICIncomingFrameBuffer test

The 12705 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/Mock.h   |   2 +-
 iocore/net/quic/QUICDebugNames.cc|  96 --
 iocore/net/quic/QUICDebugNames.h |   4 +-
 iocore/net/quic/QUICStream.cc|   6 +-
 iocore/net/quic/QUICStream.h |   2 +-
 iocore/net/quic/QUICStreamState.cc   | 468 ---
 iocore/net/quic/QUICStreamState.h| 112 ---
 iocore/net/quic/test/test_QUICStreamState.cc | 306 ++
 8 files changed, 597 insertions(+), 399 deletions(-)



[trafficserver] branch 6.2.x deleted (was eaed595)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 6.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was eaed595  Adding CHANGELOG-6.2.3

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch quic-12 deleted (was 38104e9)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


 was 38104e9  Merge branch 'asf/master' into quic-latest

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 6.1.x deleted (was 5712179)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 6.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 5712179  TS-4403: Fix stale-while-revalidate on DNS lookup failures 
(#609)

This change permanently discards the following revisions:

 discard 5712179  TS-4403: Fix stale-while-revalidate on DNS lookup failures 
(#609)
 discard a7f4f25  TS-4299 Allows for the content length to be processed even 
with C: close
 discard 82bb47f  TS-4207 Run clang format on the code...
 discard bac5f0b  TS-3917: Sending only SETTINGS_INITIAL_WINDOW_SIZE in
 discard 3609dae  Workaround for TS-4207
 discard 81b0d74  TS-4272: Clear memory for new HostDBInfo items
 discard ceccf32  TS-4307 Checks for existence of alloca.h consistently
 discard 14951bf  TS-4317: Prevent cache stripe recovery from infinite loop.
 discard dd61baa  Fix invalid condition in blacklist plugin example.
 discard a435c51  TS-4329 Off-by-one error in NULL terminator for aname in 
hostdb
 discard 0b22c17  Update CHANGES with latest backports to 6.1.2
 discard 55e8155  TS-4228 Adds better error handling in the synthetic checks
 discard 829a12a  [TS-4222] Add check to see if 
SSLConfigParams::load_ssl_file_cb is initialized.
 discard 85013c3  TS-4190 Fix potential null reference found by clang-analyzaer.
 discard ec22b6f  Automate clang-format setup.
 discard 3ef0fbe  Updated CHANGES
 discard 6a885b8  TS-4199: Fixed a bug where a parent is not marked down due to 
a race updating the parent record failCount.  Added a fix to only mark up 
retryable parents in HttpTransact when the retry is successful.
 discard 9afcf01  Bump version to 6.1.2
 discard f2987f0   Added TS-4198
 discard 8377fa5  TS-4198: Restore sync buffer cleanup.
 discard 01eb697  Updated CHANGES for TS-4188
 discard 25ec854  TS-4188: Client initial window size is set incorrectly in 
HTTP/2



[trafficserver] branch 4.0.x deleted (was 2bfb8fc)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 2bfb8fc  Updated STATUS.

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 4.2.1.x deleted (was 2674e67)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 4.2.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 2674e67  Updated version for the 4.2.1.1 release and added release 
notes

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch quic-13 deleted (was 0095388)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


 was 0095388  Add const qualifier to _hs_protocol

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 5.2.x deleted (was e5166fc)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 5.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was e5166fc  Updated release history

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 2.0.x deleted (was 640c4f7)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 2.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 640c4f7  Added v2.0.1 to the release history.

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 5.3.x deleted (was bd7b9f0)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 5.3.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was bd7b9f0  TS-5094: URL encoding in redirect pages

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch quic-15 deleted (was 447c7f6)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


 was 447c7f6  Merge branch 'master' into quic-latest

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 3.3.x deleted (was d760653)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 3.3.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was d760653  doc: whack sphinx documentation version

This change permanently discards the following revisions:

 discard d760653  doc: whack sphinx documentation version



[trafficserver] branch 5.1.x deleted (was edbbd08)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 5.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was edbbd08  CHANGES

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch lua_config deleted (was ea5fb9f)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch lua_config
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was ea5fb9f  x

This change permanently discards the following revisions:

 discard ea5fb9f  x
 discard c5c92b9  Merge remote-tracking branch 'origin/master' into lua_config
 discard 5f436df  Little more indentation cleanup
 discard 557d1a2  Run it through indent with our indentation rules
 discard f383038  Make it compile at least
 discard 72da02a  Merge branch 'lua_in_core' of 
https://github.com/postwait/trafficserver into dev/lua_conf



[trafficserver] branch 7.1.x deleted (was 739d8d7)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 739d8d7  Avoid ats_malloc in unmarshal

This change permanently discards the following revisions:

 discard 739d8d7  Avoid ats_malloc in unmarshal
 discard b9b7ff9  Fix TSHttpTxnEffectiveUrlStringGet to correctly set the port 
when it is non-standard.
 discard 4f0901e  Cached object's size can be used as content length for 304 
response
 discard 3811947  Manually merging changes from #4442



[trafficserver] branch 3.0.x deleted (was 325610e)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 3.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 325610e  TS-1459: Backport regex_remap

This change permanently discards the following revisions:

 discard 325610e  TS-1459: Backport regex_remap
 discard efb8636  New proposal
 discard 10ab74e  Undo last removal, we did release 3.0.5.
 discard a9e9c61  Removed 3.0.5, I don't think we released this.
 discard 5e04e32  Vote.
 discard a01be5c  promote
 discard 3044f6b  vote on backports
 discard 97e3c91  vote on TS-1459
 discard eed5063  STATUS UPDATES
 discard 094625c  promote TS-1259 propose TS-1459
 discard 758b224  Vote
 discard 7fb59c2  vote
 discard ae73404  consistently leave a space in CHANGES to make cherry-picks 
less broken
 discard b44e118  Voted on TS-1295.
 discard a3d336e  Propose TS-1295 for backport
 discard 981fc80  [TS-1116] Fix build issues with clang + gcc4.7 Review/Test: 
briang, igalic, zwoop Backport: briang
 discard 816eb26  Voted on TS-1116
 discard 66c7998  vote
 discard 058a7e2  Adding TS-1116 again to proposals for backport in 3.0.5



[trafficserver] branch 6.0.x deleted (was b59020b)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was b59020b  Updated the release notest for 6.0.1

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 8.0.x deleted (was 773bdce)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 773bdce  Doc: centering images is not in view

This change permanently discards the following revisions:

 discard 773bdce  Doc: centering images is not in view
 discard e315226  Updated ChangeLog
 discard ed8f1e5  Fix another ProxySession and NetVC shutdown race crash
 discard 882e54a  Fix crash in Http2ClientSession::release_netvc
 discard 82fcc3c  Updated ChangeLog
 discard 68a95eb  Fix client connections of traffic_top
 discard ae79abb  Updated Changelog
 discard a8d6a17  This improves on #3008, making the code clearer
 discard cad19df  Fix an failed assertion in HttpSM::parse_range_and_compare
 discard 0a90b58  Fix ATS does not honor 
proxy.config.body_factory.response_max_size
 discard 063c4df  Fixes heap-use-after-free in RangeTransform
 discard 0f10c1d  Fix TSHttpTxnEffectiveUrlStringGet to correctly set the port 
when it is non-standard.
 discard 45efe1a  preventing crashing when calling TSSslContextFindByName with 
a nullptr or a 0 lenght string
 discard 70f9332  Deals better with Cc: max-age=0
 discard a9a1ebb  Split current active client connections stats into HTTP/1.1 
and HTTP/2
 discard 7b4211a  Corrects description for 
proxy.config.http.origin_max_connections
 discard b1c3b76  Updated CHANGELOG
 discard bcf457f  Add ifdef so tls test client will compile on non-openssl-1.1.x
 discard 34856e4  Make autests friendlier with openssl 1.1.1
 discard 5b8d1d6  Add missing manpages to build list
 discard 60f4a00  Update logging.yaml documentation
 discard 00f66f5  Allows the use of certs with no commonName, but with 
subjectAltNames
 discard 64b4217  Finish the config removal started in #4653
 discard e336a27  Ignore the entire doc/_build directory that is generated
 discard 2ff94f7  Fixes another memory leak related to OCSP
 discard 2bf380a  Prevent linking everything against brotli
 discard 67975d6  Fix logging log file roll issue (#2544).
 discard 33a8ec9  Updated CHANGELOG
 discard 6d4f3b7  Removes this unused old/duplicated define
 discard 3f6847e  Add the TLSv1_3 setting to disable TLSv1_3
 discard 421de25  Changes the string_view::length to ::size
 discard 5f3f56e  Eliminates frequent librecords lookup
 discard 467959f  Eliminates expensive librecords and malloc on drain
 discard 6df3cf0  Fixes unmatched port when looking up HostDB
 discard 6ae6ff2  Mark H2 connection inactive only if it is NOT shutting down



[trafficserver] branch 8.1.x deleted (was 2a08906)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 2a08906  Merge branch '8.0.x' into 8.1.x

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[trafficserver] branch 4.2.x deleted (was 6ed0c57)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 4.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 6ed0c57  docs: backporting rtd theme workaround

This change permanently discards the following revisions:

 discard 6ed0c57  docs: backporting rtd theme workaround



[trafficserver] branch fix_tunnel_route deleted (was e4d4b3d)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch fix_tunnel_route
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was e4d4b3d  Add debug in curl

This change permanently discards the following revisions:

 discard e4d4b3d  Add debug in curl
 discard 39cf6dc  Fix tunnel_route action in ssl_server_name



[trafficserver] branch 4.1.x deleted (was ef46b2e)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 4.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was ef46b2e  Revert "TS-2172: Explicitly use subdir-objects in automake 
init"

This change permanently discards the following revisions:

 discard ef46b2e  Revert "TS-2172: Explicitly use subdir-objects in automake 
init"
 discard 7cb5897  TS-2568 Better template messages
 discard a9a7ba6  TS-2467: traffic_shell doesn't work with tcl 8.6, works with 
8.5
 discard a40d119  TS-2469: remove libreadline which is gpl licensed
 discard 5cdf045  bump version to 4.1.3
 discard bebda9f  TS-2172: Explicitly use subdir-objects in automake init
 discard 2b9dd00  TS-2305: fall back to ftruncate on posix_fallocate failure
 discard 39ba53d  TS-2452: Can't access a deleted object
 discard d738e39  TS-2463: Crash regression around slow-log feature
 discard 1de3269  [TS-2497] Failed post results in tunnel buffers being 
returned to freelist prematurely, Reporter: Thomas Jackson 




[trafficserver] branch 3.2.x deleted (was 245b59e)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a change to branch 3.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


 was 245b59e  TS-1475 - fix clang complaint for sync_cache_dir_on_shutdown

This change permanently discards the following revisions:

 discard 245b59e  TS-1475 - fix clang complaint for sync_cache_dir_on_shutdown
 discard 3c62327  TS-2568 Better template messages
 discard a09323c  TS-2297: fix out of tree build for TSConfig
 discard e2fe9b2  bump versions for next release.



[trafficserver] branch master updated: XXxClean up ua_entry when client_vc is closed

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new a37f0d9  XXxClean up ua_entry when client_vc is closed
a37f0d9 is described below

commit a37f0d91ec0bbc5cd1f0700a69d76df54b9484fc
Author: scw00 
AuthorDate: Sat Jan 26 17:21:42 2019 +0800

XXxClean up ua_entry when client_vc is closed
---
 proxy/http/HttpSM.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 4450247..3aa0cee 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -3287,7 +3287,9 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer 
*c)
   ua_txn->set_half_close_flag(true);
 }
 
+vc_table.remove_entry(this->ua_entry);
 ua_txn->do_io_close();
+ua_txn = nullptr;
   } else {
 ink_assert(ua_buffer_reader != nullptr);
 ua_txn->release(ua_buffer_reader);



[trafficserver] branch quic-latest updated: QUIC: AckCreator only response to non-ack-only packet

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 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 0b84cf3  QUIC: AckCreator only response to non-ack-only packet
0b84cf3 is described below

commit 0b84cf33d14accb558fa9e9b695d13a0f394868a
Author: scw00 
AuthorDate: Fri Feb 15 11:29:28 2019 +0800

QUIC: AckCreator only response to non-ack-only packet
---
 iocore/net/quic/QUICAckFrameCreator.cc   |  2 +-
 iocore/net/quic/test/test_QUICAckFrameCreator.cc | 67 
 2 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/iocore/net/quic/QUICAckFrameCreator.cc 
b/iocore/net/quic/QUICAckFrameCreator.cc
index 7214fdc..55b8d6f 100644
--- a/iocore/net/quic/QUICAckFrameCreator.cc
+++ b/iocore/net/quic/QUICAckFrameCreator.cc
@@ -193,7 +193,7 @@ 
QUICAckFrameManager::QUICAckFrameCreator::push_back(QUICPacketNumber packet_numb
   }
 
   // can not delay handshake packet
-  if (this->_level == QUICEncryptionLevel::INITIAL || this->_level == 
QUICEncryptionLevel::HANDSHAKE) {
+  if ((this->_level == QUICEncryptionLevel::INITIAL || this->_level == 
QUICEncryptionLevel::HANDSHAKE) && !ack_only) {
 this->_should_send = true;
   }
 
diff --git a/iocore/net/quic/test/test_QUICAckFrameCreator.cc 
b/iocore/net/quic/test/test_QUICAckFrameCreator.cc
index 15b1e13..7e0d410 100644
--- a/iocore/net/quic/test/test_QUICAckFrameCreator.cc
+++ b/iocore/net/quic/test/test_QUICAckFrameCreator.cc
@@ -343,3 +343,70 @@ TEST_CASE("QUICAckFrameManager lost_frame", "[quic]")
 
   CHECK(ack_manager.will_generate_frame(level) == false);
 }
+
+TEST_CASE("QUICAckFrameManager ack only packet", "[quic]")
+{
+  SECTION("INITIAL")
+  {
+QUICAckFrameManager ack_manager;
+QUICEncryptionLevel level = QUICEncryptionLevel::INITIAL;
+uint8_t frame_buf[QUICFrame::MAX_INSTANCE_SIZE];
+
+// Initial state
+QUICFrame *ack_frame = ack_manager.generate_frame(frame_buf, level, 
UINT16_MAX, UINT16_MAX);
+QUICAckFrame *frame  = static_cast(ack_frame);
+CHECK(frame == nullptr);
+
+ack_manager.update(level, 1, 1, false);
+ack_manager.update(level, 2, 1, false);
+ack_manager.update(level, 3, 1, false);
+ack_manager.update(level, 4, 1, false);
+ack_manager.update(level, 5, 1, false);
+
+CHECK(ack_manager.will_generate_frame(level) == true);
+
+ack_frame = ack_manager.generate_frame(frame_buf, level, UINT16_MAX, 
UINT16_MAX);
+frame = static_cast(ack_frame);
+CHECK(frame != nullptr);
+CHECK(frame->ack_block_count() == 0);
+CHECK(frame->largest_acknowledged() == 5);
+CHECK(frame->ack_block_section()->first_ack_block() == 4);
+CHECK(frame->ack_block_section()->begin()->gap() == 0);
+
+ack_manager.update(level, 6, 1, true);
+ack_manager.update(level, 7, 1, true);
+CHECK(ack_manager.will_generate_frame(level) == false);
+  }
+
+  SECTION("ONE_RTT")
+  {
+QUICAckFrameManager ack_manager;
+QUICEncryptionLevel level = QUICEncryptionLevel::ONE_RTT;
+uint8_t frame_buf[QUICFrame::MAX_INSTANCE_SIZE];
+
+// Initial state
+QUICFrame *ack_frame = ack_manager.generate_frame(frame_buf, level, 
UINT16_MAX, UINT16_MAX);
+QUICAckFrame *frame  = static_cast(ack_frame);
+CHECK(frame == nullptr);
+
+ack_manager.update(level, 1, 1, false);
+ack_manager.update(level, 2, 1, false);
+ack_manager.update(level, 3, 1, false);
+ack_manager.update(level, 4, 1, false);
+ack_manager.update(level, 5, 1, false);
+
+CHECK(ack_manager.will_generate_frame(level) == true);
+
+ack_frame = ack_manager.generate_frame(frame_buf, level, UINT16_MAX, 
UINT16_MAX);
+frame = static_cast(ack_frame);
+CHECK(frame != nullptr);
+CHECK(frame->ack_block_count() == 0);
+CHECK(frame->largest_acknowledged() == 5);
+CHECK(frame->ack_block_section()->first_ack_block() == 4);
+CHECK(frame->ack_block_section()->begin()->gap() == 0);
+
+ack_manager.update(level, 6, 1, true);
+ack_manager.update(level, 7, 1, true);
+CHECK(ack_manager.will_generate_frame(level) == false);
+  }
+}



[trafficserver] branch quic-latest updated (1a160b4 -> 3eac14f)

2019-02-14 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

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


from 1a160b4  Make QUICNetVC::largest_acked_packet_number() private
 new adcfe78  QUIC: Rename QUICPacket::retransmittable to ack_eliciting
 new 48a89c4  QUIC: Adds crypto flags
 new 9352e40  QUIC: LossDetector draft-17
 new 9979ff4  QUIC: Send Ping frame correctly
 new cdf771b  QUIC: Remove unneccessary log with unvverified path
 new fe61dc5  QUIC: Adds draft-17 congestion controller
 new 93b24bb  QUIC: process ecn section
 new 732c2b4  QUIC: Fixed Initial const vars
 new 3d3cde2  QUIC: uncomment the congestion controller config
 new 8fb23d6  QUIC: Fixed test cases
 new 3eac14f  QUIC: Adds log for lost packet and add comment to the changes 
with spec

The 12692 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/P_QUICNetVConnection.h  |   6 +-
 iocore/net/QUICNetVConnection.cc   |  45 +--
 iocore/net/quic/Mock.h |  30 +-
 iocore/net/quic/QUICConfig.cc  |  83 ++---
 iocore/net/quic/QUICConfig.h   |  38 +-
 iocore/net/quic/QUICCongestionController.cc|  91 +++--
 iocore/net/quic/QUICLossDetector.cc| 385 +
 iocore/net/quic/QUICLossDetector.h | 106 +++---
 iocore/net/quic/QUICPacket.cc  |  59 ++--
 iocore/net/quic/QUICPacket.h   |  26 +-
 iocore/net/quic/QUICPacketFactory.cc   |  12 +-
 iocore/net/quic/QUICPacketFactory.h|  14 +-
 iocore/net/quic/QUICPinger.cc  |  11 +
 iocore/net/quic/test/test_QUICLossDetector.cc  |  88 +++--
 iocore/net/quic/test/test_QUICPacket.cc|   4 +-
 iocore/net/quic/test/test_QUICPacketFactory.cc |   2 +-
 iocore/net/quic/test/test_QUICVersionNegotiator.cc |   8 +-
 mgmt/RecordsConfig.cc  |  21 +-
 18 files changed, 524 insertions(+), 505 deletions(-)



[trafficserver] branch master updated: Assert when sm callback to wrong thread

2019-02-11 Thread scw00
This is an automated email from the ASF dual-hosted git repository.

scw00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new f5534ba  Assert when sm callback to wrong thread
f5534ba is described below

commit f5534ba5581e09ebe3e759dc04c9dda23b75a741
Author: scw00 
AuthorDate: Thu Jan 24 17:43:37 2019 +0800

Assert when sm callback to wrong thread
---
 src/traffic_server/InkAPI.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/traffic_server/InkAPI.cc b/src/traffic_server/InkAPI.cc
index cbe88ce..5b63750 100644
--- a/src/traffic_server/InkAPI.cc
+++ b/src/traffic_server/InkAPI.cc
@@ -5928,13 +5928,14 @@ TSHttpTxnReenable(TSHttpTxn txnp, TSEvent event)
   // If this function is being executed on a thread created by the API
   // which is DEDICATED, the continuation needs to be called back on a
   // REGULAR thread.
-  if (eth == nullptr || eth->tt != REGULAR) {
+  if (eth == nullptr || eth->tt != REGULAR || !eth->is_event_type(ET_NET)) {
 eventProcessor.schedule_imm(new TSHttpSMCallback(sm, event), ET_NET);
   } else {
 MUTEX_TRY_LOCK(trylock, sm->mutex, eth);
 if (!trylock.is_locked()) {
   eventProcessor.schedule_imm(new TSHttpSMCallback(sm, event), ET_NET);
 } else {
+  ink_assert(eth->is_event_type(ET_NET));
   sm->state_api_callback((int)event, nullptr);
 }
   }



  1   2   >