[chttp2] Split ping policy from transport (#33703)

Why: Cleanup for chttp2_transport ahead of promise conversion - lots of
logic has become interleaved throughout chttp2, so some effort to
isolate logic out is warranted ahead of that conversion.

What: Split configuration and policy tracking for each of ping rate
throttling and abuse detection into their own modules. Add tests for
them.

Incidentally: Split channel args into their own header so that we can
split the policy stuff into separate build targets.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
pull/33882/head
Craig Tiller 1 year ago committed by GitHub
parent 417c8e3499
commit 3717ff04ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 27
      BUILD
  2. 107
      CMakeLists.txt
  3. 6
      Makefile
  4. 5
      Package.swift
  5. 81
      build_autogenerated.yaml
  6. 2
      config.m4
  7. 2
      config.w32
  8. 4
      gRPC-C++.podspec
  9. 7
      gRPC-Core.podspec
  10. 5
      grpc.gemspec
  11. 4
      grpc.gyp
  12. 371
      include/grpc/impl/channel_arg_names.h
  13. 354
      include/grpc/impl/grpc_types.h
  14. 1
      include/grpc/module.modulemap
  15. 5
      package.xml
  16. 70
      src/core/BUILD
  17. 2
      src/core/ext/filters/backend_metrics/backend_metric_filter.cc
  18. 2
      src/core/ext/filters/channel_idle/channel_idle_filter.cc
  19. 1
      src/core/ext/filters/client_channel/client_channel.cc
  20. 2
      src/core/ext/filters/client_channel/http_proxy.cc
  21. 1
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
  22. 2
      src/core/ext/filters/client_channel/lb_policy/health_check_client.cc
  23. 2
      src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
  24. 2
      src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
  25. 3
      src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
  26. 1
      src/core/ext/filters/client_channel/lb_policy/rls/rls.cc
  27. 2
      src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
  28. 2
      src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
  29. 2
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
  30. 2
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
  31. 2
      src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc
  32. 2
      src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
  33. 2
      src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
  34. 1
      src/core/ext/filters/client_channel/retry_filter.h
  35. 2
      src/core/ext/filters/client_channel/retry_service_config.cc
  36. 2
      src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc
  37. 2
      src/core/ext/filters/client_channel/subchannel.cc
  38. 2
      src/core/ext/filters/deadline/deadline_filter.cc
  39. 1
      src/core/ext/filters/http/client/http_client_filter.cc
  40. 2
      src/core/ext/filters/http/client_authority_filter.cc
  41. 1
      src/core/ext/filters/http/message_compress/compression_filter.cc
  42. 2
      src/core/ext/filters/http/server/http_server_filter.cc
  43. 2
      src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
  44. 2
      src/core/ext/filters/logging/logging_filter.cc
  45. 1
      src/core/ext/filters/message_size/message_size_filter.cc
  46. 1
      src/core/ext/transport/chttp2/client/chttp2_connector.cc
  47. 1
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  48. 86
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  49. 23
      src/core/ext/transport/chttp2/transport/frame_ping.cc
  50. 28
      src/core/ext/transport/chttp2/transport/internal.h
  51. 6
      src/core/ext/transport/chttp2/transport/parsing.cc
  52. 80
      src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc
  53. 55
      src/core/ext/transport/chttp2/transport/ping_abuse_policy.h
  54. 98
      src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
  55. 73
      src/core/ext/transport/chttp2/transport/ping_rate_policy.h
  56. 171
      src/core/ext/transport/chttp2/transport/writing.cc
  57. 1
      src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
  58. 1
      src/core/ext/transport/cronet/transport/cronet_transport.cc
  59. 1
      src/core/ext/transport/inproc/inproc_transport.cc
  60. 1
      src/core/ext/xds/xds_client_grpc.cc
  61. 1
      src/core/ext/xds/xds_transport_grpc.cc
  62. 1
      src/core/lib/channel/channel_args.cc
  63. 1
      src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
  64. 1
      src/core/lib/http/httpcli_security_connector.cc
  65. 1
      src/core/lib/resource_quota/api.cc
  66. 1
      src/core/lib/resource_quota/resource_quota.h
  67. 2
      src/core/lib/security/authorization/authorization_policy_provider.h
  68. 1
      src/core/lib/security/credentials/google_default/google_default_credentials.cc
  69. 1
      src/core/lib/security/credentials/ssl/ssl_credentials.cc
  70. 1
      src/core/lib/security/credentials/tls/tls_credentials.cc
  71. 1
      src/core/lib/security/credentials/xds/xds_credentials.cc
  72. 1
      src/core/lib/security/security_connector/alts/alts_security_connector.cc
  73. 1
      src/core/lib/security/security_connector/fake/fake_security_connector.cc
  74. 1
      src/core/lib/security/security_connector/ssl_utils.cc
  75. 1
      src/core/lib/security/transport/security_handshaker.cc
  76. 1
      src/core/lib/surface/channel.cc
  77. 1
      src/core/lib/surface/init.cc
  78. 1
      src/core/lib/surface/server.cc
  79. 1
      src/cpp/common/channel_arguments.cc
  80. 1
      src/cpp/common/secure_channel_arguments.cc
  81. 1
      src/cpp/ext/gcp/BUILD
  82. 1
      src/cpp/ext/gcp/observability_logging_sink.cc
  83. 2
      src/cpp/server/load_reporter/load_reporting_service_server_builder_option.cc
  84. 1
      src/cpp/server/server_builder.cc
  85. 1
      src/cpp/server/server_cc.cc
  86. 2
      src/python/grpcio/grpc_core_dependencies.py
  87. 1
      test/core/bad_connection/close_fd_test.cc
  88. 1
      test/core/bad_ssl/bad_ssl_test.cc
  89. 1
      test/core/channel/channel_args_test.cc
  90. 1
      test/core/channel/channel_trace_test.cc
  91. 1
      test/core/channel/channelz_test.cc
  92. 1
      test/core/channel/minimal_stack_is_minimal_test.cc
  93. 2
      test/core/client_channel/client_channel_test.cc
  94. 2
      test/core/client_channel/http_proxy_mapper_test.cc
  95. 1
      test/core/client_channel/lb_policy/outlier_detection_test.cc
  96. 1
      test/core/client_channel/lb_policy/pick_first_test.cc
  97. 1
      test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
  98. 1
      test/core/client_channel/retry_service_config_test.cc
  99. 8
      test/core/end2end/BUILD
  100. 1
      test/core/end2end/connection_refused_test.cc
  101. Some files were not shown because too many files have changed in this diff Show More

27
BUILD

@ -552,6 +552,7 @@ grpc_cc_library(
], ],
visibility = ["@grpc:public"], visibility = ["@grpc:public"],
deps = [ deps = [
"channel_arg_names",
"channel_stack_builder", "channel_stack_builder",
"config", "config",
"exec_ctx", "exec_ctx",
@ -624,6 +625,7 @@ grpc_cc_library(
"@grpc:public", "@grpc:public",
], ],
deps = [ deps = [
"channel_arg_names",
"channel_stack_builder", "channel_stack_builder",
"config", "config",
"exec_ctx", "exec_ctx",
@ -837,7 +839,10 @@ grpc_cc_library(
"avoid_dep", "avoid_dep",
"nofixdeps", "nofixdeps",
], ],
deps = ["gpr_public_hdrs"], deps = [
"channel_arg_names",
"gpr_public_hdrs",
],
) )
grpc_cc_library( grpc_cc_library(
@ -860,6 +865,11 @@ grpc_cc_library(
], ],
) )
grpc_cc_library(
name = "channel_arg_names",
hdrs = ["include/grpc/impl/channel_arg_names.h"],
)
grpc_cc_library( grpc_cc_library(
name = "grpc++", name = "grpc++",
hdrs = [ hdrs = [
@ -1258,6 +1268,7 @@ grpc_cc_library(
"nofixdeps", "nofixdeps",
], ],
deps = [ deps = [
"channel_arg_names",
"gpr", "gpr",
], ],
) )
@ -1496,6 +1507,7 @@ grpc_cc_library(
public_hdrs = GRPC_PUBLIC_HDRS + GRPC_PUBLIC_EVENT_ENGINE_HDRS, public_hdrs = GRPC_PUBLIC_HDRS + GRPC_PUBLIC_EVENT_ENGINE_HDRS,
visibility = ["@grpc:alt_grpc_base_legacy"], visibility = ["@grpc:alt_grpc_base_legacy"],
deps = [ deps = [
"channel_arg_names",
"channel_stack_builder", "channel_stack_builder",
"config", "config",
"config_vars", "config_vars",
@ -1659,6 +1671,7 @@ grpc_cc_library(
], ],
tags = ["nofixdeps"], tags = ["nofixdeps"],
deps = [ deps = [
"channel_arg_names",
"gpr", "gpr",
"gpr_platform", "gpr_platform",
"grpc", "grpc",
@ -1772,6 +1785,7 @@ grpc_cc_library(
public_hdrs = GRPC_PUBLIC_HDRS, public_hdrs = GRPC_PUBLIC_HDRS,
visibility = ["@grpc:public"], visibility = ["@grpc:public"],
deps = [ deps = [
"channel_arg_names",
"config", "config",
"debug_location", "debug_location",
"exec_ctx", "exec_ctx",
@ -1922,6 +1936,7 @@ grpc_cc_library(
tags = ["nofixdeps"], tags = ["nofixdeps"],
visibility = ["@grpc:alt_grpc++_base_legacy"], visibility = ["@grpc:alt_grpc++_base_legacy"],
deps = [ deps = [
"channel_arg_names",
"channel_stack_builder", "channel_stack_builder",
"config", "config",
"exec_ctx", "exec_ctx",
@ -1997,6 +2012,7 @@ grpc_cc_library(
], ],
visibility = ["@grpc:alt_grpc++_base_unsecure_legacy"], visibility = ["@grpc:alt_grpc++_base_unsecure_legacy"],
deps = [ deps = [
"channel_arg_names",
"channel_stack_builder", "channel_stack_builder",
"config", "config",
"exec_ctx", "exec_ctx",
@ -3008,6 +3024,7 @@ grpc_cc_library(
visibility = ["@grpc:client_channel"], visibility = ["@grpc:client_channel"],
deps = [ deps = [
"backoff", "backoff",
"channel_arg_names",
"channel_stack_builder", "channel_stack_builder",
"config", "config",
"config_vars", "config_vars",
@ -3110,6 +3127,7 @@ grpc_cc_library(
language = "c++", language = "c++",
deps = [ deps = [
"backoff", "backoff",
"channel_arg_names",
"config", "config",
"config_vars", "config_vars",
"debug_location", "debug_location",
@ -3217,6 +3235,7 @@ grpc_cc_library(
visibility = ["@grpc:public"], visibility = ["@grpc:public"],
deps = [ deps = [
"alts_util", "alts_util",
"channel_arg_names",
"debug_location", "debug_location",
"exec_ctx", "exec_ctx",
"gpr", "gpr",
@ -3479,6 +3498,7 @@ grpc_cc_library(
language = "c++", language = "c++",
visibility = ["@grpc:public"], visibility = ["@grpc:public"],
deps = [ deps = [
"channel_arg_names",
"config_vars", "config_vars",
"gpr", "gpr",
"grpc_base", "grpc_base",
@ -3523,6 +3543,7 @@ grpc_cc_library(
language = "c++", language = "c++",
visibility = ["@grpc:http"], visibility = ["@grpc:http"],
deps = [ deps = [
"channel_arg_names",
"channel_stack_builder", "channel_stack_builder",
"config", "config",
"gpr", "gpr",
@ -3912,6 +3933,7 @@ grpc_cc_library(
language = "c++", language = "c++",
visibility = ["@grpc:grpclb"], visibility = ["@grpc:grpclb"],
deps = [ deps = [
"channel_arg_names",
"chttp2_context_list_entry", "chttp2_context_list_entry",
"chttp2_frame", "chttp2_frame",
"chttp2_varint", "chttp2_varint",
@ -3943,7 +3965,10 @@ grpc_cc_library(
"//src/core:init_internally", "//src/core:init_internally",
"//src/core:iomgr_fwd", "//src/core:iomgr_fwd",
"//src/core:iomgr_port", "//src/core:iomgr_port",
"//src/core:match",
"//src/core:memory_quota", "//src/core:memory_quota",
"//src/core:ping_abuse_policy",
"//src/core:ping_rate_policy",
"//src/core:poll", "//src/core:poll",
"//src/core:ref_counted", "//src/core:ref_counted",
"//src/core:resource_quota", "//src/core:resource_quota",

107
CMakeLists.txt generated

@ -1136,8 +1136,10 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx periodic_update_test) add_dependencies(buildtests_cxx periodic_update_test)
add_dependencies(buildtests_cxx pick_first_test) add_dependencies(buildtests_cxx pick_first_test)
add_dependencies(buildtests_cxx pid_controller_test) add_dependencies(buildtests_cxx pid_controller_test)
add_dependencies(buildtests_cxx ping_abuse_policy_test)
add_dependencies(buildtests_cxx ping_configuration_test) add_dependencies(buildtests_cxx ping_configuration_test)
add_dependencies(buildtests_cxx ping_pong_streaming_test) add_dependencies(buildtests_cxx ping_pong_streaming_test)
add_dependencies(buildtests_cxx ping_rate_policy_test)
add_dependencies(buildtests_cxx ping_test) add_dependencies(buildtests_cxx ping_test)
add_dependencies(buildtests_cxx pipe_test) add_dependencies(buildtests_cxx pipe_test)
add_dependencies(buildtests_cxx poll_test) add_dependencies(buildtests_cxx poll_test)
@ -1781,6 +1783,8 @@ add_library(grpc
src/core/ext/transport/chttp2/transport/http_trace.cc src/core/ext/transport/chttp2/transport/http_trace.cc
src/core/ext/transport/chttp2/transport/huffsyms.cc src/core/ext/transport/chttp2/transport/huffsyms.cc
src/core/ext/transport/chttp2/transport/parsing.cc src/core/ext/transport/chttp2/transport/parsing.cc
src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc
src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
src/core/ext/transport/chttp2/transport/stream_lists.cc src/core/ext/transport/chttp2/transport/stream_lists.cc
src/core/ext/transport/chttp2/transport/varint.cc src/core/ext/transport/chttp2/transport/varint.cc
src/core/ext/transport/chttp2/transport/writing.cc src/core/ext/transport/chttp2/transport/writing.cc
@ -2529,6 +2533,7 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security.h include/grpc/grpc_security.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/impl/channel_arg_names.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
@ -2807,6 +2812,8 @@ add_library(grpc_unsecure
src/core/ext/transport/chttp2/transport/http_trace.cc src/core/ext/transport/chttp2/transport/http_trace.cc
src/core/ext/transport/chttp2/transport/huffsyms.cc src/core/ext/transport/chttp2/transport/huffsyms.cc
src/core/ext/transport/chttp2/transport/parsing.cc src/core/ext/transport/chttp2/transport/parsing.cc
src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc
src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
src/core/ext/transport/chttp2/transport/stream_lists.cc src/core/ext/transport/chttp2/transport/stream_lists.cc
src/core/ext/transport/chttp2/transport/varint.cc src/core/ext/transport/chttp2/transport/varint.cc
src/core/ext/transport/chttp2/transport/writing.cc src/core/ext/transport/chttp2/transport/writing.cc
@ -3175,6 +3182,7 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security.h include/grpc/grpc_security.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/impl/channel_arg_names.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
@ -4694,6 +4702,7 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security.h include/grpc/grpc_security.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/impl/channel_arg_names.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
@ -18224,6 +18233,55 @@ target_link_libraries(pid_controller_test
) )
endif()
if(gRPC_BUILD_TESTS)
add_executable(ping_abuse_policy_test
test/core/transport/chttp2/ping_abuse_policy_test.cc
test/core/util/cmdline.cc
test/core/util/fuzzer_util.cc
test/core/util/grpc_profiler.cc
test/core/util/histogram.cc
test/core/util/mock_endpoint.cc
test/core/util/parse_hexstring.cc
test/core/util/passthru_endpoint.cc
test/core/util/resolve_localhost_ip46.cc
test/core/util/slice_splitter.cc
test/core/util/subprocess_posix.cc
test/core/util/subprocess_windows.cc
test/core/util/tracer_util.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_compile_features(ping_abuse_policy_test PUBLIC cxx_std_14)
target_include_directories(ping_abuse_policy_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(ping_abuse_policy_test
${_gRPC_BASELIB_LIBRARIES}
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ZLIB_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif() endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)
@ -18321,6 +18379,55 @@ target_link_libraries(ping_pong_streaming_test
) )
endif()
if(gRPC_BUILD_TESTS)
add_executable(ping_rate_policy_test
test/core/transport/chttp2/ping_rate_policy_test.cc
test/core/util/cmdline.cc
test/core/util/fuzzer_util.cc
test/core/util/grpc_profiler.cc
test/core/util/histogram.cc
test/core/util/mock_endpoint.cc
test/core/util/parse_hexstring.cc
test/core/util/passthru_endpoint.cc
test/core/util/resolve_localhost_ip46.cc
test/core/util/slice_splitter.cc
test/core/util/subprocess_posix.cc
test/core/util/subprocess_windows.cc
test/core/util/tracer_util.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_compile_features(ping_rate_policy_test PUBLIC cxx_std_14)
target_include_directories(ping_rate_policy_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(ping_rate_policy_test
${_gRPC_BASELIB_LIBRARIES}
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ZLIB_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
)
endif() endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)

6
Makefile generated

@ -1065,6 +1065,8 @@ LIBGRPC_SRC = \
src/core/ext/transport/chttp2/transport/http_trace.cc \ src/core/ext/transport/chttp2/transport/http_trace.cc \
src/core/ext/transport/chttp2/transport/huffsyms.cc \ src/core/ext/transport/chttp2/transport/huffsyms.cc \
src/core/ext/transport/chttp2/transport/parsing.cc \ src/core/ext/transport/chttp2/transport/parsing.cc \
src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc \
src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \
src/core/ext/transport/chttp2/transport/stream_lists.cc \ src/core/ext/transport/chttp2/transport/stream_lists.cc \
src/core/ext/transport/chttp2/transport/varint.cc \ src/core/ext/transport/chttp2/transport/varint.cc \
src/core/ext/transport/chttp2/transport/writing.cc \ src/core/ext/transport/chttp2/transport/writing.cc \
@ -1752,6 +1754,7 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc_posix.h \ include/grpc/grpc_posix.h \
include/grpc/grpc_security.h \ include/grpc/grpc_security.h \
include/grpc/grpc_security_constants.h \ include/grpc/grpc_security_constants.h \
include/grpc/impl/channel_arg_names.h \
include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_gcc_sync.h \
@ -1944,6 +1947,8 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/transport/chttp2/transport/http_trace.cc \ src/core/ext/transport/chttp2/transport/http_trace.cc \
src/core/ext/transport/chttp2/transport/huffsyms.cc \ src/core/ext/transport/chttp2/transport/huffsyms.cc \
src/core/ext/transport/chttp2/transport/parsing.cc \ src/core/ext/transport/chttp2/transport/parsing.cc \
src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc \
src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \
src/core/ext/transport/chttp2/transport/stream_lists.cc \ src/core/ext/transport/chttp2/transport/stream_lists.cc \
src/core/ext/transport/chttp2/transport/varint.cc \ src/core/ext/transport/chttp2/transport/varint.cc \
src/core/ext/transport/chttp2/transport/writing.cc \ src/core/ext/transport/chttp2/transport/writing.cc \
@ -2252,6 +2257,7 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc_posix.h \ include/grpc/grpc_posix.h \
include/grpc/grpc_security.h \ include/grpc/grpc_security.h \
include/grpc/grpc_security_constants.h \ include/grpc/grpc_security_constants.h \
include/grpc/impl/channel_arg_names.h \
include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_gcc_sync.h \

5
Package.swift generated

@ -60,6 +60,7 @@ let package = Package(
"include/grpc/grpc_posix.h", "include/grpc/grpc_posix.h",
"include/grpc/grpc_security.h", "include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/impl/channel_arg_names.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
@ -309,6 +310,10 @@ let package = Package(
"src/core/ext/transport/chttp2/transport/huffsyms.h", "src/core/ext/transport/chttp2/transport/huffsyms.h",
"src/core/ext/transport/chttp2/transport/internal.h", "src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/parsing.cc", "src/core/ext/transport/chttp2/transport/parsing.cc",
"src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc",
"src/core/ext/transport/chttp2/transport/ping_abuse_policy.h",
"src/core/ext/transport/chttp2/transport/ping_rate_policy.cc",
"src/core/ext/transport/chttp2/transport/ping_rate_policy.h",
"src/core/ext/transport/chttp2/transport/stream_lists.cc", "src/core/ext/transport/chttp2/transport/stream_lists.cc",
"src/core/ext/transport/chttp2/transport/varint.cc", "src/core/ext/transport/chttp2/transport/varint.cc",
"src/core/ext/transport/chttp2/transport/varint.h", "src/core/ext/transport/chttp2/transport/varint.h",

@ -161,6 +161,7 @@ libs:
- include/grpc/grpc_posix.h - include/grpc/grpc_posix.h
- include/grpc/grpc_security.h - include/grpc/grpc_security.h
- include/grpc/grpc_security_constants.h - include/grpc/grpc_security_constants.h
- include/grpc/impl/channel_arg_names.h
- include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm.h
- include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_atomic.h
- include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_gcc_sync.h
@ -307,6 +308,8 @@ libs:
- src/core/ext/transport/chttp2/transport/http_trace.h - src/core/ext/transport/chttp2/transport/http_trace.h
- src/core/ext/transport/chttp2/transport/huffsyms.h - src/core/ext/transport/chttp2/transport/huffsyms.h
- src/core/ext/transport/chttp2/transport/internal.h - src/core/ext/transport/chttp2/transport/internal.h
- src/core/ext/transport/chttp2/transport/ping_abuse_policy.h
- src/core/ext/transport/chttp2/transport/ping_rate_policy.h
- src/core/ext/transport/chttp2/transport/varint.h - src/core/ext/transport/chttp2/transport/varint.h
- src/core/ext/transport/inproc/inproc_transport.h - src/core/ext/transport/inproc/inproc_transport.h
- src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h - src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h
@ -1125,6 +1128,8 @@ libs:
- src/core/ext/transport/chttp2/transport/http_trace.cc - src/core/ext/transport/chttp2/transport/http_trace.cc
- src/core/ext/transport/chttp2/transport/huffsyms.cc - src/core/ext/transport/chttp2/transport/huffsyms.cc
- src/core/ext/transport/chttp2/transport/parsing.cc - src/core/ext/transport/chttp2/transport/parsing.cc
- src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc
- src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
- src/core/ext/transport/chttp2/transport/stream_lists.cc - src/core/ext/transport/chttp2/transport/stream_lists.cc
- src/core/ext/transport/chttp2/transport/varint.cc - src/core/ext/transport/chttp2/transport/varint.cc
- src/core/ext/transport/chttp2/transport/writing.cc - src/core/ext/transport/chttp2/transport/writing.cc
@ -1891,6 +1896,7 @@ libs:
- include/grpc/grpc_posix.h - include/grpc/grpc_posix.h
- include/grpc/grpc_security.h - include/grpc/grpc_security.h
- include/grpc/grpc_security_constants.h - include/grpc/grpc_security_constants.h
- include/grpc/impl/channel_arg_names.h
- include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm.h
- include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_atomic.h
- include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_gcc_sync.h
@ -2025,6 +2031,8 @@ libs:
- src/core/ext/transport/chttp2/transport/http_trace.h - src/core/ext/transport/chttp2/transport/http_trace.h
- src/core/ext/transport/chttp2/transport/huffsyms.h - src/core/ext/transport/chttp2/transport/huffsyms.h
- src/core/ext/transport/chttp2/transport/internal.h - src/core/ext/transport/chttp2/transport/internal.h
- src/core/ext/transport/chttp2/transport/ping_abuse_policy.h
- src/core/ext/transport/chttp2/transport/ping_rate_policy.h
- src/core/ext/transport/chttp2/transport/varint.h - src/core/ext/transport/chttp2/transport/varint.h
- src/core/ext/transport/inproc/inproc_transport.h - src/core/ext/transport/inproc/inproc_transport.h
- src/core/ext/upb-generated/google/api/annotations.upb.h - src/core/ext/upb-generated/google/api/annotations.upb.h
@ -2446,6 +2454,8 @@ libs:
- src/core/ext/transport/chttp2/transport/http_trace.cc - src/core/ext/transport/chttp2/transport/http_trace.cc
- src/core/ext/transport/chttp2/transport/huffsyms.cc - src/core/ext/transport/chttp2/transport/huffsyms.cc
- src/core/ext/transport/chttp2/transport/parsing.cc - src/core/ext/transport/chttp2/transport/parsing.cc
- src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc
- src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
- src/core/ext/transport/chttp2/transport/stream_lists.cc - src/core/ext/transport/chttp2/transport/stream_lists.cc
- src/core/ext/transport/chttp2/transport/varint.cc - src/core/ext/transport/chttp2/transport/varint.cc
- src/core/ext/transport/chttp2/transport/writing.cc - src/core/ext/transport/chttp2/transport/writing.cc
@ -3497,6 +3507,7 @@ libs:
- include/grpc/grpc_posix.h - include/grpc/grpc_posix.h
- include/grpc/grpc_security.h - include/grpc/grpc_security.h
- include/grpc/grpc_security_constants.h - include/grpc/grpc_security_constants.h
- include/grpc/impl/channel_arg_names.h
- include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm.h
- include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_atomic.h
- include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_gcc_sync.h
@ -11258,6 +11269,41 @@ targets:
- test/core/util/tracer_util.cc - test/core/util/tracer_util.cc
deps: deps:
- grpc_test_util - grpc_test_util
- name: ping_abuse_policy_test
gtest: true
build: test
language: c++
headers:
- test/core/util/cmdline.h
- test/core/util/evaluate_args_test_util.h
- test/core/util/fuzzer_util.h
- test/core/util/grpc_profiler.h
- test/core/util/histogram.h
- test/core/util/mock_authorization_endpoint.h
- test/core/util/mock_endpoint.h
- test/core/util/parse_hexstring.h
- test/core/util/passthru_endpoint.h
- test/core/util/resolve_localhost_ip46.h
- test/core/util/slice_splitter.h
- test/core/util/subprocess.h
- test/core/util/tracer_util.h
src:
- test/core/transport/chttp2/ping_abuse_policy_test.cc
- test/core/util/cmdline.cc
- test/core/util/fuzzer_util.cc
- test/core/util/grpc_profiler.cc
- test/core/util/histogram.cc
- test/core/util/mock_endpoint.cc
- test/core/util/parse_hexstring.cc
- test/core/util/passthru_endpoint.cc
- test/core/util/resolve_localhost_ip46.cc
- test/core/util/slice_splitter.cc
- test/core/util/subprocess_posix.cc
- test/core/util/subprocess_windows.cc
- test/core/util/tracer_util.cc
deps:
- grpc_test_util
uses_polling: false
- name: ping_configuration_test - name: ping_configuration_test
gtest: true gtest: true
build: test build: test
@ -11328,6 +11374,41 @@ targets:
- grpc_authorization_provider - grpc_authorization_provider
- grpc_unsecure - grpc_unsecure
- grpc_test_util - grpc_test_util
- name: ping_rate_policy_test
gtest: true
build: test
language: c++
headers:
- test/core/util/cmdline.h
- test/core/util/evaluate_args_test_util.h
- test/core/util/fuzzer_util.h
- test/core/util/grpc_profiler.h
- test/core/util/histogram.h
- test/core/util/mock_authorization_endpoint.h
- test/core/util/mock_endpoint.h
- test/core/util/parse_hexstring.h
- test/core/util/passthru_endpoint.h
- test/core/util/resolve_localhost_ip46.h
- test/core/util/slice_splitter.h
- test/core/util/subprocess.h
- test/core/util/tracer_util.h
src:
- test/core/transport/chttp2/ping_rate_policy_test.cc
- test/core/util/cmdline.cc
- test/core/util/fuzzer_util.cc
- test/core/util/grpc_profiler.cc
- test/core/util/histogram.cc
- test/core/util/mock_endpoint.cc
- test/core/util/parse_hexstring.cc
- test/core/util/passthru_endpoint.cc
- test/core/util/resolve_localhost_ip46.cc
- test/core/util/slice_splitter.cc
- test/core/util/subprocess_posix.cc
- test/core/util/subprocess_windows.cc
- test/core/util/tracer_util.cc
deps:
- grpc_test_util
uses_polling: false
- name: ping_test - name: ping_test
gtest: true gtest: true
build: test build: test

2
config.m4 generated

@ -144,6 +144,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/transport/chttp2/transport/http_trace.cc \ src/core/ext/transport/chttp2/transport/http_trace.cc \
src/core/ext/transport/chttp2/transport/huffsyms.cc \ src/core/ext/transport/chttp2/transport/huffsyms.cc \
src/core/ext/transport/chttp2/transport/parsing.cc \ src/core/ext/transport/chttp2/transport/parsing.cc \
src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc \
src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \
src/core/ext/transport/chttp2/transport/stream_lists.cc \ src/core/ext/transport/chttp2/transport/stream_lists.cc \
src/core/ext/transport/chttp2/transport/varint.cc \ src/core/ext/transport/chttp2/transport/varint.cc \
src/core/ext/transport/chttp2/transport/writing.cc \ src/core/ext/transport/chttp2/transport/writing.cc \

2
config.w32 generated

@ -109,6 +109,8 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\transport\\chttp2\\transport\\http_trace.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\http_trace.cc " +
"src\\core\\ext\\transport\\chttp2\\transport\\huffsyms.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\huffsyms.cc " +
"src\\core\\ext\\transport\\chttp2\\transport\\parsing.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\parsing.cc " +
"src\\core\\ext\\transport\\chttp2\\transport\\ping_abuse_policy.cc " +
"src\\core\\ext\\transport\\chttp2\\transport\\ping_rate_policy.cc " +
"src\\core\\ext\\transport\\chttp2\\transport\\stream_lists.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\stream_lists.cc " +
"src\\core\\ext\\transport\\chttp2\\transport\\varint.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\varint.cc " +
"src\\core\\ext\\transport\\chttp2\\transport\\writing.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\writing.cc " +

4
gRPC-C++.podspec generated

@ -377,6 +377,8 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/transport/http_trace.h', 'src/core/ext/transport/chttp2/transport/http_trace.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h', 'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/internal.h', 'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.h',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.h',
'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/transport/inproc/inproc_transport.h',
'src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h', 'src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h',
@ -1426,6 +1428,8 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/transport/http_trace.h', 'src/core/ext/transport/chttp2/transport/http_trace.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h', 'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/internal.h', 'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.h',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.h',
'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/transport/inproc/inproc_transport.h',
'src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h', 'src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h',

7
gRPC-Core.podspec generated

@ -126,6 +126,7 @@ Pod::Spec.new do |s|
'include/grpc/grpc_posix.h', 'include/grpc/grpc_posix.h',
'include/grpc/grpc_security.h', 'include/grpc/grpc_security.h',
'include/grpc/grpc_security_constants.h', 'include/grpc/grpc_security_constants.h',
'include/grpc/impl/channel_arg_names.h',
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_gcc_sync.h',
@ -410,6 +411,10 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/transport/huffsyms.h', 'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/internal.h', 'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/parsing.cc', 'src/core/ext/transport/chttp2/transport/parsing.cc',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.h',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.h',
'src/core/ext/transport/chttp2/transport/stream_lists.cc', 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
'src/core/ext/transport/chttp2/transport/varint.cc', 'src/core/ext/transport/chttp2/transport/varint.cc',
'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/varint.h',
@ -2158,6 +2163,8 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/transport/http_trace.h', 'src/core/ext/transport/chttp2/transport/http_trace.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h', 'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/internal.h', 'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.h',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.h',
'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/transport/inproc/inproc_transport.h',
'src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h', 'src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h',

5
grpc.gemspec generated

@ -66,6 +66,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/grpc_posix.h ) s.files += %w( include/grpc/grpc_posix.h )
s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security.h )
s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/grpc_security_constants.h )
s.files += %w( include/grpc/impl/channel_arg_names.h )
s.files += %w( include/grpc/impl/codegen/atm.h ) s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h )
@ -315,6 +316,10 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.h ) s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.h )
s.files += %w( src/core/ext/transport/chttp2/transport/internal.h ) s.files += %w( src/core/ext/transport/chttp2/transport/internal.h )
s.files += %w( src/core/ext/transport/chttp2/transport/parsing.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/parsing.cc )
s.files += %w( src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc )
s.files += %w( src/core/ext/transport/chttp2/transport/ping_abuse_policy.h )
s.files += %w( src/core/ext/transport/chttp2/transport/ping_rate_policy.cc )
s.files += %w( src/core/ext/transport/chttp2/transport/ping_rate_policy.h )
s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.cc )
s.files += %w( src/core/ext/transport/chttp2/transport/varint.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/varint.cc )
s.files += %w( src/core/ext/transport/chttp2/transport/varint.h ) s.files += %w( src/core/ext/transport/chttp2/transport/varint.h )

4
grpc.gyp generated

@ -369,6 +369,8 @@
'src/core/ext/transport/chttp2/transport/http_trace.cc', 'src/core/ext/transport/chttp2/transport/http_trace.cc',
'src/core/ext/transport/chttp2/transport/huffsyms.cc', 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
'src/core/ext/transport/chttp2/transport/parsing.cc', 'src/core/ext/transport/chttp2/transport/parsing.cc',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc',
'src/core/ext/transport/chttp2/transport/stream_lists.cc', 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
'src/core/ext/transport/chttp2/transport/varint.cc', 'src/core/ext/transport/chttp2/transport/varint.cc',
'src/core/ext/transport/chttp2/transport/writing.cc', 'src/core/ext/transport/chttp2/transport/writing.cc',
@ -1188,6 +1190,8 @@
'src/core/ext/transport/chttp2/transport/http_trace.cc', 'src/core/ext/transport/chttp2/transport/http_trace.cc',
'src/core/ext/transport/chttp2/transport/huffsyms.cc', 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
'src/core/ext/transport/chttp2/transport/parsing.cc', 'src/core/ext/transport/chttp2/transport/parsing.cc',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc',
'src/core/ext/transport/chttp2/transport/stream_lists.cc', 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
'src/core/ext/transport/chttp2/transport/varint.cc', 'src/core/ext/transport/chttp2/transport/varint.cc',
'src/core/ext/transport/chttp2/transport/writing.cc', 'src/core/ext/transport/chttp2/transport/writing.cc',

@ -0,0 +1,371 @@
// Copyright 2023 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_IMPL_CHANNEL_ARG_NAMES_H
#define GRPC_IMPL_CHANNEL_ARG_NAMES_H
/** \defgroup grpc_arg_keys
* Channel argument keys.
* \{
*/
/** If non-zero, enable census for tracing and stats collection. */
#define GRPC_ARG_ENABLE_CENSUS "grpc.census"
/** If non-zero, enable load reporting. */
#define GRPC_ARG_ENABLE_LOAD_REPORTING "grpc.loadreporting"
/** If non-zero, call metric recording is enabled. */
#define GRPC_ARG_SERVER_CALL_METRIC_RECORDING \
"grpc.server_call_metric_recording"
/** Request that optional features default to off (regardless of what they
usually default to) - to enable tight control over what gets enabled */
#define GRPC_ARG_MINIMAL_STACK "grpc.minimal_stack"
/** Maximum number of concurrent incoming streams to allow on a http2
connection. Int valued. */
#define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams"
/** Maximum message length that the channel can receive. Int valued, bytes.
-1 means unlimited. */
#define GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH "grpc.max_receive_message_length"
/** \deprecated For backward compatibility.
* Use GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH instead. */
#define GRPC_ARG_MAX_MESSAGE_LENGTH GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH
/** Maximum message length that the channel can send. Int valued, bytes.
-1 means unlimited. */
#define GRPC_ARG_MAX_SEND_MESSAGE_LENGTH "grpc.max_send_message_length"
/** Maximum time that a channel may have no outstanding rpcs, after which the
* server will close the connection. Int valued, milliseconds. INT_MAX means
* unlimited. */
#define GRPC_ARG_MAX_CONNECTION_IDLE_MS "grpc.max_connection_idle_ms"
/** Maximum time that a channel may exist. Int valued, milliseconds.
* INT_MAX means unlimited. */
#define GRPC_ARG_MAX_CONNECTION_AGE_MS "grpc.max_connection_age_ms"
/** Grace period after the channel reaches its max age. Int valued,
milliseconds. INT_MAX means unlimited. */
#define GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS "grpc.max_connection_age_grace_ms"
/** Timeout after the last RPC finishes on the client channel at which the
* channel goes back into IDLE state. Int valued, milliseconds. INT_MAX means
* unlimited. The default value is 30 minutes and the min value is 1 second. */
#define GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS "grpc.client_idle_timeout_ms"
/** Enable/disable support for per-message compression. Defaults to 1, unless
GRPC_ARG_MINIMAL_STACK is enabled, in which case it defaults to 0. */
#define GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION "grpc.per_message_compression"
/** Experimental Arg. Enable/disable support for per-message decompression.
Defaults to 1. If disabled, decompression will not be performed and the
application will see the compressed message in the byte buffer. */
#define GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION \
"grpc.per_message_decompression"
/** Enable/disable support for deadline checking. Defaults to 1, unless
GRPC_ARG_MINIMAL_STACK is enabled, in which case it defaults to 0 */
#define GRPC_ARG_ENABLE_DEADLINE_CHECKS "grpc.enable_deadline_checking"
/** Initial stream ID for http2 transports. Int valued. */
#define GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER \
"grpc.http2.initial_sequence_number"
/** Amount to read ahead on individual streams. Defaults to 64kb, larger
values can help throughput on high-latency connections.
NOTE: at some point we'd like to auto-tune this, and this parameter
will become a no-op. Int valued, bytes. */
#define GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES "grpc.http2.lookahead_bytes"
/** How much memory to use for hpack decoding. Int valued, bytes. */
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER \
"grpc.http2.hpack_table_size.decoder"
/** How much memory to use for hpack encoding. Int valued, bytes. */
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \
"grpc.http2.hpack_table_size.encoder"
/** How big a frame are we willing to receive via HTTP2.
Min 16384, max 16777215. Larger values give lower CPU usage for large
messages, but more head of line blocking for small messages. */
#define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
/** Should BDP probing be performed? */
#define GRPC_ARG_HTTP2_BDP_PROBE "grpc.http2.bdp_probe"
/** (DEPRECATED) Does not have any effect.
Earlier, this arg configured the minimum time between successive ping frames
without receiving any data/header frame, Int valued, milliseconds. This put
unnecessary constraints on the configuration of keepalive pings,
requiring users to set this channel arg along with
GRPC_ARG_KEEPALIVE_TIME_MS. This arg also limited the activity of the other
source of pings in gRPC Core - BDP pings, but BDP pings are only sent when
there is receive-side data activity, making this arg unuseful for BDP pings
too. */
#define GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS \
"grpc.http2.min_time_between_pings_ms"
/** Minimum allowed time between a server receiving successive ping frames
without sending any data/header frame. Int valued, milliseconds
*/
#define GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS \
"grpc.http2.min_ping_interval_without_data_ms"
/** Channel arg to override the http2 :scheme header */
#define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
/** How many pings can the client send before needing to send a
data/header frame? (0 indicates that an infinite number of
pings can be sent without sending a data frame or header frame) */
#define GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA \
"grpc.http2.max_pings_without_data"
/** How many misbehaving pings the server can bear before sending goaway and
closing the transport? (0 indicates that the server can bear an infinite
number of misbehaving pings) */
#define GRPC_ARG_HTTP2_MAX_PING_STRIKES "grpc.http2.max_ping_strikes"
/** How much data are we willing to queue up per stream if
GRPC_WRITE_BUFFER_HINT is set? This is an upper bound */
#define GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE "grpc.http2.write_buffer_size"
/** Should we allow receipt of true-binary data on http2 connections?
Defaults to on (1) */
#define GRPC_ARG_HTTP2_ENABLE_TRUE_BINARY "grpc.http2.true_binary"
/** An experimental channel arg which determines whether the preferred crypto
* frame size http2 setting sent to the peer at startup. If set to 0 (false
* - default), the preferred frame size is not sent to the peer. Otherwise it
* sends a default preferred crypto frame size value of 4GB to the peer at
* the startup of each connection. */
#define GRPC_ARG_EXPERIMENTAL_HTTP2_PREFERRED_CRYPTO_FRAME_SIZE \
"grpc.experimental.http2.enable_preferred_frame_size"
/** After a duration of this time the client/server pings its peer to see if the
transport is still alive. Int valued, milliseconds. */
#define GRPC_ARG_KEEPALIVE_TIME_MS "grpc.keepalive_time_ms"
/** After waiting for a duration of this time, if the keepalive ping sender does
not receive the ping ack, it will close the transport. Int valued,
milliseconds. */
#define GRPC_ARG_KEEPALIVE_TIMEOUT_MS "grpc.keepalive_timeout_ms"
/** Is it permissible to send keepalive pings from the client without any
outstanding streams. Int valued, 0(false)/1(true). */
#define GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS \
"grpc.keepalive_permit_without_calls"
/** Default authority to pass if none specified on call construction. A string.
* */
#define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
/** Primary user agent: goes at the start of the user-agent metadata
sent on each request. A string. */
#define GRPC_ARG_PRIMARY_USER_AGENT_STRING "grpc.primary_user_agent"
/** Secondary user agent: goes at the end of the user-agent metadata
sent on each request. A string. */
#define GRPC_ARG_SECONDARY_USER_AGENT_STRING "grpc.secondary_user_agent"
/** The minimum time between subsequent connection attempts, in ms */
#define GRPC_ARG_MIN_RECONNECT_BACKOFF_MS "grpc.min_reconnect_backoff_ms"
/** The maximum time between subsequent connection attempts, in ms */
#define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"
/** The time between the first and second connection attempts, in ms */
#define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
"grpc.initial_reconnect_backoff_ms"
/** Minimum amount of time between DNS resolutions, in ms */
#define GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS \
"grpc.dns_min_time_between_resolutions_ms"
/** The timeout used on servers for finishing handshaking on an incoming
connection. Defaults to 120 seconds. */
#define GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS "grpc.server_handshake_timeout_ms"
/** This *should* be used for testing only.
The caller of the secure_channel_create functions may override the target
name used for SSL host name checking using this channel argument which is of
type \a GRPC_ARG_STRING. If this argument is not specified, the name used
for SSL host name checking will be the target parameter (assuming that the
secure channel is an SSL channel). If this parameter is specified and the
underlying is not an SSL channel, it will just be ignored. */
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
/** If non-zero, a pointer to a session cache (a pointer of type
grpc_ssl_session_cache*). (use grpc_ssl_session_cache_arg_vtable() to fetch
an appropriate pointer arg vtable) */
#define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
/** If non-zero, it will determine the maximum frame size used by TSI's frame
* protector.
*/
#define GRPC_ARG_TSI_MAX_FRAME_SIZE "grpc.tsi.max_frame_size"
/** Maximum metadata size (soft limit), in bytes. Note this limit applies to the
max sum of all metadata key-value entries in a batch of headers. Some random
sample of requests between this limit and
`GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE` will be rejected. Defaults to maximum
of 8 KB and `GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE` * 0.8 (if set).
*/
#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
/** Maximum metadata size (hard limit), in bytes. Note this limit applies to the
max sum of all metadata key-value entries in a batch of headers. All requests
exceeding this limit will be rejected. Defaults to maximum of 16 KB and
`GRPC_ARG_MAX_METADATA_SIZE` * 1.25 (if set). */
#define GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE "grpc.absolute_max_metadata_size"
/** If non-zero, allow the use of SO_REUSEPORT if it's available (default 1) */
#define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport"
/** If non-zero, a pointer to a buffer pool (a pointer of type
* grpc_resource_quota*). (use grpc_resource_quota_arg_vtable() to fetch an
* appropriate pointer arg vtable) */
#define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota"
/** If non-zero, expand wildcard addresses to a list of local addresses. */
#define GRPC_ARG_EXPAND_WILDCARD_ADDRS "grpc.expand_wildcard_addrs"
/** Service config data in JSON form.
This value will be ignored if the name resolver returns a service config. */
#define GRPC_ARG_SERVICE_CONFIG "grpc.service_config"
/** Disable looking up the service config via the name resolver. */
#define GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION \
"grpc.service_config_disable_resolution"
/** LB policy name. */
#define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name"
/** Cap for ring size in the ring_hash LB policy. The min and max ring size
values set in the LB policy config will be capped to this value.
Default is 4096. */
#define GRPC_ARG_RING_HASH_LB_RING_SIZE_CAP "grpc.lb.ring_hash.ring_size_cap"
/** The grpc_socket_mutator instance that set the socket options. A pointer. */
#define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator"
/** The grpc_socket_factory instance to create and bind sockets. A pointer. */
#define GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory"
/** The maximum amount of memory used by trace events per channel trace node.
* Once the maximum is reached, subsequent events will evict the oldest events
* from the buffer. The unit for this knob is bytes. Setting it to zero causes
* channel tracing to be disabled. */
#define GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE \
"grpc.max_channel_trace_event_memory_per_node"
/** If non-zero, gRPC library will track stats and information at at per channel
* level. Disabling channelz naturally disables channel tracing. The default
* is for channelz to be enabled. */
#define GRPC_ARG_ENABLE_CHANNELZ "grpc.enable_channelz"
/** If non-zero, Cronet transport will coalesce packets to fewer frames
* when possible. */
#define GRPC_ARG_USE_CRONET_PACKET_COALESCING \
"grpc.use_cronet_packet_coalescing"
/** Channel arg (integer) setting how large a slice to try and read from the
wire each time recvmsg (or equivalent) is called **/
#define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size"
/** Note this is not a "channel arg" key. This is the default slice size to use
* when trying to read from the wire if the GRPC_ARG_TCP_READ_CHUNK_SIZE
* channel arg is unspecified. */
#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
#define GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE \
"grpc.experimental.tcp_min_read_chunk_size"
#define GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE \
"grpc.experimental.tcp_max_read_chunk_size"
/* TCP TX Zerocopy enable state: zero is disabled, non-zero is enabled. By
default, it is disabled. */
#define GRPC_ARG_TCP_TX_ZEROCOPY_ENABLED \
"grpc.experimental.tcp_tx_zerocopy_enabled"
/* TCP TX Zerocopy send threshold: only zerocopy if >= this many bytes sent. By
default, this is set to 16KB. */
#define GRPC_ARG_TCP_TX_ZEROCOPY_SEND_BYTES_THRESHOLD \
"grpc.experimental.tcp_tx_zerocopy_send_bytes_threshold"
/* TCP TX Zerocopy max simultaneous sends: limit for maximum number of pending
calls to tcp_write() using zerocopy. A tcp_write() is considered pending
until the kernel performs the zerocopy-done callback for all sendmsg() calls
issued by the tcp_write(). By default, this is set to 4. */
#define GRPC_ARG_TCP_TX_ZEROCOPY_MAX_SIMULT_SENDS \
"grpc.experimental.tcp_tx_zerocopy_max_simultaneous_sends"
/* Overrides the TCP socket recieve buffer size, SO_RCVBUF. */
#define GRPC_ARG_TCP_RECEIVE_BUFFER_SIZE "grpc.tcp_receive_buffer_size"
/* Timeout in milliseconds to use for calls to the grpclb load balancer.
If 0 or unset, the balancer calls will have no deadline. */
#define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
/* Specifies the xDS bootstrap config as a JSON string.
FOR TESTING PURPOSES ONLY -- DO NOT USE IN PRODUCTION.
This option allows controlling the bootstrap configuration on a
per-channel basis, which is useful in tests. However, this results
in having a separate xDS client instance per channel rather than
using the global instance, which is not the intended way to use xDS.
Currently, this will (a) add unnecessary load on the xDS server and
(b) break use of CSDS, and there may be additional side effects in
the future. */
#define GRPC_ARG_TEST_ONLY_DO_NOT_USE_IN_PROD_XDS_BOOTSTRAP_CONFIG \
"grpc.TEST_ONLY_DO_NOT_USE_IN_PROD.xds_bootstrap_config"
/* Timeout in milliseconds to wait for the serverlist from the grpclb load
balancer before using fallback backend addresses from the resolver.
If 0, enter fallback mode immediately. Default value is 10000. */
#define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
/* Experimental Arg. Channel args to be used for the control-plane channel
* created to the grpclb load balancers. This is a pointer arg whose value is a
* grpc_channel_args object. If unset, most channel args from the parent channel
* will be propagated to the grpclb channel. */
#define GRPC_ARG_EXPERIMENTAL_GRPCLB_CHANNEL_ARGS \
"grpc.experimental.grpclb_channel_args"
/* Timeout in milliseconds to wait for the child of a specific priority to
complete its initial connection attempt before the priority LB policy fails
over to the next priority. Default value is 10 seconds. */
#define GRPC_ARG_PRIORITY_FAILOVER_TIMEOUT_MS \
"grpc.priority_failover_timeout_ms"
/** If non-zero, grpc server's cronet compression workaround will be enabled */
#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
"grpc.workaround.cronet_compression"
/** String defining the optimization target for a channel.
Can be: "latency" - attempt to minimize latency at the cost of throughput
"blend" - try to balance latency and throughput
"throughput" - attempt to maximize throughput at the expense of
latency
Defaults to "blend". In the current implementation "blend" is equivalent to
"latency". */
#define GRPC_ARG_OPTIMIZATION_TARGET "grpc.optimization_target"
/** Enables retry functionality. Defaults to true. When enabled,
transparent retries will be performed as appropriate, and configurable
retries are enabled when they are configured via the service config.
For details, see:
https://github.com/grpc/proposal/blob/master/A6-client-retries.md
NOTE: Hedging functionality is not yet implemented, so those
fields in the service config will currently be ignored. See
also the GRPC_ARG_EXPERIMENTAL_ENABLE_HEDGING arg below.
*/
#define GRPC_ARG_ENABLE_RETRIES "grpc.enable_retries"
/** Enables hedging functionality, as described in:
https://github.com/grpc/proposal/blob/master/A6-client-retries.md
Default is currently false, since this functionality is not yet
fully implemented.
NOTE: This channel arg is experimental and will eventually be removed.
Once hedging functionality has been implemented and proves stable,
this arg will be removed, and the hedging functionality will
be enabled via the GRPC_ARG_ENABLE_RETRIES arg above. */
#define GRPC_ARG_EXPERIMENTAL_ENABLE_HEDGING "grpc.experimental.enable_hedging"
/** Per-RPC retry buffer size, in bytes. Default is 256 KiB. */
#define GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE "grpc.per_rpc_retry_buffer_size"
/** Channel arg that carries the bridged objective c object for custom metrics
* logging filter. */
#define GRPC_ARG_MOBILE_LOG_CONTEXT "grpc.mobile_log_context"
/** If non-zero, client authority filter is disabled for the channel */
#define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER \
"grpc.disable_client_authority_filter"
/** If set to zero, disables use of http proxies. Enabled by default. */
#define GRPC_ARG_ENABLE_HTTP_PROXY "grpc.enable_http_proxy"
/** Channel arg to set http proxy per channel. If set, the channel arg
* value will be preferred over the environment variable settings. */
#define GRPC_ARG_HTTP_PROXY "grpc.http_proxy"
/** If set to non zero, surfaces the user agent string to the server. User
agent is surfaced by default. */
#define GRPC_ARG_SURFACE_USER_AGENT "grpc.surface_user_agent"
/** If set, inhibits health checking (which may be enabled via the
* service config.) */
#define GRPC_ARG_INHIBIT_HEALTH_CHECKING "grpc.inhibit_health_checking"
/** If enabled, the channel's DNS resolver queries for SRV records.
* This is useful only when using the "grpclb" load balancing policy,
* as described in the following documents:
* https://github.com/grpc/proposal/blob/master/A5-grpclb-in-dns.md
* https://github.com/grpc/proposal/blob/master/A24-lb-policy-config.md
* https://github.com/grpc/proposal/blob/master/A26-grpclb-selection.md
* Note that this works only with the "ares" DNS resolver; it isn't supported
* by the "native" DNS resolver. */
#define GRPC_ARG_DNS_ENABLE_SRV_QUERIES "grpc.dns_enable_srv_queries"
/** If set, determines an upper bound on the number of milliseconds that the
* c-ares based DNS resolver will wait on queries before cancelling them.
* The default value is 120,000. Setting this to "0" will disable the
* overall timeout entirely. Note that this doesn't include internal c-ares
* timeouts/backoff/retry logic, and so the actual DNS resolution may time out
* sooner than the value specified here. */
#define GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS "grpc.dns_ares_query_timeout"
/** If set, uses a local subchannel pool within the channel. Otherwise, uses the
* global subchannel pool. */
#define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL "grpc.use_local_subchannel_pool"
/** gRPC Objective-C channel pooling domain string. */
#define GRPC_ARG_CHANNEL_POOL_DOMAIN "grpc.channel_pooling_domain"
/** gRPC Objective-C channel pooling id. */
#define GRPC_ARG_CHANNEL_ID "grpc.channel_id"
/** Channel argument for grpc_authorization_policy_provider. If present, enables
gRPC authorization check. */
#define GRPC_ARG_AUTHORIZATION_POLICY_PROVIDER \
"grpc.authorization_policy_provider"
/** EXPERIMENTAL. Updates to a server's configuration from a config fetcher (for
* example, listener updates from xDS) cause all older connections to be
* gracefully shut down (i.e., "drained") with a grace period configured by this
* channel arg. Int valued, milliseconds. Defaults to 10 minutes.*/
#define GRPC_ARG_SERVER_CONFIG_CHANGE_DRAIN_GRACE_TIME_MS \
"grpc.experimental.server_config_change_drain_grace_time_ms"
/** Configure the Differentiated Services Code Point used on outgoing packets.
* Integer value ranging from 0 to 63. */
#define GRPC_ARG_DSCP "grpc.dscp"
/** \} */
#endif /* GRPC_IMPL_CHANNEL_ARG_NAMES_H */

@ -25,6 +25,7 @@
#include <stddef.h> #include <stddef.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/compression_types.h> #include <grpc/impl/compression_types.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>
@ -133,359 +134,6 @@ typedef struct {
grpc_arg* args; grpc_arg* args;
} grpc_channel_args; } grpc_channel_args;
/** \defgroup grpc_arg_keys
* Channel argument keys.
* \{
*/
/** If non-zero, enable census for tracing and stats collection. */
#define GRPC_ARG_ENABLE_CENSUS "grpc.census"
/** If non-zero, enable load reporting. */
#define GRPC_ARG_ENABLE_LOAD_REPORTING "grpc.loadreporting"
/** If non-zero, call metric recording is enabled. */
#define GRPC_ARG_SERVER_CALL_METRIC_RECORDING \
"grpc.server_call_metric_recording"
/** Request that optional features default to off (regardless of what they
usually default to) - to enable tight control over what gets enabled */
#define GRPC_ARG_MINIMAL_STACK "grpc.minimal_stack"
/** Maximum number of concurrent incoming streams to allow on a http2
connection. Int valued. */
#define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams"
/** Maximum message length that the channel can receive. Int valued, bytes.
-1 means unlimited. */
#define GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH "grpc.max_receive_message_length"
/** \deprecated For backward compatibility.
* Use GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH instead. */
#define GRPC_ARG_MAX_MESSAGE_LENGTH GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH
/** Maximum message length that the channel can send. Int valued, bytes.
-1 means unlimited. */
#define GRPC_ARG_MAX_SEND_MESSAGE_LENGTH "grpc.max_send_message_length"
/** Maximum time that a channel may have no outstanding rpcs, after which the
* server will close the connection. Int valued, milliseconds. INT_MAX means
* unlimited. */
#define GRPC_ARG_MAX_CONNECTION_IDLE_MS "grpc.max_connection_idle_ms"
/** Maximum time that a channel may exist. Int valued, milliseconds.
* INT_MAX means unlimited. */
#define GRPC_ARG_MAX_CONNECTION_AGE_MS "grpc.max_connection_age_ms"
/** Grace period after the channel reaches its max age. Int valued,
milliseconds. INT_MAX means unlimited. */
#define GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS "grpc.max_connection_age_grace_ms"
/** Timeout after the last RPC finishes on the client channel at which the
* channel goes back into IDLE state. Int valued, milliseconds. INT_MAX means
* unlimited. The default value is 30 minutes and the min value is 1 second. */
#define GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS "grpc.client_idle_timeout_ms"
/** Enable/disable support for per-message compression. Defaults to 1, unless
GRPC_ARG_MINIMAL_STACK is enabled, in which case it defaults to 0. */
#define GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION "grpc.per_message_compression"
/** Experimental Arg. Enable/disable support for per-message decompression.
Defaults to 1. If disabled, decompression will not be performed and the
application will see the compressed message in the byte buffer. */
#define GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION \
"grpc.per_message_decompression"
/** Enable/disable support for deadline checking. Defaults to 1, unless
GRPC_ARG_MINIMAL_STACK is enabled, in which case it defaults to 0 */
#define GRPC_ARG_ENABLE_DEADLINE_CHECKS "grpc.enable_deadline_checking"
/** Initial stream ID for http2 transports. Int valued. */
#define GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER \
"grpc.http2.initial_sequence_number"
/** Amount to read ahead on individual streams. Defaults to 64kb, larger
values can help throughput on high-latency connections.
NOTE: at some point we'd like to auto-tune this, and this parameter
will become a no-op. Int valued, bytes. */
#define GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES "grpc.http2.lookahead_bytes"
/** How much memory to use for hpack decoding. Int valued, bytes. */
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER \
"grpc.http2.hpack_table_size.decoder"
/** How much memory to use for hpack encoding. Int valued, bytes. */
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \
"grpc.http2.hpack_table_size.encoder"
/** How big a frame are we willing to receive via HTTP2.
Min 16384, max 16777215. Larger values give lower CPU usage for large
messages, but more head of line blocking for small messages. */
#define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
/** Should BDP probing be performed? */
#define GRPC_ARG_HTTP2_BDP_PROBE "grpc.http2.bdp_probe"
/** (DEPRECATED) Does not have any effect.
Earlier, this arg configured the minimum time between successive ping frames
without receiving any data/header frame, Int valued, milliseconds. This put
unnecessary constraints on the configuration of keepalive pings,
requiring users to set this channel arg along with
GRPC_ARG_KEEPALIVE_TIME_MS. This arg also limited the activity of the other
source of pings in gRPC Core - BDP pings, but BDP pings are only sent when
there is receive-side data activity, making this arg unuseful for BDP pings
too. */
#define GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS \
"grpc.http2.min_time_between_pings_ms"
/** Minimum allowed time between a server receiving successive ping frames
without sending any data/header frame. Int valued, milliseconds
*/
#define GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS \
"grpc.http2.min_ping_interval_without_data_ms"
/** Channel arg to override the http2 :scheme header */
#define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
/** How many pings can the client send before needing to send a
data/header frame? (0 indicates that an infinite number of
pings can be sent without sending a data frame or header frame) */
#define GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA \
"grpc.http2.max_pings_without_data"
/** How many misbehaving pings the server can bear before sending goaway and
closing the transport? (0 indicates that the server can bear an infinite
number of misbehaving pings) */
#define GRPC_ARG_HTTP2_MAX_PING_STRIKES "grpc.http2.max_ping_strikes"
/** How much data are we willing to queue up per stream if
GRPC_WRITE_BUFFER_HINT is set? This is an upper bound */
#define GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE "grpc.http2.write_buffer_size"
/** Should we allow receipt of true-binary data on http2 connections?
Defaults to on (1) */
#define GRPC_ARG_HTTP2_ENABLE_TRUE_BINARY "grpc.http2.true_binary"
/** An experimental channel arg which determines whether the preferred crypto
* frame size http2 setting sent to the peer at startup. If set to 0 (false
* - default), the preferred frame size is not sent to the peer. Otherwise it
* sends a default preferred crypto frame size value of 4GB to the peer at
* the startup of each connection. */
#define GRPC_ARG_EXPERIMENTAL_HTTP2_PREFERRED_CRYPTO_FRAME_SIZE \
"grpc.experimental.http2.enable_preferred_frame_size"
/** After a duration of this time the client/server pings its peer to see if the
transport is still alive. Int valued, milliseconds. */
#define GRPC_ARG_KEEPALIVE_TIME_MS "grpc.keepalive_time_ms"
/** After waiting for a duration of this time, if the keepalive ping sender does
not receive the ping ack, it will close the transport. Int valued,
milliseconds. */
#define GRPC_ARG_KEEPALIVE_TIMEOUT_MS "grpc.keepalive_timeout_ms"
/** Is it permissible to send keepalive pings from the client without any
outstanding streams. Int valued, 0(false)/1(true). */
#define GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS \
"grpc.keepalive_permit_without_calls"
/** Default authority to pass if none specified on call construction. A string.
* */
#define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
/** Primary user agent: goes at the start of the user-agent metadata
sent on each request. A string. */
#define GRPC_ARG_PRIMARY_USER_AGENT_STRING "grpc.primary_user_agent"
/** Secondary user agent: goes at the end of the user-agent metadata
sent on each request. A string. */
#define GRPC_ARG_SECONDARY_USER_AGENT_STRING "grpc.secondary_user_agent"
/** The minimum time between subsequent connection attempts, in ms */
#define GRPC_ARG_MIN_RECONNECT_BACKOFF_MS "grpc.min_reconnect_backoff_ms"
/** The maximum time between subsequent connection attempts, in ms */
#define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"
/** The time between the first and second connection attempts, in ms */
#define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
"grpc.initial_reconnect_backoff_ms"
/** Minimum amount of time between DNS resolutions, in ms */
#define GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS \
"grpc.dns_min_time_between_resolutions_ms"
/** The timeout used on servers for finishing handshaking on an incoming
connection. Defaults to 120 seconds. */
#define GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS "grpc.server_handshake_timeout_ms"
/** This *should* be used for testing only.
The caller of the secure_channel_create functions may override the target
name used for SSL host name checking using this channel argument which is of
type \a GRPC_ARG_STRING. If this argument is not specified, the name used
for SSL host name checking will be the target parameter (assuming that the
secure channel is an SSL channel). If this parameter is specified and the
underlying is not an SSL channel, it will just be ignored. */
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
/** If non-zero, a pointer to a session cache (a pointer of type
grpc_ssl_session_cache*). (use grpc_ssl_session_cache_arg_vtable() to fetch
an appropriate pointer arg vtable) */
#define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
/** If non-zero, it will determine the maximum frame size used by TSI's frame
* protector.
*/
#define GRPC_ARG_TSI_MAX_FRAME_SIZE "grpc.tsi.max_frame_size"
/** Maximum metadata size (soft limit), in bytes. Note this limit applies to the
max sum of all metadata key-value entries in a batch of headers. Some random
sample of requests between this limit and
`GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE` will be rejected. Defaults to maximum
of 8 KB and `GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE` * 0.8 (if set).
*/
#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
/** Maximum metadata size (hard limit), in bytes. Note this limit applies to the
max sum of all metadata key-value entries in a batch of headers. All requests
exceeding this limit will be rejected. Defaults to maximum of 16 KB and
`GRPC_ARG_MAX_METADATA_SIZE` * 1.25 (if set). */
#define GRPC_ARG_ABSOLUTE_MAX_METADATA_SIZE "grpc.absolute_max_metadata_size"
/** If non-zero, allow the use of SO_REUSEPORT if it's available (default 1) */
#define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport"
/** If non-zero, a pointer to a buffer pool (a pointer of type
* grpc_resource_quota*). (use grpc_resource_quota_arg_vtable() to fetch an
* appropriate pointer arg vtable) */
#define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota"
/** If non-zero, expand wildcard addresses to a list of local addresses. */
#define GRPC_ARG_EXPAND_WILDCARD_ADDRS "grpc.expand_wildcard_addrs"
/** Service config data in JSON form.
This value will be ignored if the name resolver returns a service config. */
#define GRPC_ARG_SERVICE_CONFIG "grpc.service_config"
/** Disable looking up the service config via the name resolver. */
#define GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION \
"grpc.service_config_disable_resolution"
/** LB policy name. */
#define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name"
/** Cap for ring size in the ring_hash LB policy. The min and max ring size
values set in the LB policy config will be capped to this value.
Default is 4096. */
#define GRPC_ARG_RING_HASH_LB_RING_SIZE_CAP "grpc.lb.ring_hash.ring_size_cap"
/** The grpc_socket_mutator instance that set the socket options. A pointer. */
#define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator"
/** The grpc_socket_factory instance to create and bind sockets. A pointer. */
#define GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory"
/** The maximum amount of memory used by trace events per channel trace node.
* Once the maximum is reached, subsequent events will evict the oldest events
* from the buffer. The unit for this knob is bytes. Setting it to zero causes
* channel tracing to be disabled. */
#define GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE \
"grpc.max_channel_trace_event_memory_per_node"
/** If non-zero, gRPC library will track stats and information at at per channel
* level. Disabling channelz naturally disables channel tracing. The default
* is for channelz to be enabled. */
#define GRPC_ARG_ENABLE_CHANNELZ "grpc.enable_channelz"
/** If non-zero, Cronet transport will coalesce packets to fewer frames
* when possible. */
#define GRPC_ARG_USE_CRONET_PACKET_COALESCING \
"grpc.use_cronet_packet_coalescing"
/** Channel arg (integer) setting how large a slice to try and read from the
wire each time recvmsg (or equivalent) is called **/
#define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size"
/** Note this is not a "channel arg" key. This is the default slice size to use
* when trying to read from the wire if the GRPC_ARG_TCP_READ_CHUNK_SIZE
* channel arg is unspecified. */
#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
#define GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE \
"grpc.experimental.tcp_min_read_chunk_size"
#define GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE \
"grpc.experimental.tcp_max_read_chunk_size"
/* TCP TX Zerocopy enable state: zero is disabled, non-zero is enabled. By
default, it is disabled. */
#define GRPC_ARG_TCP_TX_ZEROCOPY_ENABLED \
"grpc.experimental.tcp_tx_zerocopy_enabled"
/* TCP TX Zerocopy send threshold: only zerocopy if >= this many bytes sent. By
default, this is set to 16KB. */
#define GRPC_ARG_TCP_TX_ZEROCOPY_SEND_BYTES_THRESHOLD \
"grpc.experimental.tcp_tx_zerocopy_send_bytes_threshold"
/* TCP TX Zerocopy max simultaneous sends: limit for maximum number of pending
calls to tcp_write() using zerocopy. A tcp_write() is considered pending
until the kernel performs the zerocopy-done callback for all sendmsg() calls
issued by the tcp_write(). By default, this is set to 4. */
#define GRPC_ARG_TCP_TX_ZEROCOPY_MAX_SIMULT_SENDS \
"grpc.experimental.tcp_tx_zerocopy_max_simultaneous_sends"
/* Overrides the TCP socket recieve buffer size, SO_RCVBUF. */
#define GRPC_ARG_TCP_RECEIVE_BUFFER_SIZE "grpc.tcp_receive_buffer_size"
/* Timeout in milliseconds to use for calls to the grpclb load balancer.
If 0 or unset, the balancer calls will have no deadline. */
#define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
/* Specifies the xDS bootstrap config as a JSON string.
FOR TESTING PURPOSES ONLY -- DO NOT USE IN PRODUCTION.
This option allows controlling the bootstrap configuration on a
per-channel basis, which is useful in tests. However, this results
in having a separate xDS client instance per channel rather than
using the global instance, which is not the intended way to use xDS.
Currently, this will (a) add unnecessary load on the xDS server and
(b) break use of CSDS, and there may be additional side effects in
the future. */
#define GRPC_ARG_TEST_ONLY_DO_NOT_USE_IN_PROD_XDS_BOOTSTRAP_CONFIG \
"grpc.TEST_ONLY_DO_NOT_USE_IN_PROD.xds_bootstrap_config"
/* Timeout in milliseconds to wait for the serverlist from the grpclb load
balancer before using fallback backend addresses from the resolver.
If 0, enter fallback mode immediately. Default value is 10000. */
#define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
/* Experimental Arg. Channel args to be used for the control-plane channel
* created to the grpclb load balancers. This is a pointer arg whose value is a
* grpc_channel_args object. If unset, most channel args from the parent channel
* will be propagated to the grpclb channel. */
#define GRPC_ARG_EXPERIMENTAL_GRPCLB_CHANNEL_ARGS \
"grpc.experimental.grpclb_channel_args"
/* Timeout in milliseconds to wait for the child of a specific priority to
complete its initial connection attempt before the priority LB policy fails
over to the next priority. Default value is 10 seconds. */
#define GRPC_ARG_PRIORITY_FAILOVER_TIMEOUT_MS \
"grpc.priority_failover_timeout_ms"
/** If non-zero, grpc server's cronet compression workaround will be enabled */
#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
"grpc.workaround.cronet_compression"
/** String defining the optimization target for a channel.
Can be: "latency" - attempt to minimize latency at the cost of throughput
"blend" - try to balance latency and throughput
"throughput" - attempt to maximize throughput at the expense of
latency
Defaults to "blend". In the current implementation "blend" is equivalent to
"latency". */
#define GRPC_ARG_OPTIMIZATION_TARGET "grpc.optimization_target"
/** Enables retry functionality. Defaults to true. When enabled,
transparent retries will be performed as appropriate, and configurable
retries are enabled when they are configured via the service config.
For details, see:
https://github.com/grpc/proposal/blob/master/A6-client-retries.md
NOTE: Hedging functionality is not yet implemented, so those
fields in the service config will currently be ignored. See
also the GRPC_ARG_EXPERIMENTAL_ENABLE_HEDGING arg below.
*/
#define GRPC_ARG_ENABLE_RETRIES "grpc.enable_retries"
/** Enables hedging functionality, as described in:
https://github.com/grpc/proposal/blob/master/A6-client-retries.md
Default is currently false, since this functionality is not yet
fully implemented.
NOTE: This channel arg is experimental and will eventually be removed.
Once hedging functionality has been implemented and proves stable,
this arg will be removed, and the hedging functionality will
be enabled via the GRPC_ARG_ENABLE_RETRIES arg above. */
#define GRPC_ARG_EXPERIMENTAL_ENABLE_HEDGING "grpc.experimental.enable_hedging"
/** Per-RPC retry buffer size, in bytes. Default is 256 KiB. */
#define GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE "grpc.per_rpc_retry_buffer_size"
/** Channel arg that carries the bridged objective c object for custom metrics
* logging filter. */
#define GRPC_ARG_MOBILE_LOG_CONTEXT "grpc.mobile_log_context"
/** If non-zero, client authority filter is disabled for the channel */
#define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER \
"grpc.disable_client_authority_filter"
/** If set to zero, disables use of http proxies. Enabled by default. */
#define GRPC_ARG_ENABLE_HTTP_PROXY "grpc.enable_http_proxy"
/** Channel arg to set http proxy per channel. If set, the channel arg
* value will be preferred over the environment variable settings. */
#define GRPC_ARG_HTTP_PROXY "grpc.http_proxy"
/** If set to non zero, surfaces the user agent string to the server. User
agent is surfaced by default. */
#define GRPC_ARG_SURFACE_USER_AGENT "grpc.surface_user_agent"
/** If set, inhibits health checking (which may be enabled via the
* service config.) */
#define GRPC_ARG_INHIBIT_HEALTH_CHECKING "grpc.inhibit_health_checking"
/** If enabled, the channel's DNS resolver queries for SRV records.
* This is useful only when using the "grpclb" load balancing policy,
* as described in the following documents:
* https://github.com/grpc/proposal/blob/master/A5-grpclb-in-dns.md
* https://github.com/grpc/proposal/blob/master/A24-lb-policy-config.md
* https://github.com/grpc/proposal/blob/master/A26-grpclb-selection.md
* Note that this works only with the "ares" DNS resolver; it isn't supported
* by the "native" DNS resolver. */
#define GRPC_ARG_DNS_ENABLE_SRV_QUERIES "grpc.dns_enable_srv_queries"
/** If set, determines an upper bound on the number of milliseconds that the
* c-ares based DNS resolver will wait on queries before cancelling them.
* The default value is 120,000. Setting this to "0" will disable the
* overall timeout entirely. Note that this doesn't include internal c-ares
* timeouts/backoff/retry logic, and so the actual DNS resolution may time out
* sooner than the value specified here. */
#define GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS "grpc.dns_ares_query_timeout"
/** If set, uses a local subchannel pool within the channel. Otherwise, uses the
* global subchannel pool. */
#define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL "grpc.use_local_subchannel_pool"
/** gRPC Objective-C channel pooling domain string. */
#define GRPC_ARG_CHANNEL_POOL_DOMAIN "grpc.channel_pooling_domain"
/** gRPC Objective-C channel pooling id. */
#define GRPC_ARG_CHANNEL_ID "grpc.channel_id"
/** Channel argument for grpc_authorization_policy_provider. If present, enables
gRPC authorization check. */
#define GRPC_ARG_AUTHORIZATION_POLICY_PROVIDER \
"grpc.authorization_policy_provider"
/** EXPERIMENTAL. Updates to a server's configuration from a config fetcher (for
* example, listener updates from xDS) cause all older connections to be
* gracefully shut down (i.e., "drained") with a grace period configured by this
* channel arg. Int valued, milliseconds. Defaults to 10 minutes.*/
#define GRPC_ARG_SERVER_CONFIG_CHANGE_DRAIN_GRACE_TIME_MS \
"grpc.experimental.server_config_change_drain_grace_time_ms"
/** Configure the Differentiated Services Code Point used on outgoing packets.
* Integer value ranging from 0 to 63. */
#define GRPC_ARG_DSCP "grpc.dscp"
/** \} */
/** Result of a grpc call. If the caller satisfies the prerequisites of a /** Result of a grpc call. If the caller satisfies the prerequisites of a
particular operation, the grpc_call_error returned will be GRPC_CALL_OK. particular operation, the grpc_call_error returned will be GRPC_CALL_OK.
Receiving any other value listed here is an indication of a bug in the Receiving any other value listed here is an indication of a bug in the

@ -12,6 +12,7 @@ header "byte_buffer.h"
header "grpc_posix.h" header "grpc_posix.h"
header "grpc_security.h" header "grpc_security.h"
header "grpc_security_constants.h" header "grpc_security_constants.h"
header "impl/channel_arg_names.h"
header "impl/codegen/atm.h" header "impl/codegen/atm.h"
header "impl/codegen/byte_buffer.h" header "impl/codegen/byte_buffer.h"
header "impl/codegen/byte_buffer_reader.h" header "impl/codegen/byte_buffer_reader.h"

5
package.xml generated

@ -48,6 +48,7 @@
<file baseinstalldir="/" name="include/grpc/grpc_posix.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security_constants.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_security_constants.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/channel_arg_names.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
@ -297,6 +298,10 @@
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/huffsyms.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/huffsyms.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/internal.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/internal.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/parsing.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/parsing.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/ping_abuse_policy.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/ping_rate_policy.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/ping_rate_policy.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_lists.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_lists.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.h" role="src" />

@ -1187,6 +1187,7 @@ grpc_cc_library(
"ref_counted", "ref_counted",
"thread_quota", "thread_quota",
"useful", "useful",
"//:channel_arg_names",
"//:cpp_impl_of", "//:cpp_impl_of",
"//:event_engine_base_hdrs", "//:event_engine_base_hdrs",
"//:gpr_platform", "//:gpr_platform",
@ -1894,6 +1895,7 @@ grpc_cc_library(
"strerror", "strerror",
"time", "time",
"useful", "useful",
"//:channel_arg_names",
"//:event_engine_base_hdrs", "//:event_engine_base_hdrs",
"//:gpr", "//:gpr",
"//:ref_counted_ptr", "//:ref_counted_ptr",
@ -2634,6 +2636,7 @@ grpc_cc_library(
"ref_counted", "ref_counted",
"time", "time",
"useful", "useful",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:event_engine_base_hdrs", "//:event_engine_base_hdrs",
"//:gpr", "//:gpr",
@ -2953,6 +2956,7 @@ grpc_cc_library(
"resolved_address", "resolved_address",
"slice", "slice",
"useful", "useful",
"//:channel_arg_names",
"//:gpr", "//:gpr",
"//:grpc_base", "//:grpc_base",
"//:grpc_credentials_util", "//:grpc_credentials_util",
@ -2993,6 +2997,7 @@ grpc_cc_library(
"slice", "slice",
"unique_type_name", "unique_type_name",
"useful", "useful",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -3127,6 +3132,7 @@ grpc_cc_library(
"iomgr_fwd", "iomgr_fwd",
"unique_type_name", "unique_type_name",
"useful", "useful",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -3178,6 +3184,7 @@ grpc_cc_library(
"unique_type_name", "unique_type_name",
"useful", "useful",
"//:alts_util", "//:alts_util",
"//:channel_arg_names",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
"//:grpc_alts_credentials", "//:grpc_alts_credentials",
@ -3247,6 +3254,7 @@ grpc_cc_library(
"status_helper", "status_helper",
"unique_type_name", "unique_type_name",
"useful", "useful",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -3412,6 +3420,7 @@ grpc_cc_library(
"error", "error",
"iomgr_fwd", "iomgr_fwd",
"unique_type_name", "unique_type_name",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -3640,6 +3649,7 @@ grpc_cc_library(
"status_helper", "status_helper",
"time", "time",
"try_seq", "try_seq",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
@ -3678,6 +3688,7 @@ grpc_cc_library(
"error", "error",
"status_helper", "status_helper",
"time", "time",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
@ -3710,6 +3721,7 @@ grpc_cc_library(
"channel_fwd", "channel_fwd",
"channel_stack_type", "channel_stack_type",
"slice", "slice",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:gpr_platform", "//:gpr_platform",
@ -3752,6 +3764,7 @@ grpc_cc_library(
"slice", "slice",
"slice_buffer", "slice_buffer",
"validation_errors", "validation_errors",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:gpr", "//:gpr",
@ -3950,6 +3963,7 @@ grpc_cc_library(
"useful", "useful",
"validation_errors", "validation_errors",
"//:backoff", "//:backoff",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
@ -4041,6 +4055,7 @@ grpc_cc_library(
"time", "time",
"validation_errors", "validation_errors",
"//:backoff", "//:backoff",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
@ -4238,6 +4253,7 @@ grpc_cc_library(
"validation_errors", "validation_errors",
"xds_type_upb", "xds_type_upb",
"xds_type_upbdefs", "xds_type_upbdefs",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
@ -4438,6 +4454,7 @@ grpc_cc_library(
"lb_policy_registry", "lb_policy_registry",
"pollset_set", "pollset_set",
"validation_errors", "validation_errors",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:gpr", "//:gpr",
@ -4623,6 +4640,7 @@ grpc_cc_library(
"slice", "slice",
"subchannel_interface", "subchannel_interface",
"unique_type_name", "unique_type_name",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -4655,6 +4673,7 @@ grpc_cc_library(
"iomgr_fwd", "iomgr_fwd",
"lb_policy", "lb_policy",
"subchannel_interface", "subchannel_interface",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:gpr", "//:gpr",
"//:grpc_base", "//:grpc_base",
@ -4694,6 +4713,7 @@ grpc_cc_library(
"lb_policy_factory", "lb_policy_factory",
"subchannel_interface", "subchannel_interface",
"validation_errors", "validation_errors",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:gpr", "//:gpr",
@ -4739,6 +4759,7 @@ grpc_cc_library(
"subchannel_interface", "subchannel_interface",
"unique_type_name", "unique_type_name",
"validation_errors", "validation_errors",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
@ -4934,6 +4955,7 @@ grpc_cc_library(
"pollset_set", "pollset_set",
"time", "time",
"validation_errors", "validation_errors",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
@ -5070,6 +5092,7 @@ grpc_cc_library(
"resolved_address", "resolved_address",
"seq", "seq",
"slice", "slice",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:gpr", "//:gpr",
@ -5109,6 +5132,7 @@ grpc_cc_library(
"grpc_backend_metric_provider", "grpc_backend_metric_provider",
"map", "map",
"slice", "slice",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:gpr", "//:gpr",
@ -5197,6 +5221,7 @@ grpc_cc_library(
"time", "time",
"validation_errors", "validation_errors",
"//:backoff", "//:backoff",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -5257,6 +5282,7 @@ grpc_cc_library(
"resolved_address", "resolved_address",
"time", "time",
"//:backoff", "//:backoff",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:gpr", "//:gpr",
@ -5369,6 +5395,7 @@ grpc_cc_library(
"ref_counted", "ref_counted",
"slice", "slice",
"time", "time",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:gpr", "//:gpr",
@ -5475,6 +5502,45 @@ grpc_cc_library(
], ],
) )
grpc_cc_library(
name = "ping_abuse_policy",
srcs = [
"ext/transport/chttp2/transport/ping_abuse_policy.cc",
],
hdrs = [
"ext/transport/chttp2/transport/ping_abuse_policy.h",
],
external_deps = ["absl/types:optional"],
deps = [
"channel_args",
"time",
"//:channel_arg_names",
"//:gpr_platform",
],
)
grpc_cc_library(
name = "ping_rate_policy",
srcs = [
"ext/transport/chttp2/transport/ping_rate_policy.cc",
],
hdrs = [
"ext/transport/chttp2/transport/ping_rate_policy.h",
],
external_deps = [
"absl/strings",
"absl/types:optional",
"absl/types:variant",
],
deps = [
"channel_args",
"match",
"time",
"//:channel_arg_names",
"//:gpr_platform",
],
)
grpc_cc_library( grpc_cc_library(
name = "huffsyms", name = "huffsyms",
srcs = [ srcs = [
@ -5558,6 +5624,7 @@ grpc_cc_library(
"time", "time",
"transport_fwd", "transport_fwd",
"unique_type_name", "unique_type_name",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
@ -5609,6 +5676,7 @@ grpc_cc_library(
"time", "time",
"transport_fwd", "transport_fwd",
"unique_type_name", "unique_type_name",
"//:channel_arg_names",
"//:chttp2_frame", "//:chttp2_frame",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
@ -5655,6 +5723,7 @@ grpc_cc_library(
"status_helper", "status_helper",
"time", "time",
"transport_fwd", "transport_fwd",
"//:channel_arg_names",
"//:config", "//:config",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
@ -5801,6 +5870,7 @@ grpc_cc_library(
"slice", "slice",
"slice_buffer", "slice_buffer",
"time", "time",
"//:channel_arg_names",
"//:channel_stack_builder", "//:channel_stack_builder",
"//:config", "//:config",
"//:gpr", "//:gpr",

@ -30,7 +30,7 @@
#include "upb/upb.hpp" #include "upb/upb.hpp"
#include "xds/data/orca/v3/orca_load_report.upb.h" #include "xds/data/orca/v3/orca_load_report.upb.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h"

@ -26,7 +26,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -41,6 +41,7 @@
#include "absl/types/variant.h" #include "absl/types/variant.h"
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>

@ -39,7 +39,7 @@
#include "absl/strings/strip.h" #include "absl/strings/strip.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -54,6 +54,7 @@
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h"
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>
// IWYU pragma: no_include <sys/socket.h> // IWYU pragma: no_include <sys/socket.h>

@ -33,7 +33,7 @@
#include "upb/base/string_view.h" #include "upb/base/string_view.h"
#include "upb/upb.hpp" #include "upb/upb.hpp"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>

@ -33,7 +33,7 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -35,7 +35,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -37,10 +37,11 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/impl/channel_arg_names.h>
#define XXH_INLINE_ALL #define XXH_INLINE_ALL
#include "xxhash.h" #include "xxhash.h"
#include <grpc/grpc.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -56,6 +56,7 @@
#include <grpc/byte_buffer_reader.h> #include <grpc/byte_buffer_reader.h>
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/impl/propagation_bits.h> #include <grpc/impl/propagation_bits.h>
#include <grpc/slice.h> #include <grpc/slice.h>

@ -30,7 +30,7 @@
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -35,7 +35,7 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -33,7 +33,7 @@
#include "absl/strings/strip.h" #include "absl/strings/strip.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -24,7 +24,7 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/status_helper.h"
#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr.h"

@ -35,7 +35,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h"

@ -30,7 +30,7 @@
#include "absl/strings/strip.h" #include "absl/strings/strip.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/filters/client_channel/resolver/polling_resolver.h" #include "src/core/ext/filters/client_channel/resolver/polling_resolver.h"

@ -44,7 +44,7 @@
#include "absl/types/variant.h" #include "absl/types/variant.h"
#include "re2/re2.h" #include "re2/re2.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice.h"

@ -28,6 +28,7 @@
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/client_channel.h"

@ -27,7 +27,7 @@
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -28,7 +28,7 @@
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -33,7 +33,7 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -26,7 +26,7 @@
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -35,6 +35,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/status.h> #include <grpc/status.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -29,7 +29,7 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/channel/channel_stack_builder.h"

@ -32,6 +32,7 @@
#include <grpc/compression.h> #include <grpc/compression.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/compression_types.h> #include <grpc/impl/compression_types.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -30,7 +30,7 @@
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -40,8 +40,8 @@
#include "opencensus/stats/stats.h" #include "opencensus/stats/stats.h"
#include "opencensus/tags/tag_key.h" #include "opencensus/tags/tag_key.h"
#include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>

@ -43,7 +43,7 @@
#include "absl/strings/strip.h" #include "absl/strings/strip.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -28,6 +28,7 @@
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -34,6 +34,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_posix.h> #include <grpc/grpc_posix.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice_buffer.h> #include <grpc/slice_buffer.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>

@ -43,6 +43,7 @@
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_posix.h> #include <grpc/grpc_posix.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice_buffer.h> #include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -44,6 +44,7 @@
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/slice_buffer.h> #include <grpc/slice_buffer.h>
#include <grpc/status.h> #include <grpc/status.h>
@ -61,6 +62,8 @@
#include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/ext/transport/chttp2/transport/http_trace.h" #include "src/core/ext/transport/chttp2/transport/http_trace.h"
#include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h"
#include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h"
#include "src/core/ext/transport/chttp2/transport/varint.h" #include "src/core/ext/transport/chttp2/transport/varint.h"
#include "src/core/lib/channel/call_tracer.h" #include "src/core/lib/channel/call_tracer.h"
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"
@ -123,11 +126,6 @@ static grpc_core::Duration g_default_server_keepalive_timeout =
static bool g_default_client_keepalive_permit_without_calls = false; static bool g_default_client_keepalive_permit_without_calls = false;
static bool g_default_server_keepalive_permit_without_calls = false; static bool g_default_server_keepalive_permit_without_calls = false;
static grpc_core::Duration g_default_min_recv_ping_interval_without_data =
grpc_core::Duration::Minutes(5);
static int g_default_max_pings_without_data = 2;
static int g_default_max_ping_strikes = 2;
#define MAX_CLIENT_STREAM_ID 0x7fffffffu #define MAX_CLIENT_STREAM_ID 0x7fffffffu
grpc_core::TraceFlag grpc_keepalive_trace(false, "http_keepalive"); grpc_core::TraceFlag grpc_keepalive_trace(false, "http_keepalive");
grpc_core::DebugOnlyTraceFlag grpc_trace_chttp2_refcount(false, grpc_core::DebugOnlyTraceFlag grpc_trace_chttp2_refcount(false,
@ -346,18 +344,6 @@ static void read_channel_args(grpc_chttp2_transport* t,
t->hpack_compressor.SetMaxUsableSize(max_hpack_table_size); t->hpack_compressor.SetMaxUsableSize(max_hpack_table_size);
} }
t->ping_policy.max_pings_without_data =
std::max(0, channel_args.GetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)
.value_or(g_default_max_pings_without_data));
t->ping_policy.max_ping_strikes =
std::max(0, channel_args.GetInt(GRPC_ARG_HTTP2_MAX_PING_STRIKES)
.value_or(g_default_max_ping_strikes));
t->ping_policy.min_recv_ping_interval_without_data =
std::max(grpc_core::Duration::Zero(),
channel_args
.GetDurationFromIntMillis(
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)
.value_or(g_default_min_recv_ping_interval_without_data));
t->write_buffer_size = t->write_buffer_size =
std::max(0, channel_args.GetInt(GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE) std::max(0, channel_args.GetInt(GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE)
.value_or(grpc_core::chttp2::kDefaultWindow)); .value_or(grpc_core::chttp2::kDefaultWindow));
@ -546,6 +532,8 @@ grpc_chttp2_transport::grpc_chttp2_transport(
GRPC_CHANNEL_READY), GRPC_CHANNEL_READY),
is_client(is_client), is_client(is_client),
next_stream_id(is_client ? 1 : 2), next_stream_id(is_client ? 1 : 2),
ping_abuse_policy(channel_args),
ping_rate_policy(channel_args, is_client),
flow_control( flow_control(
peer_string.as_string_view(), peer_string.as_string_view(),
channel_args.GetBool(GRPC_ARG_HTTP2_BDP_PROBE).value_or(true), channel_args.GetBool(GRPC_ARG_HTTP2_BDP_PROBE).value_or(true),
@ -588,13 +576,6 @@ grpc_chttp2_transport::grpc_chttp2_transport(
read_channel_args(this, channel_args, is_client); read_channel_args(this, channel_args, is_client);
// No pings allowed before receiving a header or data frame.
ping_state.pings_before_data_required = 0;
ping_state.last_ping_sent_time = grpc_core::Timestamp::InfPast();
ping_recv_state.last_ping_recv_time = grpc_core::Timestamp::InfPast();
ping_recv_state.ping_strikes = 0;
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
combiner->Run( combiner->Run(
GRPC_CLOSURE_INIT(&init_keepalive_ping_locked, GRPC_CLOSURE_INIT(&init_keepalive_ping_locked,
@ -663,10 +644,10 @@ static void close_transport_locked(grpc_chttp2_transport* t,
t->closed_with_error = error; t->closed_with_error = error;
connectivity_state_set(t, GRPC_CHANNEL_SHUTDOWN, absl::Status(), connectivity_state_set(t, GRPC_CHANNEL_SHUTDOWN, absl::Status(),
"close_transport"); "close_transport");
if (t->ping_state.delayed_ping_timer_handle.has_value()) { if (t->delayed_ping_timer_handle.has_value()) {
if (t->event_engine->Cancel(*t->ping_state.delayed_ping_timer_handle)) { if (t->event_engine->Cancel(*t->delayed_ping_timer_handle)) {
GRPC_CHTTP2_UNREF_TRANSPORT(t, "retry_initiate_ping_locked"); GRPC_CHTTP2_UNREF_TRANSPORT(t, "retry_initiate_ping_locked");
t->ping_state.delayed_ping_timer_handle.reset(); t->delayed_ping_timer_handle.reset();
} }
} }
if (t->next_bdp_ping_timer_handle.has_value()) { if (t->next_bdp_ping_timer_handle.has_value()) {
@ -1673,8 +1654,8 @@ static void retry_initiate_ping_locked(void* tp,
GRPC_UNUSED grpc_error_handle error) { GRPC_UNUSED grpc_error_handle error) {
GPR_DEBUG_ASSERT(error.ok()); GPR_DEBUG_ASSERT(error.ok());
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp); grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
GPR_ASSERT(t->ping_state.delayed_ping_timer_handle.has_value()); GPR_ASSERT(t->delayed_ping_timer_handle.has_value());
t->ping_state.delayed_ping_timer_handle.reset(); t->delayed_ping_timer_handle.reset();
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING); grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING);
GRPC_CHTTP2_UNREF_TRANSPORT(t, "retry_initiate_ping_locked"); GRPC_CHTTP2_UNREF_TRANSPORT(t, "retry_initiate_ping_locked");
} }
@ -1825,29 +1806,24 @@ static void send_goaway(grpc_chttp2_transport* t, grpc_error_handle error,
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT); grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT);
} }
void grpc_chttp2_add_ping_strike(grpc_chttp2_transport* t) { void grpc_chttp2_exceeded_ping_strikes(grpc_chttp2_transport* t) {
if (++t->ping_recv_state.ping_strikes > t->ping_policy.max_ping_strikes && send_goaway(t,
t->ping_policy.max_ping_strikes != 0) { grpc_error_set_int(GRPC_ERROR_CREATE("too_many_pings"),
send_goaway(t, grpc_core::StatusIntProperty::kHttp2Error,
grpc_error_set_int(GRPC_ERROR_CREATE("too_many_pings"), GRPC_HTTP2_ENHANCE_YOUR_CALM),
grpc_core::StatusIntProperty::kHttp2Error, /*immediate_disconnect_hint=*/true);
GRPC_HTTP2_ENHANCE_YOUR_CALM), // The transport will be closed after the write is done
/*immediate_disconnect_hint=*/true); close_transport_locked(
// The transport will be closed after the write is done t, grpc_error_set_int(GRPC_ERROR_CREATE("Too many pings"),
close_transport_locked( grpc_core::StatusIntProperty::kRpcStatus,
t, grpc_error_set_int(GRPC_ERROR_CREATE("Too many pings"), GRPC_STATUS_UNAVAILABLE));
grpc_core::StatusIntProperty::kRpcStatus,
GRPC_STATUS_UNAVAILABLE));
}
} }
void grpc_chttp2_reset_ping_clock(grpc_chttp2_transport* t) { void grpc_chttp2_reset_ping_clock(grpc_chttp2_transport* t) {
if (!t->is_client) { if (!t->is_client) {
t->ping_recv_state.last_ping_recv_time = grpc_core::Timestamp::InfPast(); t->ping_abuse_policy.ResetPingStrikes();
t->ping_recv_state.ping_strikes = 0;
} }
t->ping_state.pings_before_data_required = t->ping_rate_policy.ResetPingsBeforeDataRequired();
t->ping_policy.max_pings_without_data;
} }
static void perform_transport_op_locked(void* stream_op, static void perform_transport_op_locked(void* stream_op,
@ -2736,20 +2712,8 @@ void grpc_chttp2_config_default_keepalive_args(
keepalive_permit_without_calls; keepalive_permit_without_calls;
} }
g_default_max_ping_strikes = grpc_core::Chttp2PingAbusePolicy::SetDefaults(channel_args);
std::max(0, channel_args.GetInt(GRPC_ARG_HTTP2_MAX_PING_STRIKES) grpc_core::Chttp2PingRatePolicy::SetDefaults(channel_args);
.value_or(g_default_max_ping_strikes));
g_default_max_pings_without_data =
std::max(0, channel_args.GetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)
.value_or(g_default_max_pings_without_data));
g_default_min_recv_ping_interval_without_data =
std::max(grpc_core::Duration::Zero(),
channel_args
.GetDurationFromIntMillis(
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)
.value_or(g_default_min_recv_ping_interval_without_data));
} }
static void init_keepalive_ping(grpc_chttp2_transport* t) { static void init_keepalive_ping(grpc_chttp2_transport* t) {

@ -33,7 +33,7 @@
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/gprpp/time.h" #include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h"
grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint64_t opaque_8bytes) { grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint64_t opaque_8bytes) {
grpc_slice slice = GRPC_SLICE_MALLOC(9 + 8); grpc_slice slice = GRPC_SLICE_MALLOC(9 + 8);
@ -94,24 +94,11 @@ grpc_error_handle grpc_chttp2_ping_parser_parse(void* parser,
grpc_chttp2_ack_ping(t, p->opaque_8bytes); grpc_chttp2_ack_ping(t, p->opaque_8bytes);
} else { } else {
if (!t->is_client) { if (!t->is_client) {
grpc_core::Timestamp now = grpc_core::Timestamp::Now(); const bool transport_idle =
grpc_core::Timestamp next_allowed_ping = t->keepalive_permit_without_calls == 0 && t->stream_map.empty();
t->ping_recv_state.last_ping_recv_time + if (t->ping_abuse_policy.ReceivedOnePing(transport_idle)) {
t->ping_policy.min_recv_ping_interval_without_data; grpc_chttp2_exceeded_ping_strikes(t);
if (t->keepalive_permit_without_calls == 0 && t->stream_map.empty()) {
// According to RFC1122, the interval of TCP Keep-Alive is default to
// no less than two hours. When there is no outstanding streams, we
// restrict the number of PINGS equivalent to TCP Keep-Alive.
next_allowed_ping = t->ping_recv_state.last_ping_recv_time +
grpc_core::Duration::Hours(2);
}
if (next_allowed_ping > now) {
grpc_chttp2_add_ping_strike(t);
} }
t->ping_recv_state.last_ping_recv_time = now;
} }
if (t->ack_pings) { if (t->ack_pings) {
if (t->ping_ack_count == t->ping_ack_capacity) { if (t->ping_ack_count == t->ping_ack_capacity) {

@ -48,6 +48,8 @@
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h"
#include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h"
#include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h"
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h" #include "src/core/lib/channel/channelz.h"
#include "src/core/lib/debug/trace.h" #include "src/core/lib/debug/trace.h"
@ -146,21 +148,14 @@ struct grpc_chttp2_ping_queue {
grpc_closure_list lists[GRPC_CHTTP2_PCL_COUNT] = {}; grpc_closure_list lists[GRPC_CHTTP2_PCL_COUNT] = {};
uint64_t inflight_id = 0; uint64_t inflight_id = 0;
}; };
struct grpc_chttp2_repeated_ping_policy {
int max_pings_without_data;
int max_ping_strikes;
grpc_core::Duration min_recv_ping_interval_without_data;
};
struct grpc_chttp2_repeated_ping_state { struct grpc_chttp2_repeated_ping_state {
grpc_core::Timestamp last_ping_sent_time; grpc_core::Timestamp last_ping_sent_time;
int pings_before_data_required; int pings_before_data_required;
absl::optional<grpc_event_engine::experimental::EventEngine::TaskHandle> absl::optional<grpc_event_engine::experimental::EventEngine::TaskHandle>
delayed_ping_timer_handle; delayed_ping_timer_handle;
}; };
struct grpc_chttp2_server_ping_recv_state {
grpc_core::Timestamp last_ping_recv_time;
int ping_strikes;
};
// deframer state for the overall http2 stream of bytes // deframer state for the overall http2 stream of bytes
typedef enum { typedef enum {
// prefix: one entry per http2 connection prefix byte // prefix: one entry per http2 connection prefix byte
@ -343,8 +338,10 @@ struct grpc_chttp2_transport : public grpc_core::KeepsGrpcInitialized {
/// ping queues for various ping insertion points /// ping queues for various ping insertion points
grpc_chttp2_ping_queue ping_queue = grpc_chttp2_ping_queue(); grpc_chttp2_ping_queue ping_queue = grpc_chttp2_ping_queue();
grpc_chttp2_repeated_ping_policy ping_policy; grpc_core::Chttp2PingAbusePolicy ping_abuse_policy;
grpc_chttp2_repeated_ping_state ping_state; grpc_core::Chttp2PingRatePolicy ping_rate_policy;
absl::optional<grpc_event_engine::experimental::EventEngine::TaskHandle>
delayed_ping_timer_handle;
uint64_t ping_ctr = 0; // unique id for pings uint64_t ping_ctr = 0; // unique id for pings
grpc_closure retry_initiate_ping_locked; grpc_closure retry_initiate_ping_locked;
@ -352,7 +349,6 @@ struct grpc_chttp2_transport : public grpc_core::KeepsGrpcInitialized {
size_t ping_ack_count = 0; size_t ping_ack_count = 0;
size_t ping_ack_capacity = 0; size_t ping_ack_capacity = 0;
uint64_t* ping_acks = nullptr; uint64_t* ping_acks = nullptr;
grpc_chttp2_server_ping_recv_state ping_recv_state;
/// parser for headers /// parser for headers
grpc_core::HPackParser hpack_parser; grpc_core::HPackParser hpack_parser;
@ -772,11 +768,9 @@ inline void grpc_chttp2_ref_transport(grpc_chttp2_transport* t) {
void grpc_chttp2_ack_ping(grpc_chttp2_transport* t, uint64_t id); void grpc_chttp2_ack_ping(grpc_chttp2_transport* t, uint64_t id);
/// Add a new ping strike to ping_recv_state.ping_strikes. If /// Sends GOAWAY with error code ENHANCE_YOUR_CALM and additional debug data
/// ping_recv_state.ping_strikes > ping_policy.max_ping_strikes, it sends GOAWAY /// resembling "too_many_pings" followed by immediately closing the connection.
/// with error code ENHANCE_YOUR_CALM and additional debug data resembling void grpc_chttp2_exceeded_ping_strikes(grpc_chttp2_transport* t);
/// "too_many_pings" followed by immediately closing the connection.
void grpc_chttp2_add_ping_strike(grpc_chttp2_transport* t);
/// Resets ping clock. Should be called when flushing window updates, /// Resets ping clock. Should be called when flushing window updates,
/// initial/trailing metadata or data frames. For a server, it resets the number /// initial/trailing metadata or data frames. For a server, it resets the number

@ -47,11 +47,11 @@
#include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/ext/transport/chttp2/transport/http_trace.h" #include "src/core/ext/transport/chttp2/transport/http_trace.h"
#include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h"
#include "src/core/lib/channel/channelz.h" #include "src/core/lib/channel/channelz.h"
#include "src/core/lib/debug/trace.h" #include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/status_helper.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/endpoint.h"
@ -549,7 +549,7 @@ error_handler:
t->incoming_stream = s; t->incoming_stream = s;
t->parser = grpc_chttp2_transport::Parser{ t->parser = grpc_chttp2_transport::Parser{
"data", grpc_chttp2_data_parser_parse, nullptr}; "data", grpc_chttp2_data_parser_parse, nullptr};
t->ping_state.last_ping_sent_time = grpc_core::Timestamp::InfPast(); t->ping_rate_policy.ReceivedDataFrame();
return absl::OkStatus(); return absl::OkStatus();
} else if (s != nullptr) { } else if (s != nullptr) {
// handle stream errors by closing the stream // handle stream errors by closing the stream
@ -588,7 +588,7 @@ static grpc_error_handle init_header_frame_parser(grpc_chttp2_transport* t,
? HPackParser::Priority::Included ? HPackParser::Priority::Included
: HPackParser::Priority::None; : HPackParser::Priority::None;
t->ping_state.last_ping_sent_time = grpc_core::Timestamp::InfPast(); t->ping_rate_policy.ReceivedDataFrame();
// could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream // could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream
s = grpc_chttp2_parsing_lookup_stream(t, t->incoming_stream_id); s = grpc_chttp2_parsing_lookup_stream(t, t->incoming_stream_id);

@ -0,0 +1,80 @@
// Copyright 2023 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h"
#include <algorithm>
#include "absl/types/optional.h"
#include <grpc/impl/channel_arg_names.h>
namespace grpc_core {
namespace {
Duration g_default_min_recv_ping_interval_without_data = Duration::Minutes(5);
int g_default_max_ping_strikes = 2;
} // namespace
Chttp2PingAbusePolicy::Chttp2PingAbusePolicy(const ChannelArgs& args)
: min_recv_ping_interval_without_data_(std::max(
Duration::Zero(),
args.GetDurationFromIntMillis(
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)
.value_or(g_default_min_recv_ping_interval_without_data))),
max_ping_strikes_(
std::max(0, args.GetInt(GRPC_ARG_HTTP2_MAX_PING_STRIKES)
.value_or(g_default_max_ping_strikes))) {}
void Chttp2PingAbusePolicy::SetDefaults(const ChannelArgs& args) {
g_default_max_ping_strikes =
std::max(0, args.GetInt(GRPC_ARG_HTTP2_MAX_PING_STRIKES)
.value_or(g_default_max_ping_strikes));
g_default_min_recv_ping_interval_without_data =
std::max(Duration::Zero(),
args.GetDurationFromIntMillis(
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)
.value_or(g_default_min_recv_ping_interval_without_data));
}
bool Chttp2PingAbusePolicy::ReceivedOnePing(bool transport_idle) {
const Timestamp now = Timestamp::Now();
const Timestamp next_allowed_ping =
last_ping_recv_time_ + RecvPingIntervalWithoutData(transport_idle);
last_ping_recv_time_ = now;
if (next_allowed_ping <= now) return false;
// Received ping too soon: increment strike count.
++ping_strikes_;
return ping_strikes_ > max_ping_strikes_ && max_ping_strikes_ != 0;
}
Duration Chttp2PingAbusePolicy::RecvPingIntervalWithoutData(
bool transport_idle) const {
if (transport_idle) {
// According to RFC1122, the interval of TCP Keep-Alive is default to
// no less than two hours. When there is no outstanding streams, we
// restrict the number of PINGS equivalent to TCP Keep-Alive.
return Duration::Hours(2);
}
return min_recv_ping_interval_without_data_;
}
void Chttp2PingAbusePolicy::ResetPingStrikes() {
last_ping_recv_time_ = Timestamp::InfPast();
ping_strikes_ = 0;
}
} // namespace grpc_core

@ -0,0 +1,55 @@
// Copyright 2023 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_ABUSE_POLICY_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_ABUSE_POLICY_H
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/time.h"
namespace grpc_core {
class Chttp2PingAbusePolicy {
public:
explicit Chttp2PingAbusePolicy(const ChannelArgs& args);
static void SetDefaults(const ChannelArgs& args);
// Record one received ping; returns true if the connection should be closed.
// If transport_idle is true, we increase the allowed time between pings up to
// TCP keep-alive check time.
GRPC_MUST_USE_RESULT bool ReceivedOnePing(bool transport_idle);
// Reset the ping clock, strike count.
void ResetPingStrikes();
int TestOnlyMaxPingStrikes() const { return max_ping_strikes_; }
Duration TestOnlyMinPingIntervalWithoutData() const {
return min_recv_ping_interval_without_data_;
}
private:
Duration RecvPingIntervalWithoutData(bool transport_idle) const;
Timestamp last_ping_recv_time_ = Timestamp::InfPast();
const Duration min_recv_ping_interval_without_data_;
int ping_strikes_ = 0;
const int max_ping_strikes_;
};
} // namespace grpc_core
#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_ABUSE_POLICY_H

@ -0,0 +1,98 @@
// Copyright 2023 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h"
#include <algorithm>
#include <ostream>
#include <utility>
#include "absl/strings/str_cat.h"
#include "absl/types/optional.h"
#include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/gprpp/match.h"
namespace grpc_core {
namespace {
int g_default_max_pings_without_data = 2;
} // namespace
Chttp2PingRatePolicy::Chttp2PingRatePolicy(const ChannelArgs& args,
bool is_client)
: max_pings_without_data_(
is_client
? std::max(0, args.GetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)
.value_or(g_default_max_pings_without_data))
: 0) {}
void Chttp2PingRatePolicy::SetDefaults(const ChannelArgs& args) {
g_default_max_pings_without_data =
std::max(0, args.GetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)
.value_or(g_default_max_pings_without_data));
}
Chttp2PingRatePolicy::RequestSendPingResult
Chttp2PingRatePolicy::RequestSendPing(Duration next_allowed_ping_interval) {
if (max_pings_without_data_ != 0 && pings_before_data_required_ == 0) {
return TooManyRecentPings{};
}
const Timestamp next_allowed_ping =
last_ping_sent_time_ + next_allowed_ping_interval;
const Timestamp now = Timestamp::Now();
if (next_allowed_ping > now) {
return TooSoon{next_allowed_ping_interval, last_ping_sent_time_,
next_allowed_ping - now};
}
last_ping_sent_time_ = now;
if (pings_before_data_required_) --pings_before_data_required_;
return SendGranted{};
}
void Chttp2PingRatePolicy::ReceivedDataFrame() {
last_ping_sent_time_ = Timestamp::InfPast();
}
void Chttp2PingRatePolicy::ResetPingsBeforeDataRequired() {
pings_before_data_required_ = max_pings_without_data_;
}
std::string Chttp2PingRatePolicy::GetDebugString() const {
return absl::StrCat(
"max_pings_without_data: ", max_pings_without_data_,
", pings_before_data_required: ", pings_before_data_required_,
", last_ping_sent_time_: ", last_ping_sent_time_.ToString());
}
std::ostream& operator<<(std::ostream& out,
const Chttp2PingRatePolicy::RequestSendPingResult& r) {
Match(
r, [&out](Chttp2PingRatePolicy::SendGranted) { out << "SendGranted"; },
[&out](Chttp2PingRatePolicy::TooManyRecentPings) {
out << "TooManyRecentPings";
},
[&out](Chttp2PingRatePolicy::TooSoon r) {
out << "TooSoon: next_allowed="
<< r.next_allowed_ping_interval.ToString()
<< " last_ping_sent_time=" << r.last_ping.ToString()
<< " wait=" << r.wait.ToString();
});
return out;
}
} // namespace grpc_core

@ -0,0 +1,73 @@
// Copyright 2023 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_RATE_POLICY_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_RATE_POLICY_H
#include <grpc/support/port_platform.h>
#include <iosfwd>
#include <string>
#include "absl/types/variant.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/time.h"
namespace grpc_core {
class Chttp2PingRatePolicy {
public:
explicit Chttp2PingRatePolicy(const ChannelArgs& args, bool is_client);
static void SetDefaults(const ChannelArgs& args);
struct SendGranted {
bool operator==(const SendGranted&) const { return true; }
};
struct TooManyRecentPings {
bool operator==(const TooManyRecentPings&) const { return true; }
};
struct TooSoon {
Duration next_allowed_ping_interval;
Timestamp last_ping;
Duration wait;
bool operator==(const TooSoon& other) const {
return next_allowed_ping_interval == other.next_allowed_ping_interval &&
last_ping == other.last_ping && wait == other.wait;
}
};
using RequestSendPingResult =
absl::variant<SendGranted, TooManyRecentPings, TooSoon>;
RequestSendPingResult RequestSendPing(Duration next_allowed_ping_interval);
void ResetPingsBeforeDataRequired();
void ReceivedDataFrame();
std::string GetDebugString() const;
int TestOnlyMaxPingsWithoutData() const { return max_pings_without_data_; }
private:
const int max_pings_without_data_;
// No pings allowed before receiving a header or data frame.
int pings_before_data_required_ = 0;
Timestamp last_ping_sent_time_ = Timestamp::InfPast();
};
std::ostream& operator<<(std::ostream& out,
const Chttp2PingRatePolicy::RequestSendPingResult& r);
} // namespace grpc_core
#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_PING_RATE_POLICY_H

@ -24,6 +24,7 @@
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility>
#include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_map.h"
#include "absl/status/status.h" #include "absl/status/status.h"
@ -35,10 +36,6 @@
#include <grpc/slice_buffer.h> #include <grpc/slice_buffer.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/http_trace.h"
// IWYU pragma: no_include "src/core/lib/gprpp/orphanable.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/context_list_entry.h"
#include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h"
@ -50,12 +47,15 @@
#include "src/core/ext/transport/chttp2/transport/frame_window_update.h" #include "src/core/ext/transport/chttp2/transport/frame_window_update.h"
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
#include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/ext/transport/chttp2/transport/http_trace.h"
#include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h"
#include "src/core/lib/channel/channelz.h" #include "src/core/lib/channel/channelz.h"
#include "src/core/lib/debug/stats.h" #include "src/core/lib/debug/stats.h"
#include "src/core/lib/debug/stats_data.h" #include "src/core/lib/debug/stats_data.h"
#include "src/core/lib/debug/trace.h" #include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/match.h"
#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/time.h"
@ -69,6 +69,8 @@
#include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
// IWYU pragma: no_include "src/core/lib/gprpp/orphanable.h"
static void add_to_write_list(grpc_chttp2_write_cb** list, static void add_to_write_list(grpc_chttp2_write_cb** list,
grpc_chttp2_write_cb* cb) { grpc_chttp2_write_cb* cb) {
cb->next = *list; cb->next = *list;
@ -83,6 +85,25 @@ static void finish_write_cb(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
t->write_cb_pool = cb; t->write_cb_pool = cb;
} }
static grpc_core::Duration NextAllowedPingInterval(grpc_chttp2_transport* t) {
if (t->is_client) {
return (t->keepalive_permit_without_calls == 0 && t->stream_map.empty())
? grpc_core::Duration::Hours(2)
: grpc_core::Duration::Seconds(
1); // A second is added to deal with
// network delays and timing imprecision
}
if (t->sent_goaway_state != GRPC_CHTTP2_GRACEFUL_GOAWAY) {
// The gRPC keepalive spec doesn't call for any throttling on the server
// side, but we are adding some throttling for protection anyway, unless
// we are doing a graceful GOAWAY in which case we don't want to wait.
return t->keepalive_time == grpc_core::Duration::Infinity()
? grpc_core::Duration::Seconds(20)
: t->keepalive_time / 2;
}
return grpc_core::Duration::Zero();
}
static void maybe_initiate_ping(grpc_chttp2_transport* t) { static void maybe_initiate_ping(grpc_chttp2_transport* t) {
grpc_chttp2_ping_queue* pq = &t->ping_queue; grpc_chttp2_ping_queue* pq = &t->ping_queue;
if (grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_NEXT])) { if (grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_NEXT])) {
@ -100,95 +121,67 @@ static void maybe_initiate_ping(grpc_chttp2_transport* t) {
} }
return; return;
} }
if (t->is_client && t->ping_state.pings_before_data_required == 0 &&
t->ping_policy.max_pings_without_data != 0) {
// need to receive something of substance before sending a ping again
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
gpr_log(GPR_INFO,
"CLIENT: Ping delayed [%s]: too many recent pings: %d/%d",
std::string(t->peer_string.as_string_view()).c_str(),
t->ping_state.pings_before_data_required,
t->ping_policy.max_pings_without_data);
}
return;
}
// InvalidateNow to avoid getting stuck re-initializing the ping timer // InvalidateNow to avoid getting stuck re-initializing the ping timer
// in a loop while draining the currently-held combiner. Also see // in a loop while draining the currently-held combiner. Also see
// https://github.com/grpc/grpc/issues/26079. // https://github.com/grpc/grpc/issues/26079.
grpc_core::ExecCtx::Get()->InvalidateNow(); grpc_core::ExecCtx::Get()->InvalidateNow();
grpc_core::Timestamp now = grpc_core::Timestamp::Now(); Match(
t->ping_rate_policy.RequestSendPing(NextAllowedPingInterval(t)),
grpc_core::Duration next_allowed_ping_interval = grpc_core::Duration::Zero(); [pq, t](grpc_core::Chttp2PingRatePolicy::SendGranted) {
if (t->is_client) { pq->inflight_id = t->ping_ctr;
next_allowed_ping_interval = t->ping_ctr++;
(t->keepalive_permit_without_calls == 0 && t->stream_map.empty()) grpc_core::ExecCtx::RunList(DEBUG_LOCATION,
? grpc_core::Duration::Hours(2) &pq->lists[GRPC_CHTTP2_PCL_INITIATE]);
: grpc_core::Duration::Seconds( grpc_closure_list_move(&pq->lists[GRPC_CHTTP2_PCL_NEXT],
1); // A second is added to deal with &pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]);
// network delays and timing imprecision grpc_slice_buffer_add(&t->outbuf,
} else if (t->sent_goaway_state != GRPC_CHTTP2_GRACEFUL_GOAWAY) { grpc_chttp2_ping_create(false, pq->inflight_id));
// The gRPC keepalive spec doesn't call for any throttling on the server grpc_core::global_stats().IncrementHttp2PingsSent();
// side, but we are adding some throttling for protection anyway, unless if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
// we are doing a graceful GOAWAY in which case we don't want to wait. GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
next_allowed_ping_interval = GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
t->keepalive_time == grpc_core::Duration::Infinity() gpr_log(GPR_INFO, "%s: Ping sent [%s]: %s",
? grpc_core::Duration::Seconds(20) t->is_client ? "CLIENT" : "SERVER",
: t->keepalive_time / 2; std::string(t->peer_string.as_string_view()).c_str(),
} t->ping_rate_policy.GetDebugString().c_str());
grpc_core::Timestamp next_allowed_ping = }
t->ping_state.last_ping_sent_time + next_allowed_ping_interval; },
[t](grpc_core::Chttp2PingRatePolicy::TooManyRecentPings) {
if (next_allowed_ping > now) { // need to receive something of substance before sending a ping again
// not enough elapsed time between successive pings if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) || GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) || GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) { gpr_log(GPR_INFO,
gpr_log( "CLIENT: Ping delayed [%s]: too many recent pings: %s",
GPR_INFO, std::string(t->peer_string.as_string_view()).c_str(),
"%s: Ping delayed [%s]: not enough time elapsed since last " t->ping_rate_policy.GetDebugString().c_str());
"ping. " }
" Last ping %" PRId64 ": Next ping %" PRId64 ": Now %" PRId64, },
t->is_client ? "CLIENT" : "SERVER", [t](grpc_core::Chttp2PingRatePolicy::TooSoon too_soon) {
std::string(t->peer_string.as_string_view()).c_str(), // not enough elapsed time between successive pings
t->ping_state.last_ping_sent_time.milliseconds_after_process_epoch(), if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
next_allowed_ping.milliseconds_after_process_epoch(), GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
now.milliseconds_after_process_epoch()); GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
} gpr_log(GPR_INFO,
if (!t->ping_state.delayed_ping_timer_handle.has_value()) { "%s: Ping delayed [%s]: not enough time elapsed since last "
GRPC_CHTTP2_REF_TRANSPORT(t, "retry_initiate_ping_locked"); "ping. "
t->ping_state.delayed_ping_timer_handle = " Last ping:%s, minimum wait:%s need to wait:%s",
t->event_engine->RunAfter(next_allowed_ping - now, [t] { t->is_client ? "CLIENT" : "SERVER",
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; std::string(t->peer_string.as_string_view()).c_str(),
grpc_core::ExecCtx exec_ctx; too_soon.last_ping.ToString().c_str(),
grpc_chttp2_retry_initiate_ping(t); too_soon.next_allowed_ping_interval.ToString().c_str(),
}); too_soon.wait.ToString().c_str());
} }
return; if (!t->delayed_ping_timer_handle.has_value()) {
} GRPC_CHTTP2_REF_TRANSPORT(t, "retry_initiate_ping_locked");
t->ping_state.last_ping_sent_time = now; t->delayed_ping_timer_handle =
t->event_engine->RunAfter(too_soon.wait, [t] {
pq->inflight_id = t->ping_ctr; grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
t->ping_ctr++; grpc_core::ExecCtx exec_ctx;
grpc_core::ExecCtx::RunList(DEBUG_LOCATION, grpc_chttp2_retry_initiate_ping(t);
&pq->lists[GRPC_CHTTP2_PCL_INITIATE]); });
grpc_closure_list_move(&pq->lists[GRPC_CHTTP2_PCL_NEXT], }
&pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]); });
grpc_slice_buffer_add(&t->outbuf,
grpc_chttp2_ping_create(false, pq->inflight_id));
grpc_core::global_stats().IncrementHttp2PingsSent();
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
gpr_log(GPR_INFO, "%s: Ping sent [%s]: %d/%d",
t->is_client ? "CLIENT" : "SERVER",
std::string(t->peer_string.as_string_view()).c_str(),
t->ping_state.pings_before_data_required,
t->ping_policy.max_pings_without_data);
}
t->ping_state.pings_before_data_required -=
(t->ping_state.pings_before_data_required != 0);
} }
static bool update_list(grpc_chttp2_transport* t, grpc_chttp2_stream* s, static bool update_list(grpc_chttp2_transport* t, grpc_chttp2_stream* s,

@ -22,6 +22,7 @@
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/transport/cronet/transport/cronet_transport.h" #include "src/core/ext/transport/cronet/transport/cronet_transport.h"

@ -37,6 +37,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "third_party/objective_c/Cronet/bidirectional_stream_c.h" #include "third_party/objective_c/Cronet/bidirectional_stream_c.h"
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>

@ -35,6 +35,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>

@ -30,6 +30,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -29,6 +29,7 @@
#include <grpc/byte_buffer.h> #include <grpc/byte_buffer.h>
#include <grpc/byte_buffer_reader.h> #include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/impl/propagation_bits.h> #include <grpc/impl/propagation_bits.h>
#include <grpc/slice.h> #include <grpc/slice.h>

@ -34,6 +34,7 @@
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include "absl/strings/str_join.h" #include "absl/strings/str_join.h"
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>

@ -27,6 +27,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/gpr/useful.h" #include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep #include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep

@ -29,6 +29,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>

@ -26,6 +26,7 @@
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/ref_counted_ptr.h"

@ -23,6 +23,7 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/gpr/useful.h" #include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/cpp_impl_of.h" #include "src/core/lib/gprpp/cpp_impl_of.h"

@ -19,8 +19,8 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/gpr/useful.h" #include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/dual_ref_counted.h" #include "src/core/lib/gprpp/dual_ref_counted.h"

@ -32,6 +32,7 @@
#include <grpc/grpc_security.h> // IWYU pragma: keep #include <grpc/grpc_security.h> // IWYU pragma: keep
#include <grpc/grpc_security_constants.h> #include <grpc/grpc_security_constants.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>

@ -28,6 +28,7 @@
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>

@ -28,6 +28,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security_constants.h> #include <grpc/grpc_security_constants.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -24,6 +24,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc_security_constants.h> #include <grpc/grpc_security_constants.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h"

@ -31,6 +31,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security_constants.h> #include <grpc/grpc_security_constants.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -34,6 +34,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc_security_constants.h> #include <grpc/grpc_security_constants.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>

@ -30,6 +30,7 @@
#include "absl/strings/str_split.h" #include "absl/strings/str_split.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>

@ -36,6 +36,7 @@
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/grpc_security_constants.h> #include <grpc/grpc_security_constants.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/slice_buffer.h> #include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>

@ -32,6 +32,7 @@
#include <grpc/compression.h> #include <grpc/compression.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>

@ -27,6 +27,7 @@
#include <grpc/fork.h> #include <grpc/fork.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/sync.h> #include <grpc/support/sync.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>

@ -40,6 +40,7 @@
#include <grpc/byte_buffer.h> #include <grpc/byte_buffer.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/connectivity_state.h> #include <grpc/impl/connectivity_state.h>
#include <grpc/status.h> #include <grpc/status.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -20,6 +20,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/compression_types.h> #include <grpc/impl/compression_types.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpcpp/grpcpp.h> #include <grpcpp/grpcpp.h>

@ -20,6 +20,7 @@
#include <vector> #include <vector>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpcpp/support/channel_arguments.h> #include <grpcpp/support/channel_arguments.h>
namespace grpc { namespace grpc {

@ -126,6 +126,7 @@ grpc_cc_library(
deps = [ deps = [
"environment_autodetect", "environment_autodetect",
"observability_config", "observability_config",
"//:channel_arg_names",
"//:event_engine_base_hdrs", "//:event_engine_base_hdrs",
"//:gpr", "//:gpr",
"//:gpr_platform", "//:gpr_platform",

@ -36,6 +36,7 @@
#include "google/logging/v2/logging.pb.h" #include "google/logging/v2/logging.pb.h"
#include "google/protobuf/text_format.h" #include "google/protobuf/text_format.h"
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>
#include <grpcpp/grpcpp.h> #include <grpcpp/grpcpp.h>

@ -22,7 +22,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include <grpcpp/ext/server_load_reporting.h> #include <grpcpp/ext/server_load_reporting.h>
#include <grpcpp/impl/server_builder_plugin.h> #include <grpcpp/impl/server_builder_plugin.h>
#include <grpcpp/support/channel_arguments.h> #include <grpcpp/support/channel_arguments.h>

@ -27,6 +27,7 @@
#include <vector> #include <vector>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/compression_types.h> #include <grpc/impl/compression_types.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/sync.h> #include <grpc/support/sync.h>

@ -33,6 +33,7 @@
#include <grpc/byte_buffer.h> #include <grpc/byte_buffer.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/sync.h> #include <grpc/support/sync.h>

@ -118,6 +118,8 @@ CORE_SOURCE_FILES = [
'src/core/ext/transport/chttp2/transport/http_trace.cc', 'src/core/ext/transport/chttp2/transport/http_trace.cc',
'src/core/ext/transport/chttp2/transport/huffsyms.cc', 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
'src/core/ext/transport/chttp2/transport/parsing.cc', 'src/core/ext/transport/chttp2/transport/parsing.cc',
'src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc',
'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc',
'src/core/ext/transport/chttp2/transport/stream_lists.cc', 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
'src/core/ext/transport/chttp2/transport/varint.cc', 'src/core/ext/transport/chttp2/transport/varint.cc',
'src/core/ext/transport/chttp2/transport/writing.cc', 'src/core/ext/transport/chttp2/transport/writing.cc',

@ -28,6 +28,7 @@
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/propagation_bits.h> #include <grpc/impl/propagation_bits.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>

@ -23,6 +23,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/propagation_bits.h> #include <grpc/impl/propagation_bits.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>

@ -24,6 +24,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -26,6 +26,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h" #include "src/core/lib/channel/channelz.h"

@ -31,6 +31,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>

@ -38,6 +38,7 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -21,7 +21,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include "src/core/ext/filters/client_channel/subchannel_pool_interface.h" #include "src/core/ext/filters/client_channel/subchannel_pool_interface.h"
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -19,7 +19,7 @@
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include <grpc/grpc.h> #include <grpc/impl/channel_arg_names.h>
#include "src/core/ext/filters/client_channel/http_proxy.h" #include "src/core/ext/filters/client_channel/http_proxy.h"
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -33,6 +33,7 @@
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -31,6 +31,7 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/json.h> #include <grpc/support/json.h>
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"

@ -31,6 +31,7 @@
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/atm.h> #include <grpc/support/atm.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -21,6 +21,7 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>

@ -95,6 +95,7 @@ grpc_cc_library(
hdrs = ["fixtures/proxy.h"], hdrs = ["fixtures/proxy.h"],
language = "C++", language = "C++",
deps = [ deps = [
"//:channel_arg_names",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
"//:grpc_public_hdrs", "//:grpc_public_hdrs",
@ -164,6 +165,7 @@ grpc_cc_library(
language = "C++", language = "C++",
deps = [ deps = [
"end2end_test_lib", "end2end_test_lib",
"//:channel_arg_names",
"//:config", "//:config",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -204,6 +206,7 @@ grpc_cc_library(
"fixture_support", "fixture_support",
"http_proxy", "http_proxy",
"proxy", "proxy",
"//:channel_arg_names",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
"//:grpc", "//:grpc",
@ -472,6 +475,7 @@ grpc_cc_test(
language = "C++", language = "C++",
deps = [ deps = [
"cq_verifier", "cq_verifier",
"//:channel_arg_names",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
"//:grpc_public_hdrs", "//:grpc_public_hdrs",
@ -514,6 +518,7 @@ grpc_cc_test(
language = "C++", language = "C++",
deps = [ deps = [
"cq_verifier", "cq_verifier",
"//:channel_arg_names",
"//:debug_location", "//:debug_location",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -595,6 +600,7 @@ grpc_cc_test(
"end2end_test_lib", "end2end_test_lib",
"fixture_support", "fixture_support",
"ssl_test_data", "ssl_test_data",
"//:channel_arg_names",
"//:config_vars", "//:config_vars",
"//:debug_location", "//:debug_location",
"//:gpr", "//:gpr",
@ -627,6 +633,7 @@ grpc_cc_test(
language = "C++", language = "C++",
deps = [ deps = [
"cq_verifier", "cq_verifier",
"//:channel_arg_names",
"//:config_vars", "//:config_vars",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",
@ -656,6 +663,7 @@ grpc_cc_test(
language = "C++", language = "C++",
deps = [ deps = [
"cq_verifier", "cq_verifier",
"//:channel_arg_names",
"//:config_vars", "//:config_vars",
"//:exec_ctx", "//:exec_ctx",
"//:gpr", "//:gpr",

@ -22,6 +22,7 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include <grpc/impl/channel_arg_names.h>
#include <grpc/impl/propagation_bits.h> #include <grpc/impl/propagation_bits.h>
#include <grpc/slice.h> #include <grpc/slice.h>
#include <grpc/status.h> #include <grpc/status.h>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save