From 9eb0fdec004f3f3e8a6ea93e1d8f7c1e0d92ec89 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 31 Mar 2017 16:59:30 -0700 Subject: Reorganize ext tree - filters live under filters - lb_policy, resolver implementations (being part of client_channel) live under client_channel --- tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 126 +++++++++++++++++------------------ 2 files changed, 65 insertions(+), 63 deletions(-) (limited to 'tools/doxygen') diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 209d5445db..6d171e3299 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -923,6 +923,8 @@ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_client_filter.h \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/http_server_filter.h \ +src/core/lib/channel/max_age_filter.c \ +src/core/lib/channel/max_age_filter.h \ src/core/lib/channel/message_size_filter.c \ src/core/lib/channel/message_size_filter.h \ src/core/lib/compression/algorithm_metadata.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a9343499e7..b47c48cebc 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -895,69 +895,69 @@ src/core/ext/census/trace_status.h \ src/core/ext/census/trace_string.h \ src/core/ext/census/tracing.c \ src/core/ext/census/tracing.h \ -src/core/ext/client_channel/README.md \ -src/core/ext/client_channel/channel_connectivity.c \ -src/core/ext/client_channel/client_channel.c \ -src/core/ext/client_channel/client_channel.h \ -src/core/ext/client_channel/client_channel_factory.c \ -src/core/ext/client_channel/client_channel_factory.h \ -src/core/ext/client_channel/client_channel_plugin.c \ -src/core/ext/client_channel/connector.c \ -src/core/ext/client_channel/connector.h \ -src/core/ext/client_channel/http_connect_handshaker.c \ -src/core/ext/client_channel/http_connect_handshaker.h \ -src/core/ext/client_channel/http_proxy.c \ -src/core/ext/client_channel/http_proxy.h \ -src/core/ext/client_channel/lb_policy.c \ -src/core/ext/client_channel/lb_policy.h \ -src/core/ext/client_channel/lb_policy_factory.c \ -src/core/ext/client_channel/lb_policy_factory.h \ -src/core/ext/client_channel/lb_policy_registry.c \ -src/core/ext/client_channel/lb_policy_registry.h \ -src/core/ext/client_channel/parse_address.c \ -src/core/ext/client_channel/parse_address.h \ -src/core/ext/client_channel/proxy_mapper.c \ -src/core/ext/client_channel/proxy_mapper.h \ -src/core/ext/client_channel/proxy_mapper_registry.c \ -src/core/ext/client_channel/proxy_mapper_registry.h \ -src/core/ext/client_channel/resolver.c \ -src/core/ext/client_channel/resolver.h \ -src/core/ext/client_channel/resolver_factory.c \ -src/core/ext/client_channel/resolver_factory.h \ -src/core/ext/client_channel/resolver_registry.c \ -src/core/ext/client_channel/resolver_registry.h \ -src/core/ext/client_channel/retry_throttle.c \ -src/core/ext/client_channel/retry_throttle.h \ -src/core/ext/client_channel/subchannel.c \ -src/core/ext/client_channel/subchannel.h \ -src/core/ext/client_channel/subchannel_index.c \ -src/core/ext/client_channel/subchannel_index.h \ -src/core/ext/client_channel/uri_parser.c \ -src/core/ext/client_channel/uri_parser.h \ -src/core/ext/lb_policy/grpclb/grpclb.c \ -src/core/ext/lb_policy/grpclb/grpclb.h \ -src/core/ext/lb_policy/grpclb/grpclb_channel.h \ -src/core/ext/lb_policy/grpclb/grpclb_channel_secure.c \ -src/core/ext/lb_policy/grpclb/load_balancer_api.c \ -src/core/ext/lb_policy/grpclb/load_balancer_api.h \ -src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ -src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ -src/core/ext/lb_policy/pick_first/pick_first.c \ -src/core/ext/lb_policy/round_robin/round_robin.c \ -src/core/ext/load_reporting/load_reporting.c \ -src/core/ext/load_reporting/load_reporting.h \ -src/core/ext/load_reporting/load_reporting_filter.c \ -src/core/ext/load_reporting/load_reporting_filter.h \ -src/core/ext/resolver/README.md \ -src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \ -src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h \ -src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ -src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \ -src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h \ -src/core/ext/resolver/dns/native/README.md \ -src/core/ext/resolver/dns/native/dns_resolver.c \ -src/core/ext/resolver/sockaddr/README.md \ -src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ +src/core/ext/filters/client_channel/channel_connectivity.c \ +src/core/ext/filters/client_channel/client_channel.c \ +src/core/ext/filters/client_channel/client_channel.h \ +src/core/ext/filters/client_channel/client_channel_factory.c \ +src/core/ext/filters/client_channel/client_channel_factory.h \ +src/core/ext/filters/client_channel/client_channel_plugin.c \ +src/core/ext/filters/client_channel/connector.c \ +src/core/ext/filters/client_channel/connector.h \ +src/core/ext/filters/client_channel/http_connect_handshaker.c \ +src/core/ext/filters/client_channel/http_connect_handshaker.h \ +src/core/ext/filters/client_channel/http_proxy.c \ +src/core/ext/filters/client_channel/http_proxy.h \ +src/core/ext/filters/client_channel/lb_policy.c \ +src/core/ext/filters/client_channel/lb_policy.h \ +src/core/ext/filters/client_channel/lb_policy_factory.c \ +src/core/ext/filters/client_channel/lb_policy_factory.h \ +src/core/ext/filters/client_channel/lb_policy_registry.c \ +src/core/ext/filters/client_channel/lb_policy_registry.h \ +src/core/ext/filters/client_channel/parse_address.c \ +src/core/ext/filters/client_channel/parse_address.h \ +src/core/ext/filters/client_channel/proxy_mapper.c \ +src/core/ext/filters/client_channel/proxy_mapper.h \ +src/core/ext/filters/client_channel/proxy_mapper_registry.c \ +src/core/ext/filters/client_channel/proxy_mapper_registry.h \ +src/core/ext/filters/client_channel/resolver.c \ +src/core/ext/filters/client_channel/resolver.h \ +src/core/ext/filters/client_channel/resolver_factory.c \ +src/core/ext/filters/client_channel/resolver_factory.h \ +src/core/ext/filters/client_channel/resolver_registry.c \ +src/core/ext/filters/client_channel/resolver_registry.h \ +src/core/ext/filters/client_channel/retry_throttle.c \ +src/core/ext/filters/client_channel/retry_throttle.h \ +src/core/ext/filters/client_channel/subchannel.c \ +src/core/ext/filters/client_channel/subchannel.h \ +src/core/ext/filters/client_channel/subchannel_index.c \ +src/core/ext/filters/client_channel/subchannel_index.h \ +src/core/ext/filters/client_channel/uri_parser.c \ +src/core/ext/filters/client_channel/uri_parser.h \ +src/core/ext/filters/client_channel/README.md \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h \ +src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ +src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c \ +src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c \ +src/core/ext/filters/client_channel/resolver/README.md \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h \ +src/core/ext/filters/client_channel/resolver/dns/native/README.md \ +src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c \ +src/core/ext/filters/client_channel/resolver/sockaddr/README.md \ +src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c \ +src/core/ext/filters/load_reporting/load_reporting.c \ +src/core/ext/filters/load_reporting/load_reporting.h \ +src/core/ext/filters/load_reporting/load_reporting_filter.c \ +src/core/ext/filters/load_reporting/load_reporting_filter.h \ src/core/ext/transport/README.md \ src/core/ext/transport/chttp2/README.md \ src/core/ext/transport/chttp2/alpn/alpn.c \ -- cgit v1.2.3 From 6d4894e9d6cf72f0917c6cfdabb3d3a271433d34 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 31 Mar 2017 17:22:06 -0700 Subject: optionalize max_age --- BUILD | 4 +- CMakeLists.txt | 9 +- Makefile | 9 +- binding.gyp | 2 +- build.yaml | 12 +- config.m4 | 3 +- gRPC-Core.podspec | 8 +- grpc.gemspec | 4 +- package.xml | 4 +- src/core/ext/filters/max_age/max_age_filter.c | 419 +++++++++++++++++++++ src/core/ext/filters/max_age/max_age_filter.h | 39 ++ src/core/lib/channel/max_age_filter.c | 386 ------------------- src/core/lib/channel/max_age_filter.h | 39 -- src/core/lib/surface/init.c | 4 - src/core/plugin_registry/grpc_plugin_registry.c | 4 + .../grpc_unsecure_plugin_registry.c | 4 + src/python/grpcio/grpc_core_dependencies.py | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 - tools/doxygen/Doxyfile.core.internal | 46 +-- tools/run_tests/generated/sources_and_headers.json | 23 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 3 - vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 - .../grpc++_unsecure/grpc++_unsecure.vcxproj | 3 - .../grpc++_unsecure.vcxproj.filters | 6 - vsprojects/vcxproj/grpc/grpc.vcxproj | 82 ++-- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 170 ++++----- .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 82 ++-- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 170 ++++----- 30 files changed, 789 insertions(+), 765 deletions(-) create mode 100644 src/core/ext/filters/max_age/max_age_filter.c create mode 100644 src/core/ext/filters/max_age/max_age_filter.h delete mode 100644 src/core/lib/channel/max_age_filter.c delete mode 100644 src/core/lib/channel/max_age_filter.h (limited to 'tools/doxygen') diff --git a/BUILD b/BUILD index a9f4500042..77ea833308 100644 --- a/BUILD +++ b/BUILD @@ -436,7 +436,7 @@ grpc_cc_library( "src/core/lib/channel/handshaker_registry.c", "src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/max_age_filter.c", + "src/core/ext/filters/max_age/max_age_filter.c", "src/core/lib/channel/message_size_filter.c", "src/core/lib/compression/compression.c", "src/core/lib/compression/message_compress.c", @@ -564,7 +564,7 @@ grpc_cc_library( "src/core/lib/channel/handshaker_registry.h", "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/max_age_filter.h", + "src/core/ext/filters/max_age/max_age_filter.h", "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", "src/core/lib/compression/message_compress.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b646bb414..332f8a541c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -918,7 +918,6 @@ add_library(grpc src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c @@ -1138,6 +1137,7 @@ add_library(grpc src/core/ext/census/resource.c src/core/ext/census/trace_context.c src/core/ext/census/tracing.c + src/core/ext/filters/max_age/max_age_filter.c src/core/plugin_registry/grpc_plugin_registry.c ) @@ -1240,7 +1240,6 @@ add_library(grpc_cronet src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c @@ -1549,7 +1548,6 @@ add_library(grpc_test_util src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c @@ -1810,7 +1808,6 @@ add_library(grpc_unsecure src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c @@ -2001,6 +1998,7 @@ add_library(grpc_unsecure src/core/ext/census/resource.c src/core/ext/census/trace_context.c src/core/ext/census/tracing.c + src/core/ext/filters/max_age/max_age_filter.c src/core/plugin_registry/grpc_unsecure_plugin_registry.c ) @@ -2226,7 +2224,6 @@ add_library(grpc++ src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c @@ -2557,7 +2554,6 @@ add_library(grpc++_cronet src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c @@ -3256,7 +3252,6 @@ add_library(grpc++_unsecure src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c diff --git a/Makefile b/Makefile index 4cdced8f71..8bad909fe9 100644 --- a/Makefile +++ b/Makefile @@ -2820,7 +2820,6 @@ LIBGRPC_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -3040,6 +3039,7 @@ LIBGRPC_SRC = \ src/core/ext/census/resource.c \ src/core/ext/census/trace_context.c \ src/core/ext/census/tracing.c \ + src/core/ext/filters/max_age/max_age_filter.c \ src/core/plugin_registry/grpc_plugin_registry.c \ PUBLIC_HEADERS_C += \ @@ -3140,7 +3140,6 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -3448,7 +3447,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -3681,7 +3679,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -3872,6 +3869,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/census/resource.c \ src/core/ext/census/trace_context.c \ src/core/ext/census/tracing.c \ + src/core/ext/filters/max_age/max_age_filter.c \ src/core/plugin_registry/grpc_unsecure_plugin_registry.c \ PUBLIC_HEADERS_C += \ @@ -4074,7 +4072,6 @@ LIBGRPC++_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -4413,7 +4410,6 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -5104,7 +5100,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ diff --git a/binding.gyp b/binding.gyp index e103ecfdf2..f3c7252d96 100644 --- a/binding.gyp +++ b/binding.gyp @@ -626,7 +626,6 @@ 'src/core/lib/channel/handshaker_registry.c', 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/channel/max_age_filter.c', 'src/core/lib/channel/message_size_filter.c', 'src/core/lib/compression/compression.c', 'src/core/lib/compression/message_compress.c', @@ -846,6 +845,7 @@ 'src/core/ext/census/resource.c', 'src/core/ext/census/trace_context.c', 'src/core/ext/census/tracing.c', + 'src/core/ext/filters/max_age/max_age_filter.c', 'src/core/plugin_registry/grpc_plugin_registry.c', ], "conditions": [ diff --git a/build.yaml b/build.yaml index 494d1aca8f..de72276f56 100644 --- a/build.yaml +++ b/build.yaml @@ -185,7 +185,6 @@ filegroups: - src/core/lib/channel/handshaker_registry.h - src/core/lib/channel/http_client_filter.h - src/core/lib/channel/http_server_filter.h - - src/core/lib/channel/max_age_filter.h - src/core/lib/channel/message_size_filter.h - src/core/lib/compression/algorithm_metadata.h - src/core/lib/compression/message_compress.h @@ -296,7 +295,6 @@ filegroups: - src/core/lib/channel/handshaker_registry.c - src/core/lib/channel/http_client_filter.c - src/core/lib/channel/http_server_filter.c - - src/core/lib/channel/max_age_filter.c - src/core/lib/channel/message_size_filter.c - src/core/lib/compression/compression.c - src/core/lib/compression/message_compress.c @@ -527,6 +525,14 @@ filegroups: plugin: grpc_load_reporting_plugin uses: - grpc_base +- name: grpc_max_age_filter + headers: + - src/core/ext/filters/max_age/max_age_filter.h + src: + - src/core/ext/filters/max_age/max_age_filter.c + plugin: grpc_max_age_filter + uses: + - grpc_base - name: grpc_resolver_dns_ares headers: - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -990,6 +996,7 @@ libs: - grpc_load_reporting - grpc_secure - census + - grpc_max_age_filter generate_plugin_registry: true secure: true vs_packages: @@ -1086,6 +1093,7 @@ libs: - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin - census + - grpc_max_age_filter generate_plugin_registry: true secure: false vs_project_guid: '{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}' diff --git a/config.m4 b/config.m4 index 86f156480d..2846781031 100644 --- a/config.m4 +++ b/config.m4 @@ -94,7 +94,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -314,6 +313,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/census/resource.c \ src/core/ext/census/trace_context.c \ src/core/ext/census/tracing.c \ + src/core/ext/filters/max_age/max_age_filter.c \ src/core/plugin_registry/grpc_plugin_registry.c \ src/boringssl/err_data.c \ third_party/boringssl/crypto/aes/aes.c \ @@ -638,6 +638,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver/dns/native) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver/sockaddr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/load_reporting) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/max_age) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/insecure) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index e033164c56..83c19afc24 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -267,7 +267,6 @@ Pod::Spec.new do |s| 'src/core/lib/channel/handshaker_registry.h', 'src/core/lib/channel/http_client_filter.h', 'src/core/lib/channel/http_server_filter.h', - 'src/core/lib/channel/max_age_filter.h', 'src/core/lib/channel/message_size_filter.h', 'src/core/lib/compression/algorithm_metadata.h', 'src/core/lib/compression/message_compress.h', @@ -457,6 +456,7 @@ Pod::Spec.new do |s| 'src/core/ext/census/trace_status.h', 'src/core/ext/census/trace_string.h', 'src/core/ext/census/tracing.h', + 'src/core/ext/filters/max_age/max_age_filter.h', 'src/core/lib/surface/init.c', 'src/core/lib/channel/channel_args.c', 'src/core/lib/channel/channel_stack.c', @@ -469,7 +469,6 @@ Pod::Spec.new do |s| 'src/core/lib/channel/handshaker_registry.c', 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/channel/max_age_filter.c', 'src/core/lib/channel/message_size_filter.c', 'src/core/lib/compression/compression.c', 'src/core/lib/compression/message_compress.c', @@ -689,6 +688,7 @@ Pod::Spec.new do |s| 'src/core/ext/census/resource.c', 'src/core/ext/census/trace_context.c', 'src/core/ext/census/tracing.c', + 'src/core/ext/filters/max_age/max_age_filter.c', 'src/core/plugin_registry/grpc_plugin_registry.c' ss.private_header_files = 'src/core/lib/profiling/timers.h', @@ -717,7 +717,6 @@ Pod::Spec.new do |s| 'src/core/lib/channel/handshaker_registry.h', 'src/core/lib/channel/http_client_filter.h', 'src/core/lib/channel/http_server_filter.h', - 'src/core/lib/channel/max_age_filter.h', 'src/core/lib/channel/message_size_filter.h', 'src/core/lib/compression/algorithm_metadata.h', 'src/core/lib/compression/message_compress.h', @@ -906,7 +905,8 @@ Pod::Spec.new do |s| 'src/core/ext/census/trace_propagation.h', 'src/core/ext/census/trace_status.h', 'src/core/ext/census/trace_string.h', - 'src/core/ext/census/tracing.h' + 'src/core/ext/census/tracing.h', + 'src/core/ext/filters/max_age/max_age_filter.h' end s.subspec 'Cronet-Interface' do |ss| diff --git a/grpc.gemspec b/grpc.gemspec index c1cd7018bf..a3a5870761 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -183,7 +183,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/handshaker_registry.h ) s.files += %w( src/core/lib/channel/http_client_filter.h ) s.files += %w( src/core/lib/channel/http_server_filter.h ) - s.files += %w( src/core/lib/channel/max_age_filter.h ) s.files += %w( src/core/lib/channel/message_size_filter.h ) s.files += %w( src/core/lib/compression/algorithm_metadata.h ) s.files += %w( src/core/lib/compression/message_compress.h ) @@ -373,6 +372,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/census/trace_status.h ) s.files += %w( src/core/ext/census/trace_string.h ) s.files += %w( src/core/ext/census/tracing.h ) + s.files += %w( src/core/ext/filters/max_age/max_age_filter.h ) s.files += %w( src/core/lib/surface/init.c ) s.files += %w( src/core/lib/channel/channel_args.c ) s.files += %w( src/core/lib/channel/channel_stack.c ) @@ -385,7 +385,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/handshaker_registry.c ) s.files += %w( src/core/lib/channel/http_client_filter.c ) s.files += %w( src/core/lib/channel/http_server_filter.c ) - s.files += %w( src/core/lib/channel/max_age_filter.c ) s.files += %w( src/core/lib/channel/message_size_filter.c ) s.files += %w( src/core/lib/compression/compression.c ) s.files += %w( src/core/lib/compression/message_compress.c ) @@ -605,6 +604,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/census/resource.c ) s.files += %w( src/core/ext/census/trace_context.c ) s.files += %w( src/core/ext/census/tracing.c ) + s.files += %w( src/core/ext/filters/max_age/max_age_filter.c ) s.files += %w( src/core/plugin_registry/grpc_plugin_registry.c ) s.files += %w( third_party/boringssl/crypto/aes/internal.h ) s.files += %w( third_party/boringssl/crypto/asn1/asn1_locl.h ) diff --git a/package.xml b/package.xml index 474a08e447..6957ecca73 100644 --- a/package.xml +++ b/package.xml @@ -192,7 +192,6 @@ - @@ -382,6 +381,7 @@ + @@ -394,7 +394,6 @@ - @@ -614,6 +613,7 @@ + diff --git a/src/core/ext/filters/max_age/max_age_filter.c b/src/core/ext/filters/max_age/max_age_filter.c new file mode 100644 index 0000000000..b03cb0ba0a --- /dev/null +++ b/src/core/ext/filters/max_age/max_age_filter.c @@ -0,0 +1,419 @@ +/* + * + * Copyright 2017, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/channel/message_size_filter.h" + +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/surface/channel_init.h" +#include "src/core/lib/transport/http2_errors.h" +#include "src/core/lib/transport/service_config.h" + +#define DEFAULT_MAX_CONNECTION_AGE_MS INT_MAX +#define DEFAULT_MAX_CONNECTION_AGE_GRACE_MS INT_MAX +#define DEFAULT_MAX_CONNECTION_IDLE_MS INT_MAX + +typedef struct channel_data { + /* We take a reference to the channel stack for the timer callback */ + grpc_channel_stack* channel_stack; + /* Guards access to max_age_timer, max_age_timer_pending, max_age_grace_timer + and max_age_grace_timer_pending */ + gpr_mu max_age_timer_mu; + /* True if the max_age timer callback is currently pending */ + bool max_age_timer_pending; + /* True if the max_age_grace timer callback is currently pending */ + bool max_age_grace_timer_pending; + /* The timer for checking if the channel has reached its max age */ + grpc_timer max_age_timer; + /* The timer for checking if the max-aged channel has uesed up the grace + period */ + grpc_timer max_age_grace_timer; + /* The timer for checking if the channel's idle duration reaches + max_connection_idle */ + grpc_timer max_idle_timer; + /* Allowed max time a channel may have no outstanding rpcs */ + gpr_timespec max_connection_idle; + /* Allowed max time a channel may exist */ + gpr_timespec max_connection_age; + /* Allowed grace period after the channel reaches its max age */ + gpr_timespec max_connection_age_grace; + /* Closure to run when the channel's idle duration reaches max_connection_idle + and should be closed gracefully */ + grpc_closure close_max_idle_channel; + /* Closure to run when the channel reaches its max age and should be closed + gracefully */ + grpc_closure close_max_age_channel; + /* Closure to run the channel uses up its max age grace time and should be + closed forcibly */ + grpc_closure force_close_max_age_channel; + /* Closure to run when the init fo channel stack is done and the max_idle + timer should be started */ + grpc_closure start_max_idle_timer_after_init; + /* Closure to run when the init fo channel stack is done and the max_age timer + should be started */ + grpc_closure start_max_age_timer_after_init; + /* Closure to run when the goaway op is finished and the max_age_timer */ + grpc_closure start_max_age_grace_timer_after_goaway_op; + /* Closure to run when the channel connectivity state changes */ + grpc_closure channel_connectivity_changed; + /* Records the current connectivity state */ + grpc_connectivity_state connectivity_state; + /* Number of active calls */ + gpr_atm call_count; +} channel_data; + +/* Increase the nubmer of active calls. Before the increasement, if there are no + calls, the max_idle_timer should be cancelled. */ +static void increase_call_count(grpc_exec_ctx* exec_ctx, channel_data* chand) { + if (gpr_atm_full_fetch_add(&chand->call_count, 1) == 0) { + grpc_timer_cancel(exec_ctx, &chand->max_idle_timer); + } +} + +/* Decrease the nubmer of active calls. After the decrement, if there are no + calls, the max_idle_timer should be started. */ +static void decrease_call_count(grpc_exec_ctx* exec_ctx, channel_data* chand) { + if (gpr_atm_full_fetch_add(&chand->call_count, -1) == 1) { + GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_idle_timer"); + grpc_timer_init( + exec_ctx, &chand->max_idle_timer, + gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), chand->max_connection_idle), + &chand->close_max_idle_channel, gpr_now(GPR_CLOCK_MONOTONIC)); + } +} + +static void start_max_idle_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + channel_data* chand = arg; + /* Decrease call_count. If there are no active calls at this time, + max_idle_timer will start here. If the number of active calls is not 0, + max_idle_timer will start after all the active calls end. */ + decrease_call_count(exec_ctx, chand); + GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, + "max_age start_max_idle_timer_after_init"); +} + +static void start_max_age_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + channel_data* chand = arg; + gpr_mu_lock(&chand->max_age_timer_mu); + chand->max_age_timer_pending = true; + GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_timer"); + grpc_timer_init( + exec_ctx, &chand->max_age_timer, + gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), chand->max_connection_age), + &chand->close_max_age_channel, gpr_now(GPR_CLOCK_MONOTONIC)); + gpr_mu_unlock(&chand->max_age_timer_mu); + grpc_transport_op* op = grpc_make_transport_op(NULL); + op->on_connectivity_state_change = &chand->channel_connectivity_changed, + op->connectivity_state = &chand->connectivity_state; + grpc_channel_next_op(exec_ctx, + grpc_channel_stack_element(chand->channel_stack, 0), op); + GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, + "max_age start_max_age_timer_after_init"); +} + +static void start_max_age_grace_timer_after_goaway_op(grpc_exec_ctx* exec_ctx, + void* arg, + grpc_error* error) { + channel_data* chand = arg; + gpr_mu_lock(&chand->max_age_timer_mu); + chand->max_age_grace_timer_pending = true; + GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_grace_timer"); + grpc_timer_init(exec_ctx, &chand->max_age_grace_timer, + gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + chand->max_connection_age_grace), + &chand->force_close_max_age_channel, + gpr_now(GPR_CLOCK_MONOTONIC)); + gpr_mu_unlock(&chand->max_age_timer_mu); + GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, + "max_age start_max_age_grace_timer_after_goaway_op"); +} + +static void close_max_idle_channel(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + channel_data* chand = arg; + gpr_atm_no_barrier_fetch_add(&chand->call_count, 1); + if (error == GRPC_ERROR_NONE) { + grpc_transport_op* op = grpc_make_transport_op(NULL); + op->goaway_error = + grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("max_idle"), + GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_NO_ERROR); + grpc_channel_element* elem = + grpc_channel_stack_element(chand->channel_stack, 0); + elem->filter->start_transport_op(exec_ctx, elem, op); + } else if (error != GRPC_ERROR_CANCELLED) { + GRPC_LOG_IF_ERROR("close_max_idle_channel", error); + } + GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, + "max_age max_idle_timer"); +} + +static void close_max_age_channel(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + channel_data* chand = arg; + gpr_mu_lock(&chand->max_age_timer_mu); + chand->max_age_timer_pending = false; + gpr_mu_unlock(&chand->max_age_timer_mu); + if (error == GRPC_ERROR_NONE) { + GRPC_CHANNEL_STACK_REF(chand->channel_stack, + "max_age start_max_age_grace_timer_after_goaway_op"); + grpc_transport_op* op = grpc_make_transport_op( + &chand->start_max_age_grace_timer_after_goaway_op); + op->goaway_error = + grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("max_age"), + GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_NO_ERROR); + grpc_channel_element* elem = + grpc_channel_stack_element(chand->channel_stack, 0); + elem->filter->start_transport_op(exec_ctx, elem, op); + } else if (error != GRPC_ERROR_CANCELLED) { + GRPC_LOG_IF_ERROR("close_max_age_channel", error); + } + GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, + "max_age max_age_timer"); +} + +static void force_close_max_age_channel(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + channel_data* chand = arg; + gpr_mu_lock(&chand->max_age_timer_mu); + chand->max_age_grace_timer_pending = false; + gpr_mu_unlock(&chand->max_age_timer_mu); + if (error == GRPC_ERROR_NONE) { + grpc_transport_op* op = grpc_make_transport_op(NULL); + op->disconnect_with_error = + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel reaches max age"); + grpc_channel_element* elem = + grpc_channel_stack_element(chand->channel_stack, 0); + elem->filter->start_transport_op(exec_ctx, elem, op); + } else if (error != GRPC_ERROR_CANCELLED) { + GRPC_LOG_IF_ERROR("force_close_max_age_channel", error); + } + GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, + "max_age max_age_grace_timer"); +} + +static void channel_connectivity_changed(grpc_exec_ctx* exec_ctx, void* arg, + grpc_error* error) { + channel_data* chand = arg; + if (chand->connectivity_state != GRPC_CHANNEL_SHUTDOWN) { + grpc_transport_op* op = grpc_make_transport_op(NULL); + op->on_connectivity_state_change = &chand->channel_connectivity_changed, + op->connectivity_state = &chand->connectivity_state; + grpc_channel_next_op( + exec_ctx, grpc_channel_stack_element(chand->channel_stack, 0), op); + } else { + gpr_mu_lock(&chand->max_age_timer_mu); + if (chand->max_age_timer_pending) { + grpc_timer_cancel(exec_ctx, &chand->max_age_timer); + chand->max_age_timer_pending = false; + } + if (chand->max_age_grace_timer_pending) { + grpc_timer_cancel(exec_ctx, &chand->max_age_grace_timer); + chand->max_age_grace_timer_pending = false; + } + gpr_mu_unlock(&chand->max_age_timer_mu); + /* If there are no active calls, this increasement will cancel + max_idle_timer, and prevent max_idle_timer from being started in the + future. */ + increase_call_count(exec_ctx, chand); + } +} + +/* Constructor for call_data. */ +static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, + grpc_call_element* elem, + const grpc_call_element_args* args) { + channel_data* chand = elem->channel_data; + increase_call_count(exec_ctx, chand); + return GRPC_ERROR_NONE; +} + +/* Destructor for call_data. */ +static void destroy_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, + const grpc_call_final_info* final_info, + grpc_closure* ignored) { + channel_data* chand = elem->channel_data; + decrease_call_count(exec_ctx, chand); +} + +/* Constructor for channel_data. */ +static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx, + grpc_channel_element* elem, + grpc_channel_element_args* args) { + channel_data* chand = elem->channel_data; + gpr_mu_init(&chand->max_age_timer_mu); + chand->max_age_timer_pending = false; + chand->max_age_grace_timer_pending = false; + chand->channel_stack = args->channel_stack; + chand->max_connection_age = + DEFAULT_MAX_CONNECTION_AGE_MS == INT_MAX + ? gpr_inf_future(GPR_TIMESPAN) + : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_AGE_MS, GPR_TIMESPAN); + chand->max_connection_age_grace = + DEFAULT_MAX_CONNECTION_AGE_GRACE_MS == INT_MAX + ? gpr_inf_future(GPR_TIMESPAN) + : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_AGE_GRACE_MS, + GPR_TIMESPAN); + chand->max_connection_idle = + DEFAULT_MAX_CONNECTION_IDLE_MS == INT_MAX + ? gpr_inf_future(GPR_TIMESPAN) + : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_IDLE_MS, GPR_TIMESPAN); + for (size_t i = 0; i < args->channel_args->num_args; ++i) { + if (0 == strcmp(args->channel_args->args[i].key, + GRPC_ARG_MAX_CONNECTION_AGE_MS)) { + const int value = grpc_channel_arg_get_integer( + &args->channel_args->args[i], + (grpc_integer_options){DEFAULT_MAX_CONNECTION_AGE_MS, 1, INT_MAX}); + chand->max_connection_age = + value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) + : gpr_time_from_millis(value, GPR_TIMESPAN); + } else if (0 == strcmp(args->channel_args->args[i].key, + GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS)) { + const int value = grpc_channel_arg_get_integer( + &args->channel_args->args[i], + (grpc_integer_options){DEFAULT_MAX_CONNECTION_AGE_GRACE_MS, 0, + INT_MAX}); + chand->max_connection_age_grace = + value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) + : gpr_time_from_millis(value, GPR_TIMESPAN); + } else if (0 == strcmp(args->channel_args->args[i].key, + GRPC_ARG_MAX_CONNECTION_IDLE_MS)) { + const int value = grpc_channel_arg_get_integer( + &args->channel_args->args[i], + (grpc_integer_options){DEFAULT_MAX_CONNECTION_IDLE_MS, 1, INT_MAX}); + chand->max_connection_idle = + value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) + : gpr_time_from_millis(value, GPR_TIMESPAN); + } + } + grpc_closure_init(&chand->close_max_idle_channel, close_max_idle_channel, + chand, grpc_schedule_on_exec_ctx); + grpc_closure_init(&chand->close_max_age_channel, close_max_age_channel, chand, + grpc_schedule_on_exec_ctx); + grpc_closure_init(&chand->force_close_max_age_channel, + force_close_max_age_channel, chand, + grpc_schedule_on_exec_ctx); + grpc_closure_init(&chand->start_max_idle_timer_after_init, + start_max_idle_timer_after_init, chand, + grpc_schedule_on_exec_ctx); + grpc_closure_init(&chand->start_max_age_timer_after_init, + start_max_age_timer_after_init, chand, + grpc_schedule_on_exec_ctx); + grpc_closure_init(&chand->start_max_age_grace_timer_after_goaway_op, + start_max_age_grace_timer_after_goaway_op, chand, + grpc_schedule_on_exec_ctx); + grpc_closure_init(&chand->channel_connectivity_changed, + channel_connectivity_changed, chand, + grpc_schedule_on_exec_ctx); + + if (gpr_time_cmp(chand->max_connection_age, gpr_inf_future(GPR_TIMESPAN)) != + 0) { + /* When the channel reaches its max age, we send down an op with + goaway_error set. However, we can't send down any ops until after the + channel stack is fully initialized. If we start the timer here, we have + no guarantee that the timer won't pop before channel stack initialization + is finished. To avoid that problem, we create a closure to start the + timer, and we schedule that closure to be run after call stack + initialization is done. */ + GRPC_CHANNEL_STACK_REF(chand->channel_stack, + "max_age start_max_age_timer_after_init"); + grpc_closure_sched(exec_ctx, &chand->start_max_age_timer_after_init, + GRPC_ERROR_NONE); + } + + /* Initialize the number of calls as 1, so that the max_idle_timer will not + start until start_max_idle_timer_after_init is invoked. */ + gpr_atm_rel_store(&chand->call_count, 1); + if (gpr_time_cmp(chand->max_connection_idle, gpr_inf_future(GPR_TIMESPAN)) != + 0) { + GRPC_CHANNEL_STACK_REF(chand->channel_stack, + "max_age start_max_idle_timer_after_init"); + grpc_closure_sched(exec_ctx, &chand->start_max_idle_timer_after_init, + GRPC_ERROR_NONE); + } + return GRPC_ERROR_NONE; +} + +/* Destructor for channel_data. */ +static void destroy_channel_elem(grpc_exec_ctx* exec_ctx, + grpc_channel_element* elem) {} + +const grpc_channel_filter grpc_max_age_filter = { + grpc_call_next_op, + grpc_channel_next_op, + 0, /* sizeof_call_data */ + init_call_elem, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + grpc_channel_next_get_info, + "max_age"}; + +static bool maybe_add_max_age_filter(grpc_exec_ctx* exec_ctx, + grpc_channel_stack_builder* builder, + void* arg) { + const grpc_channel_args* channel_args = + grpc_channel_stack_builder_get_channel_arguments(builder); + const grpc_arg* a = + grpc_channel_args_find(channel_args, GRPC_ARG_MAX_CONNECTION_AGE_MS); + bool enable = false; + if (a != NULL && a->type == GRPC_ARG_INTEGER && a->value.integer != INT_MAX) { + enable = true; + } + a = grpc_channel_args_find(channel_args, GRPC_ARG_MAX_CONNECTION_IDLE_MS); + if (a != NULL && a->type == GRPC_ARG_INTEGER && a->value.integer != INT_MAX) { + enable = true; + } + if (enable) { + return grpc_channel_stack_builder_prepend_filter( + builder, &grpc_max_age_filter, NULL, NULL); + } else { + return true; + } +} + +void grpc_max_age_filter_init(void) { + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, + GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, + maybe_add_max_age_filter, NULL); +} + +void grpc_max_age_filter_shutdown(void) {} diff --git a/src/core/ext/filters/max_age/max_age_filter.h b/src/core/ext/filters/max_age/max_age_filter.h new file mode 100644 index 0000000000..93e357a88e --- /dev/null +++ b/src/core/ext/filters/max_age/max_age_filter.h @@ -0,0 +1,39 @@ +// +// Copyright 2017, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#ifndef GRPC_CORE_LIB_CHANNEL_MAX_AGE_FILTER_H +#define GRPC_CORE_LIB_CHANNEL_MAX_AGE_FILTER_H + +#include "src/core/lib/channel/channel_stack.h" + +extern const grpc_channel_filter grpc_max_age_filter; + +#endif /* GRPC_CORE_LIB_CHANNEL_MAX_AGE_FILTER_H */ diff --git a/src/core/lib/channel/max_age_filter.c b/src/core/lib/channel/max_age_filter.c deleted file mode 100644 index c25481486c..0000000000 --- a/src/core/lib/channel/max_age_filter.c +++ /dev/null @@ -1,386 +0,0 @@ -/* - * - * Copyright 2017, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/lib/channel/message_size_filter.h" - -#include -#include - -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/iomgr/timer.h" -#include "src/core/lib/transport/http2_errors.h" -#include "src/core/lib/transport/service_config.h" - -#define DEFAULT_MAX_CONNECTION_AGE_MS INT_MAX -#define DEFAULT_MAX_CONNECTION_AGE_GRACE_MS INT_MAX -#define DEFAULT_MAX_CONNECTION_IDLE_MS INT_MAX - -typedef struct channel_data { - /* We take a reference to the channel stack for the timer callback */ - grpc_channel_stack* channel_stack; - /* Guards access to max_age_timer, max_age_timer_pending, max_age_grace_timer - and max_age_grace_timer_pending */ - gpr_mu max_age_timer_mu; - /* True if the max_age timer callback is currently pending */ - bool max_age_timer_pending; - /* True if the max_age_grace timer callback is currently pending */ - bool max_age_grace_timer_pending; - /* The timer for checking if the channel has reached its max age */ - grpc_timer max_age_timer; - /* The timer for checking if the max-aged channel has uesed up the grace - period */ - grpc_timer max_age_grace_timer; - /* The timer for checking if the channel's idle duration reaches - max_connection_idle */ - grpc_timer max_idle_timer; - /* Allowed max time a channel may have no outstanding rpcs */ - gpr_timespec max_connection_idle; - /* Allowed max time a channel may exist */ - gpr_timespec max_connection_age; - /* Allowed grace period after the channel reaches its max age */ - gpr_timespec max_connection_age_grace; - /* Closure to run when the channel's idle duration reaches max_connection_idle - and should be closed gracefully */ - grpc_closure close_max_idle_channel; - /* Closure to run when the channel reaches its max age and should be closed - gracefully */ - grpc_closure close_max_age_channel; - /* Closure to run the channel uses up its max age grace time and should be - closed forcibly */ - grpc_closure force_close_max_age_channel; - /* Closure to run when the init fo channel stack is done and the max_idle - timer should be started */ - grpc_closure start_max_idle_timer_after_init; - /* Closure to run when the init fo channel stack is done and the max_age timer - should be started */ - grpc_closure start_max_age_timer_after_init; - /* Closure to run when the goaway op is finished and the max_age_timer */ - grpc_closure start_max_age_grace_timer_after_goaway_op; - /* Closure to run when the channel connectivity state changes */ - grpc_closure channel_connectivity_changed; - /* Records the current connectivity state */ - grpc_connectivity_state connectivity_state; - /* Number of active calls */ - gpr_atm call_count; -} channel_data; - -/* Increase the nubmer of active calls. Before the increasement, if there are no - calls, the max_idle_timer should be cancelled. */ -static void increase_call_count(grpc_exec_ctx* exec_ctx, channel_data* chand) { - if (gpr_atm_full_fetch_add(&chand->call_count, 1) == 0) { - grpc_timer_cancel(exec_ctx, &chand->max_idle_timer); - } -} - -/* Decrease the nubmer of active calls. After the decrement, if there are no - calls, the max_idle_timer should be started. */ -static void decrease_call_count(grpc_exec_ctx* exec_ctx, channel_data* chand) { - if (gpr_atm_full_fetch_add(&chand->call_count, -1) == 1) { - GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_idle_timer"); - grpc_timer_init( - exec_ctx, &chand->max_idle_timer, - gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), chand->max_connection_idle), - &chand->close_max_idle_channel, gpr_now(GPR_CLOCK_MONOTONIC)); - } -} - -static void start_max_idle_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { - channel_data* chand = arg; - /* Decrease call_count. If there are no active calls at this time, - max_idle_timer will start here. If the number of active calls is not 0, - max_idle_timer will start after all the active calls end. */ - decrease_call_count(exec_ctx, chand); - GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, - "max_age start_max_idle_timer_after_init"); -} - -static void start_max_age_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { - channel_data* chand = arg; - gpr_mu_lock(&chand->max_age_timer_mu); - chand->max_age_timer_pending = true; - GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_timer"); - grpc_timer_init( - exec_ctx, &chand->max_age_timer, - gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), chand->max_connection_age), - &chand->close_max_age_channel, gpr_now(GPR_CLOCK_MONOTONIC)); - gpr_mu_unlock(&chand->max_age_timer_mu); - grpc_transport_op* op = grpc_make_transport_op(NULL); - op->on_connectivity_state_change = &chand->channel_connectivity_changed, - op->connectivity_state = &chand->connectivity_state; - grpc_channel_next_op(exec_ctx, - grpc_channel_stack_element(chand->channel_stack, 0), op); - GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, - "max_age start_max_age_timer_after_init"); -} - -static void start_max_age_grace_timer_after_goaway_op(grpc_exec_ctx* exec_ctx, - void* arg, - grpc_error* error) { - channel_data* chand = arg; - gpr_mu_lock(&chand->max_age_timer_mu); - chand->max_age_grace_timer_pending = true; - GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_grace_timer"); - grpc_timer_init(exec_ctx, &chand->max_age_grace_timer, - gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), - chand->max_connection_age_grace), - &chand->force_close_max_age_channel, - gpr_now(GPR_CLOCK_MONOTONIC)); - gpr_mu_unlock(&chand->max_age_timer_mu); - GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, - "max_age start_max_age_grace_timer_after_goaway_op"); -} - -static void close_max_idle_channel(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { - channel_data* chand = arg; - gpr_atm_no_barrier_fetch_add(&chand->call_count, 1); - if (error == GRPC_ERROR_NONE) { - grpc_transport_op* op = grpc_make_transport_op(NULL); - op->goaway_error = - grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("max_idle"), - GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_NO_ERROR); - grpc_channel_element* elem = - grpc_channel_stack_element(chand->channel_stack, 0); - elem->filter->start_transport_op(exec_ctx, elem, op); - } else if (error != GRPC_ERROR_CANCELLED) { - GRPC_LOG_IF_ERROR("close_max_idle_channel", error); - } - GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, - "max_age max_idle_timer"); -} - -static void close_max_age_channel(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { - channel_data* chand = arg; - gpr_mu_lock(&chand->max_age_timer_mu); - chand->max_age_timer_pending = false; - gpr_mu_unlock(&chand->max_age_timer_mu); - if (error == GRPC_ERROR_NONE) { - GRPC_CHANNEL_STACK_REF(chand->channel_stack, - "max_age start_max_age_grace_timer_after_goaway_op"); - grpc_transport_op* op = grpc_make_transport_op( - &chand->start_max_age_grace_timer_after_goaway_op); - op->goaway_error = - grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("max_age"), - GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_NO_ERROR); - grpc_channel_element* elem = - grpc_channel_stack_element(chand->channel_stack, 0); - elem->filter->start_transport_op(exec_ctx, elem, op); - } else if (error != GRPC_ERROR_CANCELLED) { - GRPC_LOG_IF_ERROR("close_max_age_channel", error); - } - GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, - "max_age max_age_timer"); -} - -static void force_close_max_age_channel(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { - channel_data* chand = arg; - gpr_mu_lock(&chand->max_age_timer_mu); - chand->max_age_grace_timer_pending = false; - gpr_mu_unlock(&chand->max_age_timer_mu); - if (error == GRPC_ERROR_NONE) { - grpc_transport_op* op = grpc_make_transport_op(NULL); - op->disconnect_with_error = - GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel reaches max age"); - grpc_channel_element* elem = - grpc_channel_stack_element(chand->channel_stack, 0); - elem->filter->start_transport_op(exec_ctx, elem, op); - } else if (error != GRPC_ERROR_CANCELLED) { - GRPC_LOG_IF_ERROR("force_close_max_age_channel", error); - } - GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack, - "max_age max_age_grace_timer"); -} - -static void channel_connectivity_changed(grpc_exec_ctx* exec_ctx, void* arg, - grpc_error* error) { - channel_data* chand = arg; - if (chand->connectivity_state != GRPC_CHANNEL_SHUTDOWN) { - grpc_transport_op* op = grpc_make_transport_op(NULL); - op->on_connectivity_state_change = &chand->channel_connectivity_changed, - op->connectivity_state = &chand->connectivity_state; - grpc_channel_next_op( - exec_ctx, grpc_channel_stack_element(chand->channel_stack, 0), op); - } else { - gpr_mu_lock(&chand->max_age_timer_mu); - if (chand->max_age_timer_pending) { - grpc_timer_cancel(exec_ctx, &chand->max_age_timer); - chand->max_age_timer_pending = false; - } - if (chand->max_age_grace_timer_pending) { - grpc_timer_cancel(exec_ctx, &chand->max_age_grace_timer); - chand->max_age_grace_timer_pending = false; - } - gpr_mu_unlock(&chand->max_age_timer_mu); - /* If there are no active calls, this increasement will cancel - max_idle_timer, and prevent max_idle_timer from being started in the - future. */ - increase_call_count(exec_ctx, chand); - } -} - -/* Constructor for call_data. */ -static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, - grpc_call_element* elem, - const grpc_call_element_args* args) { - channel_data* chand = elem->channel_data; - increase_call_count(exec_ctx, chand); - return GRPC_ERROR_NONE; -} - -/* Destructor for call_data. */ -static void destroy_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, - const grpc_call_final_info* final_info, - grpc_closure* ignored) { - channel_data* chand = elem->channel_data; - decrease_call_count(exec_ctx, chand); -} - -/* Constructor for channel_data. */ -static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem, - grpc_channel_element_args* args) { - channel_data* chand = elem->channel_data; - gpr_mu_init(&chand->max_age_timer_mu); - chand->max_age_timer_pending = false; - chand->max_age_grace_timer_pending = false; - chand->channel_stack = args->channel_stack; - chand->max_connection_age = - DEFAULT_MAX_CONNECTION_AGE_MS == INT_MAX - ? gpr_inf_future(GPR_TIMESPAN) - : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_AGE_MS, GPR_TIMESPAN); - chand->max_connection_age_grace = - DEFAULT_MAX_CONNECTION_AGE_GRACE_MS == INT_MAX - ? gpr_inf_future(GPR_TIMESPAN) - : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_AGE_GRACE_MS, - GPR_TIMESPAN); - chand->max_connection_idle = - DEFAULT_MAX_CONNECTION_IDLE_MS == INT_MAX - ? gpr_inf_future(GPR_TIMESPAN) - : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_IDLE_MS, GPR_TIMESPAN); - for (size_t i = 0; i < args->channel_args->num_args; ++i) { - if (0 == strcmp(args->channel_args->args[i].key, - GRPC_ARG_MAX_CONNECTION_AGE_MS)) { - const int value = grpc_channel_arg_get_integer( - &args->channel_args->args[i], - (grpc_integer_options){DEFAULT_MAX_CONNECTION_AGE_MS, 1, INT_MAX}); - chand->max_connection_age = - value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) - : gpr_time_from_millis(value, GPR_TIMESPAN); - } else if (0 == strcmp(args->channel_args->args[i].key, - GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS)) { - const int value = grpc_channel_arg_get_integer( - &args->channel_args->args[i], - (grpc_integer_options){DEFAULT_MAX_CONNECTION_AGE_GRACE_MS, 0, - INT_MAX}); - chand->max_connection_age_grace = - value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) - : gpr_time_from_millis(value, GPR_TIMESPAN); - } else if (0 == strcmp(args->channel_args->args[i].key, - GRPC_ARG_MAX_CONNECTION_IDLE_MS)) { - const int value = grpc_channel_arg_get_integer( - &args->channel_args->args[i], - (grpc_integer_options){DEFAULT_MAX_CONNECTION_IDLE_MS, 1, INT_MAX}); - chand->max_connection_idle = - value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) - : gpr_time_from_millis(value, GPR_TIMESPAN); - } - } - grpc_closure_init(&chand->close_max_idle_channel, close_max_idle_channel, - chand, grpc_schedule_on_exec_ctx); - grpc_closure_init(&chand->close_max_age_channel, close_max_age_channel, chand, - grpc_schedule_on_exec_ctx); - grpc_closure_init(&chand->force_close_max_age_channel, - force_close_max_age_channel, chand, - grpc_schedule_on_exec_ctx); - grpc_closure_init(&chand->start_max_idle_timer_after_init, - start_max_idle_timer_after_init, chand, - grpc_schedule_on_exec_ctx); - grpc_closure_init(&chand->start_max_age_timer_after_init, - start_max_age_timer_after_init, chand, - grpc_schedule_on_exec_ctx); - grpc_closure_init(&chand->start_max_age_grace_timer_after_goaway_op, - start_max_age_grace_timer_after_goaway_op, chand, - grpc_schedule_on_exec_ctx); - grpc_closure_init(&chand->channel_connectivity_changed, - channel_connectivity_changed, chand, - grpc_schedule_on_exec_ctx); - - if (gpr_time_cmp(chand->max_connection_age, gpr_inf_future(GPR_TIMESPAN)) != - 0) { - /* When the channel reaches its max age, we send down an op with - goaway_error set. However, we can't send down any ops until after the - channel stack is fully initialized. If we start the timer here, we have - no guarantee that the timer won't pop before channel stack initialization - is finished. To avoid that problem, we create a closure to start the - timer, and we schedule that closure to be run after call stack - initialization is done. */ - GRPC_CHANNEL_STACK_REF(chand->channel_stack, - "max_age start_max_age_timer_after_init"); - grpc_closure_sched(exec_ctx, &chand->start_max_age_timer_after_init, - GRPC_ERROR_NONE); - } - - /* Initialize the number of calls as 1, so that the max_idle_timer will not - start until start_max_idle_timer_after_init is invoked. */ - gpr_atm_rel_store(&chand->call_count, 1); - if (gpr_time_cmp(chand->max_connection_idle, gpr_inf_future(GPR_TIMESPAN)) != - 0) { - GRPC_CHANNEL_STACK_REF(chand->channel_stack, - "max_age start_max_idle_timer_after_init"); - grpc_closure_sched(exec_ctx, &chand->start_max_idle_timer_after_init, - GRPC_ERROR_NONE); - } - return GRPC_ERROR_NONE; -} - -/* Destructor for channel_data. */ -static void destroy_channel_elem(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem) {} - -const grpc_channel_filter grpc_max_age_filter = { - grpc_call_next_op, - grpc_channel_next_op, - 0, /* sizeof_call_data */ - init_call_elem, - grpc_call_stack_ignore_set_pollset_or_pollset_set, - destroy_call_elem, - sizeof(channel_data), - init_channel_elem, - destroy_channel_elem, - grpc_call_next_get_peer, - grpc_channel_next_get_info, - "max_age"}; diff --git a/src/core/lib/channel/max_age_filter.h b/src/core/lib/channel/max_age_filter.h deleted file mode 100644 index 93e357a88e..0000000000 --- a/src/core/lib/channel/max_age_filter.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2017, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#ifndef GRPC_CORE_LIB_CHANNEL_MAX_AGE_FILTER_H -#define GRPC_CORE_LIB_CHANNEL_MAX_AGE_FILTER_H - -#include "src/core/lib/channel/channel_stack.h" - -extern const grpc_channel_filter grpc_max_age_filter; - -#endif /* GRPC_CORE_LIB_CHANNEL_MAX_AGE_FILTER_H */ diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index b46ecac18d..91bd014a0e 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -47,7 +47,6 @@ #include "src/core/lib/channel/handshaker_registry.h" #include "src/core/lib/channel/http_client_filter.h" #include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/channel/max_age_filter.h" #include "src/core/lib/channel/message_size_filter.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/http/parser.h" @@ -114,9 +113,6 @@ static void register_builtin_channel_init() { grpc_channel_init_register_stage( GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter, (void *)&grpc_server_deadline_filter); - grpc_channel_init_register_stage( - GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter, - (void *)&grpc_max_age_filter); grpc_channel_init_register_stage( GRPC_CLIENT_SUBCHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter, (void *)&grpc_message_size_filter); diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c index 596e3b7114..803a26b753 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.c +++ b/src/core/plugin_registry/grpc_plugin_registry.c @@ -53,6 +53,8 @@ extern void grpc_load_reporting_plugin_init(void); extern void grpc_load_reporting_plugin_shutdown(void); extern void census_grpc_plugin_init(void); extern void census_grpc_plugin_shutdown(void); +extern void grpc_max_age_filter_init(void); +extern void grpc_max_age_filter_shutdown(void); void grpc_register_built_in_plugins(void) { grpc_register_plugin(grpc_chttp2_plugin_init, @@ -75,4 +77,6 @@ void grpc_register_built_in_plugins(void) { grpc_load_reporting_plugin_shutdown); grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_shutdown); + grpc_register_plugin(grpc_max_age_filter_init, + grpc_max_age_filter_shutdown); } diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c index a05ebcb3af..e65fc2425d 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c @@ -53,6 +53,8 @@ extern void grpc_lb_policy_round_robin_init(void); extern void grpc_lb_policy_round_robin_shutdown(void); extern void census_grpc_plugin_init(void); extern void census_grpc_plugin_shutdown(void); +extern void grpc_max_age_filter_init(void); +extern void grpc_max_age_filter_shutdown(void); void grpc_register_built_in_plugins(void) { grpc_register_plugin(grpc_chttp2_plugin_init, @@ -75,4 +77,6 @@ void grpc_register_built_in_plugins(void) { grpc_lb_policy_round_robin_shutdown); grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_shutdown); + grpc_register_plugin(grpc_max_age_filter_init, + grpc_max_age_filter_shutdown); } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index e1c37f028f..3bcbe667e2 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -88,7 +88,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/channel/handshaker_registry.c', 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/channel/max_age_filter.c', 'src/core/lib/channel/message_size_filter.c', 'src/core/lib/compression/compression.c', 'src/core/lib/compression/message_compress.c', @@ -308,6 +307,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/census/resource.c', 'src/core/ext/census/trace_context.c', 'src/core/ext/census/tracing.c', + 'src/core/ext/filters/max_age/max_age_filter.c', 'src/core/plugin_registry/grpc_plugin_registry.c', 'src/boringssl/err_data.c', 'third_party/boringssl/crypto/aes/aes.c', diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 6d171e3299..209d5445db 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -923,8 +923,6 @@ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_client_filter.h \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/http_server_filter.h \ -src/core/lib/channel/max_age_filter.c \ -src/core/lib/channel/max_age_filter.h \ src/core/lib/channel/message_size_filter.c \ src/core/lib/channel/message_size_filter.h \ src/core/lib/compression/algorithm_metadata.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b47c48cebc..6903a0e5d5 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -895,6 +895,7 @@ src/core/ext/census/trace_status.h \ src/core/ext/census/trace_string.h \ src/core/ext/census/tracing.c \ src/core/ext/census/tracing.h \ +src/core/ext/filters/client_channel/README.md \ src/core/ext/filters/client_channel/channel_connectivity.c \ src/core/ext/filters/client_channel/client_channel.c \ src/core/ext/filters/client_channel/client_channel.h \ @@ -909,6 +910,16 @@ src/core/ext/filters/client_channel/http_proxy.c \ src/core/ext/filters/client_channel/http_proxy.h \ src/core/ext/filters/client_channel/lb_policy.c \ src/core/ext/filters/client_channel/lb_policy.h \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h \ +src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h \ +src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ +src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ +src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c \ +src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c \ src/core/ext/filters/client_channel/lb_policy_factory.c \ src/core/ext/filters/client_channel/lb_policy_factory.h \ src/core/ext/filters/client_channel/lb_policy_registry.c \ @@ -921,6 +932,16 @@ src/core/ext/filters/client_channel/proxy_mapper_registry.c \ src/core/ext/filters/client_channel/proxy_mapper_registry.h \ src/core/ext/filters/client_channel/resolver.c \ src/core/ext/filters/client_channel/resolver.h \ +src/core/ext/filters/client_channel/resolver/README.md \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c \ +src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h \ +src/core/ext/filters/client_channel/resolver/dns/native/README.md \ +src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c \ +src/core/ext/filters/client_channel/resolver/sockaddr/README.md \ +src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/filters/client_channel/resolver_factory.c \ src/core/ext/filters/client_channel/resolver_factory.h \ src/core/ext/filters/client_channel/resolver_registry.c \ @@ -933,31 +954,12 @@ src/core/ext/filters/client_channel/subchannel_index.c \ src/core/ext/filters/client_channel/subchannel_index.h \ src/core/ext/filters/client_channel/uri_parser.c \ src/core/ext/filters/client_channel/uri_parser.h \ -src/core/ext/filters/client_channel/README.md \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c \ -src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c \ -src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ -src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ -src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c \ -src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c \ -src/core/ext/filters/client_channel/resolver/README.md \ -src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c \ -src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h \ -src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ -src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c \ -src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h \ -src/core/ext/filters/client_channel/resolver/dns/native/README.md \ -src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c \ -src/core/ext/filters/client_channel/resolver/sockaddr/README.md \ -src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/filters/load_reporting/load_reporting.c \ src/core/ext/filters/load_reporting/load_reporting.h \ src/core/ext/filters/load_reporting/load_reporting_filter.c \ src/core/ext/filters/load_reporting/load_reporting_filter.h \ +src/core/ext/filters/max_age/max_age_filter.c \ +src/core/ext/filters/max_age/max_age_filter.h \ src/core/ext/transport/README.md \ src/core/ext/transport/chttp2/README.md \ src/core/ext/transport/chttp2/alpn/alpn.c \ @@ -1040,8 +1042,6 @@ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_client_filter.h \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/http_server_filter.h \ -src/core/lib/channel/max_age_filter.c \ -src/core/lib/channel/max_age_filter.h \ src/core/lib/channel/message_size_filter.c \ src/core/lib/channel/message_size_filter.h \ src/core/lib/compression/algorithm_metadata.h \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 063957389b..5d2c3840cd 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -5576,6 +5576,7 @@ "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", "grpc_load_reporting", + "grpc_max_age_filter", "grpc_resolver_dns_ares", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", @@ -5678,6 +5679,7 @@ "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", "grpc_load_reporting", + "grpc_max_age_filter", "grpc_resolver_dns_ares", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", @@ -7514,7 +7516,6 @@ "src/core/lib/channel/handshaker_registry.h", "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/max_age_filter.h", "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", "src/core/lib/compression/message_compress.h", @@ -7651,8 +7652,6 @@ "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/max_age_filter.c", - "src/core/lib/channel/max_age_filter.h", "src/core/lib/channel/message_size_filter.c", "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", @@ -8081,6 +8080,24 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "gpr", + "grpc_base" + ], + "headers": [ + "src/core/ext/filters/max_age/max_age_filter.h" + ], + "is_filegroup": true, + "language": "c", + "name": "grpc_max_age_filter", + "src": [ + "src/core/ext/filters/max_age/max_age_filter.c", + "src/core/ext/filters/max_age/max_age_filter.h" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "gpr", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index a2b3e564da..caa22a019d 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -389,7 +389,6 @@ - @@ -598,8 +597,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 57d4db24a1..6fc1c96930 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -157,9 +157,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -902,9 +899,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index f0774aa8a7..674818182e 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -383,7 +383,6 @@ - @@ -582,8 +581,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 2dd3d8974f..2b9a5b13c1 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -142,9 +142,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -869,9 +866,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 13fd4c2e7c..948af2f29e 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -312,7 +312,6 @@ - @@ -455,24 +454,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -502,6 +501,7 @@ + @@ -528,8 +528,6 @@ - - @@ -858,45 +856,45 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -968,6 +966,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 5a65ca08fc..d43b0e3f83 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -37,9 +37,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -532,65 +529,65 @@ src\core\ext\transport\chttp2\client\secure - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel src\core\ext\transport\chttp2\client @@ -697,6 +694,9 @@ src\core\ext\census + + src\core\ext\filters\max_age + src\core\plugin_registry @@ -833,9 +833,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -1262,59 +1259,59 @@ src\core\ext\transport\chttp2\server - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel src\core\ext\transport\chttp2\client @@ -1403,6 +1400,9 @@ src\core\ext\census + + src\core\ext\filters\max_age + @@ -1433,9 +1433,6 @@ {4a14dd37-5868-c656-7333-fa80574cbb07} - - {36eee53a-cd19-738a-c387-20c44a2bfd07} - {a7cd279d-e0ec-32d3-4cbe-778aba4a0000} @@ -1484,6 +1481,9 @@ {12559ba7-9445-92ae-0c5a-2d79570d4c9b} + + {5369e83c-4625-fc14-cc40-9db5da3a7af4} + {e3abfd0a-064e-0f2f-c8e8-7c5a7e98142a} diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index bc018dc801..c675cda122 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -207,7 +207,6 @@ - @@ -370,8 +369,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 6a02b15a3a..c6bd2d6c9f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -94,9 +94,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -614,9 +611,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 0fd24d68ba..8799359bb7 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -302,7 +302,6 @@ - @@ -422,24 +421,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -468,6 +467,7 @@ + @@ -496,8 +496,6 @@ - - @@ -778,45 +776,45 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -878,6 +876,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a26b4c97ae..cf2def4ff6 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -40,9 +40,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -463,65 +460,65 @@ src\core\ext\transport\chttp2\client - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel src\core\ext\filters\client_channel\resolver\dns\c_ares @@ -613,6 +610,9 @@ src\core\ext\census + + src\core\ext\filters\max_age + src\core\plugin_registry @@ -746,9 +746,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -1106,59 +1103,59 @@ src\core\ext\transport\chttp2\client - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel - - src\core\ext\client_channel + + src\core\ext\filters\client_channel src\core\ext\filters\client_channel\resolver\dns\c_ares @@ -1244,6 +1241,9 @@ src\core\ext\census + + src\core\ext\filters\max_age + @@ -1274,9 +1274,6 @@ {dfe53168-57b0-3ac4-d8ba-07fd958cc8f5} - - {2edd1aad-34cf-0c66-e03e-b1b2dd81d9a8} - {5e37012e-a374-e285-bbda-b0dbe6327663} @@ -1325,6 +1322,9 @@ {0aef07b4-39d2-f862-15ac-65b4bf00dabb} + + {d3bc80c1-5f2d-e842-42ac-43d8a6ada8de} + {967c89fe-c97c-27e2-aac0-9ba5854cb5fa} -- cgit v1.2.3 From fb33d27a854211dd5507752210b654d772313526 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 2 Apr 2017 10:08:55 -0700 Subject: Merge --- CMakeLists.txt | 2 -- Makefile | 2 -- tools/doxygen/Doxyfile.c++.internal | 2 -- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 3 --- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 ------ vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj | 3 --- vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters | 6 ------ 7 files changed, 24 deletions(-) (limited to 'tools/doxygen') diff --git a/CMakeLists.txt b/CMakeLists.txt index ee9d449a2a..332f8a541c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2224,7 +2224,6 @@ add_library(grpc++ src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c @@ -3253,7 +3252,6 @@ add_library(grpc++_unsecure src/core/lib/channel/handshaker_registry.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/max_age_filter.c src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c diff --git a/Makefile b/Makefile index 6acdb3eb85..8bad909fe9 100644 --- a/Makefile +++ b/Makefile @@ -4072,7 +4072,6 @@ LIBGRPC++_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ @@ -5101,7 +5100,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/core/lib/channel/handshaker_registry.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/max_age_filter.c \ src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 6d171e3299..209d5445db 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -923,8 +923,6 @@ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_client_filter.h \ src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/http_server_filter.h \ -src/core/lib/channel/max_age_filter.c \ -src/core/lib/channel/max_age_filter.h \ src/core/lib/channel/message_size_filter.c \ src/core/lib/channel/message_size_filter.h \ src/core/lib/compression/algorithm_metadata.h \ diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index a2b3e564da..caa22a019d 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -389,7 +389,6 @@ - @@ -598,8 +597,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 57d4db24a1..6fc1c96930 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -157,9 +157,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -902,9 +899,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index f0774aa8a7..674818182e 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -383,7 +383,6 @@ - @@ -582,8 +581,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 2dd3d8974f..2b9a5b13c1 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -142,9 +142,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel @@ -869,9 +866,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\channel -- cgit v1.2.3