You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/08/29 05:51:30 UTC
[trafficserver] branch quic-latest updated (f429053 -> 2621a07)
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.
from f429053 [draft-13] Bump HQ version in ALPN
add 398fa98 Removes carriage returns from MT_hashtable.h
add 26b3087 Mark log collation as deprecated
add 15fe1ae Ensure that continuation lock is held before calling handler.
add 61c49ea Add logic to clean up vios on HttpSM shutdown
add beb5618 Fix logic to support ASYNC_pause_job
add 1815988 Adjust tests to work with more versions of curl.
add c99d010 Cached object should not be removed when write is aborted
add 3c5f2fe Optimize: make NetAccept::init_accept_loop has the logic similar to NetAccept::init_accept_per_thread
add 034c25b Enable ECDH explicitly only if OpenSSL version is v1.0.2 or lower
add 77be1a5 Doc: Document TSContCall.
add a64e8f9 Removes reference to non-existent ssl_multicert option 'exit_on_load_error'
add 39b3273 Runroot: pass runroot down from manager and error message update
add 34727ec Improve log entry for http connect result errors
add 0fa8970 Fix tunnel routing documentation
add 85404be ts/Extendible and AcidPtr class
add 6bc54f3 Runroot: Update test to support different layout
add 9b47aa6 proxy.config.http.connect_attempts_timeout tracks TTBF instead of connect
add 894c2ae fix outputlog, diagslog rolling size overflow
add d378b6b Test for proxy.config.http.connect_attempts_timeout
add 2f1dec1 Fixed url_sig error when storing base64ed params in penultimate segment.
add 4bb73b2 Bug fix for timeout test
add 3dd8750 BWF: Add BWF support for SourceLocation. Update test_History to validate the formatting support.
add 31110c9 BufferWriter: Add print overloads to FixedBufferWriter to make the return type FixedBufferWriter. This is very conventient when doing in place printing to a Fixed or Local BufferWriter.
add f2ac4a8 BWF: Add "FirstOf" for better handling of printing alternates for null strings.
add 117f54d Setup better defaults for service file logic
add cb78442 Added clear_event function to cancel inactive event before marking it as nullptr
add 43c2036 Skip timeout
add 342b311 In conf_remap plugin, print name of non-existent or non-overriddable configuration variable in a file to error log.
add 0570c29 Renames TSHttpTxnSetHttpRetStatus to TSHttpTxnStatusSet
add a5e1ff1 Cleans up README and sample config for compress plugin
add 47cb274 Detects compiler support of C++17 at configure time
add 2f305a5 mgmt: General cleanup
add 0271242 Converts more source files to #pragma once
add 96c4f99 Removes unused prefetch related code
add 0242647 Removes weird comment 'MAGIC_EDITING_TAG'
add af5b4dd Removes dead/unused/unreferenced code from proxy/logging
add b17097c Cleans up Main.h
add 9d2e6df Fix typo in header_normalize plugin.
add aa5e7ae Links server_push_preload plugin against libatscppapi
add 8d982c8 Fix Http/2 priority crashes.
add 55ba409 Lock continuation to avoid handleEvent assert.
add 180822b Doc: Add documentation for experimental plugin "multiplexer".
add 9296bd9 Collapses LogAccess and LogAccessHttp into LogAccess
add 1e71ac7 reenable timeout and change microServer timeout logic
add 63cc2b0 logstats conditionally disable format check
add 02bc5c5 access_control plugin
add 447dd6f Fixes the renamed RenameTSHttpTxnSetHttpRetStatus() API
add 6f5817b make sure len is smaller than MAX_ENTRY before we use it as the index
add 5642ab2 fix the number of started threads of certain type.
add b9b99a1 Doc: Update comments in InkAPI.cc in the header and for member converters.
add 18e67bd Prefetch plugin
add 4d5790f cachekey: handle empty regex group captures
add 17d1203 Ensure continuation lock on read and write signal
add 80bd615 Deal with the case when the hostdb cont may not have a mutex
add 9e32c19 Optimize: Assign nh->mutex to new NetVC first and switch to new mutex within UnixNetVC::acceptEvent
add d49271b cachekey: capture cache key elements from headers
add ff074f2 Disables openclose_h2 test.
add 72ed044 Replace TRY_MUTEX_LOCK_FOR with equivalent TRY_MUTEX_LOCK
add 347eb8b fix typo
add 8fd7ee0 make sure "traffic_ctl config reload" only reloads configs that changed
add c9bd130 disable address sanitizer for our own CompileParseRules binary
add d846436 adding a Mutex to the continuation
add 0178320 Increase limit on open files allowed as a service
add 60e778e MemArena: Add make method to construct objects in the arena. Update documentation.
add d21db45 fixing spelled enumeration
add 57ee8cb TextView: Add overload for strcasecmp for string_view that also handles TextView.
add d6099b3 IntrusiveHashMap: Refresh TSHashTable for C++ eleventy.
add 48e0565 Completes & deduplicates code comment for redirect
add 92b67e4 Completes documentation regarding redirects
add 1e2ef5c IntrusiveDList: Add user conversion from iterator to pointer to value_type.
add c157bdc IntrusiveDList: Update erase methods.
add f462170 IntrusiveHashMap: remove from "ts" namespace. The predecessor class, TSHashTable, wasn't in "ts" and having worked with IntrusiveHashMap for a while, I think it's best this isn't either.
add 8913fa3 IntrusiveHashMap: Change range to be std::pair based for better compatibility.
add 546a267 IntrusiveHashMap: Update erase methods. Add additional iterator_for methods for erase.
add 46de425 IntrusiveHashMap: Add overloads to apply method to support functor taking reference or pointer.
add 9b03c9c Outbound server session management - Replace TSHashTable with IntrusiveHashMap.
add a34b7b8 HttpConnectionCount: Replace TSHashTable with IntrusiveHashMap.
add 62260bf Cleanup: remove unused and unimplemented functions from ink_string.h
add ecd1af1 Clang-format: Redo clang-format error that slipped through.
add 3fc04c4 Cleanup: Remove #define INT_TO_BOOL, use local lambda instead.
add bb0275e Corrects IPv4 multicast ip address check
add f590e4e Move handleEvent back into the header file.
add 99dbdc4 Revert "Ensure continuation lock on read and write signal"
add 507368d Fix crash in Http2ClientSession::release_netvc
add febc565 Doc: Remove deprecated configs from examples of traffic_ctl
add 61d9778 IPAllow: Refresh for C++11, fix potential use after free. PR #4129.
new 3697b23 Merge branch 'asf/master' into quic-latest
new cfa1d0d Fix HQ to replace AclRecord with IpAllow::ACL
new 4067503 Remove HQClientSession::release_netvc()
new 2621a07 Acquire mutex lock before handleEvent() call
The 4 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:
CMakeLists.txt | 5 +-
configure.ac | 19 +
doc/admin-guide/files/logging.yaml.en.rst | 4 +-
doc/admin-guide/files/records.config.en.rst | 21 +-
doc/admin-guide/files/ssl_multicert.config.en.rst | 11 -
doc/admin-guide/layer-4-routing.en.rst | 7 +
doc/admin-guide/logging/destinations.en.rst | 7 +
doc/admin-guide/logging/formatting.en.rst | 5 +
doc/admin-guide/plugins/access_control.en.rst | 478 +++
doc/admin-guide/plugins/cachekey.en.rst | 29 +-
doc/admin-guide/plugins/index.en.rst | 12 +
doc/admin-guide/plugins/multiplexer.en.rst | 118 +
doc/admin-guide/plugins/prefetch.en.rst | 278 ++
doc/appendices/command-line/traffic_ctl.en.rst | 6 +-
.../command-line/traffic_logstats.en.rst | 46 +
doc/conf.py | 5 +-
.../api/functions/TSContCall.en.rst | 45 +
.../internal-libraries/AcidPtr.en.rst | 286 ++
.../internal-libraries/Extendible.en.rst | 260 ++
.../internal-libraries/MemArena.en.rst | 309 +-
.../internal-libraries/buffer-writer.en.rst | 50 +-
.../internal-libraries/index.en.rst | 3 +
.../internal-libraries/intrusive-hash-map.en.rst | 197 ++
.../internal-libraries/intrusive-list.en.rst | 35 +-
.../monitoring/logging/log-collation.en.po | 210 --
.../images/admin/prefetch_plugin_deployment.png | Bin 0 -> 222757 bytes
example/remap/remap.cc | 2 +-
example/secure_link/secure_link.c | 2 +-
iocore/dns/DNS.cc | 2 +-
.../Continuation.cc} | 28 +-
iocore/eventsystem/I_Continuation.h | 23 +-
iocore/eventsystem/I_Event.h | 1 -
iocore/eventsystem/I_Lock.h | 38 -
iocore/eventsystem/Makefile.am | 1 +
iocore/eventsystem/UnixEThread.cc | 3 +-
iocore/eventsystem/UnixEventProcessor.cc | 4 +-
iocore/hostdb/HostDB.cc | 37 +-
iocore/net/I_NetProcessor.h | 23 -
iocore/net/I_SessionAccept.h | 8 +-
iocore/net/Makefile.am | 1 -
iocore/net/P_NetAccept.h | 4 +-
iocore/net/P_NetVCTest.h | 1 +
iocore/net/P_SSLNetVConnection.h | 13 +-
iocore/net/P_UnixNetVConnection.h | 6 +
iocore/net/QUICNet.cc | 3 +
iocore/net/QUICNetProcessor.cc | 2 +
iocore/net/QUICNetVConnection.cc | 6 +-
iocore/net/SSLNetVConnection.cc | 42 +-
iocore/net/SSLUtils.cc | 5 +
iocore/net/UnixNetAccept.cc | 92 +-
iocore/net/UnixNetProcessor.cc | 151 +-
iocore/net/UnixNetVConnection.cc | 28 +-
iocore/net/UnixUDPNet.cc | 2 +-
iocore/utils/I_Machine.h | 5 +-
lib/cppapi/Transaction.cc | 4 +-
lib/cppapi/include/atscppapi/Transaction.h | 4 +-
lib/records/P_RecCore.cc | 19 +-
lib/records/P_RecUtils.h | 2 +-
lib/records/RecConfigParse.cc | 2 +-
lib/records/RecRawStats.cc | 6 +-
lib/records/RecUtils.cc | 36 +-
lib/records/test_RecordsConfig.h | 4 +-
iocore/net/SessionAccept.cc => lib/ts/AcidPtr.cc | 39 +-
lib/ts/AcidPtr.h | 199 ++
lib/ts/BufferWriter.h | 39 +-
lib/ts/Diags.cc | 8 +-
lib/ts/Extendible.h | 586 ++++
lib/ts/IntrusiveDList.h | 77 +-
lib/ts/IntrusiveHashMap.h | 723 +++++
lib/ts/MT_hashtable.h | 882 +++---
lib/ts/Makefile.am | 9 +-
lib/ts/MemArena.cc | 99 +-
lib/ts/MemArena.h | 161 +-
lib/ts/SourceLocation.cc | 16 +-
lib/ts/SourceLocation.h | 12 +
lib/ts/TextView.cc | 19 +-
lib/ts/TextView.h | 23 +-
lib/ts/Tokenizer.cc | 2 +-
lib/ts/Trie.h | 1 +
lib/ts/bwf_std_format.h | 31 +
lib/ts/ink_config.h.in | 5 +-
lib/ts/ink_defs.cc | 2 +-
lib/ts/ink_error.cc | 2 +-
lib/ts/ink_inet.h | 2 +-
lib/ts/ink_string.h | 3 -
lib/ts/runroot.cc | 49 +-
lib/ts/runroot.h | 4 +-
lib/ts/unit-tests/test_AcidPtr.cc | 96 +
lib/ts/unit-tests/test_BufferWriterFormat.cc | 31 +
lib/ts/unit-tests/test_Extendible.cc | 286 ++
lib/ts/unit-tests/test_History.cc | 22 +-
lib/ts/unit-tests/test_IntrusiveHashMap.cc | 148 +
lib/ts/unit-tests/test_MemArena.cc | 99 +-
lib/ts/unit-tests/test_TextView.cc | 105 +-
mgmt/Alarms.cc | 2 -
mgmt/Alarms.h | 20 +-
mgmt/BaseManager.cc | 14 +-
mgmt/BaseManager.h | 21 +-
mgmt/FileManager.cc | 10 +-
mgmt/FileManager.h | 15 +-
mgmt/LocalManager.cc | 11 +
mgmt/LocalManager.h | 18 +-
mgmt/MgmtDefs.h | 12 +-
mgmt/ProcessManager.cc | 3 -
mgmt/ProcessManager.h | 16 +-
mgmt/ProxyConfig.cc | 5 +-
mgmt/ProxyConfig.h | 14 +-
mgmt/RecordsConfig.cc | 3 +-
mgmt/RecordsConfig.h | 2 -
mgmt/RecordsConfigUtils.cc | 9 -
mgmt/Rollback.cc | 16 +-
mgmt/Rollback.h | 25 +-
mgmt/WebMgmtUtils.cc | 13 +-
mgmt/WebMgmtUtils.h | 26 +-
mgmt/api/CoreAPI.cc | 2 +-
mgmt/api/EventControlMain.h | 1 +
plugins/Makefile.am | 2 +
plugins/authproxy/authproxy.cc | 2 +-
plugins/cachekey/cachekey.cc | 119 +-
plugins/cachekey/cachekey.h | 4 +
plugins/cachekey/common.h | 2 +
plugins/cachekey/configs.cc | 52 +
plugins/cachekey/configs.h | 14 +-
plugins/cachekey/pattern.cc | 18 +
plugins/cachekey/pattern.h | 2 +
plugins/compress/README | 57 +-
plugins/compress/sample.compress.config | 13 +-
plugins/conf_remap/conf_remap.cc | 3 +-
plugins/esi/lib/SpecialIncludeHandler.h | 6 +-
plugins/experimental/access_control/.gitignore | 1 +
plugins/experimental/access_control/Makefile.inc | 38 +
plugins/experimental/access_control/README.md | 1 +
.../experimental/access_control/access_control.cc | 497 ++++
.../experimental/access_control/access_control.h | 294 ++
.../experimental/access_control/common.cc | 51 +-
.../access_control}/common.h | 26 +-
plugins/experimental/access_control/config.cc | 380 +++
plugins/experimental/access_control/config.h | 70 +
plugins/experimental/access_control/headers.cc | 213 ++
.../experimental/access_control/headers.h | 24 +-
.../access_control}/pattern.cc | 123 +-
.../access_control}/pattern.h | 18 +-
plugins/experimental/access_control/plugin.cc | 617 ++++
.../unit-tests/test_access_control.cc | 171 ++
.../access_control/unit-tests/test_utils.cc | 265 ++
plugins/experimental/access_control/utils.cc | 497 ++++
plugins/experimental/access_control/utils.h | 57 +
plugins/experimental/geoip_acl/geoip_acl.cc | 2 +-
.../header_normalize/header_normalize.cc | 2 +-
plugins/experimental/hipes/hipes.cc | 22 +-
.../memcached_remap/memcached_remap.cc | 2 +-
plugins/experimental/mp4/mp4.cc | 2 +-
plugins/experimental/mysql_remap/mysql_remap.cc | 2 +-
.../{server_push_preload => prefetch}/Makefile.inc | 14 +-
plugins/experimental/prefetch/README.md | 8 +
plugins/experimental/prefetch/common.cc | 59 +
.../{cachekey => experimental/prefetch}/common.h | 31 +-
plugins/experimental/prefetch/configs.cc | 172 ++
plugins/experimental/prefetch/configs.h | 202 ++
plugins/experimental/prefetch/fetch.cc | 739 +++++
plugins/experimental/prefetch/fetch.h | 202 ++
plugins/experimental/prefetch/fetch_policy.cc | 57 +
plugins/experimental/prefetch/fetch_policy.h | 66 +
plugins/experimental/prefetch/fetch_policy_lru.cc | 141 +
plugins/experimental/prefetch/fetch_policy_lru.h | 105 +
.../experimental/prefetch/fetch_policy_simple.cc | 80 +
.../experimental/prefetch/fetch_policy_simple.h | 50 +-
plugins/experimental/prefetch/headers.cc | 213 ++
.../experimental/prefetch/headers.h | 37 +-
.../{cachekey => experimental/prefetch}/pattern.cc | 129 +-
.../{cachekey => experimental/prefetch}/pattern.h | 56 +-
plugins/experimental/prefetch/plugin.cc | 751 +++++
.../experimental/server_push_preload/Makefile.inc | 7 +
plugins/experimental/uri_signing/uri_signing.c | 2 +-
plugins/experimental/url_sig/url_sig.c | 113 +-
plugins/header_rewrite/operators.cc | 6 +-
plugins/lua/ts_lua_http.c | 4 +-
plugins/regex_remap/regex_remap.cc | 6 +-
plugins/s3_auth/s3_auth.cc | 4 +-
plugins/stats_over_http/stats_over_http.c | 2 +-
plugins/xdebug/xdebug.cc | 2 +-
proxy/CacheControl.h | 1 -
proxy/ControlBase.cc | 1 -
proxy/ControlMatcher.cc | 1 -
proxy/IPAllow.cc | 332 ++-
proxy/IPAllow.h | 348 ++-
proxy/Main.h | 39 +-
proxy/ParentSelection.cc | 1 -
proxy/ParentSelection.h | 1 -
proxy/Plugin.cc | 1 -
proxy/PluginVC.cc | 23 +-
proxy/PluginVC.h | 4 +
proxy/ProxyClientSession.cc | 20 +-
proxy/ProxyClientSession.h | 25 +-
proxy/ProxyClientTransaction.h | 6 +-
proxy/ReverseProxy.cc | 1 -
proxy/TimeTrace.h | 7 -
proxy/Transform.cc | 6 -
proxy/TransformInternal.h | 15 -
proxy/api/ts/ts.h | 4 +-
proxy/hdrs/HttpCompat.cc | 2 +-
proxy/hq/HQClientSession.cc | 7 -
proxy/hq/HQClientSession.h | 1 -
proxy/hq/HQSessionAccept.cc | 11 +-
proxy/hq/QUICSimpleApp.cc | 12 +-
proxy/hq/QUICSimpleApp.h | 4 +-
proxy/http/Http1ClientSession.cc | 2 +-
proxy/http/Http1ClientSession.h | 13 -
proxy/http/HttpBodyFactory.cc | 7 +-
proxy/http/HttpBodyFactory.h | 1 -
proxy/http/HttpCacheSM.h | 4 +-
proxy/http/HttpConfig.cc | 11 +-
proxy/http/HttpConnectionCount.cc | 2 +-
proxy/http/HttpConnectionCount.h | 75 +-
proxy/http/HttpProxyServerMain.cc | 1 -
proxy/http/HttpSM.cc | 184 +-
proxy/http/HttpSM.h | 21 +-
proxy/http/HttpServerSession.cc | 4 +-
proxy/http/HttpServerSession.h | 111 +-
proxy/http/HttpSessionAccept.cc | 15 +-
proxy/http/HttpSessionManager.cc | 74 +-
proxy/http/HttpSessionManager.h | 58 +-
proxy/http/HttpTransact.cc | 27 +-
proxy/http/HttpTunnel.cc | 4 +-
proxy/http/remap/AclFiltering.cc | 1 -
proxy/http/remap/AclFiltering.h | 1 -
proxy/http/remap/UrlMapping.h | 1 -
proxy/http2/Http2ClientSession.cc | 14 +-
proxy/http2/Http2ClientSession.h | 11 -
proxy/http2/Http2DependencyTree.h | 29 +-
proxy/http2/Http2SessionAccept.cc | 8 +-
proxy/http2/test_Http2DependencyTree.cc | 96 +
proxy/logging/Log.cc | 8 -
proxy/logging/Log.h | 16 +-
proxy/logging/LogAccess.cc | 3138 ++++++++++++++------
proxy/logging/LogAccess.h | 301 +-
proxy/logging/LogAccessHttp.cc | 1801 -----------
proxy/logging/LogAccessHttp.h | 222 --
proxy/logging/LogAccessTest.h | 5 +-
proxy/logging/LogBuffer.cc | 10 -
proxy/logging/LogBuffer.h | 1 -
proxy/logging/LogConfig.cc | 2 +-
proxy/logging/LogField.h | 2 -
proxy/logging/LogFile.cc | 4 -
proxy/logging/LogFile.h | 4 -
proxy/logging/LogObject.cc | 4 +-
proxy/logging/LogStandalone.cc | 1 -
proxy/logging/Makefile.am | 2 -
rc/trafficserver.in | 7 +
rc/trafficserver.service.in | 12 +-
src/traffic_layout/engine.cc | 14 +-
src/traffic_logcat/Makefile.inc | 1 +
src/traffic_logstats/Makefile.inc | 1 +
src/traffic_logstats/logstats.cc | 23 +-
src/traffic_manager/traffic_manager.cc | 3 +
src/traffic_server/Crash.cc | 3 +
src/traffic_server/InkAPI.cc | 34 +-
src/traffic_server/traffic_server.cc | 4 +-
.../gold_tests/continuations/openclose_h2.test.py | 2 +
tests/gold_tests/h2/gold/priority_0_stderr.gold | 8 +-
tests/gold_tests/h2/http2.test.py | 3 +-
tests/gold_tests/runroot/runroot_error.test.py | 7 +-
tests/gold_tests/runroot/runroot_init.test.py | 39 +-
tests/gold_tests/runroot/runroot_manager.test.py | 52 +
tests/gold_tests/runroot/runroot_remove.test.py | 12 +-
tests/gold_tests/runroot/runroot_use.test.py | 12 +-
tests/gold_tests/runroot/runroot_verify.test.py | 13 +-
tests/gold_tests/timeout/timeout.gold | 3 +
tests/gold_tests/timeout/timeout.test.py | 46 +
tests/tools/microServer/uWServer.py | 3 +-
tests/tools/plugins/custom204plugin.cc | 2 +-
271 files changed, 15402 insertions(+), 6092 deletions(-)
create mode 100644 doc/admin-guide/plugins/access_control.en.rst
create mode 100644 doc/admin-guide/plugins/multiplexer.en.rst
create mode 100644 doc/admin-guide/plugins/prefetch.en.rst
create mode 100644 doc/developer-guide/internal-libraries/AcidPtr.en.rst
create mode 100644 doc/developer-guide/internal-libraries/Extendible.en.rst
create mode 100644 doc/developer-guide/internal-libraries/intrusive-hash-map.en.rst
delete mode 100644 doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/log-collation.en.po
create mode 100644 doc/static/images/admin/prefetch_plugin_deployment.png
copy iocore/{net/SessionAccept.cc => eventsystem/Continuation.cc} (64%)
copy iocore/net/SessionAccept.cc => lib/ts/AcidPtr.cc (53%)
create mode 100644 lib/ts/AcidPtr.h
create mode 100644 lib/ts/Extendible.h
create mode 100644 lib/ts/IntrusiveHashMap.h
create mode 100644 lib/ts/unit-tests/test_AcidPtr.cc
create mode 100644 lib/ts/unit-tests/test_Extendible.cc
create mode 100644 lib/ts/unit-tests/test_IntrusiveHashMap.cc
create mode 100644 plugins/experimental/access_control/.gitignore
create mode 100644 plugins/experimental/access_control/Makefile.inc
create mode 100644 plugins/experimental/access_control/README.md
create mode 100644 plugins/experimental/access_control/access_control.cc
create mode 100644 plugins/experimental/access_control/access_control.h
copy iocore/net/SessionAccept.cc => plugins/experimental/access_control/common.cc (57%)
copy plugins/{cachekey => experimental/access_control}/common.h (69%)
create mode 100644 plugins/experimental/access_control/config.cc
create mode 100644 plugins/experimental/access_control/config.h
create mode 100644 plugins/experimental/access_control/headers.cc
copy lib/records/test_RecordsConfig.h => plugins/experimental/access_control/headers.h (55%)
copy plugins/{cachekey => experimental/access_control}/pattern.cc (74%)
copy plugins/{cachekey => experimental/access_control}/pattern.h (91%)
create mode 100644 plugins/experimental/access_control/plugin.cc
create mode 100644 plugins/experimental/access_control/unit-tests/test_access_control.cc
create mode 100644 plugins/experimental/access_control/unit-tests/test_utils.cc
create mode 100644 plugins/experimental/access_control/utils.cc
create mode 100644 plugins/experimental/access_control/utils.h
copy plugins/experimental/{server_push_preload => prefetch}/Makefile.inc (63%)
create mode 100644 plugins/experimental/prefetch/README.md
create mode 100644 plugins/experimental/prefetch/common.cc
copy plugins/{cachekey => experimental/prefetch}/common.h (77%)
create mode 100644 plugins/experimental/prefetch/configs.cc
create mode 100644 plugins/experimental/prefetch/configs.h
create mode 100644 plugins/experimental/prefetch/fetch.cc
create mode 100644 plugins/experimental/prefetch/fetch.h
create mode 100644 plugins/experimental/prefetch/fetch_policy.cc
create mode 100644 plugins/experimental/prefetch/fetch_policy.h
create mode 100644 plugins/experimental/prefetch/fetch_policy_lru.cc
create mode 100644 plugins/experimental/prefetch/fetch_policy_lru.h
create mode 100644 plugins/experimental/prefetch/fetch_policy_simple.cc
copy iocore/net/SessionAccept.cc => plugins/experimental/prefetch/fetch_policy_simple.h (53%)
create mode 100644 plugins/experimental/prefetch/headers.cc
rename iocore/net/SessionAccept.cc => plugins/experimental/prefetch/headers.h (56%)
copy plugins/{cachekey => experimental/prefetch}/pattern.cc (75%)
copy plugins/{cachekey => experimental/prefetch}/pattern.h (63%)
create mode 100644 plugins/experimental/prefetch/plugin.cc
delete mode 100644 proxy/logging/LogAccessHttp.cc
delete mode 100644 proxy/logging/LogAccessHttp.h
create mode 100644 tests/gold_tests/runroot/runroot_manager.test.py
create mode 100644 tests/gold_tests/timeout/timeout.gold
create mode 100644 tests/gold_tests/timeout/timeout.test.py
[trafficserver] 01/04: Merge branch 'asf/master' into quic-latest
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 3697b2335ee4bd210bc760f0d3a5469a3c5f59af
Merge: f429053 61d9778
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Aug 29 12:26:24 2018 +0900
Merge branch 'asf/master' into quic-latest
* asf/master: (86 commits)
IPAllow: Refresh for C++11, fix potential use after free. PR #4129.
Doc: Remove deprecated configs from examples of traffic_ctl
Fix crash in Http2ClientSession::release_netvc
Revert "Ensure continuation lock on read and write signal"
Move handleEvent back into the header file.
Corrects IPv4 multicast ip address check
Cleanup: Remove #define INT_TO_BOOL, use local lambda instead.
Clang-format: Redo clang-format error that slipped through.
Cleanup: remove unused and unimplemented functions from ink_string.h
HttpConnectionCount: Replace TSHashTable with IntrusiveHashMap.
Outbound server session management - Replace TSHashTable with IntrusiveHashMap.
IntrusiveHashMap: Add overloads to apply method to support functor taking reference or pointer.
IntrusiveHashMap: Update erase methods. Add additional iterator_for methods for erase.
IntrusiveHashMap: Change range to be std::pair based for better compatibility.
IntrusiveHashMap: remove from "ts" namespace. The predecessor class, TSHashTable, wasn't in "ts" and having worked with IntrusiveHashMap for a while, I think it's best this isn't either.
IntrusiveDList: Update erase methods.
IntrusiveDList: Add user conversion from iterator to pointer to value_type.
Completes documentation regarding redirects
Completes & deduplicates code comment for redirect
IntrusiveHashMap: Refresh TSHashTable for C++ eleventy.
...
CMakeLists.txt | 5 +-
configure.ac | 19 +
doc/admin-guide/files/logging.yaml.en.rst | 4 +-
doc/admin-guide/files/records.config.en.rst | 21 +-
doc/admin-guide/files/ssl_multicert.config.en.rst | 11 -
doc/admin-guide/layer-4-routing.en.rst | 7 +
doc/admin-guide/logging/destinations.en.rst | 7 +
doc/admin-guide/logging/formatting.en.rst | 5 +
doc/admin-guide/plugins/access_control.en.rst | 478 +++
doc/admin-guide/plugins/cachekey.en.rst | 29 +-
doc/admin-guide/plugins/index.en.rst | 12 +
doc/admin-guide/plugins/multiplexer.en.rst | 118 +
doc/admin-guide/plugins/prefetch.en.rst | 278 ++
doc/appendices/command-line/traffic_ctl.en.rst | 6 +-
.../command-line/traffic_logstats.en.rst | 46 +
doc/conf.py | 5 +-
.../api/functions/TSContCall.en.rst | 45 +
.../internal-libraries/AcidPtr.en.rst | 286 ++
.../internal-libraries/Extendible.en.rst | 260 ++
.../internal-libraries/MemArena.en.rst | 309 +-
.../internal-libraries/buffer-writer.en.rst | 50 +-
.../internal-libraries/index.en.rst | 3 +
.../internal-libraries/intrusive-hash-map.en.rst | 197 ++
.../internal-libraries/intrusive-list.en.rst | 35 +-
.../monitoring/logging/log-collation.en.po | 210 --
.../images/admin/prefetch_plugin_deployment.png | Bin 0 -> 222757 bytes
example/remap/remap.cc | 2 +-
example/secure_link/secure_link.c | 2 +-
iocore/dns/DNS.cc | 2 +-
.../Continuation.cc} | 28 +-
iocore/eventsystem/I_Continuation.h | 23 +-
iocore/eventsystem/I_Event.h | 1 -
iocore/eventsystem/I_Lock.h | 38 -
iocore/eventsystem/Makefile.am | 1 +
iocore/eventsystem/UnixEThread.cc | 3 +-
iocore/eventsystem/UnixEventProcessor.cc | 4 +-
iocore/hostdb/HostDB.cc | 37 +-
iocore/net/I_NetProcessor.h | 23 -
iocore/net/I_SessionAccept.h | 8 +-
iocore/net/Makefile.am | 1 -
iocore/net/P_NetAccept.h | 4 +-
iocore/net/P_NetVCTest.h | 1 +
iocore/net/P_SSLNetVConnection.h | 13 +-
iocore/net/P_UnixNetVConnection.h | 6 +
iocore/net/SSLNetVConnection.cc | 42 +-
iocore/net/SSLUtils.cc | 5 +
iocore/net/UnixNetAccept.cc | 92 +-
iocore/net/UnixNetProcessor.cc | 151 +-
iocore/net/UnixNetVConnection.cc | 28 +-
iocore/net/UnixUDPNet.cc | 2 +-
iocore/utils/I_Machine.h | 5 +-
lib/cppapi/Transaction.cc | 4 +-
lib/cppapi/include/atscppapi/Transaction.h | 4 +-
lib/records/P_RecCore.cc | 19 +-
lib/records/P_RecUtils.h | 2 +-
lib/records/RecConfigParse.cc | 2 +-
lib/records/RecRawStats.cc | 6 +-
lib/records/RecUtils.cc | 36 +-
lib/records/test_RecordsConfig.h | 4 +-
iocore/net/SessionAccept.cc => lib/ts/AcidPtr.cc | 39 +-
lib/ts/AcidPtr.h | 199 ++
lib/ts/BufferWriter.h | 39 +-
lib/ts/Diags.cc | 8 +-
lib/ts/Extendible.h | 586 ++++
lib/ts/IntrusiveDList.h | 77 +-
lib/ts/IntrusiveHashMap.h | 723 +++++
lib/ts/MT_hashtable.h | 882 +++---
lib/ts/Makefile.am | 9 +-
lib/ts/MemArena.cc | 99 +-
lib/ts/MemArena.h | 161 +-
lib/ts/SourceLocation.cc | 16 +-
lib/ts/SourceLocation.h | 12 +
lib/ts/TextView.cc | 19 +-
lib/ts/TextView.h | 23 +-
lib/ts/Tokenizer.cc | 2 +-
lib/ts/Trie.h | 1 +
lib/ts/bwf_std_format.h | 31 +
lib/ts/ink_config.h.in | 5 +-
lib/ts/ink_defs.cc | 2 +-
lib/ts/ink_error.cc | 2 +-
lib/ts/ink_inet.h | 2 +-
lib/ts/ink_string.h | 3 -
lib/ts/runroot.cc | 49 +-
lib/ts/runroot.h | 4 +-
lib/ts/unit-tests/test_AcidPtr.cc | 96 +
lib/ts/unit-tests/test_BufferWriterFormat.cc | 31 +
lib/ts/unit-tests/test_Extendible.cc | 286 ++
lib/ts/unit-tests/test_History.cc | 22 +-
lib/ts/unit-tests/test_IntrusiveHashMap.cc | 148 +
lib/ts/unit-tests/test_MemArena.cc | 99 +-
lib/ts/unit-tests/test_TextView.cc | 105 +-
mgmt/Alarms.cc | 2 -
mgmt/Alarms.h | 20 +-
mgmt/BaseManager.cc | 14 +-
mgmt/BaseManager.h | 21 +-
mgmt/FileManager.cc | 10 +-
mgmt/FileManager.h | 15 +-
mgmt/LocalManager.cc | 11 +
mgmt/LocalManager.h | 18 +-
mgmt/MgmtDefs.h | 12 +-
mgmt/ProcessManager.cc | 3 -
mgmt/ProcessManager.h | 16 +-
mgmt/ProxyConfig.cc | 5 +-
mgmt/ProxyConfig.h | 14 +-
mgmt/RecordsConfig.cc | 3 +-
mgmt/RecordsConfig.h | 2 -
mgmt/RecordsConfigUtils.cc | 9 -
mgmt/Rollback.cc | 16 +-
mgmt/Rollback.h | 25 +-
mgmt/WebMgmtUtils.cc | 13 +-
mgmt/WebMgmtUtils.h | 26 +-
mgmt/api/CoreAPI.cc | 2 +-
mgmt/api/EventControlMain.h | 1 +
plugins/Makefile.am | 2 +
plugins/authproxy/authproxy.cc | 2 +-
plugins/cachekey/cachekey.cc | 119 +-
plugins/cachekey/cachekey.h | 4 +
plugins/cachekey/common.h | 2 +
plugins/cachekey/configs.cc | 52 +
plugins/cachekey/configs.h | 14 +-
plugins/cachekey/pattern.cc | 18 +
plugins/cachekey/pattern.h | 2 +
plugins/compress/README | 57 +-
plugins/compress/sample.compress.config | 13 +-
plugins/conf_remap/conf_remap.cc | 3 +-
plugins/esi/lib/SpecialIncludeHandler.h | 6 +-
plugins/experimental/access_control/.gitignore | 1 +
plugins/experimental/access_control/Makefile.inc | 38 +
plugins/experimental/access_control/README.md | 1 +
.../experimental/access_control/access_control.cc | 497 ++++
.../experimental/access_control/access_control.h | 294 ++
.../experimental/access_control/common.cc | 51 +-
.../access_control}/common.h | 26 +-
plugins/experimental/access_control/config.cc | 380 +++
plugins/experimental/access_control/config.h | 70 +
plugins/experimental/access_control/headers.cc | 213 ++
.../experimental/access_control/headers.h | 24 +-
.../access_control}/pattern.cc | 123 +-
.../access_control}/pattern.h | 18 +-
plugins/experimental/access_control/plugin.cc | 617 ++++
.../unit-tests/test_access_control.cc | 171 ++
.../access_control/unit-tests/test_utils.cc | 265 ++
plugins/experimental/access_control/utils.cc | 497 ++++
plugins/experimental/access_control/utils.h | 57 +
plugins/experimental/geoip_acl/geoip_acl.cc | 2 +-
.../header_normalize/header_normalize.cc | 2 +-
plugins/experimental/hipes/hipes.cc | 22 +-
.../memcached_remap/memcached_remap.cc | 2 +-
plugins/experimental/mp4/mp4.cc | 2 +-
plugins/experimental/mysql_remap/mysql_remap.cc | 2 +-
.../{server_push_preload => prefetch}/Makefile.inc | 14 +-
plugins/experimental/prefetch/README.md | 8 +
plugins/experimental/prefetch/common.cc | 59 +
.../{cachekey => experimental/prefetch}/common.h | 31 +-
plugins/experimental/prefetch/configs.cc | 172 ++
plugins/experimental/prefetch/configs.h | 202 ++
plugins/experimental/prefetch/fetch.cc | 739 +++++
plugins/experimental/prefetch/fetch.h | 202 ++
plugins/experimental/prefetch/fetch_policy.cc | 57 +
plugins/experimental/prefetch/fetch_policy.h | 66 +
plugins/experimental/prefetch/fetch_policy_lru.cc | 141 +
plugins/experimental/prefetch/fetch_policy_lru.h | 105 +
.../experimental/prefetch/fetch_policy_simple.cc | 80 +
.../experimental/prefetch/fetch_policy_simple.h | 50 +-
plugins/experimental/prefetch/headers.cc | 213 ++
.../experimental/prefetch/headers.h | 37 +-
.../{cachekey => experimental/prefetch}/pattern.cc | 129 +-
.../{cachekey => experimental/prefetch}/pattern.h | 56 +-
plugins/experimental/prefetch/plugin.cc | 751 +++++
.../experimental/server_push_preload/Makefile.inc | 7 +
plugins/experimental/uri_signing/uri_signing.c | 2 +-
plugins/experimental/url_sig/url_sig.c | 113 +-
plugins/header_rewrite/operators.cc | 6 +-
plugins/lua/ts_lua_http.c | 4 +-
plugins/regex_remap/regex_remap.cc | 6 +-
plugins/s3_auth/s3_auth.cc | 4 +-
plugins/stats_over_http/stats_over_http.c | 2 +-
plugins/xdebug/xdebug.cc | 2 +-
proxy/CacheControl.h | 1 -
proxy/ControlBase.cc | 1 -
proxy/ControlMatcher.cc | 1 -
proxy/IPAllow.cc | 332 ++-
proxy/IPAllow.h | 348 ++-
proxy/Main.h | 39 +-
proxy/ParentSelection.cc | 1 -
proxy/ParentSelection.h | 1 -
proxy/Plugin.cc | 1 -
proxy/PluginVC.cc | 23 +-
proxy/PluginVC.h | 4 +
proxy/ProxyClientSession.cc | 20 +-
proxy/ProxyClientSession.h | 25 +-
proxy/ProxyClientTransaction.h | 6 +-
proxy/ReverseProxy.cc | 1 -
proxy/TimeTrace.h | 7 -
proxy/Transform.cc | 6 -
proxy/TransformInternal.h | 15 -
proxy/api/ts/ts.h | 4 +-
proxy/hdrs/HttpCompat.cc | 2 +-
proxy/http/Http1ClientSession.cc | 2 +-
proxy/http/Http1ClientSession.h | 13 -
proxy/http/HttpBodyFactory.cc | 7 +-
proxy/http/HttpBodyFactory.h | 1 -
proxy/http/HttpCacheSM.h | 4 +-
proxy/http/HttpConfig.cc | 11 +-
proxy/http/HttpConnectionCount.cc | 2 +-
proxy/http/HttpConnectionCount.h | 75 +-
proxy/http/HttpProxyServerMain.cc | 1 -
proxy/http/HttpSM.cc | 184 +-
proxy/http/HttpSM.h | 21 +-
proxy/http/HttpServerSession.cc | 4 +-
proxy/http/HttpServerSession.h | 111 +-
proxy/http/HttpSessionAccept.cc | 15 +-
proxy/http/HttpSessionManager.cc | 74 +-
proxy/http/HttpSessionManager.h | 58 +-
proxy/http/HttpTransact.cc | 27 +-
proxy/http/HttpTunnel.cc | 4 +-
proxy/http/remap/AclFiltering.cc | 1 -
proxy/http/remap/AclFiltering.h | 1 -
proxy/http/remap/UrlMapping.h | 1 -
proxy/http2/Http2ClientSession.cc | 14 +-
proxy/http2/Http2ClientSession.h | 11 -
proxy/http2/Http2DependencyTree.h | 29 +-
proxy/http2/Http2SessionAccept.cc | 8 +-
proxy/http2/test_Http2DependencyTree.cc | 96 +
proxy/logging/Log.cc | 8 -
proxy/logging/Log.h | 16 +-
proxy/logging/LogAccess.cc | 3138 ++++++++++++++------
proxy/logging/LogAccess.h | 301 +-
proxy/logging/LogAccessHttp.cc | 1801 -----------
proxy/logging/LogAccessHttp.h | 222 --
proxy/logging/LogAccessTest.h | 5 +-
proxy/logging/LogBuffer.cc | 10 -
proxy/logging/LogBuffer.h | 1 -
proxy/logging/LogConfig.cc | 2 +-
proxy/logging/LogField.h | 2 -
proxy/logging/LogFile.cc | 4 -
proxy/logging/LogFile.h | 4 -
proxy/logging/LogObject.cc | 4 +-
proxy/logging/LogStandalone.cc | 1 -
proxy/logging/Makefile.am | 2 -
rc/trafficserver.in | 7 +
rc/trafficserver.service.in | 12 +-
src/traffic_layout/engine.cc | 14 +-
src/traffic_logcat/Makefile.inc | 1 +
src/traffic_logstats/Makefile.inc | 1 +
src/traffic_logstats/logstats.cc | 23 +-
src/traffic_manager/traffic_manager.cc | 3 +
src/traffic_server/Crash.cc | 3 +
src/traffic_server/InkAPI.cc | 34 +-
src/traffic_server/traffic_server.cc | 4 +-
.../gold_tests/continuations/openclose_h2.test.py | 2 +
tests/gold_tests/h2/gold/priority_0_stderr.gold | 8 +-
tests/gold_tests/h2/http2.test.py | 3 +-
tests/gold_tests/runroot/runroot_error.test.py | 7 +-
tests/gold_tests/runroot/runroot_init.test.py | 39 +-
tests/gold_tests/runroot/runroot_manager.test.py | 52 +
tests/gold_tests/runroot/runroot_remove.test.py | 12 +-
tests/gold_tests/runroot/runroot_use.test.py | 12 +-
tests/gold_tests/runroot/runroot_verify.test.py | 13 +-
tests/gold_tests/timeout/timeout.gold | 3 +
tests/gold_tests/timeout/timeout.test.py | 46 +
tests/tools/microServer/uWServer.py | 3 +-
tests/tools/plugins/custom204plugin.cc | 2 +-
263 files changed, 15378 insertions(+), 6070 deletions(-)
[trafficserver] 03/04: Remove HQClientSession::release_netvc()
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 4067503ebb037bfe1deb880162b2f65e3b647054
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Aug 29 14:49:16 2018 +0900
Remove HQClientSession::release_netvc()
---
proxy/hq/HQClientSession.cc | 7 -------
proxy/hq/HQClientSession.h | 1 -
2 files changed, 8 deletions(-)
diff --git a/proxy/hq/HQClientSession.cc b/proxy/hq/HQClientSession.cc
index 3761e7f..29af2e0 100644
--- a/proxy/hq/HQClientSession.cc
+++ b/proxy/hq/HQClientSession.cc
@@ -96,13 +96,6 @@ HQClientSession::get_netvc() const
return this->_client_vc;
}
-void
-HQClientSession::release_netvc()
-{
- ink_assert(false);
- return;
-}
-
int
HQClientSession::get_transact_count() const
{
diff --git a/proxy/hq/HQClientSession.h b/proxy/hq/HQClientSession.h
index 928503f..ff4e4da 100644
--- a/proxy/hq/HQClientSession.h
+++ b/proxy/hq/HQClientSession.h
@@ -46,7 +46,6 @@ public:
void destroy() override;
void new_connection(NetVConnection *new_vc, MIOBuffer *iobuf, IOBufferReader *reader, bool backdoor) override;
NetVConnection *get_netvc() const override;
- void release_netvc() override;
int get_transact_count() const override;
const char *get_protocol_string() const override;
void release(ProxyClientTransaction *trans) override;
[trafficserver] 02/04: Fix HQ to replace AclRecord with IpAllow::ACL
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit cfa1d0da9a00b61b3fa75c984e59f76439ce517e
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Aug 29 14:48:46 2018 +0900
Fix HQ to replace AclRecord with IpAllow::ACL
---
proxy/hq/HQSessionAccept.cc | 11 ++++++-----
proxy/hq/QUICSimpleApp.cc | 10 +++-------
proxy/hq/QUICSimpleApp.h | 4 +++-
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/proxy/hq/HQSessionAccept.cc b/proxy/hq/HQSessionAccept.cc
index 4f9299f..e16b6c5 100644
--- a/proxy/hq/HQSessionAccept.cc
+++ b/proxy/hq/HQSessionAccept.cc
@@ -25,7 +25,7 @@
#include "P_Net.h"
#include "I_Machine.h"
-#include "../IPAllow.h"
+#include "IPAllow.h"
#include "QUICSimpleApp.h"
HQSessionAccept::HQSessionAccept(const HttpSessionAccept::Options &_o) : SessionAccept(nullptr), options(_o)
@@ -38,13 +38,14 @@ HQSessionAccept::~HQSessionAccept() {}
bool
HQSessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, IOBufferReader *reader)
{
- sockaddr const *client_ip = netvc->get_remote_addr();
- const AclRecord *session_acl_record = testIpAllowPolicy(client_ip);
- if (!session_acl_record) {
+ sockaddr const *client_ip = netvc->get_remote_addr();
+ IpAllow::ACL session_acl = IpAllow::match(client_ip, IpAllow::SRC_ADDR);
+ if (!session_acl.isValid()) {
ip_port_text_buffer ipb;
Warning("QUIC client '%s' prohibited by ip-allow policy", ats_ip_ntop(client_ip, ipb, sizeof(ipb)));
return false;
}
+
netvc->attributes = this->options.transport_type;
if (is_debug_tag_set("hq")) {
@@ -55,7 +56,7 @@ HQSessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, IOBufferReader
ats_ip_nptop(client_ip, ipb, sizeof(ipb)), netvc->attributes);
}
- new QUICSimpleApp(static_cast<QUICNetVConnection *>(netvc));
+ new QUICSimpleApp(static_cast<QUICNetVConnection *>(netvc), std::move(session_acl));
return true;
}
diff --git a/proxy/hq/QUICSimpleApp.cc b/proxy/hq/QUICSimpleApp.cc
index 7dc5027..6d77af7 100644
--- a/proxy/hq/QUICSimpleApp.cc
+++ b/proxy/hq/QUICSimpleApp.cc
@@ -29,18 +29,14 @@
#include "HQClientSession.h"
#include "HQClientTransaction.h"
-#include "../IPAllow.h"
static constexpr char tag[] = "quic_simple_app";
static constexpr char tag_v[] = "v_quic_simple_app";
-QUICSimpleApp::QUICSimpleApp(QUICNetVConnection *client_vc) : QUICApplication(client_vc)
+QUICSimpleApp::QUICSimpleApp(QUICNetVConnection *client_vc, IpAllow::ACL session_acl) : QUICApplication(client_vc)
{
- sockaddr const *client_ip = client_vc->get_remote_addr();
- const AclRecord *session_acl_record = SessionAccept::testIpAllowPolicy(client_ip);
-
- this->_client_session = new HQClientSession(client_vc);
- this->_client_session->acl_record = session_acl_record;
+ this->_client_session = new HQClientSession(client_vc);
+ this->_client_session->acl = std::move(session_acl);
this->_client_session->new_connection(client_vc, nullptr, nullptr, false);
this->_qc->stream_manager()->set_default_application(this);
diff --git a/proxy/hq/QUICSimpleApp.h b/proxy/hq/QUICSimpleApp.h
index 12804eb..492aed3 100644
--- a/proxy/hq/QUICSimpleApp.h
+++ b/proxy/hq/QUICSimpleApp.h
@@ -23,6 +23,8 @@
#pragma once
+#include "IPAllow.h"
+
#include "QUICApplication.h"
class QUICNetVConnection;
@@ -36,7 +38,7 @@ class HQClientSession;
class QUICSimpleApp : public QUICApplication
{
public:
- QUICSimpleApp(QUICNetVConnection *client_vc);
+ QUICSimpleApp(QUICNetVConnection *client_vc, IpAllow::ACL session_acl);
~QUICSimpleApp();
int main_event_handler(int event, Event *data);
[trafficserver] 04/04: Acquire mutex lock before handleEvent() call
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 2621a0716f0e76f3a403383a87a154132960ac4e
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Aug 29 14:51:04 2018 +0900
Acquire mutex lock before handleEvent() call
---
iocore/net/QUICNet.cc | 3 +++
iocore/net/QUICNetProcessor.cc | 2 ++
iocore/net/QUICNetVConnection.cc | 6 +++++-
proxy/hq/QUICSimpleApp.cc | 2 ++
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/iocore/net/QUICNet.cc b/iocore/net/QUICNet.cc
index 8568280..9a4b649 100644
--- a/iocore/net/QUICNet.cc
+++ b/iocore/net/QUICNet.cc
@@ -69,14 +69,17 @@ QUICPollCont::_process_long_header_packet(QUICPollEvent *e, NetHandler *nh)
QUICPacketType ptype = static_cast<QUICPacketType>(buf[0] & 0x7f);
if (ptype == QUICPacketType::INITIAL && !vc->read.triggered) {
+ SCOPED_MUTEX_LOCK(lock, vc->mutex, this_ethread());
vc->read.triggered = 1;
vc->handle_received_packet(p);
vc->handleEvent(QUIC_EVENT_PACKET_READ_READY, nullptr);
e->free();
+
return;
}
if (vc) {
+ SCOPED_MUTEX_LOCK(lock, vc->mutex, this_ethread());
vc->read.triggered = 1;
vc->handle_received_packet(p);
} else {
diff --git a/iocore/net/QUICNetProcessor.cc b/iocore/net/QUICNetProcessor.cc
index 8807a15..e4c4ab1 100644
--- a/iocore/net/QUICNetProcessor.cc
+++ b/iocore/net/QUICNetProcessor.cc
@@ -192,6 +192,7 @@ QUICNetProcessor::main_accept(Continuation *cont, SOCKET fd, AcceptOptions const
// char thr_name[MAX_THREAD_NAME_LENGTH];
NetAccept *na = createNetAccept(opt);
+
if (accept_threads < 0) {
REC_ReadConfigInteger(accept_threads, "proxy.config.accept_threads");
}
@@ -216,6 +217,7 @@ QUICNetProcessor::main_accept(Continuation *cont, SOCKET fd, AcceptOptions const
na->action_->server = &na->server;
na->init_accept();
+ SCOPED_MUTEX_LOCK(lock, na->mutex, this_ethread());
udpNet.UDPBind((Continuation *)na, &na->server.accept_addr.sa, 1048576, 1048576);
return na->action_.get();
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index c7a41fc..7b79c48 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -720,7 +720,9 @@ QUICNetVConnection::state_connection_closed(int event, Event *data)
// TODO: Drop record from Connection-ID - QUICNetVConnection table in QUICPacketHandler
// Shutdown loss detector
for (auto s : QUIC_PN_SPACES) {
- this->_loss_detector[static_cast<int>(s)]->handleEvent(QUIC_EVENT_LD_SHUTDOWN, nullptr);
+ QUICLossDetector *ld = this->_loss_detector[static_cast<int>(s)];
+ SCOPED_MUTEX_LOCK(lock, ld->mutex, this_ethread());
+ ld->handleEvent(QUIC_EVENT_LD_SHUTDOWN, nullptr);
}
if (this->nh) {
@@ -750,7 +752,9 @@ QUICNetVConnection::get_udp_con()
void
QUICNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
{
+ SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread());
this->handleEvent(QUIC_EVENT_PACKET_READ_READY, nullptr);
+
return;
}
diff --git a/proxy/hq/QUICSimpleApp.cc b/proxy/hq/QUICSimpleApp.cc
index 6d77af7..fb42b25 100644
--- a/proxy/hq/QUICSimpleApp.cc
+++ b/proxy/hq/QUICSimpleApp.cc
@@ -75,6 +75,7 @@ QUICSimpleApp::main_event_handler(int event, Event *data)
txn->new_transaction();
} else {
+ SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread());
txn->handleEvent(event);
}
}
@@ -82,6 +83,7 @@ QUICSimpleApp::main_event_handler(int event, Event *data)
case VC_EVENT_WRITE_READY:
case VC_EVENT_WRITE_COMPLETE:
if (txn != nullptr) {
+ SCOPED_MUTEX_LOCK(lock, txn->mutex, this_ethread());
txn->handleEvent(event);
}
break;