grpc 1.45.0-x86_64-linux → 1.46.2-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/Makefile +3195 -0
- data/include/grpc/byte_buffer.h +27 -0
- data/include/grpc/byte_buffer_reader.h +26 -0
- data/include/grpc/census.h +40 -0
- data/include/grpc/compression.h +75 -0
- data/include/grpc/event_engine/README.md +38 -0
- data/include/grpc/event_engine/endpoint_config.h +43 -0
- data/include/grpc/event_engine/event_engine.h +399 -0
- data/include/grpc/event_engine/internal/memory_allocator_impl.h +68 -0
- data/include/grpc/event_engine/memory_allocator.h +226 -0
- data/include/grpc/event_engine/memory_request.h +57 -0
- data/include/grpc/event_engine/port.h +39 -0
- data/include/grpc/fork.h +26 -0
- data/include/grpc/grpc.h +605 -0
- data/include/grpc/grpc_cronet.h +38 -0
- data/include/grpc/grpc_posix.h +63 -0
- data/include/grpc/grpc_security.h +1259 -0
- data/include/grpc/grpc_security_constants.h +152 -0
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/atm.h +97 -0
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +93 -0
- data/include/grpc/impl/codegen/atm_gcc_sync.h +87 -0
- data/include/grpc/impl/codegen/atm_windows.h +134 -0
- data/include/grpc/impl/codegen/byte_buffer.h +103 -0
- data/include/grpc/impl/codegen/byte_buffer_reader.h +44 -0
- data/include/grpc/impl/codegen/compression_types.h +108 -0
- data/include/grpc/impl/codegen/connectivity_state.h +46 -0
- data/include/grpc/impl/codegen/fork.h +50 -0
- data/include/grpc/impl/codegen/gpr_slice.h +71 -0
- data/include/grpc/impl/codegen/gpr_types.h +61 -0
- data/include/grpc/impl/codegen/grpc_types.h +816 -0
- data/include/grpc/impl/codegen/log.h +112 -0
- data/include/grpc/impl/codegen/port_platform.h +723 -0
- data/include/grpc/impl/codegen/propagation_bits.h +54 -0
- data/include/grpc/impl/codegen/slice.h +132 -0
- data/include/grpc/impl/codegen/status.h +156 -0
- data/include/grpc/impl/codegen/sync.h +68 -0
- data/include/grpc/impl/codegen/sync_abseil.h +38 -0
- data/include/grpc/impl/codegen/sync_custom.h +40 -0
- data/include/grpc/impl/codegen/sync_generic.h +51 -0
- data/include/grpc/impl/codegen/sync_posix.h +54 -0
- data/include/grpc/impl/codegen/sync_windows.h +42 -0
- data/include/grpc/load_reporting.h +48 -0
- data/include/grpc/module.modulemap +64 -0
- data/include/grpc/slice.h +161 -0
- data/include/grpc/slice_buffer.h +84 -0
- data/include/grpc/status.h +26 -0
- data/include/grpc/support/alloc.h +52 -0
- data/include/grpc/support/atm.h +26 -0
- data/include/grpc/support/atm_gcc_atomic.h +26 -0
- data/include/grpc/support/atm_gcc_sync.h +26 -0
- data/include/grpc/support/atm_windows.h +26 -0
- data/include/grpc/support/cpu.h +44 -0
- data/include/grpc/support/log.h +26 -0
- data/include/grpc/support/log_windows.h +38 -0
- data/include/grpc/support/port_platform.h +24 -0
- data/include/grpc/support/string_util.h +51 -0
- data/include/grpc/support/sync.h +282 -0
- data/include/grpc/support/sync_abseil.h +26 -0
- data/include/grpc/support/sync_custom.h +26 -0
- data/include/grpc/support/sync_generic.h +26 -0
- data/include/grpc/support/sync_posix.h +26 -0
- data/include/grpc/support/sync_windows.h +26 -0
- data/include/grpc/support/thd_id.h +44 -0
- data/include/grpc/support/time.h +92 -0
- data/include/grpc/support/workaround_list.h +31 -0
- data/src/core/ext/filters/census/grpc_context.cc +39 -0
- data/src/core/ext/filters/channel_idle/channel_idle_filter.cc +309 -0
- data/src/core/ext/filters/channel_idle/channel_idle_filter.h +122 -0
- data/src/core/ext/filters/channel_idle/idle_filter_state.cc +96 -0
- data/src/core/ext/filters/channel_idle/idle_filter_state.h +66 -0
- data/src/core/ext/filters/client_channel/backend_metric.cc +79 -0
- data/src/core/ext/filters/client_channel/backend_metric.h +37 -0
- data/src/core/ext/filters/client_channel/backup_poller.cc +187 -0
- data/src/core/ext/filters/client_channel/backup_poller.h +42 -0
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +220 -0
- data/src/core/ext/filters/client_channel/client_channel.cc +3243 -0
- data/src/core/ext/filters/client_channel/client_channel.h +585 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +96 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +75 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +56 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.h +46 -0
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +67 -0
- data/src/core/ext/filters/client_channel/config_selector.cc +59 -0
- data/src/core/ext/filters/client_channel/config_selector.h +145 -0
- data/src/core/ext/filters/client_channel/connector.h +79 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +189 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.h +99 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +63 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +60 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +163 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.h +41 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +387 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.h +42 -0
- data/src/core/ext/filters/client_channel/http_proxy.cc +212 -0
- data/src/core/ext/filters/client_channel/http_proxy.h +45 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +97 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +102 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +304 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +145 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +1885 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +40 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +76 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +92 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +76 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +192 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +74 -0
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +540 -0
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +967 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +804 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +2542 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +504 -0
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +431 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +776 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +704 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +60 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +872 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +710 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +1215 -0
- data/src/core/ext/filters/client_channel/lb_policy.cc +132 -0
- data/src/core/ext/filters/client_channel/lb_policy.h +457 -0
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +48 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +185 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +65 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +56 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +58 -0
- data/src/core/ext/filters/client_channel/proxy_mapper.h +54 -0
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +89 -0
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +50 -0
- data/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc +133 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +500 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +84 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc +31 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +114 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +883 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +1113 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +115 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc +29 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +34 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h +29 -0
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +169 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +381 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +96 -0
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +400 -0
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.cc +201 -0
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.h +106 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +196 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1066 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +28 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +186 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +105 -0
- data/src/core/ext/filters/client_channel/retry_filter.cc +2655 -0
- data/src/core/ext/filters/client_channel/retry_filter.h +30 -0
- data/src/core/ext/filters/client_channel/retry_service_config.cc +314 -0
- data/src/core/ext/filters/client_channel/retry_service_config.h +102 -0
- data/src/core/ext/filters/client_channel/retry_throttle.cc +148 -0
- data/src/core/ext/filters/client_channel/retry_throttle.h +85 -0
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +157 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +1014 -0
- data/src/core/ext/filters/client_channel/subchannel.h +382 -0
- data/src/core/ext/filters/client_channel/subchannel_interface.h +130 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +126 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +106 -0
- data/src/core/ext/filters/client_channel/subchannel_stream_client.cc +544 -0
- data/src/core/ext/filters/client_channel/subchannel_stream_client.h +214 -0
- data/src/core/ext/filters/deadline/deadline_filter.cc +392 -0
- data/src/core/ext/filters/deadline/deadline_filter.h +87 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +258 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +62 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.cc +179 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.h +91 -0
- data/src/core/ext/filters/http/client/http_client_filter.cc +141 -0
- data/src/core/ext/filters/http/client/http_client_filter.h +48 -0
- data/src/core/ext/filters/http/client_authority_filter.cc +95 -0
- data/src/core/ext/filters/http/client_authority_filter.h +53 -0
- data/src/core/ext/filters/http/http_filters_plugin.cc +90 -0
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +456 -0
- data/src/core/ext/filters/http/message_compress/message_compress_filter.h +53 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +386 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +31 -0
- data/src/core/ext/filters/http/server/http_server_filter.cc +322 -0
- data/src/core/ext/filters/http/server/http_server_filter.h +29 -0
- data/src/core/ext/filters/message_size/message_size_filter.cc +394 -0
- data/src/core/ext/filters/message_size/message_size_filter.h +73 -0
- data/src/core/ext/filters/rbac/rbac_filter.cc +162 -0
- data/src/core/ext/filters/rbac/rbac_filter.h +76 -0
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +606 -0
- data/src/core/ext/filters/rbac/rbac_service_config_parser.h +75 -0
- data/src/core/ext/filters/server_config_selector/server_config_selector.cc +61 -0
- data/src/core/ext/filters/server_config_selector/server_config_selector.h +71 -0
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc +143 -0
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.h +32 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.cc +45 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.h +36 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +495 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +75 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1101 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +47 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +252 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +57 -0
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +231 -0
- data/src/core/ext/transport/chttp2/transport/bin_encoder.h +42 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +3375 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +71 -0
- data/src/core/ext/transport/chttp2/transport/context_list.cc +67 -0
- data/src/core/ext/transport/chttp2/transport/context_list.h +51 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +430 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +488 -0
- data/src/core/ext/transport/chttp2/transport/frame.h +47 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +307 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.h +83 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +187 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +63 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +132 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +46 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +123 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +51 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +275 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +62 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +123 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +43 -0
- data/src/core/ext/transport/chttp2/transport/hpack_constants.h +41 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +667 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +219 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +86 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +71 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1379 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +135 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +239 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +115 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +62 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +61 -0
- data/src/core/ext/transport/chttp2/transport/huffsyms.cc +92 -0
- data/src/core/ext/transport/chttp2/transport/huffsyms.h +32 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +865 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +653 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +216 -0
- data/src/core/ext/transport/chttp2/transport/stream_map.cc +177 -0
- data/src/core/ext/transport/chttp2/transport/stream_map.h +67 -0
- data/src/core/ext/transport/chttp2/transport/varint.cc +62 -0
- data/src/core/ext/transport/chttp2/transport/varint.h +71 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +661 -0
- data/src/core/ext/transport/inproc/inproc_plugin.cc +24 -0
- data/src/core/ext/transport/inproc/inproc_transport.cc +1321 -0
- data/src/core/ext/transport/inproc/inproc_transport.h +32 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.c +117 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/certs.upb.h +482 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.c +121 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.h +553 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +444 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +2156 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/init_dump.upb.h +151 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.c +62 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/listeners.upb.h +160 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/memory.upb.h +124 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/metrics.upb.h +102 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/mutex_stats.upb.h +97 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.c +106 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/server_info.upb.h +605 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/tap.upb.h +103 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +81 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +99 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +270 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +1240 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +411 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +2161 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +95 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +382 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +543 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +2961 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +103 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +89 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +545 -0
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.c +299 -0
- data/src/core/ext/upb-generated/envoy/config/common/matcher/v3/matcher.upb.h +1381 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +145 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +636 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +116 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +419 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1783 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +163 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +778 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +100 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +103 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.c +58 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_method_list.upb.h +151 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +269 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +1277 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +220 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +1219 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +122 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +322 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +1686 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +169 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +144 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +178 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +118 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +106 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +348 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +144 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +623 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +129 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +568 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +165 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +886 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +186 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +941 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +234 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +154 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/metrics_service.upb.h +136 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +165 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +716 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +174 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +721 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +209 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +1008 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +101 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +443 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +1051 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +5956 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +255 -0
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.c +222 -0
- data/src/core/ext/upb-generated/envoy/config/tap/v3/common.upb.h +1052 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.c +44 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/dynamic_ot.upb.h +103 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +167 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.c +52 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/lightstep.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opencensus.upb.h +250 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/service.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.c +69 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/skywalking.upb.h +213 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.c +32 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/trace.upb.h +42 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.c +71 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/xray.upb.h +218 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.h +146 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +85 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +96 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +375 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +94 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +433 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.c +64 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +183 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +55 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +168 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +463 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +2606 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +38 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +175 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +880 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +308 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +191 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +1035 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.c +62 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +160 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +38 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +70 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +165 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +755 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +68 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +210 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +138 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +631 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/cookie.upb.h +112 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +76 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +249 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/http_inputs.upb.h +214 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +62 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +188 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +117 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +113 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +100 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +80 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +234 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +67 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +218 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +170 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +78 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +294 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +107 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +429 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +107 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +419 -0
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.c +66 -0
- data/src/core/ext/upb-generated/envoy/type/v3/hash_policy.upb.h +201 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +26 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +39 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http_status.upb.h +139 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +139 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +66 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +196 -0
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.c +26 -0
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.h +41 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +97 -0
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/type/v3/token_bucket.upb.h +127 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +40 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +53 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +271 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +1236 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +283 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +1338 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +81 -0
- data/src/core/ext/upb-generated/google/api/http.upb.h +331 -0
- data/src/core/ext/upb-generated/google/api/httpbody.upb.c +46 -0
- data/src/core/ext/upb-generated/google/api/httpbody.upb.h +111 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +40 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +88 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +577 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +3095 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +40 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +88 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +35 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +70 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +95 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +317 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +40 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +88 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +127 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +439 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +46 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +111 -0
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.c +84 -0
- data/src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.h +319 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +63 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +184 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +240 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +1133 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +57 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +174 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +50 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +131 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +161 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +669 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +70 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +208 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c +175 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h +764 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +110 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +278 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +55 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +108 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +38 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +46 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +54 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +115 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +53 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +99 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +560 -0
- data/src/core/ext/upb-generated/validate/validate.upb.h +4013 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.c +110 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/migrate.upb.h +278 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.c +55 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/security.upb.h +108 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.c +38 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/sensitive.upb.h +46 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +105 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +290 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.c +53 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/versioning.upb.h +99 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +41 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +79 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +66 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +200 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +56 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +115 -0
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.c +46 -0
- data/src/core/ext/upb-generated/xds/core/v3/extension.upb.h +103 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +49 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +127 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +68 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +240 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +49 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +121 -0
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +73 -0
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +187 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.c +207 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/matcher.upb.h +878 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.c +52 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/regex.upb.h +143 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.c +65 -0
- data/src/core/ext/upb-generated/xds/type/matcher/v3/string.upb.h +218 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +46 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +103 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.c +84 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/certs.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.c +127 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +309 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +140 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/init_dump.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/listeners.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/memory.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/metrics.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/mutex_stats.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/server_info.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/tap.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +48 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +38 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +222 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +393 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +120 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +98 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +557 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +155 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +138 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.c +206 -0
- data/src/core/ext/upbdefs-generated/envoy/config/common/matcher/v3/matcher.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +112 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +267 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +150 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +168 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_method_list.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +235 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +228 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +298 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +110 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +99 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +128 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +136 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +48 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +197 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +190 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +88 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.c +69 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/metrics_service.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +125 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +134 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.c +190 -0
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +115 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +896 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +295 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +77 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.c +188 -0
- data/src/core/ext/upbdefs-generated/envoy/config/tap/v3/common.upbdefs.h +85 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/dynamic_ot.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/lightstep.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.c +99 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opencensus.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/service.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/skywalking.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/trace.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.c +75 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/xray.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.c +77 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +92 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +117 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +78 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +551 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +130 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +48 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +210 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +91 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +254 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +58 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +58 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +128 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +76 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +153 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/cookie.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/http_inputs.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +70 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +58 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +75 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +78 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +85 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/hash_policy.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +36 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.c +94 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http_status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +48 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.c +38 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.c +57 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/token_bucket.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.c +154 -0
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/checked.upbdefs.h +95 -0
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.c +153 -0
- data/src/core/ext/upbdefs-generated/google/api/expr/v1alpha1/syntax.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/api/httpbody.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +34 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +329 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +165 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +32 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +45 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +37 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c +67 -0
- data/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c +99 -0
- data/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +62 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +34 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +283 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.c +35 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +38 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/extension.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +45 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.c +126 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/matcher.upbdefs.h +80 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/regex.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/xds/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h +35 -0
- data/src/core/ext/xds/certificate_provider_factory.h +61 -0
- data/src/core/ext/xds/certificate_provider_registry.cc +103 -0
- data/src/core/ext/xds/certificate_provider_registry.h +57 -0
- data/src/core/ext/xds/certificate_provider_store.cc +95 -0
- data/src/core/ext/xds/certificate_provider_store.h +121 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +144 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +69 -0
- data/src/core/ext/xds/upb_utils.h +67 -0
- data/src/core/ext/xds/xds_api.cc +730 -0
- data/src/core/ext/xds/xds_api.h +191 -0
- data/src/core/ext/xds/xds_bootstrap.cc +570 -0
- data/src/core/ext/xds/xds_bootstrap.h +141 -0
- data/src/core/ext/xds/xds_certificate_provider.cc +407 -0
- data/src/core/ext/xds/xds_certificate_provider.h +159 -0
- data/src/core/ext/xds/xds_channel_args.h +32 -0
- data/src/core/ext/xds/xds_channel_stack_modifier.cc +109 -0
- data/src/core/ext/xds/xds_channel_stack_modifier.h +53 -0
- data/src/core/ext/xds/xds_client.cc +2510 -0
- data/src/core/ext/xds/xds_client.h +347 -0
- data/src/core/ext/xds/xds_client_stats.cc +160 -0
- data/src/core/ext/xds/xds_client_stats.h +241 -0
- data/src/core/ext/xds/xds_cluster.cc +453 -0
- data/src/core/ext/xds/xds_cluster.h +108 -0
- data/src/core/ext/xds/xds_cluster_specifier_plugin.cc +142 -0
- data/src/core/ext/xds/xds_cluster_specifier_plugin.h +79 -0
- data/src/core/ext/xds/xds_common_types.cc +388 -0
- data/src/core/ext/xds/xds_common_types.h +95 -0
- data/src/core/ext/xds/xds_endpoint.cc +371 -0
- data/src/core/ext/xds/xds_endpoint.h +135 -0
- data/src/core/ext/xds/xds_http_fault_filter.cc +227 -0
- data/src/core/ext/xds/xds_http_fault_filter.h +64 -0
- data/src/core/ext/xds/xds_http_filters.cc +122 -0
- data/src/core/ext/xds/xds_http_filters.h +133 -0
- data/src/core/ext/xds/xds_http_rbac_filter.cc +563 -0
- data/src/core/ext/xds/xds_http_rbac_filter.h +54 -0
- data/src/core/ext/xds/xds_listener.cc +1039 -0
- data/src/core/ext/xds/xds_listener.h +220 -0
- data/src/core/ext/xds/xds_resource_type.cc +33 -0
- data/src/core/ext/xds/xds_resource_type.h +98 -0
- data/src/core/ext/xds/xds_resource_type_impl.h +87 -0
- data/src/core/ext/xds/xds_route_config.cc +1122 -0
- data/src/core/ext/xds/xds_route_config.h +218 -0
- data/src/core/ext/xds/xds_routing.cc +250 -0
- data/src/core/ext/xds/xds_routing.h +101 -0
- data/src/core/ext/xds/xds_server_config_fetcher.cc +1314 -0
- data/src/core/lib/address_utils/parse_address.cc +340 -0
- data/src/core/lib/address_utils/parse_address.h +82 -0
- data/src/core/lib/address_utils/sockaddr_utils.cc +409 -0
- data/src/core/lib/address_utils/sockaddr_utils.h +95 -0
- data/src/core/lib/avl/avl.h +458 -0
- data/src/core/lib/backoff/backoff.cc +49 -0
- data/src/core/lib/backoff/backoff.h +89 -0
- data/src/core/lib/channel/call_finalization.h +86 -0
- data/src/core/lib/channel/call_tracer.h +88 -0
- data/src/core/lib/channel/channel_args.cc +538 -0
- data/src/core/lib/channel/channel_args.h +347 -0
- data/src/core/lib/channel/channel_args_preconditioning.cc +42 -0
- data/src/core/lib/channel/channel_args_preconditioning.h +61 -0
- data/src/core/lib/channel/channel_stack.cc +274 -0
- data/src/core/lib/channel/channel_stack.h +345 -0
- data/src/core/lib/channel/channel_stack_builder.cc +64 -0
- data/src/core/lib/channel/channel_stack_builder.h +127 -0
- data/src/core/lib/channel/channel_stack_builder_impl.cc +102 -0
- data/src/core/lib/channel/channel_stack_builder_impl.h +48 -0
- data/src/core/lib/channel/channel_trace.cc +190 -0
- data/src/core/lib/channel/channel_trace.h +135 -0
- data/src/core/lib/channel/channelz.cc +597 -0
- data/src/core/lib/channel/channelz.h +357 -0
- data/src/core/lib/channel/channelz_registry.cc +285 -0
- data/src/core/lib/channel/channelz_registry.h +99 -0
- data/src/core/lib/channel/connected_channel.cc +250 -0
- data/src/core/lib/channel/connected_channel.h +34 -0
- data/src/core/lib/channel/context.h +63 -0
- data/src/core/lib/channel/handshaker.cc +222 -0
- data/src/core/lib/channel/handshaker.h +161 -0
- data/src/core/lib/channel/handshaker_factory.h +50 -0
- data/src/core/lib/channel/handshaker_registry.cc +50 -0
- data/src/core/lib/channel/handshaker_registry.h +71 -0
- data/src/core/lib/channel/promise_based_filter.cc +1002 -0
- data/src/core/lib/channel/promise_based_filter.h +437 -0
- data/src/core/lib/channel/status_util.cc +109 -0
- data/src/core/lib/channel/status_util.h +67 -0
- data/src/core/lib/compression/compression.cc +91 -0
- data/src/core/lib/compression/compression_internal.cc +217 -0
- data/src/core/lib/compression/compression_internal.h +92 -0
- data/src/core/lib/compression/message_compress.cc +192 -0
- data/src/core/lib/compression/message_compress.h +40 -0
- data/src/core/lib/config/core_configuration.cc +104 -0
- data/src/core/lib/config/core_configuration.h +196 -0
- data/src/core/lib/debug/stats.cc +172 -0
- data/src/core/lib/debug/stats.h +71 -0
- data/src/core/lib/debug/stats_data.cc +685 -0
- data/src/core/lib/debug/stats_data.h +553 -0
- data/src/core/lib/debug/trace.cc +155 -0
- data/src/core/lib/debug/trace.h +132 -0
- data/src/core/lib/event_engine/channel_args_endpoint_config.cc +46 -0
- data/src/core/lib/event_engine/channel_args_endpoint_config.h +42 -0
- data/src/core/lib/event_engine/default_event_engine_factory.cc +27 -0
- data/src/core/lib/event_engine/event_engine.cc +52 -0
- data/src/core/lib/event_engine/event_engine_factory.h +36 -0
- data/src/core/lib/event_engine/memory_allocator.cc +66 -0
- data/src/core/lib/event_engine/resolved_address.cc +39 -0
- data/src/core/lib/event_engine/sockaddr.cc +40 -0
- data/src/core/lib/event_engine/sockaddr.h +44 -0
- data/src/core/lib/gpr/alloc.cc +76 -0
- data/src/core/lib/gpr/alloc.h +28 -0
- data/src/core/lib/gpr/atm.cc +35 -0
- data/src/core/lib/gpr/cpu_iphone.cc +44 -0
- data/src/core/lib/gpr/cpu_linux.cc +82 -0
- data/src/core/lib/gpr/cpu_posix.cc +83 -0
- data/src/core/lib/gpr/cpu_windows.cc +33 -0
- data/src/core/lib/gpr/env.h +40 -0
- data/src/core/lib/gpr/env_linux.cc +75 -0
- data/src/core/lib/gpr/env_posix.cc +46 -0
- data/src/core/lib/gpr/env_windows.cc +74 -0
- data/src/core/lib/gpr/log.cc +140 -0
- data/src/core/lib/gpr/log_android.cc +77 -0
- data/src/core/lib/gpr/log_linux.cc +114 -0
- data/src/core/lib/gpr/log_posix.cc +110 -0
- data/src/core/lib/gpr/log_windows.cc +116 -0
- data/src/core/lib/gpr/murmur_hash.cc +82 -0
- data/src/core/lib/gpr/murmur_hash.h +29 -0
- data/src/core/lib/gpr/spinlock.h +53 -0
- data/src/core/lib/gpr/string.cc +343 -0
- data/src/core/lib/gpr/string.h +112 -0
- data/src/core/lib/gpr/string_posix.cc +72 -0
- data/src/core/lib/gpr/string_util_windows.cc +82 -0
- data/src/core/lib/gpr/string_windows.cc +69 -0
- data/src/core/lib/gpr/string_windows.h +32 -0
- data/src/core/lib/gpr/sync.cc +124 -0
- data/src/core/lib/gpr/sync_abseil.cc +114 -0
- data/src/core/lib/gpr/sync_posix.cc +171 -0
- data/src/core/lib/gpr/sync_windows.cc +120 -0
- data/src/core/lib/gpr/time.cc +265 -0
- data/src/core/lib/gpr/time_posix.cc +186 -0
- data/src/core/lib/gpr/time_precise.cc +168 -0
- data/src/core/lib/gpr/time_precise.h +70 -0
- data/src/core/lib/gpr/time_windows.cc +99 -0
- data/src/core/lib/gpr/tls.h +158 -0
- data/src/core/lib/gpr/tmpfile.h +32 -0
- data/src/core/lib/gpr/tmpfile_msys.cc +58 -0
- data/src/core/lib/gpr/tmpfile_posix.cc +69 -0
- data/src/core/lib/gpr/tmpfile_windows.cc +69 -0
- data/src/core/lib/gpr/useful.h +131 -0
- data/src/core/lib/gpr/wrap_memcpy.cc +43 -0
- data/src/core/lib/gprpp/atomic_utils.h +47 -0
- data/src/core/lib/gprpp/bitset.h +207 -0
- data/src/core/lib/gprpp/capture.h +76 -0
- data/src/core/lib/gprpp/chunked_vector.h +253 -0
- data/src/core/lib/gprpp/construct_destruct.h +39 -0
- data/src/core/lib/gprpp/cpp_impl_of.h +49 -0
- data/src/core/lib/gprpp/debug_location.h +55 -0
- data/src/core/lib/gprpp/dual_ref_counted.h +330 -0
- data/src/core/lib/gprpp/examine_stack.cc +43 -0
- data/src/core/lib/gprpp/examine_stack.h +46 -0
- data/src/core/lib/gprpp/fork.cc +244 -0
- data/src/core/lib/gprpp/fork.h +103 -0
- data/src/core/lib/gprpp/global_config.h +95 -0
- data/src/core/lib/gprpp/global_config_custom.h +29 -0
- data/src/core/lib/gprpp/global_config_env.cc +137 -0
- data/src/core/lib/gprpp/global_config_env.h +131 -0
- data/src/core/lib/gprpp/global_config_generic.h +44 -0
- data/src/core/lib/gprpp/host_port.cc +112 -0
- data/src/core/lib/gprpp/host_port.h +56 -0
- data/src/core/lib/gprpp/manual_constructor.h +215 -0
- data/src/core/lib/gprpp/match.h +73 -0
- data/src/core/lib/gprpp/memory.h +57 -0
- data/src/core/lib/gprpp/mpscq.cc +108 -0
- data/src/core/lib/gprpp/mpscq.h +99 -0
- data/src/core/lib/gprpp/orphanable.h +125 -0
- data/src/core/lib/gprpp/overload.h +59 -0
- data/src/core/lib/gprpp/ref_counted.h +351 -0
- data/src/core/lib/gprpp/ref_counted_ptr.h +351 -0
- data/src/core/lib/gprpp/single_set_ptr.h +87 -0
- data/src/core/lib/gprpp/stat.h +38 -0
- data/src/core/lib/gprpp/stat_posix.cc +49 -0
- data/src/core/lib/gprpp/stat_windows.cc +48 -0
- data/src/core/lib/gprpp/status_helper.cc +435 -0
- data/src/core/lib/gprpp/status_helper.h +181 -0
- data/src/core/lib/gprpp/sync.h +198 -0
- data/src/core/lib/gprpp/table.h +434 -0
- data/src/core/lib/gprpp/thd.h +174 -0
- data/src/core/lib/gprpp/thd_posix.cc +209 -0
- data/src/core/lib/gprpp/thd_windows.cc +171 -0
- data/src/core/lib/gprpp/time.cc +198 -0
- data/src/core/lib/gprpp/time.h +292 -0
- data/src/core/lib/gprpp/time_util.cc +77 -0
- data/src/core/lib/gprpp/time_util.h +42 -0
- data/src/core/lib/http/format_request.cc +107 -0
- data/src/core/lib/http/format_request.h +36 -0
- data/src/core/lib/http/httpcli.cc +396 -0
- data/src/core/lib/http/httpcli.h +223 -0
- data/src/core/lib/http/httpcli_security_connector.cc +204 -0
- data/src/core/lib/http/httpcli_ssl_credentials.h +37 -0
- data/src/core/lib/http/parser.cc +463 -0
- data/src/core/lib/http/parser.h +127 -0
- data/src/core/lib/iomgr/block_annotate.h +57 -0
- data/src/core/lib/iomgr/buffer_list.cc +307 -0
- data/src/core/lib/iomgr/buffer_list.h +163 -0
- data/src/core/lib/iomgr/call_combiner.cc +291 -0
- data/src/core/lib/iomgr/call_combiner.h +215 -0
- data/src/core/lib/iomgr/cfstream_handle.cc +210 -0
- data/src/core/lib/iomgr/cfstream_handle.h +90 -0
- data/src/core/lib/iomgr/closure.h +276 -0
- data/src/core/lib/iomgr/combiner.cc +350 -0
- data/src/core/lib/iomgr/combiner.h +89 -0
- data/src/core/lib/iomgr/dualstack_socket_posix.cc +48 -0
- data/src/core/lib/iomgr/dynamic_annotations.h +67 -0
- data/src/core/lib/iomgr/endpoint.cc +67 -0
- data/src/core/lib/iomgr/endpoint.h +107 -0
- data/src/core/lib/iomgr/endpoint_cfstream.cc +372 -0
- data/src/core/lib/iomgr/endpoint_cfstream.h +49 -0
- data/src/core/lib/iomgr/endpoint_pair.h +34 -0
- data/src/core/lib/iomgr/endpoint_pair_event_engine.cc +32 -0
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +75 -0
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +86 -0
- data/src/core/lib/iomgr/error.cc +988 -0
- data/src/core/lib/iomgr/error.h +440 -0
- data/src/core/lib/iomgr/error_cfstream.cc +59 -0
- data/src/core/lib/iomgr/error_cfstream.h +31 -0
- data/src/core/lib/iomgr/error_internal.h +66 -0
- data/src/core/lib/iomgr/ev_apple.cc +360 -0
- data/src/core/lib/iomgr/ev_apple.h +43 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +1365 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.h +31 -0
- data/src/core/lib/iomgr/ev_poll_posix.cc +1430 -0
- data/src/core/lib/iomgr/ev_poll_posix.h +29 -0
- data/src/core/lib/iomgr/ev_posix.cc +416 -0
- data/src/core/lib/iomgr/ev_posix.h +207 -0
- data/src/core/lib/iomgr/ev_windows.cc +30 -0
- data/src/core/lib/iomgr/event_engine/closure.cc +77 -0
- data/src/core/lib/iomgr/event_engine/closure.h +42 -0
- data/src/core/lib/iomgr/event_engine/endpoint.cc +172 -0
- data/src/core/lib/iomgr/event_engine/endpoint.h +52 -0
- data/src/core/lib/iomgr/event_engine/iomgr.cc +85 -0
- data/src/core/lib/iomgr/event_engine/pollset.cc +87 -0
- data/src/core/lib/iomgr/event_engine/pollset.h +25 -0
- data/src/core/lib/iomgr/event_engine/promise.h +51 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.cc +47 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.h +37 -0
- data/src/core/lib/iomgr/event_engine/resolver.cc +133 -0
- data/src/core/lib/iomgr/event_engine/resolver.h +56 -0
- data/src/core/lib/iomgr/event_engine/tcp.cc +296 -0
- data/src/core/lib/iomgr/event_engine/timer.cc +62 -0
- data/src/core/lib/iomgr/exec_ctx.cc +155 -0
- data/src/core/lib/iomgr/exec_ctx.h +359 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.cc +182 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.h +171 -0
- data/src/core/lib/iomgr/executor/threadpool.cc +136 -0
- data/src/core/lib/iomgr/executor/threadpool.h +150 -0
- data/src/core/lib/iomgr/executor.cc +461 -0
- data/src/core/lib/iomgr/executor.h +122 -0
- data/src/core/lib/iomgr/fork_posix.cc +120 -0
- data/src/core/lib/iomgr/fork_windows.cc +41 -0
- data/src/core/lib/iomgr/gethostname.h +26 -0
- data/src/core/lib/iomgr/gethostname_fallback.cc +30 -0
- data/src/core/lib/iomgr/gethostname_host_name_max.cc +40 -0
- data/src/core/lib/iomgr/gethostname_sysconf.cc +40 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex.h +30 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc +42 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc +38 -0
- data/src/core/lib/iomgr/internal_errqueue.cc +68 -0
- data/src/core/lib/iomgr/internal_errqueue.h +191 -0
- data/src/core/lib/iomgr/iocp_windows.cc +158 -0
- data/src/core/lib/iomgr/iocp_windows.h +48 -0
- data/src/core/lib/iomgr/iomgr.cc +196 -0
- data/src/core/lib/iomgr/iomgr.h +60 -0
- data/src/core/lib/iomgr/iomgr_internal.cc +53 -0
- data/src/core/lib/iomgr/iomgr_internal.h +74 -0
- data/src/core/lib/iomgr/iomgr_posix.cc +90 -0
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +200 -0
- data/src/core/lib/iomgr/iomgr_windows.cc +105 -0
- data/src/core/lib/iomgr/load_file.cc +81 -0
- data/src/core/lib/iomgr/load_file.h +35 -0
- data/src/core/lib/iomgr/lockfree_event.cc +278 -0
- data/src/core/lib/iomgr/lockfree_event.h +72 -0
- data/src/core/lib/iomgr/nameser.h +106 -0
- data/src/core/lib/iomgr/polling_entity.cc +96 -0
- data/src/core/lib/iomgr/polling_entity.h +74 -0
- data/src/core/lib/iomgr/pollset.cc +56 -0
- data/src/core/lib/iomgr/pollset.h +99 -0
- data/src/core/lib/iomgr/pollset_set.cc +55 -0
- data/src/core/lib/iomgr/pollset_set.h +55 -0
- data/src/core/lib/iomgr/pollset_set_windows.cc +52 -0
- data/src/core/lib/iomgr/pollset_set_windows.h +26 -0
- data/src/core/lib/iomgr/pollset_windows.cc +243 -0
- data/src/core/lib/iomgr/pollset_windows.h +70 -0
- data/src/core/lib/iomgr/port.h +216 -0
- data/src/core/lib/iomgr/python_util.h +47 -0
- data/src/core/lib/iomgr/resolve_address.cc +36 -0
- data/src/core/lib/iomgr/resolve_address.h +86 -0
- data/src/core/lib/iomgr/resolve_address_impl.h +59 -0
- data/src/core/lib/iomgr/resolve_address_posix.cc +186 -0
- data/src/core/lib/iomgr/resolve_address_posix.h +47 -0
- data/src/core/lib/iomgr/resolve_address_windows.cc +171 -0
- data/src/core/lib/iomgr/resolve_address_windows.h +47 -0
- data/src/core/lib/iomgr/resolved_address.h +39 -0
- data/src/core/lib/iomgr/sockaddr.h +33 -0
- data/src/core/lib/iomgr/sockaddr_posix.h +55 -0
- data/src/core/lib/iomgr/sockaddr_utils_posix.cc +62 -0
- data/src/core/lib/iomgr/sockaddr_windows.h +55 -0
- data/src/core/lib/iomgr/socket_factory_posix.cc +95 -0
- data/src/core/lib/iomgr/socket_factory_posix.h +69 -0
- data/src/core/lib/iomgr/socket_mutator.cc +97 -0
- data/src/core/lib/iomgr/socket_mutator.h +84 -0
- data/src/core/lib/iomgr/socket_utils.h +47 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +498 -0
- data/src/core/lib/iomgr/socket_utils_linux.cc +42 -0
- data/src/core/lib/iomgr/socket_utils_posix.cc +58 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +163 -0
- data/src/core/lib/iomgr/socket_utils_windows.cc +47 -0
- data/src/core/lib/iomgr/socket_windows.cc +202 -0
- data/src/core/lib/iomgr/socket_windows.h +127 -0
- data/src/core/lib/iomgr/tcp_client.cc +36 -0
- data/src/core/lib/iomgr/tcp_client.h +55 -0
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +197 -0
- data/src/core/lib/iomgr/tcp_client_posix.cc +344 -0
- data/src/core/lib/iomgr/tcp_client_posix.h +69 -0
- data/src/core/lib/iomgr/tcp_client_windows.cc +232 -0
- data/src/core/lib/iomgr/tcp_posix.cc +1902 -0
- data/src/core/lib/iomgr/tcp_posix.h +65 -0
- data/src/core/lib/iomgr/tcp_server.cc +77 -0
- data/src/core/lib/iomgr/tcp_server.h +147 -0
- data/src/core/lib/iomgr/tcp_server_posix.cc +650 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +129 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +224 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +176 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +36 -0
- data/src/core/lib/iomgr/tcp_server_windows.cc +561 -0
- data/src/core/lib/iomgr/tcp_windows.cc +532 -0
- data/src/core/lib/iomgr/tcp_windows.h +53 -0
- data/src/core/lib/iomgr/time_averaged_stats.cc +64 -0
- data/src/core/lib/iomgr/time_averaged_stats.h +72 -0
- data/src/core/lib/iomgr/timer.cc +46 -0
- data/src/core/lib/iomgr/timer.h +136 -0
- data/src/core/lib/iomgr/timer_generic.cc +737 -0
- data/src/core/lib/iomgr/timer_generic.h +40 -0
- data/src/core/lib/iomgr/timer_heap.cc +134 -0
- data/src/core/lib/iomgr/timer_heap.h +43 -0
- data/src/core/lib/iomgr/timer_manager.cc +364 -0
- data/src/core/lib/iomgr/timer_manager.h +41 -0
- data/src/core/lib/iomgr/unix_sockets_posix.cc +96 -0
- data/src/core/lib/iomgr/unix_sockets_posix.h +46 -0
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +53 -0
- data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +82 -0
- data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +39 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +99 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.h +28 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +70 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.h +98 -0
- data/src/core/lib/iomgr/work_serializer.cc +231 -0
- data/src/core/lib/iomgr/work_serializer.h +93 -0
- data/src/core/lib/json/json.h +250 -0
- data/src/core/lib/json/json_reader.cc +897 -0
- data/src/core/lib/json/json_util.cc +126 -0
- data/src/core/lib/json/json_util.h +154 -0
- data/src/core/lib/json/json_writer.cc +335 -0
- data/src/core/lib/matchers/matchers.cc +327 -0
- data/src/core/lib/matchers/matchers.h +160 -0
- data/src/core/lib/profiling/basic_timers.cc +295 -0
- data/src/core/lib/profiling/stap_timers.cc +50 -0
- data/src/core/lib/profiling/timers.h +94 -0
- data/src/core/lib/promise/activity.cc +121 -0
- data/src/core/lib/promise/activity.h +540 -0
- data/src/core/lib/promise/arena_promise.h +188 -0
- data/src/core/lib/promise/call_push_pull.h +144 -0
- data/src/core/lib/promise/context.h +86 -0
- data/src/core/lib/promise/detail/basic_seq.h +496 -0
- data/src/core/lib/promise/detail/promise_factory.h +189 -0
- data/src/core/lib/promise/detail/promise_like.h +85 -0
- data/src/core/lib/promise/detail/status.h +50 -0
- data/src/core/lib/promise/detail/switch.h +1455 -0
- data/src/core/lib/promise/exec_ctx_wakeup_scheduler.h +48 -0
- data/src/core/lib/promise/intra_activity_waiter.h +49 -0
- data/src/core/lib/promise/latch.h +104 -0
- data/src/core/lib/promise/loop.h +134 -0
- data/src/core/lib/promise/map.h +88 -0
- data/src/core/lib/promise/poll.h +66 -0
- data/src/core/lib/promise/promise.h +95 -0
- data/src/core/lib/promise/race.h +84 -0
- data/src/core/lib/promise/seq.h +89 -0
- data/src/core/lib/promise/sleep.cc +74 -0
- data/src/core/lib/promise/sleep.h +66 -0
- data/src/core/lib/promise/try_seq.h +157 -0
- data/src/core/lib/resolver/resolver.cc +79 -0
- data/src/core/lib/resolver/resolver.h +135 -0
- data/src/core/lib/resolver/resolver_factory.h +76 -0
- data/src/core/lib/resolver/resolver_registry.cc +156 -0
- data/src/core/lib/resolver/resolver_registry.h +113 -0
- data/src/core/lib/resolver/server_address.cc +170 -0
- data/src/core/lib/resolver/server_address.h +144 -0
- data/src/core/lib/resource_quota/api.cc +83 -0
- data/src/core/lib/resource_quota/api.h +40 -0
- data/src/core/lib/resource_quota/arena.cc +107 -0
- data/src/core/lib/resource_quota/arena.h +142 -0
- data/src/core/lib/resource_quota/memory_quota.cc +478 -0
- data/src/core/lib/resource_quota/memory_quota.h +457 -0
- data/src/core/lib/resource_quota/resource_quota.cc +33 -0
- data/src/core/lib/resource_quota/resource_quota.h +66 -0
- data/src/core/lib/resource_quota/thread_quota.cc +43 -0
- data/src/core/lib/resource_quota/thread_quota.h +57 -0
- data/src/core/lib/resource_quota/trace.cc +19 -0
- data/src/core/lib/resource_quota/trace.h +24 -0
- data/src/core/lib/security/authorization/authorization_engine.h +44 -0
- data/src/core/lib/security/authorization/authorization_policy_provider.h +40 -0
- data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +46 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +212 -0
- data/src/core/lib/security/authorization/evaluate_args.h +92 -0
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +60 -0
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +62 -0
- data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +106 -0
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +50 -0
- data/src/core/lib/security/authorization/matchers.cc +227 -0
- data/src/core/lib/security/authorization/matchers.h +211 -0
- data/src/core/lib/security/authorization/rbac_policy.cc +442 -0
- data/src/core/lib/security/authorization/rbac_policy.h +171 -0
- data/src/core/lib/security/context/security_context.cc +327 -0
- data/src/core/lib/security/context/security_context.h +159 -0
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +112 -0
- data/src/core/lib/security/credentials/alts/alts_credentials.h +119 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +72 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment.h +57 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc +68 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +33 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +102 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc +127 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc +46 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h +75 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc +59 -0
- data/src/core/lib/security/credentials/call_creds_util.cc +87 -0
- data/src/core/lib/security/credentials/call_creds_util.h +42 -0
- data/src/core/lib/security/credentials/channel_creds_registry.h +97 -0
- data/src/core/lib/security/credentials/channel_creds_registry_init.cc +70 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +171 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +119 -0
- data/src/core/lib/security/credentials/credentials.cc +163 -0
- data/src/core/lib/security/credentials/credentials.h +285 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +419 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +82 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +214 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +72 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +544 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +118 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +135 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +49 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +230 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +61 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +109 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.h +88 -0
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +42 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +470 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.h +93 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +74 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.h +55 -0
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +63 -0
- data/src/core/lib/security/credentials/insecure/insecure_credentials.h +57 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +286 -0
- data/src/core/lib/security/credentials/jwt/json_token.h +76 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +180 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +93 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +933 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +122 -0
- data/src/core/lib/security/credentials/local/local_credentials.cc +65 -0
- data/src/core/lib/security/credentials/local/local_credentials.h +71 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +736 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +200 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +211 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +101 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +378 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +119 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +348 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +217 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +454 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +195 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc +209 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +145 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +123 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +117 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +147 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.h +68 -0
- data/src/core/lib/security/credentials/tls/tls_utils.cc +123 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +51 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +237 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.h +100 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +305 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +76 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +318 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.h +43 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +111 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +92 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +33 -0
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +33 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +170 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.h +46 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +289 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.h +59 -0
- data/src/core/lib/security/security_connector/security_connector.cc +125 -0
- data/src/core/lib/security/security_connector/security_connector.h +187 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +450 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +81 -0
- data/src/core/lib/security/security_connector/ssl_utils.cc +617 -0
- data/src/core/lib/security/security_connector/ssl_utils.h +184 -0
- data/src/core/lib/security/security_connector/ssl_utils_config.cc +32 -0
- data/src/core/lib/security/security_connector/ssl_utils_config.h +30 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +826 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +266 -0
- data/src/core/lib/security/transport/auth_filters.h +69 -0
- data/src/core/lib/security/transport/client_auth_filter.cc +210 -0
- data/src/core/lib/security/transport/secure_endpoint.cc +511 -0
- data/src/core/lib/security/transport/secure_endpoint.h +42 -0
- data/src/core/lib/security/transport/security_handshaker.cc +652 -0
- data/src/core/lib/security/transport/security_handshaker.h +46 -0
- data/src/core/lib/security/transport/server_auth_filter.cc +337 -0
- data/src/core/lib/security/transport/tsi_error.cc +28 -0
- data/src/core/lib/security/transport/tsi_error.h +30 -0
- data/src/core/lib/security/util/json_util.cc +70 -0
- data/src/core/lib/security/util/json_util.h +45 -0
- data/src/core/lib/service_config/service_config.h +82 -0
- data/src/core/lib/service_config/service_config_call_data.h +72 -0
- data/src/core/lib/service_config/service_config_impl.cc +230 -0
- data/src/core/lib/service_config/service_config_impl.h +125 -0
- data/src/core/lib/service_config/service_config_parser.cc +93 -0
- data/src/core/lib/service_config/service_config_parser.h +106 -0
- data/src/core/lib/slice/b64.cc +239 -0
- data/src/core/lib/slice/b64.h +50 -0
- data/src/core/lib/slice/percent_encoding.cc +156 -0
- data/src/core/lib/slice/percent_encoding.h +60 -0
- data/src/core/lib/slice/slice.cc +489 -0
- data/src/core/lib/slice/slice.h +384 -0
- data/src/core/lib/slice/slice_api.cc +39 -0
- data/src/core/lib/slice/slice_buffer.cc +417 -0
- data/src/core/lib/slice/slice_internal.h +104 -0
- data/src/core/lib/slice/slice_refcount.cc +35 -0
- data/src/core/lib/slice/slice_refcount.h +46 -0
- data/src/core/lib/slice/slice_refcount_base.h +61 -0
- data/src/core/lib/slice/slice_split.cc +100 -0
- data/src/core/lib/slice/slice_split.h +40 -0
- data/src/core/lib/slice/slice_string_helpers.cc +44 -0
- data/src/core/lib/slice/slice_string_helpers.h +38 -0
- data/src/core/lib/surface/api_trace.cc +25 -0
- data/src/core/lib/surface/api_trace.h +53 -0
- data/src/core/lib/surface/builtins.cc +49 -0
- data/src/core/lib/surface/builtins.h +26 -0
- data/src/core/lib/surface/byte_buffer.cc +92 -0
- data/src/core/lib/surface/byte_buffer_reader.cc +101 -0
- data/src/core/lib/surface/call.cc +1967 -0
- data/src/core/lib/surface/call.h +117 -0
- data/src/core/lib/surface/call_details.cc +41 -0
- data/src/core/lib/surface/call_log_batch.cc +111 -0
- data/src/core/lib/surface/call_test_only.h +43 -0
- data/src/core/lib/surface/channel.cc +504 -0
- data/src/core/lib/surface/channel.h +167 -0
- data/src/core/lib/surface/channel_init.cc +55 -0
- data/src/core/lib/surface/channel_init.h +82 -0
- data/src/core/lib/surface/channel_ping.cc +63 -0
- data/src/core/lib/surface/channel_stack_type.cc +59 -0
- data/src/core/lib/surface/channel_stack_type.h +47 -0
- data/src/core/lib/surface/completion_queue.cc +1430 -0
- data/src/core/lib/surface/completion_queue.h +98 -0
- data/src/core/lib/surface/completion_queue_factory.cc +88 -0
- data/src/core/lib/surface/completion_queue_factory.h +39 -0
- data/src/core/lib/surface/event_string.cc +62 -0
- data/src/core/lib/surface/event_string.h +31 -0
- data/src/core/lib/surface/init.cc +288 -0
- data/src/core/lib/surface/init.h +33 -0
- data/src/core/lib/surface/lame_client.cc +199 -0
- data/src/core/lib/surface/lame_client.h +33 -0
- data/src/core/lib/surface/metadata_array.cc +36 -0
- data/src/core/lib/surface/server.cc +1569 -0
- data/src/core/lib/surface/server.h +495 -0
- data/src/core/lib/surface/validate_metadata.cc +136 -0
- data/src/core/lib/surface/validate_metadata.h +45 -0
- data/src/core/lib/surface/version.cc +28 -0
- data/src/core/lib/transport/bdp_estimator.cc +86 -0
- data/src/core/lib/transport/bdp_estimator.h +95 -0
- data/src/core/lib/transport/byte_stream.cc +164 -0
- data/src/core/lib/transport/byte_stream.h +166 -0
- data/src/core/lib/transport/connectivity_state.cc +188 -0
- data/src/core/lib/transport/connectivity_state.h +145 -0
- data/src/core/lib/transport/error_utils.cc +193 -0
- data/src/core/lib/transport/error_utils.h +59 -0
- data/src/core/lib/transport/http2_errors.h +41 -0
- data/src/core/lib/transport/metadata_batch.h +1394 -0
- data/src/core/lib/transport/parsed_metadata.cc +37 -0
- data/src/core/lib/transport/parsed_metadata.h +401 -0
- data/src/core/lib/transport/pid_controller.cc +51 -0
- data/src/core/lib/transport/pid_controller.h +116 -0
- data/src/core/lib/transport/status_conversion.cc +92 -0
- data/src/core/lib/transport/status_conversion.h +38 -0
- data/src/core/lib/transport/timeout_encoding.cc +288 -0
- data/src/core/lib/transport/timeout_encoding.h +68 -0
- data/src/core/lib/transport/transport.cc +241 -0
- data/src/core/lib/transport/transport.h +570 -0
- data/src/core/lib/transport/transport_impl.h +85 -0
- data/src/core/lib/transport/transport_op_string.cc +147 -0
- data/src/core/lib/uri/uri_parser.cc +365 -0
- data/src/core/lib/uri/uri_parser.h +103 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +129 -0
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +85 -0
- data/src/core/tsi/alts/crypt/aes_gcm.cc +690 -0
- data/src/core/tsi/alts/crypt/gsec.cc +190 -0
- data/src/core/tsi/alts/crypt/gsec.h +459 -0
- data/src/core/tsi/alts/frame_protector/alts_counter.cc +118 -0
- data/src/core/tsi/alts/frame_protector/alts_counter.h +98 -0
- data/src/core/tsi/alts/frame_protector/alts_crypter.cc +66 -0
- data/src/core/tsi/alts/frame_protector/alts_crypter.h +255 -0
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.cc +408 -0
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.h +55 -0
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc +114 -0
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h +114 -0
- data/src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc +105 -0
- data/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc +103 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +219 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.h +236 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +908 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +160 -0
- data/src/core/tsi/alts/handshaker/alts_shared_resource.cc +91 -0
- data/src/core/tsi/alts/handshaker/alts_shared_resource.h +73 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +713 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +104 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +89 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +64 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +53 -0
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +223 -0
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +171 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +226 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +54 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc +144 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h +49 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h +91 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +174 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h +99 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +478 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h +199 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +307 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +57 -0
- data/src/core/tsi/fake_transport_security.cc +809 -0
- data/src/core/tsi/fake_transport_security.h +47 -0
- data/src/core/tsi/local_transport_security.cc +170 -0
- data/src/core/tsi/local_transport_security.h +47 -0
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +141 -0
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.h +81 -0
- data/src/core/tsi/ssl/session_cache/ssl_session.h +69 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +57 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +179 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +90 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +75 -0
- data/src/core/tsi/ssl_transport_security.cc +2417 -0
- data/src/core/tsi/ssl_transport_security.h +405 -0
- data/src/core/tsi/ssl_types.h +42 -0
- data/src/core/tsi/transport_security.cc +384 -0
- data/src/core/tsi/transport_security.h +142 -0
- data/src/core/tsi/transport_security_grpc.cc +73 -0
- data/src/core/tsi/transport_security_grpc.h +80 -0
- data/src/core/tsi/transport_security_interface.h +509 -0
- data/src/ruby/ext/grpc/extconf.rb +1 -1
- data/src/ruby/lib/grpc/2.5/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.6/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.7/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.0/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/3.1/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/generic/active_call.rb +7 -1
- data/src/ruby/lib/grpc/grpc.rb +1 -1
- data/src/ruby/lib/grpc/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/generate_proto_ruby.sh +1 -0
- data/third_party/abseil-cpp/absl/algorithm/algorithm.h +159 -0
- data/third_party/abseil-cpp/absl/algorithm/container.h +1774 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +735 -0
- data/third_party/abseil-cpp/absl/base/call_once.h +219 -0
- data/third_party/abseil-cpp/absl/base/casts.h +187 -0
- data/third_party/abseil-cpp/absl/base/config.h +772 -0
- data/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +471 -0
- data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +107 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +94 -0
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +169 -0
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/third_party/abseil-cpp/absl/base/internal/endian.h +327 -0
- data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/third_party/abseil-cpp/absl/base/internal/fast_type_id.h +48 -0
- data/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
- data/third_party/abseil-cpp/absl/base/internal/identity.h +37 -0
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +107 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +187 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +134 -0
- data/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +242 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +195 -0
- data/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +229 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +248 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +74 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +95 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +37 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +508 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +74 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +271 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +155 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +265 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +212 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.h +75 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +68 -0
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +82 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +154 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +124 -0
- data/third_party/abseil-cpp/absl/base/log_severity.cc +27 -0
- data/third_party/abseil-cpp/absl/base/log_severity.h +121 -0
- data/third_party/abseil-cpp/absl/base/macros.h +158 -0
- data/third_party/abseil-cpp/absl/base/optimization.h +244 -0
- data/third_party/abseil-cpp/absl/base/options.h +238 -0
- data/third_party/abseil-cpp/absl/base/policy_checks.h +111 -0
- data/third_party/abseil-cpp/absl/base/port.h +25 -0
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +335 -0
- data/third_party/abseil-cpp/absl/container/fixed_array.h +527 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +606 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +855 -0
- data/third_party/abseil-cpp/absl/container/internal/common.h +206 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +290 -0
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +460 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +163 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +208 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +190 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +281 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +31 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +50 -0
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +932 -0
- data/third_party/abseil-cpp/absl/container/internal/layout.h +743 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +198 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +67 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +2034 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +139 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1959 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +383 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +138 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +199 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +87 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +110 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +108 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +253 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +234 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +93 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +364 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +153 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +191 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +142 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +38 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +101 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1574 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +72 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/bind_front.h +184 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +142 -0
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +95 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +347 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +349 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +78 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +69 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +1096 -0
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +123 -0
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.h +50 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +699 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +797 -0
- data/third_party/abseil-cpp/absl/numeric/bits.h +177 -0
- data/third_party/abseil-cpp/absl/numeric/int128.cc +383 -0
- data/third_party/abseil-cpp/absl/numeric/int128.h +1165 -0
- data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +296 -0
- data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +311 -0
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +358 -0
- data/third_party/abseil-cpp/absl/numeric/internal/representation.h +55 -0
- data/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +230 -0
- data/third_party/abseil-cpp/absl/random/bernoulli_distribution.h +200 -0
- data/third_party/abseil-cpp/absl/random/beta_distribution.h +427 -0
- data/third_party/abseil-cpp/absl/random/discrete_distribution.cc +98 -0
- data/third_party/abseil-cpp/absl/random/discrete_distribution.h +247 -0
- data/third_party/abseil-cpp/absl/random/distributions.h +452 -0
- data/third_party/abseil-cpp/absl/random/exponential_distribution.h +165 -0
- data/third_party/abseil-cpp/absl/random/gaussian_distribution.cc +104 -0
- data/third_party/abseil-cpp/absl/random/gaussian_distribution.h +275 -0
- data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +92 -0
- data/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +268 -0
- data/third_party/abseil-cpp/absl/random/internal/fastmath.h +57 -0
- data/third_party/abseil-cpp/absl/random/internal/generate_real.h +144 -0
- data/third_party/abseil-cpp/absl/random/internal/iostream_state_saver.h +245 -0
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +150 -0
- data/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +308 -0
- data/third_party/abseil-cpp/absl/random/internal/platform.h +171 -0
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.cc +253 -0
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.h +131 -0
- data/third_party/abseil-cpp/absl/random/internal/randen.cc +91 -0
- data/third_party/abseil-cpp/absl/random/internal/randen.h +102 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +221 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.h +33 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_engine.h +239 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_hwaes.cc +526 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_hwaes.h +50 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_round_keys.cc +462 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_slow.cc +471 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_slow.h +40 -0
- data/third_party/abseil-cpp/absl/random/internal/randen_traits.h +88 -0
- data/third_party/abseil-cpp/absl/random/internal/salted_seed_seq.h +167 -0
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +267 -0
- data/third_party/abseil-cpp/absl/random/internal/seed_material.h +104 -0
- data/third_party/abseil-cpp/absl/random/internal/traits.h +101 -0
- data/third_party/abseil-cpp/absl/random/internal/uniform_helper.h +244 -0
- data/third_party/abseil-cpp/absl/random/internal/wide_multiply.h +111 -0
- data/third_party/abseil-cpp/absl/random/log_uniform_int_distribution.h +257 -0
- data/third_party/abseil-cpp/absl/random/poisson_distribution.h +258 -0
- data/third_party/abseil-cpp/absl/random/random.h +189 -0
- data/third_party/abseil-cpp/absl/random/seed_gen_exception.cc +46 -0
- data/third_party/abseil-cpp/absl/random/seed_gen_exception.h +55 -0
- data/third_party/abseil-cpp/absl/random/seed_sequences.cc +29 -0
- data/third_party/abseil-cpp/absl/random/seed_sequences.h +110 -0
- data/third_party/abseil-cpp/absl/random/uniform_int_distribution.h +275 -0
- data/third_party/abseil-cpp/absl/random/uniform_real_distribution.h +202 -0
- data/third_party/abseil-cpp/absl/random/zipf_distribution.h +271 -0
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +69 -0
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +396 -0
- data/third_party/abseil-cpp/absl/status/status.cc +444 -0
- data/third_party/abseil-cpp/absl/status/status.h +882 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +38 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/status/statusor.cc +103 -0
- data/third_party/abseil-cpp/absl/status/statusor.h +770 -0
- data/third_party/abseil-cpp/absl/strings/ascii.cc +200 -0
- data/third_party/abseil-cpp/absl/strings/ascii.h +242 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +984 -0
- data/third_party/abseil-cpp/absl/strings/charconv.h +120 -0
- data/third_party/abseil-cpp/absl/strings/cord.cc +2047 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1521 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +949 -0
- data/third_party/abseil-cpp/absl/strings/escaping.h +164 -0
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +156 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +359 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +423 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +89 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +620 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +1128 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +939 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +185 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h +265 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc +68 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h +211 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.cc +129 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.h +50 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +146 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +771 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.h +607 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h +118 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc +96 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h +85 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc +139 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h +131 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +445 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +298 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +87 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_update_scope.h +71 -0
- data/third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h +121 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +180 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +58 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +112 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.h +148 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +36 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +89 -0
- data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +119 -0
- data/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +488 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +526 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +258 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +217 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +333 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +75 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +445 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +1423 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +37 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +72 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +96 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +339 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +357 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +314 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +430 -0
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +64 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +53 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +50 -0
- data/third_party/abseil-cpp/absl/strings/match.cc +43 -0
- data/third_party/abseil-cpp/absl/strings/match.h +100 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +1093 -0
- data/third_party/abseil-cpp/absl/strings/numbers.h +300 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +246 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.h +408 -0
- data/third_party/abseil-cpp/absl/strings/str_format.h +812 -0
- data/third_party/abseil-cpp/absl/strings/str_join.h +293 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +82 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.h +219 -0
- data/third_party/abseil-cpp/absl/strings/str_split.cc +139 -0
- data/third_party/abseil-cpp/absl/strings/str_split.h +548 -0
- data/third_party/abseil-cpp/absl/strings/string_view.cc +230 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +710 -0
- data/third_party/abseil-cpp/absl/strings/strip.h +91 -0
- data/third_party/abseil-cpp/absl/strings/substitute.cc +172 -0
- data/third_party/abseil-cpp/absl/strings/substitute.h +721 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +67 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +101 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/futex.h +154 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +698 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +156 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +428 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2751 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1082 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/time/civil_time.cc +173 -0
- data/third_party/abseil-cpp/absl/time/civil_time.h +538 -0
- data/third_party/abseil-cpp/absl/time/clock.cc +585 -0
- data/third_party/abseil-cpp/absl/time/clock.h +74 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +954 -0
- data/third_party/abseil-cpp/absl/time/format.cc +160 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h +332 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +628 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +459 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +102 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc +94 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +140 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h +52 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1029 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc +45 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +77 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +113 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +93 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +1027 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +137 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +315 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h +55 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +236 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc +159 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h +132 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +122 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +115 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc +31 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc +24 -0
- data/third_party/abseil-cpp/absl/time/time.cc +500 -0
- data/third_party/abseil-cpp/absl/time/time.h +1616 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +48 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +78 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/optional.h +396 -0
- data/third_party/abseil-cpp/absl/types/internal/span.h +128 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/optional.h +776 -0
- data/third_party/abseil-cpp/absl/types/span.h +726 -0
- data/third_party/abseil-cpp/absl/types/variant.h +866 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +350 -0
- data/third_party/address_sorting/address_sorting.c +375 -0
- data/third_party/address_sorting/address_sorting_internal.h +70 -0
- data/third_party/address_sorting/address_sorting_posix.c +98 -0
- data/third_party/address_sorting/address_sorting_windows.c +95 -0
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +115 -0
- data/third_party/boringssl-with-bazel/err_data.c +1493 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c +195 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c +88 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c +420 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +298 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +299 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c +77 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c +83 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strex.c +650 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +212 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +163 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +264 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utf8.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +452 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +80 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +101 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/charmap.h +15 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +102 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +224 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +969 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +710 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +233 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +332 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +281 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/time_support.c +206 -0
- data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +482 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +702 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +324 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +541 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +275 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +311 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/hexdump.c +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/internal.h +111 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +483 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/printf.c +115 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +156 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c +57 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/convert.c +470 -0
- data/third_party/boringssl-with-bazel/src/crypto/buf/buf.c +172 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.c +52 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +728 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +711 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/internal.h +96 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/unicode.c +155 -0
- data/third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c +175 -0
- data/third_party/boringssl-with-bazel/src/crypto/chacha/internal.h +45 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +127 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c +152 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesccm.c +447 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesctrhmac.c +283 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesgcmsiv.c +891 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c +343 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.c +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc2.c +462 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c +601 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +338 -0
- data/third_party/boringssl-with-bazel/src/crypto/cmac/cmac.c +278 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf.c +821 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf_def.h +127 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/internal.h +31 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-fuchsia.c +55 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-linux.c +62 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-win.c +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c +229 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.h +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm.c +38 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-intel.c +291 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-ppc64le.c +38 -0
- data/third_party/boringssl-with-bazel/src/crypto/crypto.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c +2159 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_tables.h +7872 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c +539 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c +160 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c +272 -0
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +268 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +967 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +390 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c +559 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_derive.c +95 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c +385 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c +124 -0
- data/third_party/boringssl-with-bazel/src/crypto/ecdsa_extra/ecdsa_asn1.c +267 -0
- data/third_party/boringssl-with-bazel/src/crypto/engine/engine.c +99 -0
- data/third_party/boringssl-with-bazel/src/crypto/err/err.c +857 -0
- data/third_party/boringssl-with-bazel/src/crypto/err/internal.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/digestsign.c +231 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +547 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_ctx.c +484 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/internal.h +269 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +277 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec.c +286 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec_asn1.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519.c +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519_asn1.c +221 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.c +648 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa_asn1.c +194 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519.c +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519_asn1.c +248 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.c +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/print.c +489 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c +211 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/sign.c +151 -0
- data/third_party/boringssl-with-bazel/src/crypto/ex_data.c +261 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c +108 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1282 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/internal.h +238 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/key_wrap.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/add.c +316 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/x86_64-gcc.c +541 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c +438 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bytes.c +230 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/cmp.c +200 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/ctx.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +902 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div_extra.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.c +1288 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd.c +378 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c +326 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/generic.c +711 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +715 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.c +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.c +502 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery_inv.c +186 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.c +749 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c +1064 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/random.c +341 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.h +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/shift.c +364 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.c +498 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/aead.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c +648 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +1473 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_des.c +237 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/internal.h +128 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/delocate.h +89 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/des.c +784 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/internal.h +238 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/check.c +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/dh.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +282 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h +112 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +195 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +1268 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +472 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c +524 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.c +100 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +772 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c +328 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +1180 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64-table.h +9497 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.c +633 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.h +153 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c +740 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +297 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/scalar.c +175 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c +357 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +270 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c +270 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +338 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +39 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c +32 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/hmac.c +228 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/internal.h +37 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c +178 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c +203 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c +733 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +420 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c +97 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/polyval.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg.c +202 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.c +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.h +49 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h +64 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +184 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +457 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +401 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c +243 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/padding.c +695 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +935 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +1416 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.c +79 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +874 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/internal.h +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1-altivec.c +361 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c +357 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +321 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +508 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h +39 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/kdf.c +165 -0
- data/third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf.c +112 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +618 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c +2198 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +68 -0
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +959 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/internal.h +253 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c +353 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +410 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj.c +553 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +11585 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +252 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +358 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +769 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +214 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.c +65 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.c +65 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +193 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +526 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/p5_pbev2.c +316 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c +530 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +1383 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/internal.h +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +321 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c +307 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c +860 -0
- data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +49 -0
- data/third_party/boringssl-with-bazel/src/crypto/pool/pool.c +257 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c +46 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c +74 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +73 -0
- data/third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/refcount_c11.c +67 -0
- data/third_party/boringssl-with-bazel/src/crypto/refcount_lock.c +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c +324 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.c +22 -0
- data/third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c +82 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/stack.c +425 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread.c +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_none.c +59 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.c +182 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_win.c +260 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +318 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +1399 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +858 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +766 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c +96 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c +128 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c +118 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +163 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +826 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c +459 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +277 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.c +83 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +404 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +400 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +130 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_req.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +365 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +116 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +90 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +358 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +461 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_def.c +103 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +212 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +830 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +199 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +331 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +204 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +281 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +2456 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +651 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +388 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +84 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c +153 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +386 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +565 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c +77 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_info.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +544 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +94 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_spki.c +80 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.c +71 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +394 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +138 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +289 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +287 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +132 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_lib.c +155 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_node.c +189 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c +843 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akeya.c +72 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +640 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bcons.c +133 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +144 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +468 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +500 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +563 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_extku.c +148 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c +121 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +218 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_int.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +379 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +558 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ocsp.c +68 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c +289 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcia.c +57 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcons.c +139 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pmaps.c +154 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +230 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +929 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +156 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +1437 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +480 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +207 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +240 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +2039 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1_mac.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +718 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +627 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base64.h +198 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +939 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +62 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blowfish.h +93 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +1057 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/buf.h +137 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/buffer.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +586 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cast.h +96 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +41 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +673 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cmac.h +91 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/conf.h +183 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +202 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +169 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/curve25519.h +201 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +183 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +353 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +348 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +443 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dtls1.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/e_os2.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +442 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +357 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdh.h +118 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +236 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/engine.h +109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +466 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +1083 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp_errors.h +99 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ex_data.h +203 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +68 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hmac.h +186 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +350 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +102 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/is_boringssl.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/lhash.h +81 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/md4.h +108 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/md5.h +109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +184 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +4259 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +256 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj_mac.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/objects.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +70 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslv.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ossl_typ.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +483 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs12.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +239 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +282 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/poly1305.h +49 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +108 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +114 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rc4.h +96 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ripemd.h +108 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +855 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/safestack.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +294 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/siphash.h +37 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +222 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/srtp.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +5624 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl3.h +333 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/stack.h +542 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/thread.h +191 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +647 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +310 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/type_check.h +90 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +2419 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +1021 -0
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +192 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +835 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +268 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc +273 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +232 -0
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +200 -0
- data/third_party/boringssl-with-bazel/src/ssl/dtls_record.cc +353 -0
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +1084 -0
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +4325 -0
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +986 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +758 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +1986 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1956 -0
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +3953 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +730 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +219 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +453 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc +432 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +896 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc +306 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +1014 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +1717 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_file.cc +585 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +400 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +3072 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +837 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +1342 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +233 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +272 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +402 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +1363 -0
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +384 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +733 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +1122 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +582 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +1349 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +319 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +705 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_32.h +981 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64.h +619 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_32.h +3147 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64.h +1226 -0
- data/third_party/cares/ares_build.h +223 -0
- data/third_party/cares/cares/include/ares.h +742 -0
- data/third_party/cares/cares/include/ares_dns.h +112 -0
- data/third_party/cares/cares/include/ares_rules.h +125 -0
- data/third_party/cares/cares/include/ares_version.h +24 -0
- data/third_party/cares/cares/src/lib/ares__close_sockets.c +61 -0
- data/third_party/cares/cares/src/lib/ares__get_hostent.c +260 -0
- data/third_party/cares/cares/src/lib/ares__parse_into_addrinfo.c +260 -0
- data/third_party/cares/cares/src/lib/ares__read_line.c +73 -0
- data/third_party/cares/cares/src/lib/ares__readaddrinfo.c +264 -0
- data/third_party/cares/cares/src/lib/ares__sortaddrinfo.c +499 -0
- data/third_party/cares/cares/src/lib/ares__timeval.c +111 -0
- data/third_party/cares/cares/src/lib/ares_android.c +444 -0
- data/third_party/cares/cares/src/lib/ares_android.h +27 -0
- data/third_party/cares/cares/src/lib/ares_cancel.c +63 -0
- data/third_party/cares/cares/src/lib/ares_create_query.c +197 -0
- data/third_party/cares/cares/src/lib/ares_data.c +240 -0
- data/third_party/cares/cares/src/lib/ares_data.h +74 -0
- data/third_party/cares/cares/src/lib/ares_destroy.c +113 -0
- data/third_party/cares/cares/src/lib/ares_expand_name.c +300 -0
- data/third_party/cares/cares/src/lib/ares_expand_string.c +67 -0
- data/third_party/cares/cares/src/lib/ares_fds.c +59 -0
- data/third_party/cares/cares/src/lib/ares_free_hostent.c +43 -0
- data/third_party/cares/cares/src/lib/ares_free_string.c +25 -0
- data/third_party/cares/cares/src/lib/ares_freeaddrinfo.c +59 -0
- data/third_party/cares/cares/src/lib/ares_getaddrinfo.c +772 -0
- data/third_party/cares/cares/src/lib/ares_getenv.c +28 -0
- data/third_party/cares/cares/src/lib/ares_getenv.h +26 -0
- data/third_party/cares/cares/src/lib/ares_gethostbyaddr.c +287 -0
- data/third_party/cares/cares/src/lib/ares_gethostbyname.c +534 -0
- data/third_party/cares/cares/src/lib/ares_getnameinfo.c +447 -0
- data/third_party/cares/cares/src/lib/ares_getsock.c +66 -0
- data/third_party/cares/cares/src/lib/ares_inet_net_pton.h +25 -0
- data/third_party/cares/cares/src/lib/ares_init.c +2654 -0
- data/third_party/cares/cares/src/lib/ares_iphlpapi.h +221 -0
- data/third_party/cares/cares/src/lib/ares_ipv6.h +85 -0
- data/third_party/cares/cares/src/lib/ares_library_init.c +200 -0
- data/third_party/cares/cares/src/lib/ares_library_init.h +43 -0
- data/third_party/cares/cares/src/lib/ares_llist.c +63 -0
- data/third_party/cares/cares/src/lib/ares_llist.h +39 -0
- data/third_party/cares/cares/src/lib/ares_mkquery.c +24 -0
- data/third_party/cares/cares/src/lib/ares_nameser.h +482 -0
- data/third_party/cares/cares/src/lib/ares_nowarn.c +260 -0
- data/third_party/cares/cares/src/lib/ares_nowarn.h +61 -0
- data/third_party/cares/cares/src/lib/ares_options.c +406 -0
- data/third_party/cares/cares/src/lib/ares_parse_a_reply.c +209 -0
- data/third_party/cares/cares/src/lib/ares_parse_aaaa_reply.c +212 -0
- data/third_party/cares/cares/src/lib/ares_parse_caa_reply.c +199 -0
- data/third_party/cares/cares/src/lib/ares_parse_mx_reply.c +164 -0
- data/third_party/cares/cares/src/lib/ares_parse_naptr_reply.c +183 -0
- data/third_party/cares/cares/src/lib/ares_parse_ns_reply.c +177 -0
- data/third_party/cares/cares/src/lib/ares_parse_ptr_reply.c +228 -0
- data/third_party/cares/cares/src/lib/ares_parse_soa_reply.c +179 -0
- data/third_party/cares/cares/src/lib/ares_parse_srv_reply.c +168 -0
- data/third_party/cares/cares/src/lib/ares_parse_txt_reply.c +214 -0
- data/third_party/cares/cares/src/lib/ares_platform.c +11042 -0
- data/third_party/cares/cares/src/lib/ares_platform.h +43 -0
- data/third_party/cares/cares/src/lib/ares_private.h +423 -0
- data/third_party/cares/cares/src/lib/ares_process.c +1548 -0
- data/third_party/cares/cares/src/lib/ares_query.c +180 -0
- data/third_party/cares/cares/src/lib/ares_search.c +321 -0
- data/third_party/cares/cares/src/lib/ares_send.c +131 -0
- data/third_party/cares/cares/src/lib/ares_setup.h +220 -0
- data/third_party/cares/cares/src/lib/ares_strcasecmp.c +66 -0
- data/third_party/cares/cares/src/lib/ares_strcasecmp.h +30 -0
- data/third_party/cares/cares/src/lib/ares_strdup.c +49 -0
- data/third_party/cares/cares/src/lib/ares_strdup.h +24 -0
- data/third_party/cares/cares/src/lib/ares_strerror.c +56 -0
- data/third_party/cares/cares/src/lib/ares_strsplit.c +178 -0
- data/third_party/cares/cares/src/lib/ares_strsplit.h +43 -0
- data/third_party/cares/cares/src/lib/ares_timeout.c +88 -0
- data/third_party/cares/cares/src/lib/ares_version.c +11 -0
- data/third_party/cares/cares/src/lib/ares_writev.c +79 -0
- data/third_party/cares/cares/src/lib/ares_writev.h +36 -0
- data/third_party/cares/cares/src/lib/bitncmp.c +59 -0
- data/third_party/cares/cares/src/lib/bitncmp.h +26 -0
- data/third_party/cares/cares/src/lib/config-dos.h +115 -0
- data/third_party/cares/cares/src/lib/config-win32.h +351 -0
- data/third_party/cares/cares/src/lib/inet_net_pton.c +444 -0
- data/third_party/cares/cares/src/lib/inet_ntop.c +201 -0
- data/third_party/cares/cares/src/lib/setup_once.h +554 -0
- data/third_party/cares/cares/src/lib/windows_port.c +22 -0
- data/third_party/cares/config_darwin/ares_config.h +428 -0
- data/third_party/cares/config_freebsd/ares_config.h +505 -0
- data/third_party/cares/config_linux/ares_config.h +461 -0
- data/third_party/cares/config_openbsd/ares_config.h +505 -0
- data/third_party/re2/re2/bitmap256.h +117 -0
- data/third_party/re2/re2/bitstate.cc +385 -0
- data/third_party/re2/re2/compile.cc +1261 -0
- data/third_party/re2/re2/dfa.cc +2118 -0
- data/third_party/re2/re2/filtered_re2.cc +137 -0
- data/third_party/re2/re2/filtered_re2.h +114 -0
- data/third_party/re2/re2/mimics_pcre.cc +197 -0
- data/third_party/re2/re2/nfa.cc +713 -0
- data/third_party/re2/re2/onepass.cc +623 -0
- data/third_party/re2/re2/parse.cc +2483 -0
- data/third_party/re2/re2/perl_groups.cc +119 -0
- data/third_party/re2/re2/pod_array.h +55 -0
- data/third_party/re2/re2/prefilter.cc +711 -0
- data/third_party/re2/re2/prefilter.h +108 -0
- data/third_party/re2/re2/prefilter_tree.cc +407 -0
- data/third_party/re2/re2/prefilter_tree.h +139 -0
- data/third_party/re2/re2/prog.cc +1166 -0
- data/third_party/re2/re2/prog.h +455 -0
- data/third_party/re2/re2/re2.cc +1331 -0
- data/third_party/re2/re2/re2.h +1017 -0
- data/third_party/re2/re2/regexp.cc +987 -0
- data/third_party/re2/re2/regexp.h +665 -0
- data/third_party/re2/re2/set.cc +176 -0
- data/third_party/re2/re2/set.h +85 -0
- data/third_party/re2/re2/simplify.cc +665 -0
- data/third_party/re2/re2/sparse_array.h +392 -0
- data/third_party/re2/re2/sparse_set.h +264 -0
- data/third_party/re2/re2/stringpiece.cc +65 -0
- data/third_party/re2/re2/stringpiece.h +210 -0
- data/third_party/re2/re2/tostring.cc +351 -0
- data/third_party/re2/re2/unicode_casefold.cc +582 -0
- data/third_party/re2/re2/unicode_casefold.h +78 -0
- data/third_party/re2/re2/unicode_groups.cc +6269 -0
- data/third_party/re2/re2/unicode_groups.h +67 -0
- data/third_party/re2/re2/walker-inl.h +246 -0
- data/third_party/re2/util/benchmark.h +156 -0
- data/third_party/re2/util/flags.h +26 -0
- data/third_party/re2/util/logging.h +109 -0
- data/third_party/re2/util/malloc_counter.h +19 -0
- data/third_party/re2/util/mix.h +41 -0
- data/third_party/re2/util/mutex.h +148 -0
- data/third_party/re2/util/pcre.cc +1025 -0
- data/third_party/re2/util/pcre.h +681 -0
- data/third_party/re2/util/rune.cc +260 -0
- data/third_party/re2/util/strutil.cc +149 -0
- data/third_party/re2/util/strutil.h +21 -0
- data/third_party/re2/util/test.h +50 -0
- data/third_party/re2/util/utf.h +44 -0
- data/third_party/re2/util/util.h +42 -0
- data/third_party/upb/third_party/utf8_range/naive.c +92 -0
- data/third_party/upb/third_party/utf8_range/range2-neon.c +157 -0
- data/third_party/upb/third_party/utf8_range/range2-sse.c +170 -0
- data/third_party/upb/third_party/utf8_range/utf8_range.h +9 -0
- data/third_party/upb/upb/decode.c +1125 -0
- data/third_party/upb/upb/decode.h +94 -0
- data/third_party/upb/upb/decode_fast.c +1055 -0
- data/third_party/upb/upb/decode_fast.h +153 -0
- data/third_party/upb/upb/decode_internal.h +211 -0
- data/third_party/upb/upb/def.c +3261 -0
- data/third_party/upb/upb/def.h +409 -0
- data/third_party/upb/upb/def.hpp +438 -0
- data/third_party/upb/upb/encode.c +604 -0
- data/third_party/upb/upb/encode.h +71 -0
- data/third_party/upb/upb/json_encode.c +776 -0
- data/third_party/upb/upb/json_encode.h +62 -0
- data/third_party/upb/upb/msg.c +428 -0
- data/third_party/upb/upb/msg.h +114 -0
- data/third_party/upb/upb/msg_internal.h +831 -0
- data/third_party/upb/upb/port_def.inc +261 -0
- data/third_party/upb/upb/port_undef.inc +62 -0
- data/third_party/upb/upb/reflection.c +480 -0
- data/third_party/upb/upb/reflection.h +220 -0
- data/third_party/upb/upb/reflection.hpp +37 -0
- data/third_party/upb/upb/table.c +926 -0
- data/third_party/upb/upb/table_internal.h +385 -0
- data/third_party/upb/upb/text_encode.c +472 -0
- data/third_party/upb/upb/text_encode.h +64 -0
- data/third_party/upb/upb/upb.c +362 -0
- data/third_party/upb/upb/upb.h +373 -0
- data/third_party/upb/upb/upb.hpp +115 -0
- data/third_party/upb/upb/upb_internal.h +68 -0
- data/third_party/xxhash/xxhash.h +5580 -0
- data/third_party/zlib/adler32.c +186 -0
- data/third_party/zlib/compress.c +86 -0
- data/third_party/zlib/crc32.c +1116 -0
- data/third_party/zlib/crc32.h +9446 -0
- data/third_party/zlib/deflate.c +2211 -0
- data/third_party/zlib/deflate.h +346 -0
- data/third_party/zlib/gzclose.c +25 -0
- data/third_party/zlib/gzguts.h +219 -0
- data/third_party/zlib/gzlib.c +639 -0
- data/third_party/zlib/gzread.c +652 -0
- data/third_party/zlib/gzwrite.c +677 -0
- data/third_party/zlib/infback.c +641 -0
- data/third_party/zlib/inffast.c +323 -0
- data/third_party/zlib/inffast.h +11 -0
- data/third_party/zlib/inffixed.h +94 -0
- data/third_party/zlib/inflate.c +1592 -0
- data/third_party/zlib/inflate.h +126 -0
- data/third_party/zlib/inftrees.c +304 -0
- data/third_party/zlib/inftrees.h +62 -0
- data/third_party/zlib/trees.c +1182 -0
- data/third_party/zlib/trees.h +128 -0
- data/third_party/zlib/uncompr.c +93 -0
- data/third_party/zlib/zconf.h +534 -0
- data/third_party/zlib/zlib.h +1935 -0
- data/third_party/zlib/zutil.c +325 -0
- data/third_party/zlib/zutil.h +274 -0
- metadata +2486 -38
- data/grpc_c.32.ruby +0 -0
- data/grpc_c.64.ruby +0 -0
@@ -0,0 +1,3375 @@
|
|
1
|
+
//
|
2
|
+
// Copyright 2018 gRPC authors.
|
3
|
+
//
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
// you may not use this file except in compliance with the License.
|
6
|
+
// You may obtain a copy of the License at
|
7
|
+
//
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
//
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
// See the License for the specific language governing permissions and
|
14
|
+
// limitations under the License.
|
15
|
+
//
|
16
|
+
|
17
|
+
#include <grpc/support/port_platform.h>
|
18
|
+
|
19
|
+
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
|
20
|
+
|
21
|
+
#include <inttypes.h>
|
22
|
+
#include <limits.h>
|
23
|
+
#include <math.h>
|
24
|
+
#include <stdio.h>
|
25
|
+
#include <string.h>
|
26
|
+
|
27
|
+
#include "absl/strings/str_format.h"
|
28
|
+
|
29
|
+
#include <grpc/slice_buffer.h>
|
30
|
+
#include <grpc/status.h>
|
31
|
+
#include <grpc/support/alloc.h>
|
32
|
+
#include <grpc/support/log.h>
|
33
|
+
#include <grpc/support/string_util.h>
|
34
|
+
|
35
|
+
#include "src/core/ext/transport/chttp2/transport/context_list.h"
|
36
|
+
#include "src/core/ext/transport/chttp2/transport/frame_data.h"
|
37
|
+
#include "src/core/ext/transport/chttp2/transport/internal.h"
|
38
|
+
#include "src/core/ext/transport/chttp2/transport/varint.h"
|
39
|
+
#include "src/core/lib/channel/channel_args.h"
|
40
|
+
#include "src/core/lib/debug/stats.h"
|
41
|
+
#include "src/core/lib/gpr/env.h"
|
42
|
+
#include "src/core/lib/gpr/string.h"
|
43
|
+
#include "src/core/lib/gprpp/memory.h"
|
44
|
+
#include "src/core/lib/http/parser.h"
|
45
|
+
#include "src/core/lib/iomgr/executor.h"
|
46
|
+
#include "src/core/lib/iomgr/iomgr.h"
|
47
|
+
#include "src/core/lib/iomgr/timer.h"
|
48
|
+
#include "src/core/lib/profiling/timers.h"
|
49
|
+
#include "src/core/lib/resource_quota/api.h"
|
50
|
+
#include "src/core/lib/resource_quota/trace.h"
|
51
|
+
#include "src/core/lib/slice/slice_internal.h"
|
52
|
+
#include "src/core/lib/slice/slice_string_helpers.h"
|
53
|
+
#include "src/core/lib/transport/error_utils.h"
|
54
|
+
#include "src/core/lib/transport/http2_errors.h"
|
55
|
+
#include "src/core/lib/transport/status_conversion.h"
|
56
|
+
#include "src/core/lib/transport/timeout_encoding.h"
|
57
|
+
#include "src/core/lib/transport/transport.h"
|
58
|
+
#include "src/core/lib/transport/transport_impl.h"
|
59
|
+
#include "src/core/lib/uri/uri_parser.h"
|
60
|
+
|
61
|
+
GPR_GLOBAL_CONFIG_DEFINE_BOOL(
|
62
|
+
grpc_experimental_disable_flow_control, false,
|
63
|
+
"If set, flow control will be effectively disabled. Max out all values and "
|
64
|
+
"assume the remote peer does the same. Thus we can ignore any flow control "
|
65
|
+
"bookkeeping, error checking, and decision making");
|
66
|
+
|
67
|
+
#define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024)
|
68
|
+
#define MAX_WINDOW 0x7fffffffu
|
69
|
+
#define MAX_WRITE_BUFFER_SIZE (64 * 1024 * 1024)
|
70
|
+
#define DEFAULT_MAX_HEADER_LIST_SIZE (8 * 1024)
|
71
|
+
|
72
|
+
#define DEFAULT_CLIENT_KEEPALIVE_TIME_MS INT_MAX
|
73
|
+
#define DEFAULT_CLIENT_KEEPALIVE_TIMEOUT_MS 20000 /* 20 seconds */
|
74
|
+
#define DEFAULT_SERVER_KEEPALIVE_TIME_MS 7200000 /* 2 hours */
|
75
|
+
#define DEFAULT_SERVER_KEEPALIVE_TIMEOUT_MS 20000 /* 20 seconds */
|
76
|
+
#define DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS false
|
77
|
+
#define KEEPALIVE_TIME_BACKOFF_MULTIPLIER 2
|
78
|
+
|
79
|
+
#define DEFAULT_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS 300000 /* 5 minutes */
|
80
|
+
#define DEFAULT_MAX_PINGS_BETWEEN_DATA 2
|
81
|
+
#define DEFAULT_MAX_PING_STRIKES 2
|
82
|
+
|
83
|
+
#define DEFAULT_MAX_PENDING_INDUCED_FRAMES 10000
|
84
|
+
|
85
|
+
static int g_default_client_keepalive_time_ms =
|
86
|
+
DEFAULT_CLIENT_KEEPALIVE_TIME_MS;
|
87
|
+
static int g_default_client_keepalive_timeout_ms =
|
88
|
+
DEFAULT_CLIENT_KEEPALIVE_TIMEOUT_MS;
|
89
|
+
static int g_default_server_keepalive_time_ms =
|
90
|
+
DEFAULT_SERVER_KEEPALIVE_TIME_MS;
|
91
|
+
static int g_default_server_keepalive_timeout_ms =
|
92
|
+
DEFAULT_SERVER_KEEPALIVE_TIMEOUT_MS;
|
93
|
+
static bool g_default_client_keepalive_permit_without_calls =
|
94
|
+
DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
|
95
|
+
static bool g_default_server_keepalive_permit_without_calls =
|
96
|
+
DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
|
97
|
+
|
98
|
+
static int g_default_min_recv_ping_interval_without_data_ms =
|
99
|
+
DEFAULT_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS;
|
100
|
+
static int g_default_max_pings_without_data = DEFAULT_MAX_PINGS_BETWEEN_DATA;
|
101
|
+
static int g_default_max_ping_strikes = DEFAULT_MAX_PING_STRIKES;
|
102
|
+
|
103
|
+
#define MAX_CLIENT_STREAM_ID 0x7fffffffu
|
104
|
+
grpc_core::TraceFlag grpc_http_trace(false, "http");
|
105
|
+
grpc_core::TraceFlag grpc_keepalive_trace(false, "http_keepalive");
|
106
|
+
grpc_core::DebugOnlyTraceFlag grpc_trace_chttp2_refcount(false,
|
107
|
+
"chttp2_refcount");
|
108
|
+
|
109
|
+
// forward declarations of various callbacks that we'll build closures around
|
110
|
+
static void write_action_begin_locked(void* t, grpc_error_handle error);
|
111
|
+
static void write_action(void* t, grpc_error_handle error);
|
112
|
+
static void write_action_end(void* t, grpc_error_handle error);
|
113
|
+
static void write_action_end_locked(void* t, grpc_error_handle error);
|
114
|
+
|
115
|
+
static void read_action(void* t, grpc_error_handle error);
|
116
|
+
static void read_action_locked(void* t, grpc_error_handle error);
|
117
|
+
static void continue_read_action_locked(grpc_chttp2_transport* t);
|
118
|
+
|
119
|
+
static void complete_fetch(void* gs, grpc_error_handle error);
|
120
|
+
static void complete_fetch_locked(void* gs, grpc_error_handle error);
|
121
|
+
// Set a transport level setting, and push it to our peer
|
122
|
+
static void queue_setting_update(grpc_chttp2_transport* t,
|
123
|
+
grpc_chttp2_setting_id id, uint32_t value);
|
124
|
+
|
125
|
+
static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
|
126
|
+
grpc_error_handle error);
|
127
|
+
|
128
|
+
// Start new streams that have been created if we can
|
129
|
+
static void maybe_start_some_streams(grpc_chttp2_transport* t);
|
130
|
+
|
131
|
+
static void connectivity_state_set(grpc_chttp2_transport* t,
|
132
|
+
grpc_connectivity_state state,
|
133
|
+
const absl::Status& status,
|
134
|
+
const char* reason);
|
135
|
+
|
136
|
+
static void benign_reclaimer_locked(void* arg, grpc_error_handle error);
|
137
|
+
static void destructive_reclaimer_locked(void* arg, grpc_error_handle error);
|
138
|
+
|
139
|
+
static void post_benign_reclaimer(grpc_chttp2_transport* t);
|
140
|
+
static void post_destructive_reclaimer(grpc_chttp2_transport* t);
|
141
|
+
|
142
|
+
static void close_transport_locked(grpc_chttp2_transport* t,
|
143
|
+
grpc_error_handle error);
|
144
|
+
static void end_all_the_calls(grpc_chttp2_transport* t,
|
145
|
+
grpc_error_handle error);
|
146
|
+
|
147
|
+
static void start_bdp_ping(void* tp, grpc_error_handle error);
|
148
|
+
static void finish_bdp_ping(void* tp, grpc_error_handle error);
|
149
|
+
static void start_bdp_ping_locked(void* tp, grpc_error_handle error);
|
150
|
+
static void finish_bdp_ping_locked(void* tp, grpc_error_handle error);
|
151
|
+
static void next_bdp_ping_timer_expired(void* tp, grpc_error_handle error);
|
152
|
+
static void next_bdp_ping_timer_expired_locked(void* tp,
|
153
|
+
grpc_error_handle error);
|
154
|
+
|
155
|
+
static void cancel_pings(grpc_chttp2_transport* t, grpc_error_handle error);
|
156
|
+
static void send_ping_locked(grpc_chttp2_transport* t,
|
157
|
+
grpc_closure* on_initiate, grpc_closure* on_ack);
|
158
|
+
static void retry_initiate_ping_locked(void* tp, grpc_error_handle error);
|
159
|
+
|
160
|
+
// keepalive-relevant functions
|
161
|
+
static void init_keepalive_ping(void* arg, grpc_error_handle error);
|
162
|
+
static void init_keepalive_ping_locked(void* arg, grpc_error_handle error);
|
163
|
+
static void start_keepalive_ping(void* arg, grpc_error_handle error);
|
164
|
+
static void finish_keepalive_ping(void* arg, grpc_error_handle error);
|
165
|
+
static void start_keepalive_ping_locked(void* arg, grpc_error_handle error);
|
166
|
+
static void finish_keepalive_ping_locked(void* arg, grpc_error_handle error);
|
167
|
+
static void keepalive_watchdog_fired(void* arg, grpc_error_handle error);
|
168
|
+
static void keepalive_watchdog_fired_locked(void* arg, grpc_error_handle error);
|
169
|
+
|
170
|
+
static void reset_byte_stream(void* arg, grpc_error_handle error);
|
171
|
+
|
172
|
+
namespace grpc_core {
|
173
|
+
|
174
|
+
namespace {
|
175
|
+
TestOnlyGlobalHttp2TransportInitCallback test_only_init_callback = nullptr;
|
176
|
+
TestOnlyGlobalHttp2TransportDestructCallback test_only_destruct_callback =
|
177
|
+
nullptr;
|
178
|
+
bool test_only_disable_transient_failure_state_notification = false;
|
179
|
+
} // namespace
|
180
|
+
|
181
|
+
void TestOnlySetGlobalHttp2TransportInitCallback(
|
182
|
+
TestOnlyGlobalHttp2TransportInitCallback callback) {
|
183
|
+
test_only_init_callback = callback;
|
184
|
+
}
|
185
|
+
|
186
|
+
void TestOnlySetGlobalHttp2TransportDestructCallback(
|
187
|
+
TestOnlyGlobalHttp2TransportDestructCallback callback) {
|
188
|
+
test_only_destruct_callback = callback;
|
189
|
+
}
|
190
|
+
|
191
|
+
void TestOnlyGlobalHttp2TransportDisableTransientFailureStateNotification(
|
192
|
+
bool disable) {
|
193
|
+
test_only_disable_transient_failure_state_notification = disable;
|
194
|
+
}
|
195
|
+
|
196
|
+
} // namespace grpc_core
|
197
|
+
|
198
|
+
//
|
199
|
+
// CONSTRUCTION/DESTRUCTION/REFCOUNTING
|
200
|
+
//
|
201
|
+
|
202
|
+
grpc_chttp2_transport::~grpc_chttp2_transport() {
|
203
|
+
size_t i;
|
204
|
+
|
205
|
+
if (channelz_socket != nullptr) {
|
206
|
+
channelz_socket.reset();
|
207
|
+
}
|
208
|
+
|
209
|
+
grpc_endpoint_destroy(ep);
|
210
|
+
|
211
|
+
grpc_slice_buffer_destroy_internal(&qbuf);
|
212
|
+
|
213
|
+
grpc_slice_buffer_destroy_internal(&outbuf);
|
214
|
+
|
215
|
+
grpc_error_handle error =
|
216
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed");
|
217
|
+
// ContextList::Execute follows semantics of a callback function and does not
|
218
|
+
// take a ref on error
|
219
|
+
grpc_core::ContextList::Execute(cl, nullptr, error);
|
220
|
+
GRPC_ERROR_UNREF(error);
|
221
|
+
cl = nullptr;
|
222
|
+
|
223
|
+
grpc_slice_buffer_destroy_internal(&read_buffer);
|
224
|
+
grpc_chttp2_goaway_parser_destroy(&goaway_parser);
|
225
|
+
|
226
|
+
for (i = 0; i < STREAM_LIST_COUNT; i++) {
|
227
|
+
GPR_ASSERT(lists[i].head == nullptr);
|
228
|
+
GPR_ASSERT(lists[i].tail == nullptr);
|
229
|
+
}
|
230
|
+
|
231
|
+
GRPC_ERROR_UNREF(goaway_error);
|
232
|
+
|
233
|
+
GPR_ASSERT(grpc_chttp2_stream_map_size(&stream_map) == 0);
|
234
|
+
|
235
|
+
grpc_chttp2_stream_map_destroy(&stream_map);
|
236
|
+
|
237
|
+
GRPC_COMBINER_UNREF(combiner, "chttp2_transport");
|
238
|
+
|
239
|
+
cancel_pings(this,
|
240
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed"));
|
241
|
+
|
242
|
+
while (write_cb_pool) {
|
243
|
+
grpc_chttp2_write_cb* next = write_cb_pool->next;
|
244
|
+
gpr_free(write_cb_pool);
|
245
|
+
write_cb_pool = next;
|
246
|
+
}
|
247
|
+
|
248
|
+
flow_control.Destroy();
|
249
|
+
|
250
|
+
GRPC_ERROR_UNREF(closed_with_error);
|
251
|
+
gpr_free(ping_acks);
|
252
|
+
if (grpc_core::test_only_destruct_callback != nullptr) {
|
253
|
+
grpc_core::test_only_destruct_callback();
|
254
|
+
}
|
255
|
+
}
|
256
|
+
|
257
|
+
static const grpc_transport_vtable* get_vtable(void);
|
258
|
+
|
259
|
+
// Returns whether bdp is enabled
|
260
|
+
static bool read_channel_args(grpc_chttp2_transport* t,
|
261
|
+
const grpc_channel_args* channel_args,
|
262
|
+
bool is_client) {
|
263
|
+
bool enable_bdp = true;
|
264
|
+
bool channelz_enabled = GRPC_ENABLE_CHANNELZ_DEFAULT;
|
265
|
+
size_t i;
|
266
|
+
int j;
|
267
|
+
|
268
|
+
for (i = 0; i < channel_args->num_args; i++) {
|
269
|
+
if (0 == strcmp(channel_args->args[i].key,
|
270
|
+
GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER)) {
|
271
|
+
const grpc_integer_options options = {-1, 0, INT_MAX};
|
272
|
+
const int value =
|
273
|
+
grpc_channel_arg_get_integer(&channel_args->args[i], options);
|
274
|
+
if (value >= 0) {
|
275
|
+
if ((t->next_stream_id & 1) != (value & 1)) {
|
276
|
+
gpr_log(GPR_ERROR, "%s: low bit must be %d on %s",
|
277
|
+
GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER, t->next_stream_id & 1,
|
278
|
+
is_client ? "client" : "server");
|
279
|
+
} else {
|
280
|
+
t->next_stream_id = static_cast<uint32_t>(value);
|
281
|
+
}
|
282
|
+
}
|
283
|
+
} else if (0 == strcmp(channel_args->args[i].key,
|
284
|
+
GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER)) {
|
285
|
+
const grpc_integer_options options = {-1, 0, INT_MAX};
|
286
|
+
const int value =
|
287
|
+
grpc_channel_arg_get_integer(&channel_args->args[i], options);
|
288
|
+
if (value >= 0) {
|
289
|
+
t->hpack_compressor.SetMaxUsableSize(value);
|
290
|
+
}
|
291
|
+
} else if (0 == strcmp(channel_args->args[i].key,
|
292
|
+
GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)) {
|
293
|
+
t->ping_policy.max_pings_without_data = grpc_channel_arg_get_integer(
|
294
|
+
&channel_args->args[i],
|
295
|
+
{g_default_max_pings_without_data, 0, INT_MAX});
|
296
|
+
} else if (0 == strcmp(channel_args->args[i].key,
|
297
|
+
GRPC_ARG_HTTP2_MAX_PING_STRIKES)) {
|
298
|
+
t->ping_policy.max_ping_strikes = grpc_channel_arg_get_integer(
|
299
|
+
&channel_args->args[i], {g_default_max_ping_strikes, 0, INT_MAX});
|
300
|
+
} else if (0 ==
|
301
|
+
strcmp(channel_args->args[i].key,
|
302
|
+
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)) {
|
303
|
+
t->ping_policy.min_recv_ping_interval_without_data =
|
304
|
+
grpc_core::Duration::Milliseconds(grpc_channel_arg_get_integer(
|
305
|
+
&channel_args->args[i],
|
306
|
+
grpc_integer_options{
|
307
|
+
g_default_min_recv_ping_interval_without_data_ms, 0,
|
308
|
+
INT_MAX}));
|
309
|
+
} else if (0 == strcmp(channel_args->args[i].key,
|
310
|
+
GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE)) {
|
311
|
+
t->write_buffer_size = static_cast<uint32_t>(grpc_channel_arg_get_integer(
|
312
|
+
&channel_args->args[i], {0, 0, MAX_WRITE_BUFFER_SIZE}));
|
313
|
+
} else if (0 ==
|
314
|
+
strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_BDP_PROBE)) {
|
315
|
+
enable_bdp = grpc_channel_arg_get_bool(&channel_args->args[i], true);
|
316
|
+
} else if (0 ==
|
317
|
+
strcmp(channel_args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) {
|
318
|
+
const int value = grpc_channel_arg_get_integer(
|
319
|
+
&channel_args->args[i],
|
320
|
+
grpc_integer_options{t->is_client
|
321
|
+
? g_default_client_keepalive_time_ms
|
322
|
+
: g_default_server_keepalive_time_ms,
|
323
|
+
1, INT_MAX});
|
324
|
+
t->keepalive_time = value == INT_MAX
|
325
|
+
? grpc_core::Duration::Infinity()
|
326
|
+
: grpc_core::Duration::Milliseconds(value);
|
327
|
+
} else if (0 == strcmp(channel_args->args[i].key,
|
328
|
+
GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) {
|
329
|
+
const int value = grpc_channel_arg_get_integer(
|
330
|
+
&channel_args->args[i],
|
331
|
+
grpc_integer_options{t->is_client
|
332
|
+
? g_default_client_keepalive_timeout_ms
|
333
|
+
: g_default_server_keepalive_timeout_ms,
|
334
|
+
0, INT_MAX});
|
335
|
+
t->keepalive_timeout = value == INT_MAX
|
336
|
+
? grpc_core::Duration::Infinity()
|
337
|
+
: grpc_core::Duration::Milliseconds(value);
|
338
|
+
} else if (0 == strcmp(channel_args->args[i].key,
|
339
|
+
GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS)) {
|
340
|
+
t->keepalive_permit_without_calls = static_cast<uint32_t>(
|
341
|
+
grpc_channel_arg_get_integer(&channel_args->args[i], {0, 0, 1}));
|
342
|
+
} else if (0 == strcmp(channel_args->args[i].key,
|
343
|
+
GRPC_ARG_OPTIMIZATION_TARGET)) {
|
344
|
+
gpr_log(GPR_INFO, "GRPC_ARG_OPTIMIZATION_TARGET is deprecated");
|
345
|
+
} else if (0 ==
|
346
|
+
strcmp(channel_args->args[i].key, GRPC_ARG_ENABLE_CHANNELZ)) {
|
347
|
+
channelz_enabled = grpc_channel_arg_get_bool(
|
348
|
+
&channel_args->args[i], GRPC_ENABLE_CHANNELZ_DEFAULT);
|
349
|
+
} else {
|
350
|
+
static const struct {
|
351
|
+
const char* channel_arg_name;
|
352
|
+
grpc_chttp2_setting_id setting_id;
|
353
|
+
grpc_integer_options integer_options;
|
354
|
+
bool availability[2] /* server, client */;
|
355
|
+
} settings_map[] = {{GRPC_ARG_MAX_CONCURRENT_STREAMS,
|
356
|
+
GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS,
|
357
|
+
{-1, 0, INT32_MAX},
|
358
|
+
{true, false}},
|
359
|
+
{GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER,
|
360
|
+
GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE,
|
361
|
+
{-1, 0, INT32_MAX},
|
362
|
+
{true, true}},
|
363
|
+
{GRPC_ARG_MAX_METADATA_SIZE,
|
364
|
+
GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
|
365
|
+
{-1, 0, INT32_MAX},
|
366
|
+
{true, true}},
|
367
|
+
{GRPC_ARG_HTTP2_MAX_FRAME_SIZE,
|
368
|
+
GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE,
|
369
|
+
{-1, 16384, 16777215},
|
370
|
+
{true, true}},
|
371
|
+
{GRPC_ARG_HTTP2_ENABLE_TRUE_BINARY,
|
372
|
+
GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA,
|
373
|
+
{1, 0, 1},
|
374
|
+
{true, true}},
|
375
|
+
{GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES,
|
376
|
+
GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE,
|
377
|
+
{-1, 5, INT32_MAX},
|
378
|
+
{true, true}}};
|
379
|
+
for (j = 0; j < static_cast<int> GPR_ARRAY_SIZE(settings_map); j++) {
|
380
|
+
if (0 == strcmp(channel_args->args[i].key,
|
381
|
+
settings_map[j].channel_arg_name)) {
|
382
|
+
if (!settings_map[j].availability[is_client]) {
|
383
|
+
gpr_log(GPR_DEBUG, "%s is not available on %s",
|
384
|
+
settings_map[j].channel_arg_name,
|
385
|
+
is_client ? "clients" : "servers");
|
386
|
+
} else {
|
387
|
+
int value = grpc_channel_arg_get_integer(
|
388
|
+
&channel_args->args[i], settings_map[j].integer_options);
|
389
|
+
if (value >= 0) {
|
390
|
+
queue_setting_update(t, settings_map[j].setting_id,
|
391
|
+
static_cast<uint32_t>(value));
|
392
|
+
}
|
393
|
+
}
|
394
|
+
break;
|
395
|
+
}
|
396
|
+
}
|
397
|
+
}
|
398
|
+
}
|
399
|
+
if (channelz_enabled) {
|
400
|
+
t->channelz_socket =
|
401
|
+
grpc_core::MakeRefCounted<grpc_core::channelz::SocketNode>(
|
402
|
+
std::string(grpc_endpoint_get_local_address(t->ep)), t->peer_string,
|
403
|
+
absl::StrFormat("%s %s", get_vtable()->name, t->peer_string),
|
404
|
+
grpc_core::channelz::SocketNode::Security::GetFromChannelArgs(
|
405
|
+
channel_args));
|
406
|
+
}
|
407
|
+
return enable_bdp;
|
408
|
+
}
|
409
|
+
|
410
|
+
static void init_transport_keepalive_settings(grpc_chttp2_transport* t) {
|
411
|
+
if (t->is_client) {
|
412
|
+
t->keepalive_time = g_default_client_keepalive_time_ms == INT_MAX
|
413
|
+
? grpc_core::Duration::Infinity()
|
414
|
+
: grpc_core::Duration::Milliseconds(
|
415
|
+
g_default_client_keepalive_time_ms);
|
416
|
+
t->keepalive_timeout = g_default_client_keepalive_timeout_ms == INT_MAX
|
417
|
+
? grpc_core::Duration::Infinity()
|
418
|
+
: grpc_core::Duration::Milliseconds(
|
419
|
+
g_default_client_keepalive_timeout_ms);
|
420
|
+
t->keepalive_permit_without_calls =
|
421
|
+
g_default_client_keepalive_permit_without_calls;
|
422
|
+
} else {
|
423
|
+
t->keepalive_time = g_default_server_keepalive_time_ms == INT_MAX
|
424
|
+
? grpc_core::Duration::Infinity()
|
425
|
+
: grpc_core::Duration::Milliseconds(
|
426
|
+
g_default_server_keepalive_time_ms);
|
427
|
+
t->keepalive_timeout = g_default_server_keepalive_timeout_ms == INT_MAX
|
428
|
+
? grpc_core::Duration::Infinity()
|
429
|
+
: grpc_core::Duration::Milliseconds(
|
430
|
+
g_default_server_keepalive_timeout_ms);
|
431
|
+
t->keepalive_permit_without_calls =
|
432
|
+
g_default_server_keepalive_permit_without_calls;
|
433
|
+
}
|
434
|
+
}
|
435
|
+
|
436
|
+
static void configure_transport_ping_policy(grpc_chttp2_transport* t) {
|
437
|
+
t->ping_policy.max_pings_without_data = g_default_max_pings_without_data;
|
438
|
+
t->ping_policy.max_ping_strikes = g_default_max_ping_strikes;
|
439
|
+
t->ping_policy.min_recv_ping_interval_without_data =
|
440
|
+
grpc_core::Duration::Milliseconds(
|
441
|
+
g_default_min_recv_ping_interval_without_data_ms);
|
442
|
+
}
|
443
|
+
|
444
|
+
static void init_keepalive_pings_if_enabled(grpc_chttp2_transport* t) {
|
445
|
+
if (t->keepalive_time != grpc_core::Duration::Infinity()) {
|
446
|
+
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
|
447
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
|
448
|
+
GRPC_CLOSURE_INIT(&t->init_keepalive_ping_locked, init_keepalive_ping, t,
|
449
|
+
grpc_schedule_on_exec_ctx);
|
450
|
+
grpc_timer_init(&t->keepalive_ping_timer,
|
451
|
+
grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
|
452
|
+
&t->init_keepalive_ping_locked);
|
453
|
+
} else {
|
454
|
+
// Use GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED to indicate there are no
|
455
|
+
// inflight keeaplive timers
|
456
|
+
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED;
|
457
|
+
}
|
458
|
+
}
|
459
|
+
|
460
|
+
grpc_chttp2_transport::grpc_chttp2_transport(
|
461
|
+
const grpc_channel_args* channel_args, grpc_endpoint* ep, bool is_client)
|
462
|
+
: refs(1, GRPC_TRACE_FLAG_ENABLED(grpc_trace_chttp2_refcount)
|
463
|
+
? "chttp2_refcount"
|
464
|
+
: nullptr),
|
465
|
+
ep(ep),
|
466
|
+
peer_string(grpc_endpoint_get_peer(ep)),
|
467
|
+
memory_owner(grpc_core::ResourceQuotaFromChannelArgs(channel_args)
|
468
|
+
->memory_quota()
|
469
|
+
->CreateMemoryOwner(absl::StrCat(
|
470
|
+
grpc_endpoint_get_peer(ep), ":client_transport"))),
|
471
|
+
self_reservation(
|
472
|
+
memory_owner.MakeReservation(sizeof(grpc_chttp2_transport))),
|
473
|
+
combiner(grpc_combiner_create()),
|
474
|
+
state_tracker(is_client ? "client_transport" : "server_transport",
|
475
|
+
GRPC_CHANNEL_READY),
|
476
|
+
is_client(is_client),
|
477
|
+
next_stream_id(is_client ? 1 : 2),
|
478
|
+
deframe_state(is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0) {
|
479
|
+
GPR_ASSERT(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) ==
|
480
|
+
GRPC_CHTTP2_CLIENT_CONNECT_STRLEN);
|
481
|
+
base.vtable = get_vtable();
|
482
|
+
// 8 is a random stab in the dark as to a good initial size: it's small enough
|
483
|
+
// that it shouldn't waste memory for infrequently used connections, yet
|
484
|
+
// large enough that the exponential growth should happen nicely when it's
|
485
|
+
// needed.
|
486
|
+
// TODO(ctiller): tune this
|
487
|
+
grpc_chttp2_stream_map_init(&stream_map, 8);
|
488
|
+
|
489
|
+
grpc_slice_buffer_init(&read_buffer);
|
490
|
+
grpc_slice_buffer_init(&outbuf);
|
491
|
+
if (is_client) {
|
492
|
+
grpc_slice_buffer_add(&outbuf, grpc_slice_from_copied_string(
|
493
|
+
GRPC_CHTTP2_CLIENT_CONNECT_STRING));
|
494
|
+
}
|
495
|
+
grpc_slice_buffer_init(&qbuf);
|
496
|
+
// copy in initial settings to all setting sets
|
497
|
+
size_t i;
|
498
|
+
int j;
|
499
|
+
for (i = 0; i < GRPC_CHTTP2_NUM_SETTINGS; i++) {
|
500
|
+
for (j = 0; j < GRPC_NUM_SETTING_SETS; j++) {
|
501
|
+
settings[j][i] = grpc_chttp2_settings_parameters[i].default_value;
|
502
|
+
}
|
503
|
+
}
|
504
|
+
grpc_chttp2_goaway_parser_init(&goaway_parser);
|
505
|
+
|
506
|
+
// configure http2 the way we like it
|
507
|
+
if (is_client) {
|
508
|
+
queue_setting_update(this, GRPC_CHTTP2_SETTINGS_ENABLE_PUSH, 0);
|
509
|
+
queue_setting_update(this, GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0);
|
510
|
+
}
|
511
|
+
queue_setting_update(this, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
|
512
|
+
DEFAULT_MAX_HEADER_LIST_SIZE);
|
513
|
+
queue_setting_update(this,
|
514
|
+
GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA, 1);
|
515
|
+
|
516
|
+
configure_transport_ping_policy(this);
|
517
|
+
init_transport_keepalive_settings(this);
|
518
|
+
|
519
|
+
bool enable_bdp = true;
|
520
|
+
if (channel_args) {
|
521
|
+
enable_bdp = read_channel_args(this, channel_args, is_client);
|
522
|
+
}
|
523
|
+
|
524
|
+
static const bool kEnableFlowControl =
|
525
|
+
!GPR_GLOBAL_CONFIG_GET(grpc_experimental_disable_flow_control);
|
526
|
+
if (kEnableFlowControl) {
|
527
|
+
flow_control.Init<grpc_core::chttp2::TransportFlowControl>(this,
|
528
|
+
enable_bdp);
|
529
|
+
} else {
|
530
|
+
flow_control.Init<grpc_core::chttp2::TransportFlowControlDisabled>(this);
|
531
|
+
enable_bdp = false;
|
532
|
+
}
|
533
|
+
|
534
|
+
// No pings allowed before receiving a header or data frame.
|
535
|
+
ping_state.pings_before_data_required = 0;
|
536
|
+
ping_state.is_delayed_ping_timer_set = false;
|
537
|
+
ping_state.last_ping_sent_time = grpc_core::Timestamp::InfPast();
|
538
|
+
|
539
|
+
ping_recv_state.last_ping_recv_time = grpc_core::Timestamp::InfPast();
|
540
|
+
ping_recv_state.ping_strikes = 0;
|
541
|
+
|
542
|
+
init_keepalive_pings_if_enabled(this);
|
543
|
+
|
544
|
+
if (enable_bdp) {
|
545
|
+
bdp_ping_blocked = true;
|
546
|
+
grpc_chttp2_act_on_flowctl_action(flow_control->PeriodicUpdate(), this,
|
547
|
+
nullptr);
|
548
|
+
}
|
549
|
+
|
550
|
+
grpc_chttp2_initiate_write(this, GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE);
|
551
|
+
post_benign_reclaimer(this);
|
552
|
+
if (grpc_core::test_only_init_callback != nullptr) {
|
553
|
+
grpc_core::test_only_init_callback();
|
554
|
+
}
|
555
|
+
}
|
556
|
+
|
557
|
+
static void destroy_transport_locked(void* tp, grpc_error_handle /*error*/) {
|
558
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
559
|
+
t->destroying = 1;
|
560
|
+
close_transport_locked(
|
561
|
+
t, grpc_error_set_int(
|
562
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Transport destroyed"),
|
563
|
+
GRPC_ERROR_INT_OCCURRED_DURING_WRITE, t->write_state));
|
564
|
+
t->memory_owner.Reset();
|
565
|
+
// Must be the last line.
|
566
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "destroy");
|
567
|
+
}
|
568
|
+
|
569
|
+
static void destroy_transport(grpc_transport* gt) {
|
570
|
+
grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
|
571
|
+
t->combiner->Run(GRPC_CLOSURE_CREATE(destroy_transport_locked, t, nullptr),
|
572
|
+
GRPC_ERROR_NONE);
|
573
|
+
}
|
574
|
+
|
575
|
+
static void close_transport_locked(grpc_chttp2_transport* t,
|
576
|
+
grpc_error_handle error) {
|
577
|
+
end_all_the_calls(t, GRPC_ERROR_REF(error));
|
578
|
+
cancel_pings(t, GRPC_ERROR_REF(error));
|
579
|
+
if (t->closed_with_error == GRPC_ERROR_NONE) {
|
580
|
+
if (!grpc_error_has_clear_grpc_status(error)) {
|
581
|
+
error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,
|
582
|
+
GRPC_STATUS_UNAVAILABLE);
|
583
|
+
}
|
584
|
+
if (t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE) {
|
585
|
+
if (t->close_transport_on_writes_finished == GRPC_ERROR_NONE) {
|
586
|
+
t->close_transport_on_writes_finished =
|
587
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
588
|
+
"Delayed close due to in-progress write");
|
589
|
+
}
|
590
|
+
t->close_transport_on_writes_finished =
|
591
|
+
grpc_error_add_child(t->close_transport_on_writes_finished, error);
|
592
|
+
return;
|
593
|
+
}
|
594
|
+
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
595
|
+
t->closed_with_error = GRPC_ERROR_REF(error);
|
596
|
+
connectivity_state_set(t, GRPC_CHANNEL_SHUTDOWN, absl::Status(),
|
597
|
+
"close_transport");
|
598
|
+
if (t->ping_state.is_delayed_ping_timer_set) {
|
599
|
+
grpc_timer_cancel(&t->ping_state.delayed_ping_timer);
|
600
|
+
}
|
601
|
+
if (t->have_next_bdp_ping_timer) {
|
602
|
+
grpc_timer_cancel(&t->next_bdp_ping_timer);
|
603
|
+
}
|
604
|
+
switch (t->keepalive_state) {
|
605
|
+
case GRPC_CHTTP2_KEEPALIVE_STATE_WAITING:
|
606
|
+
grpc_timer_cancel(&t->keepalive_ping_timer);
|
607
|
+
break;
|
608
|
+
case GRPC_CHTTP2_KEEPALIVE_STATE_PINGING:
|
609
|
+
grpc_timer_cancel(&t->keepalive_ping_timer);
|
610
|
+
grpc_timer_cancel(&t->keepalive_watchdog_timer);
|
611
|
+
break;
|
612
|
+
case GRPC_CHTTP2_KEEPALIVE_STATE_DYING:
|
613
|
+
case GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED:
|
614
|
+
// keepalive timers are not set in these two states
|
615
|
+
break;
|
616
|
+
}
|
617
|
+
|
618
|
+
// flush writable stream list to avoid dangling references
|
619
|
+
grpc_chttp2_stream* s;
|
620
|
+
while (grpc_chttp2_list_pop_writable_stream(t, &s)) {
|
621
|
+
GRPC_CHTTP2_STREAM_UNREF(s, "chttp2_writing:close");
|
622
|
+
}
|
623
|
+
GPR_ASSERT(t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE);
|
624
|
+
grpc_endpoint_shutdown(t->ep, GRPC_ERROR_REF(error));
|
625
|
+
}
|
626
|
+
if (t->notify_on_receive_settings != nullptr) {
|
627
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, t->notify_on_receive_settings,
|
628
|
+
GRPC_ERROR_REF(error));
|
629
|
+
t->notify_on_receive_settings = nullptr;
|
630
|
+
}
|
631
|
+
if (t->notify_on_close != nullptr) {
|
632
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, t->notify_on_close,
|
633
|
+
GRPC_ERROR_REF(error));
|
634
|
+
t->notify_on_close = nullptr;
|
635
|
+
}
|
636
|
+
GRPC_ERROR_UNREF(error);
|
637
|
+
}
|
638
|
+
|
639
|
+
#ifndef NDEBUG
|
640
|
+
void grpc_chttp2_stream_ref(grpc_chttp2_stream* s, const char* reason) {
|
641
|
+
grpc_stream_ref(s->refcount, reason);
|
642
|
+
}
|
643
|
+
void grpc_chttp2_stream_unref(grpc_chttp2_stream* s, const char* reason) {
|
644
|
+
grpc_stream_unref(s->refcount, reason);
|
645
|
+
}
|
646
|
+
#else
|
647
|
+
void grpc_chttp2_stream_ref(grpc_chttp2_stream* s) {
|
648
|
+
grpc_stream_ref(s->refcount);
|
649
|
+
}
|
650
|
+
void grpc_chttp2_stream_unref(grpc_chttp2_stream* s) {
|
651
|
+
grpc_stream_unref(s->refcount);
|
652
|
+
}
|
653
|
+
#endif
|
654
|
+
|
655
|
+
grpc_chttp2_stream::Reffer::Reffer(grpc_chttp2_stream* s) {
|
656
|
+
// We reserve one 'active stream' that's dropped when the stream is
|
657
|
+
// read-closed. The others are for Chttp2IncomingByteStreams that are
|
658
|
+
// actively reading
|
659
|
+
GRPC_CHTTP2_STREAM_REF(s, "chttp2");
|
660
|
+
GRPC_CHTTP2_REF_TRANSPORT(s->t, "stream");
|
661
|
+
}
|
662
|
+
|
663
|
+
grpc_chttp2_stream::grpc_chttp2_stream(grpc_chttp2_transport* t,
|
664
|
+
grpc_stream_refcount* refcount,
|
665
|
+
const void* server_data,
|
666
|
+
grpc_core::Arena* arena)
|
667
|
+
: t(t),
|
668
|
+
refcount(refcount),
|
669
|
+
reffer(this),
|
670
|
+
initial_metadata_buffer(arena),
|
671
|
+
trailing_metadata_buffer(arena) {
|
672
|
+
if (server_data) {
|
673
|
+
id = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(server_data));
|
674
|
+
*t->accepting_stream = this;
|
675
|
+
grpc_chttp2_stream_map_add(&t->stream_map, id, this);
|
676
|
+
post_destructive_reclaimer(t);
|
677
|
+
}
|
678
|
+
if (t->flow_control->flow_control_enabled()) {
|
679
|
+
flow_control.Init<grpc_core::chttp2::StreamFlowControl>(
|
680
|
+
static_cast<grpc_core::chttp2::TransportFlowControl*>(
|
681
|
+
t->flow_control.get()),
|
682
|
+
this);
|
683
|
+
} else {
|
684
|
+
flow_control.Init<grpc_core::chttp2::StreamFlowControlDisabled>();
|
685
|
+
}
|
686
|
+
|
687
|
+
grpc_slice_buffer_init(&frame_storage);
|
688
|
+
grpc_slice_buffer_init(&unprocessed_incoming_frames_buffer);
|
689
|
+
grpc_slice_buffer_init(&flow_controlled_buffer);
|
690
|
+
GRPC_CLOSURE_INIT(&reset_byte_stream, ::reset_byte_stream, this, nullptr);
|
691
|
+
}
|
692
|
+
|
693
|
+
grpc_chttp2_stream::~grpc_chttp2_stream() {
|
694
|
+
if (t->channelz_socket != nullptr) {
|
695
|
+
if ((t->is_client && eos_received) || (!t->is_client && eos_sent)) {
|
696
|
+
t->channelz_socket->RecordStreamSucceeded();
|
697
|
+
} else {
|
698
|
+
t->channelz_socket->RecordStreamFailed();
|
699
|
+
}
|
700
|
+
}
|
701
|
+
|
702
|
+
GPR_ASSERT((write_closed && read_closed) || id == 0);
|
703
|
+
if (id != 0) {
|
704
|
+
GPR_ASSERT(grpc_chttp2_stream_map_find(&t->stream_map, id) == nullptr);
|
705
|
+
}
|
706
|
+
|
707
|
+
grpc_slice_buffer_destroy_internal(&unprocessed_incoming_frames_buffer);
|
708
|
+
grpc_slice_buffer_destroy_internal(&frame_storage);
|
709
|
+
|
710
|
+
for (int i = 0; i < STREAM_LIST_COUNT; i++) {
|
711
|
+
if (GPR_UNLIKELY(included[i])) {
|
712
|
+
gpr_log(GPR_ERROR, "%s stream %d still included in list %d",
|
713
|
+
t->is_client ? "client" : "server", id, i);
|
714
|
+
abort();
|
715
|
+
}
|
716
|
+
}
|
717
|
+
|
718
|
+
GPR_ASSERT(send_initial_metadata_finished == nullptr);
|
719
|
+
GPR_ASSERT(fetching_send_message == nullptr);
|
720
|
+
GPR_ASSERT(send_trailing_metadata_finished == nullptr);
|
721
|
+
GPR_ASSERT(recv_initial_metadata_ready == nullptr);
|
722
|
+
GPR_ASSERT(recv_message_ready == nullptr);
|
723
|
+
GPR_ASSERT(recv_trailing_metadata_finished == nullptr);
|
724
|
+
grpc_slice_buffer_destroy_internal(&flow_controlled_buffer);
|
725
|
+
GRPC_ERROR_UNREF(read_closed_error);
|
726
|
+
GRPC_ERROR_UNREF(write_closed_error);
|
727
|
+
GRPC_ERROR_UNREF(byte_stream_error);
|
728
|
+
flow_control.Destroy();
|
729
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "stream");
|
730
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, destroy_stream_arg, GRPC_ERROR_NONE);
|
731
|
+
}
|
732
|
+
|
733
|
+
static int init_stream(grpc_transport* gt, grpc_stream* gs,
|
734
|
+
grpc_stream_refcount* refcount, const void* server_data,
|
735
|
+
grpc_core::Arena* arena) {
|
736
|
+
GPR_TIMER_SCOPE("init_stream", 0);
|
737
|
+
grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
|
738
|
+
new (gs) grpc_chttp2_stream(t, refcount, server_data, arena);
|
739
|
+
return 0;
|
740
|
+
}
|
741
|
+
|
742
|
+
static void destroy_stream_locked(void* sp, grpc_error_handle /*error*/) {
|
743
|
+
GPR_TIMER_SCOPE("destroy_stream", 0);
|
744
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(sp);
|
745
|
+
s->~grpc_chttp2_stream();
|
746
|
+
}
|
747
|
+
|
748
|
+
static void destroy_stream(grpc_transport* gt, grpc_stream* gs,
|
749
|
+
grpc_closure* then_schedule_closure) {
|
750
|
+
GPR_TIMER_SCOPE("destroy_stream", 0);
|
751
|
+
grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
|
752
|
+
grpc_chttp2_stream* s = reinterpret_cast<grpc_chttp2_stream*>(gs);
|
753
|
+
|
754
|
+
s->destroy_stream_arg = then_schedule_closure;
|
755
|
+
t->combiner->Run(
|
756
|
+
GRPC_CLOSURE_INIT(&s->destroy_stream, destroy_stream_locked, s, nullptr),
|
757
|
+
GRPC_ERROR_NONE);
|
758
|
+
}
|
759
|
+
|
760
|
+
grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport* t,
|
761
|
+
uint32_t id) {
|
762
|
+
if (t->accept_stream_cb == nullptr) {
|
763
|
+
return nullptr;
|
764
|
+
}
|
765
|
+
grpc_chttp2_stream* accepting = nullptr;
|
766
|
+
GPR_ASSERT(t->accepting_stream == nullptr);
|
767
|
+
t->accepting_stream = &accepting;
|
768
|
+
t->accept_stream_cb(t->accept_stream_cb_user_data, &t->base,
|
769
|
+
reinterpret_cast<void*>(id));
|
770
|
+
t->accepting_stream = nullptr;
|
771
|
+
return accepting;
|
772
|
+
}
|
773
|
+
|
774
|
+
//
|
775
|
+
// OUTPUT PROCESSING
|
776
|
+
//
|
777
|
+
|
778
|
+
static const char* write_state_name(grpc_chttp2_write_state st) {
|
779
|
+
switch (st) {
|
780
|
+
case GRPC_CHTTP2_WRITE_STATE_IDLE:
|
781
|
+
return "IDLE";
|
782
|
+
case GRPC_CHTTP2_WRITE_STATE_WRITING:
|
783
|
+
return "WRITING";
|
784
|
+
case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE:
|
785
|
+
return "WRITING+MORE";
|
786
|
+
}
|
787
|
+
GPR_UNREACHABLE_CODE(return "UNKNOWN");
|
788
|
+
}
|
789
|
+
|
790
|
+
static void set_write_state(grpc_chttp2_transport* t,
|
791
|
+
grpc_chttp2_write_state st, const char* reason) {
|
792
|
+
GRPC_CHTTP2_IF_TRACING(
|
793
|
+
gpr_log(GPR_INFO, "W:%p %s [%s] state %s -> %s [%s]", t,
|
794
|
+
t->is_client ? "CLIENT" : "SERVER", t->peer_string.c_str(),
|
795
|
+
write_state_name(t->write_state), write_state_name(st), reason));
|
796
|
+
t->write_state = st;
|
797
|
+
// If the state is being reset back to idle, it means a write was just
|
798
|
+
// finished. Make sure all the run_after_write closures are scheduled.
|
799
|
+
//
|
800
|
+
// This is also our chance to close the transport if the transport was marked
|
801
|
+
// to be closed after all writes finish (for example, if we received a go-away
|
802
|
+
// from peer while we had some pending writes)
|
803
|
+
if (st == GRPC_CHTTP2_WRITE_STATE_IDLE) {
|
804
|
+
grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &t->run_after_write);
|
805
|
+
if (t->close_transport_on_writes_finished != GRPC_ERROR_NONE) {
|
806
|
+
grpc_error_handle err = t->close_transport_on_writes_finished;
|
807
|
+
t->close_transport_on_writes_finished = GRPC_ERROR_NONE;
|
808
|
+
close_transport_locked(t, err);
|
809
|
+
}
|
810
|
+
}
|
811
|
+
}
|
812
|
+
|
813
|
+
static void inc_initiate_write_reason(
|
814
|
+
grpc_chttp2_initiate_write_reason reason) {
|
815
|
+
switch (reason) {
|
816
|
+
case GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE:
|
817
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE();
|
818
|
+
break;
|
819
|
+
case GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM:
|
820
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM();
|
821
|
+
break;
|
822
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE:
|
823
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE();
|
824
|
+
break;
|
825
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA:
|
826
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA();
|
827
|
+
break;
|
828
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA:
|
829
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA();
|
830
|
+
break;
|
831
|
+
case GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING:
|
832
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING();
|
833
|
+
break;
|
834
|
+
case GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS:
|
835
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS();
|
836
|
+
break;
|
837
|
+
case GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT:
|
838
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT();
|
839
|
+
break;
|
840
|
+
case GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM:
|
841
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM();
|
842
|
+
break;
|
843
|
+
case GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API:
|
844
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API();
|
845
|
+
break;
|
846
|
+
case GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL:
|
847
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL();
|
848
|
+
break;
|
849
|
+
case GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL:
|
850
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL();
|
851
|
+
break;
|
852
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS:
|
853
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS();
|
854
|
+
break;
|
855
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SETTINGS_ACK:
|
856
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SETTINGS_ACK();
|
857
|
+
break;
|
858
|
+
case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING:
|
859
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING();
|
860
|
+
break;
|
861
|
+
case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_UPDATE:
|
862
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE();
|
863
|
+
break;
|
864
|
+
case GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING:
|
865
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING();
|
866
|
+
break;
|
867
|
+
case GRPC_CHTTP2_INITIATE_WRITE_BDP_PING:
|
868
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING();
|
869
|
+
break;
|
870
|
+
case GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING:
|
871
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING();
|
872
|
+
break;
|
873
|
+
case GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL_UNSTALLED:
|
874
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED();
|
875
|
+
break;
|
876
|
+
case GRPC_CHTTP2_INITIATE_WRITE_PING_RESPONSE:
|
877
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE();
|
878
|
+
break;
|
879
|
+
case GRPC_CHTTP2_INITIATE_WRITE_FORCE_RST_STREAM:
|
880
|
+
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM();
|
881
|
+
break;
|
882
|
+
}
|
883
|
+
}
|
884
|
+
|
885
|
+
void grpc_chttp2_initiate_write(grpc_chttp2_transport* t,
|
886
|
+
grpc_chttp2_initiate_write_reason reason) {
|
887
|
+
GPR_TIMER_SCOPE("grpc_chttp2_initiate_write", 0);
|
888
|
+
|
889
|
+
switch (t->write_state) {
|
890
|
+
case GRPC_CHTTP2_WRITE_STATE_IDLE:
|
891
|
+
inc_initiate_write_reason(reason);
|
892
|
+
set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING,
|
893
|
+
grpc_chttp2_initiate_write_reason_string(reason));
|
894
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "writing");
|
895
|
+
// Note that the 'write_action_begin_locked' closure is being scheduled
|
896
|
+
// on the 'finally_scheduler' of t->combiner. This means that
|
897
|
+
// 'write_action_begin_locked' is called only *after* all the other
|
898
|
+
// closures (some of which are potentially initiating more writes on the
|
899
|
+
// transport) are executed on the t->combiner.
|
900
|
+
//
|
901
|
+
// The reason for scheduling on finally_scheduler is to make sure we batch
|
902
|
+
// as many writes as possible. 'write_action_begin_locked' is the function
|
903
|
+
// that gathers all the relevant bytes (which are at various places in the
|
904
|
+
// grpc_chttp2_transport structure) and append them to 'outbuf' field in
|
905
|
+
// grpc_chttp2_transport thereby batching what would have been potentially
|
906
|
+
// multiple write operations.
|
907
|
+
//
|
908
|
+
// Also, 'write_action_begin_locked' only gathers the bytes into outbuf.
|
909
|
+
// It does not call the endpoint to write the bytes. That is done by the
|
910
|
+
// 'write_action' (which is scheduled by 'write_action_begin_locked')
|
911
|
+
t->combiner->FinallyRun(
|
912
|
+
GRPC_CLOSURE_INIT(&t->write_action_begin_locked,
|
913
|
+
write_action_begin_locked, t, nullptr),
|
914
|
+
GRPC_ERROR_NONE);
|
915
|
+
break;
|
916
|
+
case GRPC_CHTTP2_WRITE_STATE_WRITING:
|
917
|
+
set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE,
|
918
|
+
grpc_chttp2_initiate_write_reason_string(reason));
|
919
|
+
break;
|
920
|
+
case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE:
|
921
|
+
break;
|
922
|
+
}
|
923
|
+
}
|
924
|
+
|
925
|
+
void grpc_chttp2_mark_stream_writable(grpc_chttp2_transport* t,
|
926
|
+
grpc_chttp2_stream* s) {
|
927
|
+
if (t->closed_with_error == GRPC_ERROR_NONE &&
|
928
|
+
grpc_chttp2_list_add_writable_stream(t, s)) {
|
929
|
+
GRPC_CHTTP2_STREAM_REF(s, "chttp2_writing:become");
|
930
|
+
}
|
931
|
+
}
|
932
|
+
|
933
|
+
static const char* begin_writing_desc(bool partial) {
|
934
|
+
if (partial) {
|
935
|
+
return "begin partial write in background";
|
936
|
+
} else {
|
937
|
+
return "begin write in current thread";
|
938
|
+
}
|
939
|
+
}
|
940
|
+
|
941
|
+
static void write_action_begin_locked(void* gt,
|
942
|
+
grpc_error_handle /*error_ignored*/) {
|
943
|
+
GPR_TIMER_SCOPE("write_action_begin_locked", 0);
|
944
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(gt);
|
945
|
+
GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE);
|
946
|
+
grpc_chttp2_begin_write_result r;
|
947
|
+
if (t->closed_with_error != GRPC_ERROR_NONE) {
|
948
|
+
r.writing = false;
|
949
|
+
} else {
|
950
|
+
r = grpc_chttp2_begin_write(t);
|
951
|
+
}
|
952
|
+
if (r.writing) {
|
953
|
+
if (r.partial) {
|
954
|
+
GRPC_STATS_INC_HTTP2_PARTIAL_WRITES();
|
955
|
+
}
|
956
|
+
set_write_state(t,
|
957
|
+
r.partial ? GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE
|
958
|
+
: GRPC_CHTTP2_WRITE_STATE_WRITING,
|
959
|
+
begin_writing_desc(r.partial));
|
960
|
+
write_action(t, GRPC_ERROR_NONE);
|
961
|
+
if (t->reading_paused_on_pending_induced_frames) {
|
962
|
+
GPR_ASSERT(t->num_pending_induced_frames == 0);
|
963
|
+
// We had paused reading, because we had many induced frames (SETTINGS
|
964
|
+
// ACK, PINGS ACK and RST_STREAMS) pending in t->qbuf. Now that we have
|
965
|
+
// been able to flush qbuf, we can resume reading.
|
966
|
+
GRPC_CHTTP2_IF_TRACING(gpr_log(
|
967
|
+
GPR_INFO,
|
968
|
+
"transport %p : Resuming reading after being paused due to too "
|
969
|
+
"many unwritten SETTINGS ACK, PINGS ACK and RST_STREAM frames",
|
970
|
+
t));
|
971
|
+
t->reading_paused_on_pending_induced_frames = false;
|
972
|
+
continue_read_action_locked(t);
|
973
|
+
}
|
974
|
+
} else {
|
975
|
+
GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN();
|
976
|
+
set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "begin writing nothing");
|
977
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "writing");
|
978
|
+
}
|
979
|
+
}
|
980
|
+
|
981
|
+
static void write_action(void* gt, grpc_error_handle /*error*/) {
|
982
|
+
GPR_TIMER_SCOPE("write_action", 0);
|
983
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(gt);
|
984
|
+
void* cl = t->cl;
|
985
|
+
t->cl = nullptr;
|
986
|
+
grpc_endpoint_write(
|
987
|
+
t->ep, &t->outbuf,
|
988
|
+
GRPC_CLOSURE_INIT(&t->write_action_end_locked, write_action_end, t,
|
989
|
+
grpc_schedule_on_exec_ctx),
|
990
|
+
cl);
|
991
|
+
}
|
992
|
+
|
993
|
+
static void write_action_end(void* tp, grpc_error_handle error) {
|
994
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
995
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->write_action_end_locked,
|
996
|
+
write_action_end_locked, t, nullptr),
|
997
|
+
GRPC_ERROR_REF(error));
|
998
|
+
}
|
999
|
+
|
1000
|
+
// Callback from the grpc_endpoint after bytes have been written by calling
|
1001
|
+
// sendmsg
|
1002
|
+
static void write_action_end_locked(void* tp, grpc_error_handle error) {
|
1003
|
+
GPR_TIMER_SCOPE("terminate_writing_with_lock", 0);
|
1004
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
1005
|
+
|
1006
|
+
bool closed = false;
|
1007
|
+
if (error != GRPC_ERROR_NONE) {
|
1008
|
+
close_transport_locked(t, GRPC_ERROR_REF(error));
|
1009
|
+
closed = true;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
if (t->sent_goaway_state == GRPC_CHTTP2_FINAL_GOAWAY_SEND_SCHEDULED) {
|
1013
|
+
t->sent_goaway_state = GRPC_CHTTP2_FINAL_GOAWAY_SENT;
|
1014
|
+
closed = true;
|
1015
|
+
if (grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
|
1016
|
+
close_transport_locked(
|
1017
|
+
t, GRPC_ERROR_CREATE_FROM_STATIC_STRING("goaway sent"));
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
switch (t->write_state) {
|
1022
|
+
case GRPC_CHTTP2_WRITE_STATE_IDLE:
|
1023
|
+
GPR_UNREACHABLE_CODE(break);
|
1024
|
+
case GRPC_CHTTP2_WRITE_STATE_WRITING:
|
1025
|
+
GPR_TIMER_MARK("state=writing", 0);
|
1026
|
+
set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "finish writing");
|
1027
|
+
break;
|
1028
|
+
case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE:
|
1029
|
+
GPR_TIMER_MARK("state=writing_stale_no_poller", 0);
|
1030
|
+
set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, "continue writing");
|
1031
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "writing");
|
1032
|
+
// If the transport is closed, we will retry writing on the endpoint
|
1033
|
+
// and next write may contain part of the currently serialized frames.
|
1034
|
+
// So, we should only call the run_after_write callbacks when the next
|
1035
|
+
// write finishes, or the callbacks will be invoked when the stream is
|
1036
|
+
// closed.
|
1037
|
+
if (!closed) {
|
1038
|
+
grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &t->run_after_write);
|
1039
|
+
}
|
1040
|
+
t->combiner->FinallyRun(
|
1041
|
+
GRPC_CLOSURE_INIT(&t->write_action_begin_locked,
|
1042
|
+
write_action_begin_locked, t, nullptr),
|
1043
|
+
GRPC_ERROR_NONE);
|
1044
|
+
break;
|
1045
|
+
}
|
1046
|
+
|
1047
|
+
grpc_chttp2_end_write(t, GRPC_ERROR_REF(error));
|
1048
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "writing");
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
// Dirties an HTTP2 setting to be sent out next time a writing path occurs.
|
1052
|
+
// If the change needs to occur immediately, manually initiate a write.
|
1053
|
+
static void queue_setting_update(grpc_chttp2_transport* t,
|
1054
|
+
grpc_chttp2_setting_id id, uint32_t value) {
|
1055
|
+
const grpc_chttp2_setting_parameters* sp =
|
1056
|
+
&grpc_chttp2_settings_parameters[id];
|
1057
|
+
uint32_t use_value = grpc_core::Clamp(value, sp->min_value, sp->max_value);
|
1058
|
+
if (use_value != value) {
|
1059
|
+
gpr_log(GPR_INFO, "Requested parameter %s clamped from %d to %d", sp->name,
|
1060
|
+
value, use_value);
|
1061
|
+
}
|
1062
|
+
if (use_value != t->settings[GRPC_LOCAL_SETTINGS][id]) {
|
1063
|
+
t->settings[GRPC_LOCAL_SETTINGS][id] = use_value;
|
1064
|
+
t->dirtied_local_settings = true;
|
1065
|
+
}
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
// Cancel out streams that haven't yet started if we have received a GOAWAY
|
1069
|
+
static void cancel_unstarted_streams(grpc_chttp2_transport* t,
|
1070
|
+
grpc_error_handle error) {
|
1071
|
+
grpc_chttp2_stream* s;
|
1072
|
+
while (grpc_chttp2_list_pop_waiting_for_concurrency(t, &s)) {
|
1073
|
+
s->trailing_metadata_buffer.Set(
|
1074
|
+
grpc_core::GrpcStreamNetworkState(),
|
1075
|
+
grpc_core::GrpcStreamNetworkState::kNotSentOnWire);
|
1076
|
+
grpc_chttp2_cancel_stream(t, s, GRPC_ERROR_REF(error));
|
1077
|
+
}
|
1078
|
+
GRPC_ERROR_UNREF(error);
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport* t,
|
1082
|
+
uint32_t goaway_error,
|
1083
|
+
uint32_t last_stream_id,
|
1084
|
+
absl::string_view goaway_text) {
|
1085
|
+
// Discard the error from a previous goaway frame (if any)
|
1086
|
+
if (t->goaway_error != GRPC_ERROR_NONE) {
|
1087
|
+
GRPC_ERROR_UNREF(t->goaway_error);
|
1088
|
+
}
|
1089
|
+
t->goaway_error = grpc_error_set_str(
|
1090
|
+
grpc_error_set_int(
|
1091
|
+
grpc_error_set_int(
|
1092
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("GOAWAY received"),
|
1093
|
+
GRPC_ERROR_INT_HTTP2_ERROR, static_cast<intptr_t>(goaway_error)),
|
1094
|
+
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE),
|
1095
|
+
GRPC_ERROR_STR_RAW_BYTES, goaway_text);
|
1096
|
+
|
1097
|
+
GRPC_CHTTP2_IF_TRACING(
|
1098
|
+
gpr_log(GPR_INFO, "transport %p got goaway with last stream id %d", t,
|
1099
|
+
last_stream_id));
|
1100
|
+
// We want to log this irrespective of whether http tracing is enabled if we
|
1101
|
+
// received a GOAWAY with a non NO_ERROR code.
|
1102
|
+
if (goaway_error != GRPC_HTTP2_NO_ERROR) {
|
1103
|
+
gpr_log(GPR_INFO, "%s: Got goaway [%d] err=%s", t->peer_string.c_str(),
|
1104
|
+
goaway_error, grpc_error_std_string(t->goaway_error).c_str());
|
1105
|
+
}
|
1106
|
+
if (t->is_client) {
|
1107
|
+
cancel_unstarted_streams(t, GRPC_ERROR_REF(t->goaway_error));
|
1108
|
+
// Cancel all unseen streams
|
1109
|
+
grpc_chttp2_stream_map_for_each(
|
1110
|
+
&t->stream_map,
|
1111
|
+
[](void* user_data, uint32_t /* key */, void* stream) {
|
1112
|
+
uint32_t last_stream_id = *(static_cast<uint32_t*>(user_data));
|
1113
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(stream);
|
1114
|
+
if (s->id > last_stream_id) {
|
1115
|
+
s->trailing_metadata_buffer.Set(
|
1116
|
+
grpc_core::GrpcStreamNetworkState(),
|
1117
|
+
grpc_core::GrpcStreamNetworkState::kNotSeenByServer);
|
1118
|
+
grpc_chttp2_cancel_stream(s->t, s,
|
1119
|
+
GRPC_ERROR_REF(s->t->goaway_error));
|
1120
|
+
}
|
1121
|
+
},
|
1122
|
+
&last_stream_id);
|
1123
|
+
}
|
1124
|
+
absl::Status status = grpc_error_to_absl_status(t->goaway_error);
|
1125
|
+
// When a client receives a GOAWAY with error code ENHANCE_YOUR_CALM and debug
|
1126
|
+
// data equal to "too_many_pings", it should log the occurrence at a log level
|
1127
|
+
// that is enabled by default and double the configured KEEPALIVE_TIME used
|
1128
|
+
// for new connections on that channel.
|
1129
|
+
if (GPR_UNLIKELY(t->is_client &&
|
1130
|
+
goaway_error == GRPC_HTTP2_ENHANCE_YOUR_CALM &&
|
1131
|
+
goaway_text == "too_many_pings")) {
|
1132
|
+
gpr_log(GPR_ERROR,
|
1133
|
+
"Received a GOAWAY with error code ENHANCE_YOUR_CALM and debug "
|
1134
|
+
"data equal to \"too_many_pings\"");
|
1135
|
+
constexpr auto max_keepalive_time = grpc_core::Duration::Milliseconds(
|
1136
|
+
INT_MAX / KEEPALIVE_TIME_BACKOFF_MULTIPLIER);
|
1137
|
+
t->keepalive_time =
|
1138
|
+
t->keepalive_time > max_keepalive_time
|
1139
|
+
? grpc_core::Duration::Infinity()
|
1140
|
+
: t->keepalive_time * KEEPALIVE_TIME_BACKOFF_MULTIPLIER;
|
1141
|
+
status.SetPayload(grpc_core::kKeepaliveThrottlingKey,
|
1142
|
+
absl::Cord(std::to_string(t->keepalive_time.millis())));
|
1143
|
+
}
|
1144
|
+
// lie: use transient failure from the transport to indicate goaway has been
|
1145
|
+
// received.
|
1146
|
+
if (!grpc_core::test_only_disable_transient_failure_state_notification) {
|
1147
|
+
connectivity_state_set(t, GRPC_CHANNEL_TRANSIENT_FAILURE, status,
|
1148
|
+
"got_goaway");
|
1149
|
+
}
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
static void maybe_start_some_streams(grpc_chttp2_transport* t) {
|
1153
|
+
grpc_chttp2_stream* s;
|
1154
|
+
// maybe cancel out streams that haven't yet started if we have received a
|
1155
|
+
// GOAWAY
|
1156
|
+
if (t->goaway_error != GRPC_ERROR_NONE) {
|
1157
|
+
cancel_unstarted_streams(t, GRPC_ERROR_REF(t->goaway_error));
|
1158
|
+
return;
|
1159
|
+
}
|
1160
|
+
// start streams where we have free grpc_chttp2_stream ids and free
|
1161
|
+
// * concurrency
|
1162
|
+
while (t->next_stream_id <= MAX_CLIENT_STREAM_ID &&
|
1163
|
+
grpc_chttp2_stream_map_size(&t->stream_map) <
|
1164
|
+
t->settings[GRPC_PEER_SETTINGS]
|
1165
|
+
[GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] &&
|
1166
|
+
grpc_chttp2_list_pop_waiting_for_concurrency(t, &s)) {
|
1167
|
+
// safe since we can't (legally) be parsing this stream yet
|
1168
|
+
GRPC_CHTTP2_IF_TRACING(gpr_log(
|
1169
|
+
GPR_INFO,
|
1170
|
+
"HTTP:%s: Transport %p allocating new grpc_chttp2_stream %p to id %d",
|
1171
|
+
t->is_client ? "CLI" : "SVR", t, s, t->next_stream_id));
|
1172
|
+
|
1173
|
+
GPR_ASSERT(s->id == 0);
|
1174
|
+
s->id = t->next_stream_id;
|
1175
|
+
t->next_stream_id += 2;
|
1176
|
+
|
1177
|
+
if (t->next_stream_id >= MAX_CLIENT_STREAM_ID) {
|
1178
|
+
connectivity_state_set(t, GRPC_CHANNEL_TRANSIENT_FAILURE,
|
1179
|
+
absl::Status(absl::StatusCode::kUnavailable,
|
1180
|
+
"Transport Stream IDs exhausted"),
|
1181
|
+
"no_more_stream_ids");
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
grpc_chttp2_stream_map_add(&t->stream_map, s->id, s);
|
1185
|
+
post_destructive_reclaimer(t);
|
1186
|
+
grpc_chttp2_mark_stream_writable(t, s);
|
1187
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM);
|
1188
|
+
}
|
1189
|
+
// cancel out streams that will never be started
|
1190
|
+
if (t->next_stream_id >= MAX_CLIENT_STREAM_ID) {
|
1191
|
+
while (grpc_chttp2_list_pop_waiting_for_concurrency(t, &s)) {
|
1192
|
+
s->trailing_metadata_buffer.Set(
|
1193
|
+
grpc_core::GrpcStreamNetworkState(),
|
1194
|
+
grpc_core::GrpcStreamNetworkState::kNotSentOnWire);
|
1195
|
+
grpc_chttp2_cancel_stream(
|
1196
|
+
t, s,
|
1197
|
+
grpc_error_set_int(
|
1198
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream IDs exhausted"),
|
1199
|
+
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
|
1200
|
+
}
|
1201
|
+
}
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
// Flag that this closure barrier may be covering a write in a pollset, and so
|
1205
|
+
// we should not complete this closure until we can prove that the write got
|
1206
|
+
// scheduled
|
1207
|
+
#define CLOSURE_BARRIER_MAY_COVER_WRITE (1 << 0)
|
1208
|
+
// First bit of the reference count, stored in the high order bits (with the low
|
1209
|
+
// bits being used for flags defined above)
|
1210
|
+
#define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16)
|
1211
|
+
|
1212
|
+
static grpc_closure* add_closure_barrier(grpc_closure* closure) {
|
1213
|
+
closure->next_data.scratch += CLOSURE_BARRIER_FIRST_REF_BIT;
|
1214
|
+
return closure;
|
1215
|
+
}
|
1216
|
+
|
1217
|
+
static void null_then_sched_closure(grpc_closure** closure) {
|
1218
|
+
grpc_closure* c = *closure;
|
1219
|
+
*closure = nullptr;
|
1220
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, c, GRPC_ERROR_NONE);
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
void grpc_chttp2_complete_closure_step(grpc_chttp2_transport* t,
|
1224
|
+
grpc_chttp2_stream* /*s*/,
|
1225
|
+
grpc_closure** pclosure,
|
1226
|
+
grpc_error_handle error,
|
1227
|
+
const char* desc) {
|
1228
|
+
grpc_closure* closure = *pclosure;
|
1229
|
+
*pclosure = nullptr;
|
1230
|
+
if (closure == nullptr) {
|
1231
|
+
GRPC_ERROR_UNREF(error);
|
1232
|
+
return;
|
1233
|
+
}
|
1234
|
+
closure->next_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT;
|
1235
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) {
|
1236
|
+
gpr_log(
|
1237
|
+
GPR_INFO,
|
1238
|
+
"complete_closure_step: t=%p %p refs=%d flags=0x%04x desc=%s err=%s "
|
1239
|
+
"write_state=%s",
|
1240
|
+
t, closure,
|
1241
|
+
static_cast<int>(closure->next_data.scratch /
|
1242
|
+
CLOSURE_BARRIER_FIRST_REF_BIT),
|
1243
|
+
static_cast<int>(closure->next_data.scratch %
|
1244
|
+
CLOSURE_BARRIER_FIRST_REF_BIT),
|
1245
|
+
desc, grpc_error_std_string(error).c_str(),
|
1246
|
+
write_state_name(t->write_state));
|
1247
|
+
}
|
1248
|
+
if (error != GRPC_ERROR_NONE) {
|
1249
|
+
#ifdef GRPC_ERROR_IS_ABSEIL_STATUS
|
1250
|
+
grpc_error_handle cl_err =
|
1251
|
+
grpc_core::internal::StatusMoveFromHeapPtr(closure->error_data.error);
|
1252
|
+
#else
|
1253
|
+
grpc_error_handle cl_err =
|
1254
|
+
reinterpret_cast<grpc_error_handle>(closure->error_data.error);
|
1255
|
+
#endif
|
1256
|
+
if (cl_err == GRPC_ERROR_NONE) {
|
1257
|
+
cl_err = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1258
|
+
"Error in HTTP transport completing operation");
|
1259
|
+
cl_err = grpc_error_set_str(cl_err, GRPC_ERROR_STR_TARGET_ADDRESS,
|
1260
|
+
t->peer_string);
|
1261
|
+
}
|
1262
|
+
cl_err = grpc_error_add_child(cl_err, error);
|
1263
|
+
#ifdef GRPC_ERROR_IS_ABSEIL_STATUS
|
1264
|
+
closure->error_data.error = grpc_core::internal::StatusAllocHeapPtr(cl_err);
|
1265
|
+
#else
|
1266
|
+
closure->error_data.error = reinterpret_cast<intptr_t>(cl_err);
|
1267
|
+
#endif
|
1268
|
+
}
|
1269
|
+
if (closure->next_data.scratch < CLOSURE_BARRIER_FIRST_REF_BIT) {
|
1270
|
+
if ((t->write_state == GRPC_CHTTP2_WRITE_STATE_IDLE) ||
|
1271
|
+
!(closure->next_data.scratch & CLOSURE_BARRIER_MAY_COVER_WRITE)) {
|
1272
|
+
// Using GRPC_CLOSURE_SCHED instead of GRPC_CLOSURE_RUN to avoid running
|
1273
|
+
// closures earlier than when it is safe to do so.
|
1274
|
+
#ifdef GRPC_ERROR_IS_ABSEIL_STATUS
|
1275
|
+
grpc_error_handle run_error =
|
1276
|
+
grpc_core::internal::StatusMoveFromHeapPtr(closure->error_data.error);
|
1277
|
+
#else
|
1278
|
+
grpc_error_handle run_error =
|
1279
|
+
reinterpret_cast<grpc_error_handle>(closure->error_data.error);
|
1280
|
+
#endif
|
1281
|
+
closure->error_data.error = 0;
|
1282
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, run_error);
|
1283
|
+
} else {
|
1284
|
+
grpc_closure_list_append(&t->run_after_write, closure);
|
1285
|
+
}
|
1286
|
+
}
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
static bool contains_non_ok_status(grpc_metadata_batch* batch) {
|
1290
|
+
return batch->get(grpc_core::GrpcStatusMetadata()).value_or(GRPC_STATUS_OK) !=
|
1291
|
+
GRPC_STATUS_OK;
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
static void maybe_become_writable_due_to_send_msg(grpc_chttp2_transport* t,
|
1295
|
+
grpc_chttp2_stream* s) {
|
1296
|
+
if (s->id != 0 && (!s->write_buffering ||
|
1297
|
+
s->flow_controlled_buffer.length > t->write_buffer_size)) {
|
1298
|
+
grpc_chttp2_mark_stream_writable(t, s);
|
1299
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE);
|
1300
|
+
}
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
static void add_fetched_slice_locked(grpc_chttp2_transport* t,
|
1304
|
+
grpc_chttp2_stream* s) {
|
1305
|
+
s->fetched_send_message_length +=
|
1306
|
+
static_cast<uint32_t> GRPC_SLICE_LENGTH(s->fetching_slice);
|
1307
|
+
grpc_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice);
|
1308
|
+
maybe_become_writable_due_to_send_msg(t, s);
|
1309
|
+
}
|
1310
|
+
|
1311
|
+
static void continue_fetching_send_locked(grpc_chttp2_transport* t,
|
1312
|
+
grpc_chttp2_stream* s) {
|
1313
|
+
for (;;) {
|
1314
|
+
if (s->fetching_send_message == nullptr) {
|
1315
|
+
// Stream was cancelled before message fetch completed
|
1316
|
+
abort(); /* TODO(ctiller): what cleanup here? */
|
1317
|
+
}
|
1318
|
+
if (s->fetched_send_message_length == s->fetching_send_message->length()) {
|
1319
|
+
int64_t notify_offset = s->next_message_end_offset;
|
1320
|
+
if (notify_offset <= s->flow_controlled_bytes_written) {
|
1321
|
+
grpc_chttp2_complete_closure_step(
|
1322
|
+
t, s, &s->fetching_send_message_finished, GRPC_ERROR_NONE,
|
1323
|
+
"fetching_send_message_finished");
|
1324
|
+
} else {
|
1325
|
+
grpc_chttp2_write_cb* cb = t->write_cb_pool;
|
1326
|
+
if (cb == nullptr) {
|
1327
|
+
cb = static_cast<grpc_chttp2_write_cb*>(gpr_malloc(sizeof(*cb)));
|
1328
|
+
} else {
|
1329
|
+
t->write_cb_pool = cb->next;
|
1330
|
+
}
|
1331
|
+
cb->call_at_byte = notify_offset;
|
1332
|
+
cb->closure = s->fetching_send_message_finished;
|
1333
|
+
s->fetching_send_message_finished = nullptr;
|
1334
|
+
grpc_chttp2_write_cb** list =
|
1335
|
+
s->fetching_send_message->flags() & GRPC_WRITE_THROUGH
|
1336
|
+
? &s->on_write_finished_cbs
|
1337
|
+
: &s->on_flow_controlled_cbs;
|
1338
|
+
cb->next = *list;
|
1339
|
+
*list = cb;
|
1340
|
+
}
|
1341
|
+
s->fetching_send_message.reset();
|
1342
|
+
return; /* early out */
|
1343
|
+
} else if (s->fetching_send_message->Next(
|
1344
|
+
UINT32_MAX, GRPC_CLOSURE_INIT(&s->complete_fetch_locked,
|
1345
|
+
::complete_fetch, s,
|
1346
|
+
grpc_schedule_on_exec_ctx))) {
|
1347
|
+
grpc_error_handle error =
|
1348
|
+
s->fetching_send_message->Pull(&s->fetching_slice);
|
1349
|
+
if (error != GRPC_ERROR_NONE) {
|
1350
|
+
s->fetching_send_message.reset();
|
1351
|
+
grpc_chttp2_cancel_stream(t, s, error);
|
1352
|
+
} else {
|
1353
|
+
add_fetched_slice_locked(t, s);
|
1354
|
+
}
|
1355
|
+
}
|
1356
|
+
}
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
static void complete_fetch(void* gs, grpc_error_handle error) {
|
1360
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(gs);
|
1361
|
+
s->t->combiner->Run(GRPC_CLOSURE_INIT(&s->complete_fetch_locked,
|
1362
|
+
::complete_fetch_locked, s, nullptr),
|
1363
|
+
GRPC_ERROR_REF(error));
|
1364
|
+
}
|
1365
|
+
|
1366
|
+
static void complete_fetch_locked(void* gs, grpc_error_handle error) {
|
1367
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(gs);
|
1368
|
+
grpc_chttp2_transport* t = s->t;
|
1369
|
+
if (error == GRPC_ERROR_NONE) {
|
1370
|
+
error = s->fetching_send_message->Pull(&s->fetching_slice);
|
1371
|
+
if (error == GRPC_ERROR_NONE) {
|
1372
|
+
add_fetched_slice_locked(t, s);
|
1373
|
+
continue_fetching_send_locked(t, s);
|
1374
|
+
}
|
1375
|
+
}
|
1376
|
+
if (error != GRPC_ERROR_NONE) {
|
1377
|
+
s->fetching_send_message.reset();
|
1378
|
+
grpc_chttp2_cancel_stream(t, s, error);
|
1379
|
+
}
|
1380
|
+
}
|
1381
|
+
|
1382
|
+
static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id,
|
1383
|
+
bool is_client, bool is_initial) {
|
1384
|
+
const std::string prefix = absl::StrCat(
|
1385
|
+
"HTTP:", id, is_initial ? ":HDR" : ":TRL", is_client ? ":CLI:" : ":SVR:");
|
1386
|
+
md_batch->Log([&prefix](absl::string_view key, absl::string_view value) {
|
1387
|
+
gpr_log(GPR_INFO, "%s", absl::StrCat(prefix, key, ": ", value).c_str());
|
1388
|
+
});
|
1389
|
+
}
|
1390
|
+
|
1391
|
+
static void perform_stream_op_locked(void* stream_op,
|
1392
|
+
grpc_error_handle /*error_ignored*/) {
|
1393
|
+
GPR_TIMER_SCOPE("perform_stream_op_locked", 0);
|
1394
|
+
|
1395
|
+
grpc_transport_stream_op_batch* op =
|
1396
|
+
static_cast<grpc_transport_stream_op_batch*>(stream_op);
|
1397
|
+
grpc_chttp2_stream* s =
|
1398
|
+
static_cast<grpc_chttp2_stream*>(op->handler_private.extra_arg);
|
1399
|
+
grpc_transport_stream_op_batch_payload* op_payload = op->payload;
|
1400
|
+
grpc_chttp2_transport* t = s->t;
|
1401
|
+
|
1402
|
+
GRPC_STATS_INC_HTTP2_OP_BATCHES();
|
1403
|
+
|
1404
|
+
s->context = op->payload->context;
|
1405
|
+
s->traced = op->is_traced;
|
1406
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) {
|
1407
|
+
gpr_log(GPR_INFO,
|
1408
|
+
"perform_stream_op_locked[s=%p; op=%p]: %s; on_complete = %p", s,
|
1409
|
+
op, grpc_transport_stream_op_batch_string(op).c_str(),
|
1410
|
+
op->on_complete);
|
1411
|
+
if (op->send_initial_metadata) {
|
1412
|
+
log_metadata(op_payload->send_initial_metadata.send_initial_metadata,
|
1413
|
+
s->id, t->is_client, true);
|
1414
|
+
}
|
1415
|
+
if (op->send_trailing_metadata) {
|
1416
|
+
log_metadata(op_payload->send_trailing_metadata.send_trailing_metadata,
|
1417
|
+
s->id, t->is_client, false);
|
1418
|
+
}
|
1419
|
+
}
|
1420
|
+
|
1421
|
+
grpc_closure* on_complete = op->on_complete;
|
1422
|
+
// on_complete will be null if and only if there are no send ops in the batch.
|
1423
|
+
if (on_complete != nullptr) {
|
1424
|
+
// This batch has send ops. Use final_data as a barrier until enqueue time;
|
1425
|
+
// the initial counter is dropped at the end of this function.
|
1426
|
+
on_complete->next_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT;
|
1427
|
+
on_complete->error_data.error = 0;
|
1428
|
+
}
|
1429
|
+
|
1430
|
+
if (op->cancel_stream) {
|
1431
|
+
GRPC_STATS_INC_HTTP2_OP_CANCEL();
|
1432
|
+
grpc_chttp2_cancel_stream(t, s, op_payload->cancel_stream.cancel_error);
|
1433
|
+
}
|
1434
|
+
|
1435
|
+
if (op->send_initial_metadata) {
|
1436
|
+
if (t->is_client && t->channelz_socket != nullptr) {
|
1437
|
+
t->channelz_socket->RecordStreamStartedFromLocal();
|
1438
|
+
}
|
1439
|
+
GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA();
|
1440
|
+
GPR_ASSERT(s->send_initial_metadata_finished == nullptr);
|
1441
|
+
on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE;
|
1442
|
+
|
1443
|
+
s->send_initial_metadata_finished = add_closure_barrier(on_complete);
|
1444
|
+
s->send_initial_metadata =
|
1445
|
+
op_payload->send_initial_metadata.send_initial_metadata;
|
1446
|
+
if (t->is_client) {
|
1447
|
+
s->deadline = std::min(
|
1448
|
+
s->deadline,
|
1449
|
+
s->send_initial_metadata->get(grpc_core::GrpcTimeoutMetadata())
|
1450
|
+
.value_or(grpc_core::Timestamp::InfFuture()));
|
1451
|
+
}
|
1452
|
+
if (contains_non_ok_status(s->send_initial_metadata)) {
|
1453
|
+
s->seen_error = true;
|
1454
|
+
}
|
1455
|
+
if (!s->write_closed) {
|
1456
|
+
if (t->is_client) {
|
1457
|
+
if (t->closed_with_error == GRPC_ERROR_NONE) {
|
1458
|
+
GPR_ASSERT(s->id == 0);
|
1459
|
+
grpc_chttp2_list_add_waiting_for_concurrency(t, s);
|
1460
|
+
maybe_start_some_streams(t);
|
1461
|
+
} else {
|
1462
|
+
s->trailing_metadata_buffer.Set(
|
1463
|
+
grpc_core::GrpcStreamNetworkState(),
|
1464
|
+
grpc_core::GrpcStreamNetworkState::kNotSentOnWire);
|
1465
|
+
grpc_chttp2_cancel_stream(
|
1466
|
+
t, s,
|
1467
|
+
grpc_error_set_int(
|
1468
|
+
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
1469
|
+
"Transport closed", &t->closed_with_error, 1),
|
1470
|
+
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
|
1471
|
+
}
|
1472
|
+
} else {
|
1473
|
+
GPR_ASSERT(s->id != 0);
|
1474
|
+
grpc_chttp2_mark_stream_writable(t, s);
|
1475
|
+
if (!(op->send_message &&
|
1476
|
+
(op->payload->send_message.send_message->flags() &
|
1477
|
+
GRPC_WRITE_BUFFER_HINT))) {
|
1478
|
+
grpc_chttp2_initiate_write(
|
1479
|
+
t, GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA);
|
1480
|
+
}
|
1481
|
+
}
|
1482
|
+
} else {
|
1483
|
+
s->send_initial_metadata = nullptr;
|
1484
|
+
grpc_chttp2_complete_closure_step(
|
1485
|
+
t, s, &s->send_initial_metadata_finished,
|
1486
|
+
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
1487
|
+
"Attempt to send initial metadata after stream was closed",
|
1488
|
+
&s->write_closed_error, 1),
|
1489
|
+
"send_initial_metadata_finished");
|
1490
|
+
}
|
1491
|
+
if (op_payload->send_initial_metadata.peer_string != nullptr) {
|
1492
|
+
gpr_atm_rel_store(op_payload->send_initial_metadata.peer_string,
|
1493
|
+
(gpr_atm)t->peer_string.c_str());
|
1494
|
+
}
|
1495
|
+
}
|
1496
|
+
|
1497
|
+
if (op->send_message) {
|
1498
|
+
GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE();
|
1499
|
+
t->num_messages_in_next_write++;
|
1500
|
+
GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(
|
1501
|
+
op->payload->send_message.send_message->length());
|
1502
|
+
on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE;
|
1503
|
+
s->fetching_send_message_finished = add_closure_barrier(op->on_complete);
|
1504
|
+
if (s->write_closed) {
|
1505
|
+
op->payload->send_message.stream_write_closed = true;
|
1506
|
+
// We should NOT return an error here, so as to avoid a cancel OP being
|
1507
|
+
// started. The surface layer will notice that the stream has been closed
|
1508
|
+
// for writes and fail the send message op.
|
1509
|
+
op->payload->send_message.send_message.reset();
|
1510
|
+
grpc_chttp2_complete_closure_step(
|
1511
|
+
t, s, &s->fetching_send_message_finished, GRPC_ERROR_NONE,
|
1512
|
+
"fetching_send_message_finished");
|
1513
|
+
} else {
|
1514
|
+
GPR_ASSERT(s->fetching_send_message == nullptr);
|
1515
|
+
uint8_t* frame_hdr = grpc_slice_buffer_tiny_add(
|
1516
|
+
&s->flow_controlled_buffer, GRPC_HEADER_SIZE_IN_BYTES);
|
1517
|
+
uint32_t flags = op_payload->send_message.send_message->flags();
|
1518
|
+
frame_hdr[0] = (flags & GRPC_WRITE_INTERNAL_COMPRESS) != 0;
|
1519
|
+
size_t len = op_payload->send_message.send_message->length();
|
1520
|
+
frame_hdr[1] = static_cast<uint8_t>(len >> 24);
|
1521
|
+
frame_hdr[2] = static_cast<uint8_t>(len >> 16);
|
1522
|
+
frame_hdr[3] = static_cast<uint8_t>(len >> 8);
|
1523
|
+
frame_hdr[4] = static_cast<uint8_t>(len);
|
1524
|
+
s->fetching_send_message =
|
1525
|
+
std::move(op_payload->send_message.send_message);
|
1526
|
+
s->fetched_send_message_length = 0;
|
1527
|
+
s->next_message_end_offset =
|
1528
|
+
s->flow_controlled_bytes_written +
|
1529
|
+
static_cast<int64_t>(s->flow_controlled_buffer.length) +
|
1530
|
+
static_cast<int64_t>(len);
|
1531
|
+
if (flags & GRPC_WRITE_BUFFER_HINT) {
|
1532
|
+
s->next_message_end_offset -= t->write_buffer_size;
|
1533
|
+
s->write_buffering = true;
|
1534
|
+
} else {
|
1535
|
+
s->write_buffering = false;
|
1536
|
+
}
|
1537
|
+
continue_fetching_send_locked(t, s);
|
1538
|
+
maybe_become_writable_due_to_send_msg(t, s);
|
1539
|
+
}
|
1540
|
+
}
|
1541
|
+
|
1542
|
+
if (op->send_trailing_metadata) {
|
1543
|
+
GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA();
|
1544
|
+
GPR_ASSERT(s->send_trailing_metadata_finished == nullptr);
|
1545
|
+
on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE;
|
1546
|
+
s->send_trailing_metadata_finished = add_closure_barrier(on_complete);
|
1547
|
+
s->send_trailing_metadata =
|
1548
|
+
op_payload->send_trailing_metadata.send_trailing_metadata;
|
1549
|
+
s->sent_trailing_metadata_op = op_payload->send_trailing_metadata.sent;
|
1550
|
+
s->write_buffering = false;
|
1551
|
+
if (contains_non_ok_status(s->send_trailing_metadata)) {
|
1552
|
+
s->seen_error = true;
|
1553
|
+
}
|
1554
|
+
if (s->write_closed) {
|
1555
|
+
s->send_trailing_metadata = nullptr;
|
1556
|
+
s->sent_trailing_metadata_op = nullptr;
|
1557
|
+
grpc_chttp2_complete_closure_step(
|
1558
|
+
t, s, &s->send_trailing_metadata_finished,
|
1559
|
+
op->payload->send_trailing_metadata.send_trailing_metadata->empty()
|
1560
|
+
? GRPC_ERROR_NONE
|
1561
|
+
: GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
1562
|
+
"Attempt to send trailing metadata after "
|
1563
|
+
"stream was closed"),
|
1564
|
+
"send_trailing_metadata_finished");
|
1565
|
+
} else if (s->id != 0) {
|
1566
|
+
// TODO(ctiller): check if there's flow control for any outstanding
|
1567
|
+
// bytes before going writable
|
1568
|
+
grpc_chttp2_mark_stream_writable(t, s);
|
1569
|
+
grpc_chttp2_initiate_write(
|
1570
|
+
t, GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA);
|
1571
|
+
}
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
if (op->recv_initial_metadata) {
|
1575
|
+
GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA();
|
1576
|
+
GPR_ASSERT(s->recv_initial_metadata_ready == nullptr);
|
1577
|
+
s->recv_initial_metadata_ready =
|
1578
|
+
op_payload->recv_initial_metadata.recv_initial_metadata_ready;
|
1579
|
+
s->recv_initial_metadata =
|
1580
|
+
op_payload->recv_initial_metadata.recv_initial_metadata;
|
1581
|
+
s->trailing_metadata_available =
|
1582
|
+
op_payload->recv_initial_metadata.trailing_metadata_available;
|
1583
|
+
if (op_payload->recv_initial_metadata.peer_string != nullptr) {
|
1584
|
+
gpr_atm_rel_store(op_payload->recv_initial_metadata.peer_string,
|
1585
|
+
(gpr_atm)t->peer_string.c_str());
|
1586
|
+
}
|
1587
|
+
grpc_chttp2_maybe_complete_recv_initial_metadata(t, s);
|
1588
|
+
}
|
1589
|
+
|
1590
|
+
if (op->recv_message) {
|
1591
|
+
GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE();
|
1592
|
+
size_t before = 0;
|
1593
|
+
GPR_ASSERT(s->recv_message_ready == nullptr);
|
1594
|
+
GPR_ASSERT(!s->pending_byte_stream);
|
1595
|
+
s->recv_message_ready = op_payload->recv_message.recv_message_ready;
|
1596
|
+
s->recv_message = op_payload->recv_message.recv_message;
|
1597
|
+
s->call_failed_before_recv_message =
|
1598
|
+
op_payload->recv_message.call_failed_before_recv_message;
|
1599
|
+
if (s->id != 0) {
|
1600
|
+
if (!s->read_closed) {
|
1601
|
+
before = s->frame_storage.length +
|
1602
|
+
s->unprocessed_incoming_frames_buffer.length;
|
1603
|
+
}
|
1604
|
+
}
|
1605
|
+
grpc_chttp2_maybe_complete_recv_message(t, s);
|
1606
|
+
if (s->id != 0) {
|
1607
|
+
if (!s->read_closed && s->frame_storage.length == 0) {
|
1608
|
+
size_t after = s->unprocessed_incoming_frames_buffer_cached_length;
|
1609
|
+
s->flow_control->IncomingByteStreamUpdate(GRPC_HEADER_SIZE_IN_BYTES,
|
1610
|
+
before - after);
|
1611
|
+
grpc_chttp2_act_on_flowctl_action(s->flow_control->MakeAction(), t, s);
|
1612
|
+
}
|
1613
|
+
}
|
1614
|
+
}
|
1615
|
+
|
1616
|
+
if (op->recv_trailing_metadata) {
|
1617
|
+
GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA();
|
1618
|
+
GPR_ASSERT(s->collecting_stats == nullptr);
|
1619
|
+
s->collecting_stats = op_payload->recv_trailing_metadata.collect_stats;
|
1620
|
+
GPR_ASSERT(s->recv_trailing_metadata_finished == nullptr);
|
1621
|
+
s->recv_trailing_metadata_finished =
|
1622
|
+
op_payload->recv_trailing_metadata.recv_trailing_metadata_ready;
|
1623
|
+
s->recv_trailing_metadata =
|
1624
|
+
op_payload->recv_trailing_metadata.recv_trailing_metadata;
|
1625
|
+
s->final_metadata_requested = true;
|
1626
|
+
grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
|
1627
|
+
}
|
1628
|
+
|
1629
|
+
if (on_complete != nullptr) {
|
1630
|
+
grpc_chttp2_complete_closure_step(t, s, &on_complete, GRPC_ERROR_NONE,
|
1631
|
+
"op->on_complete");
|
1632
|
+
}
|
1633
|
+
|
1634
|
+
GRPC_CHTTP2_STREAM_UNREF(s, "perform_stream_op");
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
static void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
|
1638
|
+
grpc_transport_stream_op_batch* op) {
|
1639
|
+
GPR_TIMER_SCOPE("perform_stream_op", 0);
|
1640
|
+
grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
|
1641
|
+
grpc_chttp2_stream* s = reinterpret_cast<grpc_chttp2_stream*>(gs);
|
1642
|
+
|
1643
|
+
if (!t->is_client) {
|
1644
|
+
if (op->send_initial_metadata) {
|
1645
|
+
GPR_ASSERT(!op->payload->send_initial_metadata.send_initial_metadata
|
1646
|
+
->get(grpc_core::GrpcTimeoutMetadata())
|
1647
|
+
.has_value());
|
1648
|
+
}
|
1649
|
+
if (op->send_trailing_metadata) {
|
1650
|
+
GPR_ASSERT(!op->payload->send_trailing_metadata.send_trailing_metadata
|
1651
|
+
->get(grpc_core::GrpcTimeoutMetadata())
|
1652
|
+
.has_value());
|
1653
|
+
}
|
1654
|
+
}
|
1655
|
+
|
1656
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) {
|
1657
|
+
gpr_log(GPR_INFO, "perform_stream_op[s=%p; op=%p]: %s", s, op,
|
1658
|
+
grpc_transport_stream_op_batch_string(op).c_str());
|
1659
|
+
}
|
1660
|
+
|
1661
|
+
GRPC_CHTTP2_STREAM_REF(s, "perform_stream_op");
|
1662
|
+
op->handler_private.extra_arg = gs;
|
1663
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&op->handler_private.closure,
|
1664
|
+
perform_stream_op_locked, op, nullptr),
|
1665
|
+
GRPC_ERROR_NONE);
|
1666
|
+
}
|
1667
|
+
|
1668
|
+
static void cancel_pings(grpc_chttp2_transport* t, grpc_error_handle error) {
|
1669
|
+
// callback remaining pings: they're not allowed to call into the transport,
|
1670
|
+
// and maybe they hold resources that need to be freed
|
1671
|
+
grpc_chttp2_ping_queue* pq = &t->ping_queue;
|
1672
|
+
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
1673
|
+
for (size_t j = 0; j < GRPC_CHTTP2_PCL_COUNT; j++) {
|
1674
|
+
grpc_closure_list_fail_all(&pq->lists[j], GRPC_ERROR_REF(error));
|
1675
|
+
grpc_core::ExecCtx::RunList(DEBUG_LOCATION, &pq->lists[j]);
|
1676
|
+
}
|
1677
|
+
GRPC_ERROR_UNREF(error);
|
1678
|
+
}
|
1679
|
+
|
1680
|
+
static void send_ping_locked(grpc_chttp2_transport* t,
|
1681
|
+
grpc_closure* on_initiate, grpc_closure* on_ack) {
|
1682
|
+
if (t->closed_with_error != GRPC_ERROR_NONE) {
|
1683
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_initiate,
|
1684
|
+
GRPC_ERROR_REF(t->closed_with_error));
|
1685
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_ack,
|
1686
|
+
GRPC_ERROR_REF(t->closed_with_error));
|
1687
|
+
return;
|
1688
|
+
}
|
1689
|
+
grpc_chttp2_ping_queue* pq = &t->ping_queue;
|
1690
|
+
grpc_closure_list_append(&pq->lists[GRPC_CHTTP2_PCL_INITIATE], on_initiate,
|
1691
|
+
GRPC_ERROR_NONE);
|
1692
|
+
grpc_closure_list_append(&pq->lists[GRPC_CHTTP2_PCL_NEXT], on_ack,
|
1693
|
+
GRPC_ERROR_NONE);
|
1694
|
+
}
|
1695
|
+
|
1696
|
+
// Specialized form of send_ping_locked for keepalive ping. If there is already
|
1697
|
+
// a ping in progress, the keepalive ping would piggyback onto that ping,
|
1698
|
+
// instead of waiting for that ping to complete and then starting a new ping.
|
1699
|
+
static void send_keepalive_ping_locked(grpc_chttp2_transport* t) {
|
1700
|
+
if (t->closed_with_error != GRPC_ERROR_NONE) {
|
1701
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->start_keepalive_ping_locked,
|
1702
|
+
start_keepalive_ping_locked, t, nullptr),
|
1703
|
+
GRPC_ERROR_REF(t->closed_with_error));
|
1704
|
+
t->combiner->Run(
|
1705
|
+
GRPC_CLOSURE_INIT(&t->finish_keepalive_ping_locked,
|
1706
|
+
finish_keepalive_ping_locked, t, nullptr),
|
1707
|
+
GRPC_ERROR_REF(t->closed_with_error));
|
1708
|
+
return;
|
1709
|
+
}
|
1710
|
+
grpc_chttp2_ping_queue* pq = &t->ping_queue;
|
1711
|
+
if (!grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_INFLIGHT])) {
|
1712
|
+
// There is a ping in flight. Add yourself to the inflight closure list.
|
1713
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->start_keepalive_ping_locked,
|
1714
|
+
start_keepalive_ping_locked, t, nullptr),
|
1715
|
+
GRPC_ERROR_REF(t->closed_with_error));
|
1716
|
+
grpc_closure_list_append(
|
1717
|
+
&pq->lists[GRPC_CHTTP2_PCL_INFLIGHT],
|
1718
|
+
GRPC_CLOSURE_INIT(&t->finish_keepalive_ping_locked,
|
1719
|
+
finish_keepalive_ping, t, grpc_schedule_on_exec_ctx),
|
1720
|
+
GRPC_ERROR_NONE);
|
1721
|
+
return;
|
1722
|
+
}
|
1723
|
+
grpc_closure_list_append(
|
1724
|
+
&pq->lists[GRPC_CHTTP2_PCL_INITIATE],
|
1725
|
+
GRPC_CLOSURE_INIT(&t->start_keepalive_ping_locked, start_keepalive_ping,
|
1726
|
+
t, grpc_schedule_on_exec_ctx),
|
1727
|
+
GRPC_ERROR_NONE);
|
1728
|
+
grpc_closure_list_append(
|
1729
|
+
&pq->lists[GRPC_CHTTP2_PCL_NEXT],
|
1730
|
+
GRPC_CLOSURE_INIT(&t->finish_keepalive_ping_locked, finish_keepalive_ping,
|
1731
|
+
t, grpc_schedule_on_exec_ctx),
|
1732
|
+
GRPC_ERROR_NONE);
|
1733
|
+
}
|
1734
|
+
|
1735
|
+
void grpc_chttp2_retry_initiate_ping(void* tp, grpc_error_handle error) {
|
1736
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
1737
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->retry_initiate_ping_locked,
|
1738
|
+
retry_initiate_ping_locked, t, nullptr),
|
1739
|
+
GRPC_ERROR_REF(error));
|
1740
|
+
}
|
1741
|
+
|
1742
|
+
static void retry_initiate_ping_locked(void* tp, grpc_error_handle error) {
|
1743
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
1744
|
+
t->ping_state.is_delayed_ping_timer_set = false;
|
1745
|
+
if (error == GRPC_ERROR_NONE) {
|
1746
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING);
|
1747
|
+
}
|
1748
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "retry_initiate_ping_locked");
|
1749
|
+
}
|
1750
|
+
|
1751
|
+
void grpc_chttp2_ack_ping(grpc_chttp2_transport* t, uint64_t id) {
|
1752
|
+
grpc_chttp2_ping_queue* pq = &t->ping_queue;
|
1753
|
+
if (pq->inflight_id != id) {
|
1754
|
+
gpr_log(GPR_DEBUG, "Unknown ping response from %s: %" PRIx64,
|
1755
|
+
t->peer_string.c_str(), id);
|
1756
|
+
return;
|
1757
|
+
}
|
1758
|
+
grpc_core::ExecCtx::RunList(DEBUG_LOCATION,
|
1759
|
+
&pq->lists[GRPC_CHTTP2_PCL_INFLIGHT]);
|
1760
|
+
if (!grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_NEXT])) {
|
1761
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS);
|
1762
|
+
}
|
1763
|
+
}
|
1764
|
+
|
1765
|
+
namespace {
|
1766
|
+
|
1767
|
+
// Fire and forget (deletes itself on completion). Does a graceful shutdown by
|
1768
|
+
// sending a GOAWAY frame with the last stream id set to 2^31-1, sending a ping
|
1769
|
+
// and waiting for an ack (effective waiting for an RTT) and then sending a
|
1770
|
+
// final GOAWAY freame with an updated last stream identifier. This helps ensure
|
1771
|
+
// that a connection can be cleanly shut down without losing requests.
|
1772
|
+
// In the event, that the client does not respond to the ping for some reason,
|
1773
|
+
// we add a 20 second deadline, after which we send the second goaway.
|
1774
|
+
class GracefulGoaway : public grpc_core::RefCounted<GracefulGoaway> {
|
1775
|
+
public:
|
1776
|
+
static void Start(grpc_chttp2_transport* t) { new GracefulGoaway(t); }
|
1777
|
+
|
1778
|
+
~GracefulGoaway() override {
|
1779
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t_, "graceful goaway");
|
1780
|
+
}
|
1781
|
+
|
1782
|
+
private:
|
1783
|
+
explicit GracefulGoaway(grpc_chttp2_transport* t) : t_(t) {
|
1784
|
+
t->sent_goaway_state = GRPC_CHTTP2_GRACEFUL_GOAWAY;
|
1785
|
+
GRPC_CHTTP2_REF_TRANSPORT(t_, "graceful goaway");
|
1786
|
+
grpc_chttp2_goaway_append((1u << 31) - 1, 0, grpc_empty_slice(), &t->qbuf);
|
1787
|
+
send_ping_locked(
|
1788
|
+
t, nullptr, GRPC_CLOSURE_INIT(&on_ping_ack_, OnPingAck, this, nullptr));
|
1789
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT);
|
1790
|
+
Ref().release(); // Ref for the timer
|
1791
|
+
grpc_timer_init(
|
1792
|
+
&timer_,
|
1793
|
+
grpc_core::ExecCtx::Get()->Now() + grpc_core::Duration::Seconds(20),
|
1794
|
+
GRPC_CLOSURE_INIT(&on_timer_, OnTimer, this, nullptr));
|
1795
|
+
}
|
1796
|
+
|
1797
|
+
void MaybeSendFinalGoawayLocked() {
|
1798
|
+
if (t_->sent_goaway_state != GRPC_CHTTP2_GRACEFUL_GOAWAY) {
|
1799
|
+
// We already sent the final GOAWAY.
|
1800
|
+
return;
|
1801
|
+
}
|
1802
|
+
if (t_->destroying || t_->closed_with_error != GRPC_ERROR_NONE) {
|
1803
|
+
GRPC_CHTTP2_IF_TRACING(gpr_log(
|
1804
|
+
GPR_INFO,
|
1805
|
+
"transport:%p %s peer:%s Transport already shutting down. "
|
1806
|
+
"Graceful GOAWAY abandoned.",
|
1807
|
+
t_, t_->is_client ? "CLIENT" : "SERVER", t_->peer_string.c_str()));
|
1808
|
+
return;
|
1809
|
+
}
|
1810
|
+
// Ping completed. Send final goaway.
|
1811
|
+
GRPC_CHTTP2_IF_TRACING(
|
1812
|
+
gpr_log(GPR_INFO,
|
1813
|
+
"transport:%p %s peer:%s Graceful shutdown: Ping received. "
|
1814
|
+
"Sending final GOAWAY with stream_id:%d",
|
1815
|
+
t_, t_->is_client ? "CLIENT" : "SERVER",
|
1816
|
+
t_->peer_string.c_str(), t_->last_new_stream_id));
|
1817
|
+
t_->sent_goaway_state = GRPC_CHTTP2_FINAL_GOAWAY_SEND_SCHEDULED;
|
1818
|
+
grpc_chttp2_goaway_append(t_->last_new_stream_id, 0, grpc_empty_slice(),
|
1819
|
+
&t_->qbuf);
|
1820
|
+
grpc_chttp2_initiate_write(t_, GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT);
|
1821
|
+
}
|
1822
|
+
|
1823
|
+
static void OnPingAck(void* arg, grpc_error_handle /* error */) {
|
1824
|
+
auto* self = static_cast<GracefulGoaway*>(arg);
|
1825
|
+
self->t_->combiner->Run(
|
1826
|
+
GRPC_CLOSURE_INIT(&self->on_ping_ack_, OnPingAckLocked, self, nullptr),
|
1827
|
+
GRPC_ERROR_NONE);
|
1828
|
+
}
|
1829
|
+
|
1830
|
+
static void OnPingAckLocked(void* arg, grpc_error_handle /* error */) {
|
1831
|
+
auto* self = static_cast<GracefulGoaway*>(arg);
|
1832
|
+
grpc_timer_cancel(&self->timer_);
|
1833
|
+
self->MaybeSendFinalGoawayLocked();
|
1834
|
+
self->Unref();
|
1835
|
+
}
|
1836
|
+
|
1837
|
+
static void OnTimer(void* arg, grpc_error_handle error) {
|
1838
|
+
auto* self = static_cast<GracefulGoaway*>(arg);
|
1839
|
+
if (error != GRPC_ERROR_NONE) {
|
1840
|
+
self->Unref();
|
1841
|
+
return;
|
1842
|
+
}
|
1843
|
+
self->t_->combiner->Run(
|
1844
|
+
GRPC_CLOSURE_INIT(&self->on_timer_, OnTimerLocked, self, nullptr),
|
1845
|
+
GRPC_ERROR_NONE);
|
1846
|
+
}
|
1847
|
+
|
1848
|
+
static void OnTimerLocked(void* arg, grpc_error_handle /* error */) {
|
1849
|
+
auto* self = static_cast<GracefulGoaway*>(arg);
|
1850
|
+
self->MaybeSendFinalGoawayLocked();
|
1851
|
+
self->Unref();
|
1852
|
+
}
|
1853
|
+
|
1854
|
+
grpc_chttp2_transport* t_;
|
1855
|
+
grpc_closure on_ping_ack_;
|
1856
|
+
grpc_timer timer_;
|
1857
|
+
grpc_closure on_timer_;
|
1858
|
+
};
|
1859
|
+
|
1860
|
+
} // namespace
|
1861
|
+
|
1862
|
+
static void send_goaway(grpc_chttp2_transport* t, grpc_error_handle error) {
|
1863
|
+
grpc_http2_error_code http_error;
|
1864
|
+
std::string message;
|
1865
|
+
grpc_error_get_status(error, grpc_core::Timestamp::InfFuture(), nullptr,
|
1866
|
+
&message, &http_error, nullptr);
|
1867
|
+
if (!t->is_client && http_error == GRPC_HTTP2_NO_ERROR) {
|
1868
|
+
// Do a graceful shutdown.
|
1869
|
+
GracefulGoaway::Start(t);
|
1870
|
+
} else {
|
1871
|
+
// We want to log this irrespective of whether http tracing is enabled
|
1872
|
+
gpr_log(GPR_DEBUG, "%s: Sending goaway err=%s", t->peer_string.c_str(),
|
1873
|
+
grpc_error_std_string(error).c_str());
|
1874
|
+
t->sent_goaway_state = GRPC_CHTTP2_FINAL_GOAWAY_SEND_SCHEDULED;
|
1875
|
+
grpc_chttp2_goaway_append(
|
1876
|
+
t->last_new_stream_id, static_cast<uint32_t>(http_error),
|
1877
|
+
grpc_slice_from_cpp_string(std::move(message)), &t->qbuf);
|
1878
|
+
}
|
1879
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT);
|
1880
|
+
GRPC_ERROR_UNREF(error);
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
void grpc_chttp2_add_ping_strike(grpc_chttp2_transport* t) {
|
1884
|
+
if (++t->ping_recv_state.ping_strikes > t->ping_policy.max_ping_strikes &&
|
1885
|
+
t->ping_policy.max_ping_strikes != 0) {
|
1886
|
+
send_goaway(t,
|
1887
|
+
grpc_error_set_int(
|
1888
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("too_many_pings"),
|
1889
|
+
GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_ENHANCE_YOUR_CALM));
|
1890
|
+
// The transport will be closed after the write is done
|
1891
|
+
close_transport_locked(
|
1892
|
+
t, grpc_error_set_int(
|
1893
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Too many pings"),
|
1894
|
+
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
|
1895
|
+
}
|
1896
|
+
}
|
1897
|
+
|
1898
|
+
void grpc_chttp2_reset_ping_clock(grpc_chttp2_transport* t) {
|
1899
|
+
if (!t->is_client) {
|
1900
|
+
t->ping_recv_state.last_ping_recv_time = grpc_core::Timestamp::InfPast();
|
1901
|
+
t->ping_recv_state.ping_strikes = 0;
|
1902
|
+
}
|
1903
|
+
t->ping_state.pings_before_data_required =
|
1904
|
+
t->ping_policy.max_pings_without_data;
|
1905
|
+
}
|
1906
|
+
|
1907
|
+
static void perform_transport_op_locked(void* stream_op,
|
1908
|
+
grpc_error_handle /*error_ignored*/) {
|
1909
|
+
grpc_transport_op* op = static_cast<grpc_transport_op*>(stream_op);
|
1910
|
+
grpc_chttp2_transport* t =
|
1911
|
+
static_cast<grpc_chttp2_transport*>(op->handler_private.extra_arg);
|
1912
|
+
|
1913
|
+
if (op->goaway_error != GRPC_ERROR_NONE) {
|
1914
|
+
send_goaway(t, op->goaway_error);
|
1915
|
+
}
|
1916
|
+
|
1917
|
+
if (op->set_accept_stream) {
|
1918
|
+
t->accept_stream_cb = op->set_accept_stream_fn;
|
1919
|
+
t->accept_stream_cb_user_data = op->set_accept_stream_user_data;
|
1920
|
+
}
|
1921
|
+
|
1922
|
+
if (op->bind_pollset) {
|
1923
|
+
grpc_endpoint_add_to_pollset(t->ep, op->bind_pollset);
|
1924
|
+
}
|
1925
|
+
|
1926
|
+
if (op->bind_pollset_set) {
|
1927
|
+
grpc_endpoint_add_to_pollset_set(t->ep, op->bind_pollset_set);
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
if (op->send_ping.on_initiate != nullptr || op->send_ping.on_ack != nullptr) {
|
1931
|
+
send_ping_locked(t, op->send_ping.on_initiate, op->send_ping.on_ack);
|
1932
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING);
|
1933
|
+
}
|
1934
|
+
|
1935
|
+
if (op->start_connectivity_watch != nullptr) {
|
1936
|
+
t->state_tracker.AddWatcher(op->start_connectivity_watch_state,
|
1937
|
+
std::move(op->start_connectivity_watch));
|
1938
|
+
}
|
1939
|
+
if (op->stop_connectivity_watch != nullptr) {
|
1940
|
+
t->state_tracker.RemoveWatcher(op->stop_connectivity_watch);
|
1941
|
+
}
|
1942
|
+
|
1943
|
+
if (op->disconnect_with_error != GRPC_ERROR_NONE) {
|
1944
|
+
close_transport_locked(t, op->disconnect_with_error);
|
1945
|
+
}
|
1946
|
+
|
1947
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, op->on_consumed, GRPC_ERROR_NONE);
|
1948
|
+
|
1949
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "transport_op");
|
1950
|
+
}
|
1951
|
+
|
1952
|
+
static void perform_transport_op(grpc_transport* gt, grpc_transport_op* op) {
|
1953
|
+
grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
|
1954
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) {
|
1955
|
+
gpr_log(GPR_INFO, "perform_transport_op[t=%p]: %s", t,
|
1956
|
+
grpc_transport_op_string(op).c_str());
|
1957
|
+
}
|
1958
|
+
op->handler_private.extra_arg = gt;
|
1959
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "transport_op");
|
1960
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&op->handler_private.closure,
|
1961
|
+
perform_transport_op_locked, op, nullptr),
|
1962
|
+
GRPC_ERROR_NONE);
|
1963
|
+
}
|
1964
|
+
|
1965
|
+
//
|
1966
|
+
// INPUT PROCESSING - GENERAL
|
1967
|
+
//
|
1968
|
+
|
1969
|
+
void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_chttp2_transport* t,
|
1970
|
+
grpc_chttp2_stream* s) {
|
1971
|
+
if (s->recv_initial_metadata_ready != nullptr &&
|
1972
|
+
s->published_metadata[0] != GRPC_METADATA_NOT_PUBLISHED) {
|
1973
|
+
if (s->seen_error) {
|
1974
|
+
grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
|
1975
|
+
if (!s->pending_byte_stream) {
|
1976
|
+
grpc_slice_buffer_reset_and_unref_internal(
|
1977
|
+
&s->unprocessed_incoming_frames_buffer);
|
1978
|
+
}
|
1979
|
+
}
|
1980
|
+
*s->recv_initial_metadata = std::move(s->initial_metadata_buffer);
|
1981
|
+
s->recv_initial_metadata->Set(grpc_core::PeerString(), t->peer_string);
|
1982
|
+
// If we didn't receive initial metadata from the wire and instead faked a
|
1983
|
+
// status (due to stream cancellations for example), let upper layers know
|
1984
|
+
// that trailing metadata is immediately available.
|
1985
|
+
if (s->trailing_metadata_available != nullptr &&
|
1986
|
+
s->published_metadata[0] != GRPC_METADATA_PUBLISHED_FROM_WIRE &&
|
1987
|
+
s->published_metadata[1] == GRPC_METADATA_SYNTHESIZED_FROM_FAKE) {
|
1988
|
+
*s->trailing_metadata_available = true;
|
1989
|
+
s->trailing_metadata_available = nullptr;
|
1990
|
+
}
|
1991
|
+
null_then_sched_closure(&s->recv_initial_metadata_ready);
|
1992
|
+
}
|
1993
|
+
}
|
1994
|
+
|
1995
|
+
void grpc_chttp2_maybe_complete_recv_message(grpc_chttp2_transport* /*t*/,
|
1996
|
+
grpc_chttp2_stream* s) {
|
1997
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
1998
|
+
if (s->recv_message_ready != nullptr) {
|
1999
|
+
*s->recv_message = nullptr;
|
2000
|
+
if (s->final_metadata_requested && s->seen_error) {
|
2001
|
+
grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
|
2002
|
+
if (!s->pending_byte_stream) {
|
2003
|
+
grpc_slice_buffer_reset_and_unref_internal(
|
2004
|
+
&s->unprocessed_incoming_frames_buffer);
|
2005
|
+
}
|
2006
|
+
}
|
2007
|
+
if (!s->pending_byte_stream) {
|
2008
|
+
while (s->unprocessed_incoming_frames_buffer.length > 0 ||
|
2009
|
+
s->frame_storage.length > 0) {
|
2010
|
+
if (s->unprocessed_incoming_frames_buffer.length == 0) {
|
2011
|
+
grpc_slice_buffer_swap(&s->unprocessed_incoming_frames_buffer,
|
2012
|
+
&s->frame_storage);
|
2013
|
+
}
|
2014
|
+
error = grpc_deframe_unprocessed_incoming_frames(
|
2015
|
+
&s->data_parser, s, &s->unprocessed_incoming_frames_buffer, nullptr,
|
2016
|
+
s->recv_message);
|
2017
|
+
if (error != GRPC_ERROR_NONE) {
|
2018
|
+
s->seen_error = true;
|
2019
|
+
grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
|
2020
|
+
grpc_slice_buffer_reset_and_unref_internal(
|
2021
|
+
&s->unprocessed_incoming_frames_buffer);
|
2022
|
+
break;
|
2023
|
+
} else if (*s->recv_message != nullptr) {
|
2024
|
+
break;
|
2025
|
+
}
|
2026
|
+
}
|
2027
|
+
}
|
2028
|
+
// save the length of the buffer before handing control back to application
|
2029
|
+
// threads. Needed to support correct flow control bookkeeping
|
2030
|
+
s->unprocessed_incoming_frames_buffer_cached_length =
|
2031
|
+
s->unprocessed_incoming_frames_buffer.length;
|
2032
|
+
if (error == GRPC_ERROR_NONE && *s->recv_message != nullptr) {
|
2033
|
+
null_then_sched_closure(&s->recv_message_ready);
|
2034
|
+
} else if (s->published_metadata[1] != GRPC_METADATA_NOT_PUBLISHED) {
|
2035
|
+
*s->recv_message = nullptr;
|
2036
|
+
if (s->call_failed_before_recv_message != nullptr) {
|
2037
|
+
*s->call_failed_before_recv_message =
|
2038
|
+
(s->published_metadata[1] != GRPC_METADATA_PUBLISHED_AT_CLOSE);
|
2039
|
+
}
|
2040
|
+
null_then_sched_closure(&s->recv_message_ready);
|
2041
|
+
}
|
2042
|
+
GRPC_ERROR_UNREF(error);
|
2043
|
+
}
|
2044
|
+
}
|
2045
|
+
|
2046
|
+
void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_chttp2_transport* t,
|
2047
|
+
grpc_chttp2_stream* s) {
|
2048
|
+
grpc_chttp2_maybe_complete_recv_message(t, s);
|
2049
|
+
if (s->recv_trailing_metadata_finished != nullptr && s->read_closed &&
|
2050
|
+
s->write_closed) {
|
2051
|
+
if (s->seen_error || !t->is_client) {
|
2052
|
+
grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
|
2053
|
+
if (!s->pending_byte_stream) {
|
2054
|
+
grpc_slice_buffer_reset_and_unref_internal(
|
2055
|
+
&s->unprocessed_incoming_frames_buffer);
|
2056
|
+
}
|
2057
|
+
}
|
2058
|
+
bool pending_data = s->pending_byte_stream ||
|
2059
|
+
s->unprocessed_incoming_frames_buffer.length > 0;
|
2060
|
+
if (s->read_closed && s->frame_storage.length > 0 && !pending_data &&
|
2061
|
+
!s->seen_error && s->recv_trailing_metadata_finished != nullptr) {
|
2062
|
+
// Maybe some SYNC_FLUSH data is left in frame_storage. Consume them and
|
2063
|
+
// maybe decompress the next 5 bytes in the stream.
|
2064
|
+
grpc_slice_buffer_move_first(
|
2065
|
+
&s->frame_storage,
|
2066
|
+
std::min(s->frame_storage.length, size_t(GRPC_HEADER_SIZE_IN_BYTES)),
|
2067
|
+
&s->unprocessed_incoming_frames_buffer);
|
2068
|
+
if (s->unprocessed_incoming_frames_buffer.length > 0) {
|
2069
|
+
pending_data = true;
|
2070
|
+
}
|
2071
|
+
}
|
2072
|
+
if (s->read_closed && s->frame_storage.length == 0 && !pending_data &&
|
2073
|
+
s->recv_trailing_metadata_finished != nullptr) {
|
2074
|
+
grpc_transport_move_stats(&s->stats, s->collecting_stats);
|
2075
|
+
s->collecting_stats = nullptr;
|
2076
|
+
*s->recv_trailing_metadata = std::move(s->trailing_metadata_buffer);
|
2077
|
+
s->recv_trailing_metadata->Set(grpc_core::PeerString(), t->peer_string);
|
2078
|
+
null_then_sched_closure(&s->recv_trailing_metadata_finished);
|
2079
|
+
}
|
2080
|
+
}
|
2081
|
+
}
|
2082
|
+
|
2083
|
+
static void remove_stream(grpc_chttp2_transport* t, uint32_t id,
|
2084
|
+
grpc_error_handle error) {
|
2085
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(
|
2086
|
+
grpc_chttp2_stream_map_delete(&t->stream_map, id));
|
2087
|
+
GPR_DEBUG_ASSERT(s);
|
2088
|
+
if (t->incoming_stream == s) {
|
2089
|
+
t->incoming_stream = nullptr;
|
2090
|
+
grpc_chttp2_parsing_become_skip_parser(t);
|
2091
|
+
}
|
2092
|
+
if (s->pending_byte_stream) {
|
2093
|
+
if (s->on_next != nullptr) {
|
2094
|
+
grpc_core::Chttp2IncomingByteStream* bs = s->data_parser.parsing_frame;
|
2095
|
+
if (error == GRPC_ERROR_NONE) {
|
2096
|
+
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
|
2097
|
+
}
|
2098
|
+
bs->PublishError(error);
|
2099
|
+
bs->Unref();
|
2100
|
+
s->data_parser.parsing_frame = nullptr;
|
2101
|
+
} else {
|
2102
|
+
GRPC_ERROR_UNREF(s->byte_stream_error);
|
2103
|
+
s->byte_stream_error = GRPC_ERROR_REF(error);
|
2104
|
+
}
|
2105
|
+
}
|
2106
|
+
|
2107
|
+
if (grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
|
2108
|
+
post_benign_reclaimer(t);
|
2109
|
+
if (t->sent_goaway_state == GRPC_CHTTP2_FINAL_GOAWAY_SENT) {
|
2110
|
+
close_transport_locked(
|
2111
|
+
t, GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
2112
|
+
"Last stream closed after sending GOAWAY", &error, 1));
|
2113
|
+
}
|
2114
|
+
}
|
2115
|
+
if (grpc_chttp2_list_remove_writable_stream(t, s)) {
|
2116
|
+
GRPC_CHTTP2_STREAM_UNREF(s, "chttp2_writing:remove_stream");
|
2117
|
+
}
|
2118
|
+
grpc_chttp2_list_remove_stalled_by_stream(t, s);
|
2119
|
+
grpc_chttp2_list_remove_stalled_by_transport(t, s);
|
2120
|
+
|
2121
|
+
GRPC_ERROR_UNREF(error);
|
2122
|
+
|
2123
|
+
maybe_start_some_streams(t);
|
2124
|
+
}
|
2125
|
+
|
2126
|
+
void grpc_chttp2_cancel_stream(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
|
2127
|
+
grpc_error_handle due_to_error) {
|
2128
|
+
if (!t->is_client && !s->sent_trailing_metadata &&
|
2129
|
+
grpc_error_has_clear_grpc_status(due_to_error)) {
|
2130
|
+
close_from_api(t, s, due_to_error);
|
2131
|
+
return;
|
2132
|
+
}
|
2133
|
+
|
2134
|
+
if (!s->read_closed || !s->write_closed) {
|
2135
|
+
if (s->id != 0) {
|
2136
|
+
grpc_http2_error_code http_error;
|
2137
|
+
grpc_error_get_status(due_to_error, s->deadline, nullptr, nullptr,
|
2138
|
+
&http_error, nullptr);
|
2139
|
+
grpc_chttp2_add_rst_stream_to_next_write(
|
2140
|
+
t, s->id, static_cast<uint32_t>(http_error), &s->stats.outgoing);
|
2141
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM);
|
2142
|
+
}
|
2143
|
+
}
|
2144
|
+
if (due_to_error != GRPC_ERROR_NONE && !s->seen_error) {
|
2145
|
+
s->seen_error = true;
|
2146
|
+
}
|
2147
|
+
grpc_chttp2_mark_stream_closed(t, s, 1, 1, due_to_error);
|
2148
|
+
}
|
2149
|
+
|
2150
|
+
void grpc_chttp2_fake_status(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
|
2151
|
+
grpc_error_handle error) {
|
2152
|
+
grpc_status_code status;
|
2153
|
+
std::string message;
|
2154
|
+
grpc_error_get_status(error, s->deadline, &status, &message, nullptr,
|
2155
|
+
nullptr);
|
2156
|
+
if (status != GRPC_STATUS_OK) {
|
2157
|
+
s->seen_error = true;
|
2158
|
+
}
|
2159
|
+
// stream_global->recv_trailing_metadata_finished gives us a
|
2160
|
+
// last chance replacement: we've received trailing metadata,
|
2161
|
+
// but something more important has become available to signal
|
2162
|
+
// to the upper layers - drop what we've got, and then publish
|
2163
|
+
// what we want - which is safe because we haven't told anyone
|
2164
|
+
// about the metadata yet
|
2165
|
+
if (s->published_metadata[1] == GRPC_METADATA_NOT_PUBLISHED ||
|
2166
|
+
s->recv_trailing_metadata_finished != nullptr) {
|
2167
|
+
s->trailing_metadata_buffer.Set(grpc_core::GrpcStatusMetadata(), status);
|
2168
|
+
if (!message.empty()) {
|
2169
|
+
s->trailing_metadata_buffer.Set(
|
2170
|
+
grpc_core::GrpcMessageMetadata(),
|
2171
|
+
grpc_core::Slice::FromCopiedBuffer(message));
|
2172
|
+
}
|
2173
|
+
s->published_metadata[1] = GRPC_METADATA_SYNTHESIZED_FROM_FAKE;
|
2174
|
+
grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
|
2175
|
+
}
|
2176
|
+
|
2177
|
+
GRPC_ERROR_UNREF(error);
|
2178
|
+
}
|
2179
|
+
|
2180
|
+
static void add_error(grpc_error_handle error, grpc_error_handle* refs,
|
2181
|
+
size_t* nrefs) {
|
2182
|
+
if (error == GRPC_ERROR_NONE) return;
|
2183
|
+
for (size_t i = 0; i < *nrefs; i++) {
|
2184
|
+
if (error == refs[i]) {
|
2185
|
+
return;
|
2186
|
+
}
|
2187
|
+
}
|
2188
|
+
refs[*nrefs] = error;
|
2189
|
+
++*nrefs;
|
2190
|
+
}
|
2191
|
+
|
2192
|
+
static grpc_error_handle removal_error(grpc_error_handle extra_error,
|
2193
|
+
grpc_chttp2_stream* s,
|
2194
|
+
const char* main_error_msg) {
|
2195
|
+
grpc_error_handle refs[3];
|
2196
|
+
size_t nrefs = 0;
|
2197
|
+
add_error(s->read_closed_error, refs, &nrefs);
|
2198
|
+
add_error(s->write_closed_error, refs, &nrefs);
|
2199
|
+
add_error(extra_error, refs, &nrefs);
|
2200
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
2201
|
+
if (nrefs > 0) {
|
2202
|
+
error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(main_error_msg,
|
2203
|
+
refs, nrefs);
|
2204
|
+
}
|
2205
|
+
GRPC_ERROR_UNREF(extra_error);
|
2206
|
+
return error;
|
2207
|
+
}
|
2208
|
+
|
2209
|
+
static void flush_write_list(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
|
2210
|
+
grpc_chttp2_write_cb** list,
|
2211
|
+
grpc_error_handle error) {
|
2212
|
+
while (*list) {
|
2213
|
+
grpc_chttp2_write_cb* cb = *list;
|
2214
|
+
*list = cb->next;
|
2215
|
+
grpc_chttp2_complete_closure_step(t, s, &cb->closure, GRPC_ERROR_REF(error),
|
2216
|
+
"on_write_finished_cb");
|
2217
|
+
cb->next = t->write_cb_pool;
|
2218
|
+
t->write_cb_pool = cb;
|
2219
|
+
}
|
2220
|
+
GRPC_ERROR_UNREF(error);
|
2221
|
+
}
|
2222
|
+
|
2223
|
+
void grpc_chttp2_fail_pending_writes(grpc_chttp2_transport* t,
|
2224
|
+
grpc_chttp2_stream* s,
|
2225
|
+
grpc_error_handle error) {
|
2226
|
+
error =
|
2227
|
+
removal_error(error, s, "Pending writes failed due to stream closure");
|
2228
|
+
s->send_initial_metadata = nullptr;
|
2229
|
+
grpc_chttp2_complete_closure_step(t, s, &s->send_initial_metadata_finished,
|
2230
|
+
GRPC_ERROR_REF(error),
|
2231
|
+
"send_initial_metadata_finished");
|
2232
|
+
|
2233
|
+
s->send_trailing_metadata = nullptr;
|
2234
|
+
s->sent_trailing_metadata_op = nullptr;
|
2235
|
+
grpc_chttp2_complete_closure_step(t, s, &s->send_trailing_metadata_finished,
|
2236
|
+
GRPC_ERROR_REF(error),
|
2237
|
+
"send_trailing_metadata_finished");
|
2238
|
+
|
2239
|
+
s->fetching_send_message.reset();
|
2240
|
+
grpc_chttp2_complete_closure_step(t, s, &s->fetching_send_message_finished,
|
2241
|
+
GRPC_ERROR_REF(error),
|
2242
|
+
"fetching_send_message_finished");
|
2243
|
+
flush_write_list(t, s, &s->on_write_finished_cbs, GRPC_ERROR_REF(error));
|
2244
|
+
flush_write_list(t, s, &s->on_flow_controlled_cbs, error);
|
2245
|
+
}
|
2246
|
+
|
2247
|
+
void grpc_chttp2_mark_stream_closed(grpc_chttp2_transport* t,
|
2248
|
+
grpc_chttp2_stream* s, int close_reads,
|
2249
|
+
int close_writes, grpc_error_handle error) {
|
2250
|
+
if (s->read_closed && s->write_closed) {
|
2251
|
+
// already closed, but we should still fake the status if needed.
|
2252
|
+
grpc_error_handle overall_error = removal_error(error, s, "Stream removed");
|
2253
|
+
if (overall_error != GRPC_ERROR_NONE) {
|
2254
|
+
grpc_chttp2_fake_status(t, s, overall_error);
|
2255
|
+
}
|
2256
|
+
grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
|
2257
|
+
return;
|
2258
|
+
}
|
2259
|
+
bool closed_read = false;
|
2260
|
+
bool became_closed = false;
|
2261
|
+
if (close_reads && !s->read_closed) {
|
2262
|
+
s->read_closed_error = GRPC_ERROR_REF(error);
|
2263
|
+
s->read_closed = true;
|
2264
|
+
closed_read = true;
|
2265
|
+
}
|
2266
|
+
if (close_writes && !s->write_closed) {
|
2267
|
+
s->write_closed_error = GRPC_ERROR_REF(error);
|
2268
|
+
s->write_closed = true;
|
2269
|
+
grpc_chttp2_fail_pending_writes(t, s, GRPC_ERROR_REF(error));
|
2270
|
+
}
|
2271
|
+
if (s->read_closed && s->write_closed) {
|
2272
|
+
became_closed = true;
|
2273
|
+
grpc_error_handle overall_error =
|
2274
|
+
removal_error(GRPC_ERROR_REF(error), s, "Stream removed");
|
2275
|
+
if (s->id != 0) {
|
2276
|
+
remove_stream(t, s->id, GRPC_ERROR_REF(overall_error));
|
2277
|
+
} else {
|
2278
|
+
// Purge streams waiting on concurrency still waiting for id assignment
|
2279
|
+
grpc_chttp2_list_remove_waiting_for_concurrency(t, s);
|
2280
|
+
}
|
2281
|
+
if (overall_error != GRPC_ERROR_NONE) {
|
2282
|
+
grpc_chttp2_fake_status(t, s, overall_error);
|
2283
|
+
}
|
2284
|
+
}
|
2285
|
+
if (closed_read) {
|
2286
|
+
for (int i = 0; i < 2; i++) {
|
2287
|
+
if (s->published_metadata[i] == GRPC_METADATA_NOT_PUBLISHED) {
|
2288
|
+
s->published_metadata[i] = GRPC_METADATA_PUBLISHED_AT_CLOSE;
|
2289
|
+
}
|
2290
|
+
}
|
2291
|
+
grpc_chttp2_maybe_complete_recv_initial_metadata(t, s);
|
2292
|
+
grpc_chttp2_maybe_complete_recv_message(t, s);
|
2293
|
+
}
|
2294
|
+
if (became_closed) {
|
2295
|
+
grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
|
2296
|
+
GRPC_CHTTP2_STREAM_UNREF(s, "chttp2");
|
2297
|
+
}
|
2298
|
+
GRPC_ERROR_UNREF(error);
|
2299
|
+
}
|
2300
|
+
|
2301
|
+
static void close_from_api(grpc_chttp2_transport* t, grpc_chttp2_stream* s,
|
2302
|
+
grpc_error_handle error) {
|
2303
|
+
grpc_slice hdr;
|
2304
|
+
grpc_slice status_hdr;
|
2305
|
+
grpc_slice http_status_hdr;
|
2306
|
+
grpc_slice content_type_hdr;
|
2307
|
+
grpc_slice message_pfx;
|
2308
|
+
uint8_t* p;
|
2309
|
+
uint32_t len = 0;
|
2310
|
+
grpc_status_code grpc_status;
|
2311
|
+
std::string message;
|
2312
|
+
grpc_error_get_status(error, s->deadline, &grpc_status, &message, nullptr,
|
2313
|
+
nullptr);
|
2314
|
+
|
2315
|
+
GPR_ASSERT(grpc_status >= 0 && (int)grpc_status < 100);
|
2316
|
+
|
2317
|
+
// Hand roll a header block.
|
2318
|
+
// This is unnecessarily ugly - at some point we should find a more
|
2319
|
+
// elegant solution.
|
2320
|
+
// It's complicated by the fact that our send machinery would be dead by
|
2321
|
+
// the time we got around to sending this, so instead we ignore HPACK
|
2322
|
+
// compression and just write the uncompressed bytes onto the wire.
|
2323
|
+
if (!s->sent_initial_metadata) {
|
2324
|
+
http_status_hdr = GRPC_SLICE_MALLOC(13);
|
2325
|
+
p = GRPC_SLICE_START_PTR(http_status_hdr);
|
2326
|
+
*p++ = 0x00;
|
2327
|
+
*p++ = 7;
|
2328
|
+
*p++ = ':';
|
2329
|
+
*p++ = 's';
|
2330
|
+
*p++ = 't';
|
2331
|
+
*p++ = 'a';
|
2332
|
+
*p++ = 't';
|
2333
|
+
*p++ = 'u';
|
2334
|
+
*p++ = 's';
|
2335
|
+
*p++ = 3;
|
2336
|
+
*p++ = '2';
|
2337
|
+
*p++ = '0';
|
2338
|
+
*p++ = '0';
|
2339
|
+
GPR_ASSERT(p == GRPC_SLICE_END_PTR(http_status_hdr));
|
2340
|
+
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(http_status_hdr);
|
2341
|
+
|
2342
|
+
content_type_hdr = GRPC_SLICE_MALLOC(31);
|
2343
|
+
p = GRPC_SLICE_START_PTR(content_type_hdr);
|
2344
|
+
*p++ = 0x00;
|
2345
|
+
*p++ = 12;
|
2346
|
+
*p++ = 'c';
|
2347
|
+
*p++ = 'o';
|
2348
|
+
*p++ = 'n';
|
2349
|
+
*p++ = 't';
|
2350
|
+
*p++ = 'e';
|
2351
|
+
*p++ = 'n';
|
2352
|
+
*p++ = 't';
|
2353
|
+
*p++ = '-';
|
2354
|
+
*p++ = 't';
|
2355
|
+
*p++ = 'y';
|
2356
|
+
*p++ = 'p';
|
2357
|
+
*p++ = 'e';
|
2358
|
+
*p++ = 16;
|
2359
|
+
*p++ = 'a';
|
2360
|
+
*p++ = 'p';
|
2361
|
+
*p++ = 'p';
|
2362
|
+
*p++ = 'l';
|
2363
|
+
*p++ = 'i';
|
2364
|
+
*p++ = 'c';
|
2365
|
+
*p++ = 'a';
|
2366
|
+
*p++ = 't';
|
2367
|
+
*p++ = 'i';
|
2368
|
+
*p++ = 'o';
|
2369
|
+
*p++ = 'n';
|
2370
|
+
*p++ = '/';
|
2371
|
+
*p++ = 'g';
|
2372
|
+
*p++ = 'r';
|
2373
|
+
*p++ = 'p';
|
2374
|
+
*p++ = 'c';
|
2375
|
+
GPR_ASSERT(p == GRPC_SLICE_END_PTR(content_type_hdr));
|
2376
|
+
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(content_type_hdr);
|
2377
|
+
}
|
2378
|
+
|
2379
|
+
status_hdr = GRPC_SLICE_MALLOC(15 + (grpc_status >= 10));
|
2380
|
+
p = GRPC_SLICE_START_PTR(status_hdr);
|
2381
|
+
*p++ = 0x00; /* literal header, not indexed */
|
2382
|
+
*p++ = 11; /* len(grpc-status) */
|
2383
|
+
*p++ = 'g';
|
2384
|
+
*p++ = 'r';
|
2385
|
+
*p++ = 'p';
|
2386
|
+
*p++ = 'c';
|
2387
|
+
*p++ = '-';
|
2388
|
+
*p++ = 's';
|
2389
|
+
*p++ = 't';
|
2390
|
+
*p++ = 'a';
|
2391
|
+
*p++ = 't';
|
2392
|
+
*p++ = 'u';
|
2393
|
+
*p++ = 's';
|
2394
|
+
if (grpc_status < 10) {
|
2395
|
+
*p++ = 1;
|
2396
|
+
*p++ = static_cast<uint8_t>('0' + grpc_status);
|
2397
|
+
} else {
|
2398
|
+
*p++ = 2;
|
2399
|
+
*p++ = static_cast<uint8_t>('0' + (grpc_status / 10));
|
2400
|
+
*p++ = static_cast<uint8_t>('0' + (grpc_status % 10));
|
2401
|
+
}
|
2402
|
+
GPR_ASSERT(p == GRPC_SLICE_END_PTR(status_hdr));
|
2403
|
+
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(status_hdr);
|
2404
|
+
|
2405
|
+
size_t msg_len = message.length();
|
2406
|
+
GPR_ASSERT(msg_len <= UINT32_MAX);
|
2407
|
+
grpc_core::VarintWriter<1> msg_len_writer(msg_len);
|
2408
|
+
message_pfx = GRPC_SLICE_MALLOC(14 + msg_len_writer.length());
|
2409
|
+
p = GRPC_SLICE_START_PTR(message_pfx);
|
2410
|
+
*p++ = 0x00; /* literal header, not indexed */
|
2411
|
+
*p++ = 12; /* len(grpc-message) */
|
2412
|
+
*p++ = 'g';
|
2413
|
+
*p++ = 'r';
|
2414
|
+
*p++ = 'p';
|
2415
|
+
*p++ = 'c';
|
2416
|
+
*p++ = '-';
|
2417
|
+
*p++ = 'm';
|
2418
|
+
*p++ = 'e';
|
2419
|
+
*p++ = 's';
|
2420
|
+
*p++ = 's';
|
2421
|
+
*p++ = 'a';
|
2422
|
+
*p++ = 'g';
|
2423
|
+
*p++ = 'e';
|
2424
|
+
msg_len_writer.Write(0, p);
|
2425
|
+
p += msg_len_writer.length();
|
2426
|
+
GPR_ASSERT(p == GRPC_SLICE_END_PTR(message_pfx));
|
2427
|
+
len += static_cast<uint32_t> GRPC_SLICE_LENGTH(message_pfx);
|
2428
|
+
len += static_cast<uint32_t>(msg_len);
|
2429
|
+
|
2430
|
+
hdr = GRPC_SLICE_MALLOC(9);
|
2431
|
+
p = GRPC_SLICE_START_PTR(hdr);
|
2432
|
+
*p++ = static_cast<uint8_t>(len >> 16);
|
2433
|
+
*p++ = static_cast<uint8_t>(len >> 8);
|
2434
|
+
*p++ = static_cast<uint8_t>(len);
|
2435
|
+
*p++ = GRPC_CHTTP2_FRAME_HEADER;
|
2436
|
+
*p++ = GRPC_CHTTP2_DATA_FLAG_END_STREAM | GRPC_CHTTP2_DATA_FLAG_END_HEADERS;
|
2437
|
+
*p++ = static_cast<uint8_t>(s->id >> 24);
|
2438
|
+
*p++ = static_cast<uint8_t>(s->id >> 16);
|
2439
|
+
*p++ = static_cast<uint8_t>(s->id >> 8);
|
2440
|
+
*p++ = static_cast<uint8_t>(s->id);
|
2441
|
+
GPR_ASSERT(p == GRPC_SLICE_END_PTR(hdr));
|
2442
|
+
|
2443
|
+
grpc_slice_buffer_add(&t->qbuf, hdr);
|
2444
|
+
if (!s->sent_initial_metadata) {
|
2445
|
+
grpc_slice_buffer_add(&t->qbuf, http_status_hdr);
|
2446
|
+
grpc_slice_buffer_add(&t->qbuf, content_type_hdr);
|
2447
|
+
}
|
2448
|
+
grpc_slice_buffer_add(&t->qbuf, status_hdr);
|
2449
|
+
grpc_slice_buffer_add(&t->qbuf, message_pfx);
|
2450
|
+
grpc_slice_buffer_add(&t->qbuf,
|
2451
|
+
grpc_slice_from_cpp_string(std::move(message)));
|
2452
|
+
grpc_chttp2_reset_ping_clock(t);
|
2453
|
+
grpc_chttp2_add_rst_stream_to_next_write(t, s->id, GRPC_HTTP2_NO_ERROR,
|
2454
|
+
&s->stats.outgoing);
|
2455
|
+
|
2456
|
+
grpc_chttp2_mark_stream_closed(t, s, 1, 1, error);
|
2457
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API);
|
2458
|
+
}
|
2459
|
+
|
2460
|
+
struct cancel_stream_cb_args {
|
2461
|
+
grpc_error_handle error;
|
2462
|
+
grpc_chttp2_transport* t;
|
2463
|
+
};
|
2464
|
+
|
2465
|
+
static void cancel_stream_cb(void* user_data, uint32_t /*key*/, void* stream) {
|
2466
|
+
cancel_stream_cb_args* args = static_cast<cancel_stream_cb_args*>(user_data);
|
2467
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(stream);
|
2468
|
+
grpc_chttp2_cancel_stream(args->t, s, GRPC_ERROR_REF(args->error));
|
2469
|
+
}
|
2470
|
+
|
2471
|
+
static void end_all_the_calls(grpc_chttp2_transport* t,
|
2472
|
+
grpc_error_handle error) {
|
2473
|
+
intptr_t http2_error;
|
2474
|
+
// If there is no explicit grpc or HTTP/2 error, set to UNAVAILABLE on server.
|
2475
|
+
if (!t->is_client && !grpc_error_has_clear_grpc_status(error) &&
|
2476
|
+
!grpc_error_get_int(error, GRPC_ERROR_INT_HTTP2_ERROR, &http2_error)) {
|
2477
|
+
error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,
|
2478
|
+
GRPC_STATUS_UNAVAILABLE);
|
2479
|
+
}
|
2480
|
+
cancel_unstarted_streams(t, GRPC_ERROR_REF(error));
|
2481
|
+
cancel_stream_cb_args args = {error, t};
|
2482
|
+
grpc_chttp2_stream_map_for_each(&t->stream_map, cancel_stream_cb, &args);
|
2483
|
+
GRPC_ERROR_UNREF(error);
|
2484
|
+
}
|
2485
|
+
|
2486
|
+
//
|
2487
|
+
// INPUT PROCESSING - PARSING
|
2488
|
+
//
|
2489
|
+
|
2490
|
+
template <class F>
|
2491
|
+
static void WithUrgency(grpc_chttp2_transport* t,
|
2492
|
+
grpc_core::chttp2::FlowControlAction::Urgency urgency,
|
2493
|
+
grpc_chttp2_initiate_write_reason reason, F action) {
|
2494
|
+
switch (urgency) {
|
2495
|
+
case grpc_core::chttp2::FlowControlAction::Urgency::NO_ACTION_NEEDED:
|
2496
|
+
break;
|
2497
|
+
case grpc_core::chttp2::FlowControlAction::Urgency::UPDATE_IMMEDIATELY:
|
2498
|
+
grpc_chttp2_initiate_write(t, reason);
|
2499
|
+
ABSL_FALLTHROUGH_INTENDED;
|
2500
|
+
case grpc_core::chttp2::FlowControlAction::Urgency::QUEUE_UPDATE:
|
2501
|
+
action();
|
2502
|
+
break;
|
2503
|
+
}
|
2504
|
+
}
|
2505
|
+
|
2506
|
+
void grpc_chttp2_act_on_flowctl_action(
|
2507
|
+
const grpc_core::chttp2::FlowControlAction& action,
|
2508
|
+
grpc_chttp2_transport* t, grpc_chttp2_stream* s) {
|
2509
|
+
WithUrgency(t, action.send_stream_update(),
|
2510
|
+
GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL,
|
2511
|
+
[t, s]() { grpc_chttp2_mark_stream_writable(t, s); });
|
2512
|
+
WithUrgency(t, action.send_transport_update(),
|
2513
|
+
GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL, []() {});
|
2514
|
+
WithUrgency(t, action.send_initial_window_update(),
|
2515
|
+
GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS, [t, &action]() {
|
2516
|
+
queue_setting_update(t,
|
2517
|
+
GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE,
|
2518
|
+
action.initial_window_size());
|
2519
|
+
});
|
2520
|
+
WithUrgency(t, action.send_max_frame_size_update(),
|
2521
|
+
GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS, [t, &action]() {
|
2522
|
+
queue_setting_update(t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE,
|
2523
|
+
action.max_frame_size());
|
2524
|
+
});
|
2525
|
+
}
|
2526
|
+
|
2527
|
+
static grpc_error_handle try_http_parsing(grpc_chttp2_transport* t) {
|
2528
|
+
grpc_http_parser parser;
|
2529
|
+
size_t i = 0;
|
2530
|
+
grpc_error_handle error = GRPC_ERROR_NONE;
|
2531
|
+
grpc_http_response response;
|
2532
|
+
|
2533
|
+
grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response);
|
2534
|
+
|
2535
|
+
grpc_error_handle parse_error = GRPC_ERROR_NONE;
|
2536
|
+
for (; i < t->read_buffer.count && parse_error == GRPC_ERROR_NONE; i++) {
|
2537
|
+
parse_error =
|
2538
|
+
grpc_http_parser_parse(&parser, t->read_buffer.slices[i], nullptr);
|
2539
|
+
}
|
2540
|
+
if (parse_error == GRPC_ERROR_NONE &&
|
2541
|
+
(parse_error = grpc_http_parser_eof(&parser)) == GRPC_ERROR_NONE) {
|
2542
|
+
error = grpc_error_set_int(
|
2543
|
+
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
2544
|
+
"Trying to connect an http1.x server"),
|
2545
|
+
GRPC_ERROR_INT_HTTP_STATUS, response.status),
|
2546
|
+
GRPC_ERROR_INT_GRPC_STATUS,
|
2547
|
+
grpc_http2_status_to_grpc_status(response.status));
|
2548
|
+
}
|
2549
|
+
GRPC_ERROR_UNREF(parse_error);
|
2550
|
+
|
2551
|
+
grpc_http_parser_destroy(&parser);
|
2552
|
+
grpc_http_response_destroy(&response);
|
2553
|
+
return error;
|
2554
|
+
}
|
2555
|
+
|
2556
|
+
static void read_action(void* tp, grpc_error_handle error) {
|
2557
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2558
|
+
t->combiner->Run(
|
2559
|
+
GRPC_CLOSURE_INIT(&t->read_action_locked, read_action_locked, t, nullptr),
|
2560
|
+
GRPC_ERROR_REF(error));
|
2561
|
+
}
|
2562
|
+
|
2563
|
+
static void read_action_locked(void* tp, grpc_error_handle error) {
|
2564
|
+
GPR_TIMER_SCOPE("reading_action_locked", 0);
|
2565
|
+
|
2566
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2567
|
+
|
2568
|
+
(void)GRPC_ERROR_REF(error);
|
2569
|
+
|
2570
|
+
grpc_error_handle err = error;
|
2571
|
+
if (err != GRPC_ERROR_NONE) {
|
2572
|
+
err = grpc_error_set_int(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
2573
|
+
"Endpoint read failed", &err, 1),
|
2574
|
+
GRPC_ERROR_INT_OCCURRED_DURING_WRITE,
|
2575
|
+
t->write_state);
|
2576
|
+
}
|
2577
|
+
std::swap(err, error);
|
2578
|
+
GRPC_ERROR_UNREF(err);
|
2579
|
+
if (t->closed_with_error == GRPC_ERROR_NONE) {
|
2580
|
+
GPR_TIMER_SCOPE("reading_action.parse", 0);
|
2581
|
+
size_t i = 0;
|
2582
|
+
grpc_error_handle errors[3] = {GRPC_ERROR_REF(error), GRPC_ERROR_NONE,
|
2583
|
+
GRPC_ERROR_NONE};
|
2584
|
+
for (; i < t->read_buffer.count && errors[1] == GRPC_ERROR_NONE; i++) {
|
2585
|
+
errors[1] = grpc_chttp2_perform_read(t, t->read_buffer.slices[i]);
|
2586
|
+
}
|
2587
|
+
if (errors[1] != GRPC_ERROR_NONE) {
|
2588
|
+
errors[2] = try_http_parsing(t);
|
2589
|
+
GRPC_ERROR_UNREF(error);
|
2590
|
+
error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
2591
|
+
"Failed parsing HTTP/2", errors, GPR_ARRAY_SIZE(errors));
|
2592
|
+
}
|
2593
|
+
for (i = 0; i < GPR_ARRAY_SIZE(errors); i++) {
|
2594
|
+
GRPC_ERROR_UNREF(errors[i]);
|
2595
|
+
}
|
2596
|
+
|
2597
|
+
GPR_TIMER_SCOPE("post_parse_locked", 0);
|
2598
|
+
if (t->initial_window_update != 0) {
|
2599
|
+
if (t->initial_window_update > 0) {
|
2600
|
+
grpc_chttp2_stream* s;
|
2601
|
+
while (grpc_chttp2_list_pop_stalled_by_stream(t, &s)) {
|
2602
|
+
grpc_chttp2_mark_stream_writable(t, s);
|
2603
|
+
grpc_chttp2_initiate_write(
|
2604
|
+
t, GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING);
|
2605
|
+
}
|
2606
|
+
}
|
2607
|
+
t->initial_window_update = 0;
|
2608
|
+
}
|
2609
|
+
}
|
2610
|
+
|
2611
|
+
GPR_TIMER_SCOPE("post_reading_action_locked", 0);
|
2612
|
+
bool keep_reading = false;
|
2613
|
+
if (error == GRPC_ERROR_NONE && t->closed_with_error != GRPC_ERROR_NONE) {
|
2614
|
+
error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
2615
|
+
"Transport closed", &t->closed_with_error, 1);
|
2616
|
+
}
|
2617
|
+
if (error != GRPC_ERROR_NONE) {
|
2618
|
+
// If a goaway frame was received, this might be the reason why the read
|
2619
|
+
// failed. Add this info to the error
|
2620
|
+
if (t->goaway_error != GRPC_ERROR_NONE) {
|
2621
|
+
error = grpc_error_add_child(error, GRPC_ERROR_REF(t->goaway_error));
|
2622
|
+
}
|
2623
|
+
|
2624
|
+
close_transport_locked(t, GRPC_ERROR_REF(error));
|
2625
|
+
t->endpoint_reading = 0;
|
2626
|
+
} else if (t->closed_with_error == GRPC_ERROR_NONE) {
|
2627
|
+
keep_reading = true;
|
2628
|
+
// Since we have read a byte, reset the keepalive timer
|
2629
|
+
if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING) {
|
2630
|
+
grpc_timer_cancel(&t->keepalive_ping_timer);
|
2631
|
+
}
|
2632
|
+
}
|
2633
|
+
grpc_slice_buffer_reset_and_unref_internal(&t->read_buffer);
|
2634
|
+
|
2635
|
+
if (keep_reading) {
|
2636
|
+
if (t->num_pending_induced_frames >= DEFAULT_MAX_PENDING_INDUCED_FRAMES) {
|
2637
|
+
t->reading_paused_on_pending_induced_frames = true;
|
2638
|
+
GRPC_CHTTP2_IF_TRACING(
|
2639
|
+
gpr_log(GPR_INFO,
|
2640
|
+
"transport %p : Pausing reading due to too "
|
2641
|
+
"many unwritten SETTINGS ACK and RST_STREAM frames",
|
2642
|
+
t));
|
2643
|
+
} else {
|
2644
|
+
continue_read_action_locked(t);
|
2645
|
+
}
|
2646
|
+
} else {
|
2647
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "reading_action");
|
2648
|
+
}
|
2649
|
+
|
2650
|
+
GRPC_ERROR_UNREF(error);
|
2651
|
+
}
|
2652
|
+
|
2653
|
+
static void continue_read_action_locked(grpc_chttp2_transport* t) {
|
2654
|
+
const bool urgent = t->goaway_error != GRPC_ERROR_NONE;
|
2655
|
+
GRPC_CLOSURE_INIT(&t->read_action_locked, read_action, t,
|
2656
|
+
grpc_schedule_on_exec_ctx);
|
2657
|
+
grpc_endpoint_read(t->ep, &t->read_buffer, &t->read_action_locked, urgent);
|
2658
|
+
grpc_chttp2_act_on_flowctl_action(t->flow_control->MakeAction(), t, nullptr);
|
2659
|
+
}
|
2660
|
+
|
2661
|
+
// t is reffed prior to calling the first time, and once the callback chain
|
2662
|
+
// that kicks off finishes, it's unreffed
|
2663
|
+
void schedule_bdp_ping_locked(grpc_chttp2_transport* t) {
|
2664
|
+
t->flow_control->bdp_estimator()->SchedulePing();
|
2665
|
+
send_ping_locked(
|
2666
|
+
t,
|
2667
|
+
GRPC_CLOSURE_INIT(&t->start_bdp_ping_locked, start_bdp_ping, t,
|
2668
|
+
grpc_schedule_on_exec_ctx),
|
2669
|
+
GRPC_CLOSURE_INIT(&t->finish_bdp_ping_locked, finish_bdp_ping, t,
|
2670
|
+
grpc_schedule_on_exec_ctx));
|
2671
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_BDP_PING);
|
2672
|
+
}
|
2673
|
+
|
2674
|
+
static void start_bdp_ping(void* tp, grpc_error_handle error) {
|
2675
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2676
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->start_bdp_ping_locked,
|
2677
|
+
start_bdp_ping_locked, t, nullptr),
|
2678
|
+
GRPC_ERROR_REF(error));
|
2679
|
+
}
|
2680
|
+
|
2681
|
+
static void start_bdp_ping_locked(void* tp, grpc_error_handle error) {
|
2682
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2683
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) {
|
2684
|
+
gpr_log(GPR_INFO, "%s: Start BDP ping err=%s", t->peer_string.c_str(),
|
2685
|
+
grpc_error_std_string(error).c_str());
|
2686
|
+
}
|
2687
|
+
if (error != GRPC_ERROR_NONE || t->closed_with_error != GRPC_ERROR_NONE) {
|
2688
|
+
return;
|
2689
|
+
}
|
2690
|
+
// Reset the keepalive ping timer
|
2691
|
+
if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING) {
|
2692
|
+
grpc_timer_cancel(&t->keepalive_ping_timer);
|
2693
|
+
}
|
2694
|
+
t->flow_control->bdp_estimator()->StartPing();
|
2695
|
+
t->bdp_ping_started = true;
|
2696
|
+
}
|
2697
|
+
|
2698
|
+
static void finish_bdp_ping(void* tp, grpc_error_handle error) {
|
2699
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2700
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->finish_bdp_ping_locked,
|
2701
|
+
finish_bdp_ping_locked, t, nullptr),
|
2702
|
+
GRPC_ERROR_REF(error));
|
2703
|
+
}
|
2704
|
+
|
2705
|
+
static void finish_bdp_ping_locked(void* tp, grpc_error_handle error) {
|
2706
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2707
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) {
|
2708
|
+
gpr_log(GPR_INFO, "%s: Complete BDP ping err=%s", t->peer_string.c_str(),
|
2709
|
+
grpc_error_std_string(error).c_str());
|
2710
|
+
}
|
2711
|
+
if (error != GRPC_ERROR_NONE || t->closed_with_error != GRPC_ERROR_NONE) {
|
2712
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "bdp_ping");
|
2713
|
+
return;
|
2714
|
+
}
|
2715
|
+
if (!t->bdp_ping_started) {
|
2716
|
+
// start_bdp_ping_locked has not been run yet. Schedule
|
2717
|
+
// finish_bdp_ping_locked to be run later.
|
2718
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->finish_bdp_ping_locked,
|
2719
|
+
finish_bdp_ping_locked, t, nullptr),
|
2720
|
+
GRPC_ERROR_REF(error));
|
2721
|
+
return;
|
2722
|
+
}
|
2723
|
+
t->bdp_ping_started = false;
|
2724
|
+
grpc_core::Timestamp next_ping =
|
2725
|
+
t->flow_control->bdp_estimator()->CompletePing();
|
2726
|
+
grpc_chttp2_act_on_flowctl_action(t->flow_control->PeriodicUpdate(), t,
|
2727
|
+
nullptr);
|
2728
|
+
GPR_ASSERT(!t->have_next_bdp_ping_timer);
|
2729
|
+
t->have_next_bdp_ping_timer = true;
|
2730
|
+
GRPC_CLOSURE_INIT(&t->next_bdp_ping_timer_expired_locked,
|
2731
|
+
next_bdp_ping_timer_expired, t, grpc_schedule_on_exec_ctx);
|
2732
|
+
grpc_timer_init(&t->next_bdp_ping_timer, next_ping,
|
2733
|
+
&t->next_bdp_ping_timer_expired_locked);
|
2734
|
+
}
|
2735
|
+
|
2736
|
+
static void next_bdp_ping_timer_expired(void* tp, grpc_error_handle error) {
|
2737
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2738
|
+
t->combiner->Run(
|
2739
|
+
GRPC_CLOSURE_INIT(&t->next_bdp_ping_timer_expired_locked,
|
2740
|
+
next_bdp_ping_timer_expired_locked, t, nullptr),
|
2741
|
+
GRPC_ERROR_REF(error));
|
2742
|
+
}
|
2743
|
+
|
2744
|
+
static void next_bdp_ping_timer_expired_locked(void* tp,
|
2745
|
+
grpc_error_handle error) {
|
2746
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
|
2747
|
+
GPR_ASSERT(t->have_next_bdp_ping_timer);
|
2748
|
+
t->have_next_bdp_ping_timer = false;
|
2749
|
+
if (error != GRPC_ERROR_NONE) {
|
2750
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "bdp_ping");
|
2751
|
+
return;
|
2752
|
+
}
|
2753
|
+
if (t->flow_control->bdp_estimator()->accumulator() == 0) {
|
2754
|
+
// Block the bdp ping till we receive more data.
|
2755
|
+
t->bdp_ping_blocked = true;
|
2756
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "bdp_ping");
|
2757
|
+
} else {
|
2758
|
+
schedule_bdp_ping_locked(t);
|
2759
|
+
}
|
2760
|
+
}
|
2761
|
+
|
2762
|
+
void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
|
2763
|
+
bool is_client) {
|
2764
|
+
size_t i;
|
2765
|
+
if (args) {
|
2766
|
+
for (i = 0; i < args->num_args; i++) {
|
2767
|
+
if (0 == strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) {
|
2768
|
+
const int value = grpc_channel_arg_get_integer(
|
2769
|
+
&args->args[i], {is_client ? g_default_client_keepalive_time_ms
|
2770
|
+
: g_default_server_keepalive_time_ms,
|
2771
|
+
1, INT_MAX});
|
2772
|
+
if (is_client) {
|
2773
|
+
g_default_client_keepalive_time_ms = value;
|
2774
|
+
} else {
|
2775
|
+
g_default_server_keepalive_time_ms = value;
|
2776
|
+
}
|
2777
|
+
} else if (0 ==
|
2778
|
+
strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) {
|
2779
|
+
const int value = grpc_channel_arg_get_integer(
|
2780
|
+
&args->args[i], {is_client ? g_default_client_keepalive_timeout_ms
|
2781
|
+
: g_default_server_keepalive_timeout_ms,
|
2782
|
+
0, INT_MAX});
|
2783
|
+
if (is_client) {
|
2784
|
+
g_default_client_keepalive_timeout_ms = value;
|
2785
|
+
} else {
|
2786
|
+
g_default_server_keepalive_timeout_ms = value;
|
2787
|
+
}
|
2788
|
+
} else if (0 == strcmp(args->args[i].key,
|
2789
|
+
GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS)) {
|
2790
|
+
const bool value = static_cast<uint32_t>(grpc_channel_arg_get_integer(
|
2791
|
+
&args->args[i],
|
2792
|
+
{is_client ? g_default_client_keepalive_permit_without_calls
|
2793
|
+
: g_default_server_keepalive_timeout_ms,
|
2794
|
+
0, 1}));
|
2795
|
+
if (is_client) {
|
2796
|
+
g_default_client_keepalive_permit_without_calls = value;
|
2797
|
+
} else {
|
2798
|
+
g_default_server_keepalive_permit_without_calls = value;
|
2799
|
+
}
|
2800
|
+
} else if (0 ==
|
2801
|
+
strcmp(args->args[i].key, GRPC_ARG_HTTP2_MAX_PING_STRIKES)) {
|
2802
|
+
g_default_max_ping_strikes = grpc_channel_arg_get_integer(
|
2803
|
+
&args->args[i], {g_default_max_ping_strikes, 0, INT_MAX});
|
2804
|
+
} else if (0 == strcmp(args->args[i].key,
|
2805
|
+
GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)) {
|
2806
|
+
g_default_max_pings_without_data = grpc_channel_arg_get_integer(
|
2807
|
+
&args->args[i], {g_default_max_pings_without_data, 0, INT_MAX});
|
2808
|
+
} else if (0 ==
|
2809
|
+
strcmp(
|
2810
|
+
args->args[i].key,
|
2811
|
+
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)) {
|
2812
|
+
g_default_min_recv_ping_interval_without_data_ms =
|
2813
|
+
grpc_channel_arg_get_integer(
|
2814
|
+
&args->args[i],
|
2815
|
+
{g_default_min_recv_ping_interval_without_data_ms, 0, INT_MAX});
|
2816
|
+
}
|
2817
|
+
}
|
2818
|
+
}
|
2819
|
+
}
|
2820
|
+
|
2821
|
+
static void init_keepalive_ping(void* arg, grpc_error_handle error) {
|
2822
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2823
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->init_keepalive_ping_locked,
|
2824
|
+
init_keepalive_ping_locked, t, nullptr),
|
2825
|
+
GRPC_ERROR_REF(error));
|
2826
|
+
}
|
2827
|
+
|
2828
|
+
static void init_keepalive_ping_locked(void* arg, grpc_error_handle error) {
|
2829
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2830
|
+
GPR_ASSERT(t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_WAITING);
|
2831
|
+
if (t->destroying || t->closed_with_error != GRPC_ERROR_NONE) {
|
2832
|
+
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DYING;
|
2833
|
+
} else if (error == GRPC_ERROR_NONE) {
|
2834
|
+
if (t->keepalive_permit_without_calls ||
|
2835
|
+
grpc_chttp2_stream_map_size(&t->stream_map) > 0) {
|
2836
|
+
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_PINGING;
|
2837
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive ping end");
|
2838
|
+
grpc_timer_init_unset(&t->keepalive_watchdog_timer);
|
2839
|
+
send_keepalive_ping_locked(t);
|
2840
|
+
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING);
|
2841
|
+
} else {
|
2842
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
|
2843
|
+
GRPC_CLOSURE_INIT(&t->init_keepalive_ping_locked, init_keepalive_ping, t,
|
2844
|
+
grpc_schedule_on_exec_ctx);
|
2845
|
+
grpc_timer_init(&t->keepalive_ping_timer,
|
2846
|
+
grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
|
2847
|
+
&t->init_keepalive_ping_locked);
|
2848
|
+
}
|
2849
|
+
} else if (error == GRPC_ERROR_CANCELLED) {
|
2850
|
+
// The keepalive ping timer may be cancelled by bdp
|
2851
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
|
2852
|
+
GRPC_CLOSURE_INIT(&t->init_keepalive_ping_locked, init_keepalive_ping, t,
|
2853
|
+
grpc_schedule_on_exec_ctx);
|
2854
|
+
grpc_timer_init(&t->keepalive_ping_timer,
|
2855
|
+
grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
|
2856
|
+
&t->init_keepalive_ping_locked);
|
2857
|
+
}
|
2858
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "init keepalive ping");
|
2859
|
+
}
|
2860
|
+
|
2861
|
+
static void start_keepalive_ping(void* arg, grpc_error_handle error) {
|
2862
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2863
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->start_keepalive_ping_locked,
|
2864
|
+
start_keepalive_ping_locked, t, nullptr),
|
2865
|
+
GRPC_ERROR_REF(error));
|
2866
|
+
}
|
2867
|
+
|
2868
|
+
static void start_keepalive_ping_locked(void* arg, grpc_error_handle error) {
|
2869
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2870
|
+
if (error != GRPC_ERROR_NONE) {
|
2871
|
+
return;
|
2872
|
+
}
|
2873
|
+
if (t->channelz_socket != nullptr) {
|
2874
|
+
t->channelz_socket->RecordKeepaliveSent();
|
2875
|
+
}
|
2876
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
|
2877
|
+
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
|
2878
|
+
gpr_log(GPR_INFO, "%s: Start keepalive ping", t->peer_string.c_str());
|
2879
|
+
}
|
2880
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive watchdog");
|
2881
|
+
GRPC_CLOSURE_INIT(&t->keepalive_watchdog_fired_locked,
|
2882
|
+
keepalive_watchdog_fired, t, grpc_schedule_on_exec_ctx);
|
2883
|
+
grpc_timer_init(&t->keepalive_watchdog_timer,
|
2884
|
+
grpc_core::ExecCtx::Get()->Now() + t->keepalive_timeout,
|
2885
|
+
&t->keepalive_watchdog_fired_locked);
|
2886
|
+
t->keepalive_ping_started = true;
|
2887
|
+
}
|
2888
|
+
|
2889
|
+
static void finish_keepalive_ping(void* arg, grpc_error_handle error) {
|
2890
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2891
|
+
t->combiner->Run(GRPC_CLOSURE_INIT(&t->finish_keepalive_ping_locked,
|
2892
|
+
finish_keepalive_ping_locked, t, nullptr),
|
2893
|
+
GRPC_ERROR_REF(error));
|
2894
|
+
}
|
2895
|
+
|
2896
|
+
static void finish_keepalive_ping_locked(void* arg, grpc_error_handle error) {
|
2897
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2898
|
+
if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_PINGING) {
|
2899
|
+
if (error == GRPC_ERROR_NONE) {
|
2900
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
|
2901
|
+
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
|
2902
|
+
gpr_log(GPR_INFO, "%s: Finish keepalive ping", t->peer_string.c_str());
|
2903
|
+
}
|
2904
|
+
if (!t->keepalive_ping_started) {
|
2905
|
+
// start_keepalive_ping_locked has not run yet. Reschedule
|
2906
|
+
// finish_keepalive_ping_locked for it to be run later.
|
2907
|
+
t->combiner->Run(
|
2908
|
+
GRPC_CLOSURE_INIT(&t->finish_keepalive_ping_locked,
|
2909
|
+
finish_keepalive_ping_locked, t, nullptr),
|
2910
|
+
GRPC_ERROR_REF(error));
|
2911
|
+
return;
|
2912
|
+
}
|
2913
|
+
t->keepalive_ping_started = false;
|
2914
|
+
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
|
2915
|
+
grpc_timer_cancel(&t->keepalive_watchdog_timer);
|
2916
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
|
2917
|
+
GRPC_CLOSURE_INIT(&t->init_keepalive_ping_locked, init_keepalive_ping, t,
|
2918
|
+
grpc_schedule_on_exec_ctx);
|
2919
|
+
grpc_timer_init(&t->keepalive_ping_timer,
|
2920
|
+
grpc_core::ExecCtx::Get()->Now() + t->keepalive_time,
|
2921
|
+
&t->init_keepalive_ping_locked);
|
2922
|
+
}
|
2923
|
+
}
|
2924
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "keepalive ping end");
|
2925
|
+
}
|
2926
|
+
|
2927
|
+
static void keepalive_watchdog_fired(void* arg, grpc_error_handle error) {
|
2928
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2929
|
+
t->combiner->Run(
|
2930
|
+
GRPC_CLOSURE_INIT(&t->keepalive_watchdog_fired_locked,
|
2931
|
+
keepalive_watchdog_fired_locked, t, nullptr),
|
2932
|
+
GRPC_ERROR_REF(error));
|
2933
|
+
}
|
2934
|
+
|
2935
|
+
static void keepalive_watchdog_fired_locked(void* arg,
|
2936
|
+
grpc_error_handle error) {
|
2937
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
2938
|
+
if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_PINGING) {
|
2939
|
+
if (error == GRPC_ERROR_NONE) {
|
2940
|
+
gpr_log(GPR_INFO, "%s: Keepalive watchdog fired. Closing transport.",
|
2941
|
+
t->peer_string.c_str());
|
2942
|
+
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DYING;
|
2943
|
+
close_transport_locked(
|
2944
|
+
t, grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
|
2945
|
+
"keepalive watchdog timeout"),
|
2946
|
+
GRPC_ERROR_INT_GRPC_STATUS,
|
2947
|
+
GRPC_STATUS_UNAVAILABLE));
|
2948
|
+
}
|
2949
|
+
} else {
|
2950
|
+
// The watchdog timer should have been cancelled by
|
2951
|
+
// finish_keepalive_ping_locked.
|
2952
|
+
if (GPR_UNLIKELY(error != GRPC_ERROR_CANCELLED)) {
|
2953
|
+
gpr_log(GPR_ERROR, "keepalive_ping_end state error: %d (expect: %d)",
|
2954
|
+
t->keepalive_state, GRPC_CHTTP2_KEEPALIVE_STATE_PINGING);
|
2955
|
+
}
|
2956
|
+
}
|
2957
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "keepalive watchdog");
|
2958
|
+
}
|
2959
|
+
|
2960
|
+
//
|
2961
|
+
// CALLBACK LOOP
|
2962
|
+
//
|
2963
|
+
|
2964
|
+
static void connectivity_state_set(grpc_chttp2_transport* t,
|
2965
|
+
grpc_connectivity_state state,
|
2966
|
+
const absl::Status& status,
|
2967
|
+
const char* reason) {
|
2968
|
+
GRPC_CHTTP2_IF_TRACING(
|
2969
|
+
gpr_log(GPR_INFO, "transport %p set connectivity_state=%d", t, state));
|
2970
|
+
t->state_tracker.SetState(state, status, reason);
|
2971
|
+
}
|
2972
|
+
|
2973
|
+
//
|
2974
|
+
// POLLSET STUFF
|
2975
|
+
//
|
2976
|
+
|
2977
|
+
static void set_pollset(grpc_transport* gt, grpc_stream* /*gs*/,
|
2978
|
+
grpc_pollset* pollset) {
|
2979
|
+
grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
|
2980
|
+
grpc_endpoint_add_to_pollset(t->ep, pollset);
|
2981
|
+
}
|
2982
|
+
|
2983
|
+
static void set_pollset_set(grpc_transport* gt, grpc_stream* /*gs*/,
|
2984
|
+
grpc_pollset_set* pollset_set) {
|
2985
|
+
grpc_chttp2_transport* t = reinterpret_cast<grpc_chttp2_transport*>(gt);
|
2986
|
+
grpc_endpoint_add_to_pollset_set(t->ep, pollset_set);
|
2987
|
+
}
|
2988
|
+
|
2989
|
+
//
|
2990
|
+
// BYTE STREAM
|
2991
|
+
//
|
2992
|
+
|
2993
|
+
static void reset_byte_stream(void* arg, grpc_error_handle error) {
|
2994
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(arg);
|
2995
|
+
s->pending_byte_stream = false;
|
2996
|
+
if (error == GRPC_ERROR_NONE) {
|
2997
|
+
grpc_chttp2_maybe_complete_recv_message(s->t, s);
|
2998
|
+
grpc_chttp2_maybe_complete_recv_trailing_metadata(s->t, s);
|
2999
|
+
} else {
|
3000
|
+
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
3001
|
+
grpc_core::ExecCtx::Run(DEBUG_LOCATION, s->on_next, GRPC_ERROR_REF(error));
|
3002
|
+
s->on_next = nullptr;
|
3003
|
+
GRPC_ERROR_UNREF(s->byte_stream_error);
|
3004
|
+
s->byte_stream_error = GRPC_ERROR_NONE;
|
3005
|
+
grpc_chttp2_cancel_stream(s->t, s, GRPC_ERROR_REF(error));
|
3006
|
+
s->byte_stream_error = GRPC_ERROR_REF(error);
|
3007
|
+
}
|
3008
|
+
}
|
3009
|
+
|
3010
|
+
namespace grpc_core {
|
3011
|
+
|
3012
|
+
Chttp2IncomingByteStream::Chttp2IncomingByteStream(
|
3013
|
+
grpc_chttp2_transport* transport, grpc_chttp2_stream* stream,
|
3014
|
+
uint32_t frame_size, uint32_t flags)
|
3015
|
+
: ByteStream(frame_size, flags),
|
3016
|
+
transport_(transport),
|
3017
|
+
stream_(stream),
|
3018
|
+
refs_(2),
|
3019
|
+
remaining_bytes_(frame_size) {
|
3020
|
+
GRPC_ERROR_UNREF(stream->byte_stream_error);
|
3021
|
+
stream->byte_stream_error = GRPC_ERROR_NONE;
|
3022
|
+
}
|
3023
|
+
|
3024
|
+
void Chttp2IncomingByteStream::OrphanLocked(
|
3025
|
+
void* arg, grpc_error_handle /*error_ignored*/) {
|
3026
|
+
Chttp2IncomingByteStream* bs = static_cast<Chttp2IncomingByteStream*>(arg);
|
3027
|
+
grpc_chttp2_stream* s = bs->stream_;
|
3028
|
+
grpc_chttp2_transport* t = s->t;
|
3029
|
+
bs->Unref();
|
3030
|
+
s->pending_byte_stream = false;
|
3031
|
+
grpc_chttp2_maybe_complete_recv_message(t, s);
|
3032
|
+
grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
|
3033
|
+
}
|
3034
|
+
|
3035
|
+
void Chttp2IncomingByteStream::Orphan() {
|
3036
|
+
GPR_TIMER_SCOPE("incoming_byte_stream_destroy", 0);
|
3037
|
+
transport_->combiner->Run(
|
3038
|
+
GRPC_CLOSURE_INIT(&destroy_action_,
|
3039
|
+
&Chttp2IncomingByteStream::OrphanLocked, this, nullptr),
|
3040
|
+
GRPC_ERROR_NONE);
|
3041
|
+
}
|
3042
|
+
|
3043
|
+
void Chttp2IncomingByteStream::NextLocked(void* arg,
|
3044
|
+
grpc_error_handle /*error_ignored*/) {
|
3045
|
+
Chttp2IncomingByteStream* bs = static_cast<Chttp2IncomingByteStream*>(arg);
|
3046
|
+
grpc_chttp2_transport* t = bs->transport_;
|
3047
|
+
grpc_chttp2_stream* s = bs->stream_;
|
3048
|
+
size_t cur_length = s->frame_storage.length;
|
3049
|
+
if (!s->read_closed) {
|
3050
|
+
s->flow_control->IncomingByteStreamUpdate(bs->next_action_.max_size_hint,
|
3051
|
+
cur_length);
|
3052
|
+
grpc_chttp2_act_on_flowctl_action(s->flow_control->MakeAction(), t, s);
|
3053
|
+
}
|
3054
|
+
GPR_ASSERT(s->unprocessed_incoming_frames_buffer.length == 0);
|
3055
|
+
if (s->frame_storage.length > 0) {
|
3056
|
+
grpc_slice_buffer_swap(&s->frame_storage,
|
3057
|
+
&s->unprocessed_incoming_frames_buffer);
|
3058
|
+
ExecCtx::Run(DEBUG_LOCATION, bs->next_action_.on_complete, GRPC_ERROR_NONE);
|
3059
|
+
} else if (s->byte_stream_error != GRPC_ERROR_NONE) {
|
3060
|
+
ExecCtx::Run(DEBUG_LOCATION, bs->next_action_.on_complete,
|
3061
|
+
GRPC_ERROR_REF(s->byte_stream_error));
|
3062
|
+
if (s->data_parser.parsing_frame != nullptr) {
|
3063
|
+
s->data_parser.parsing_frame->Unref();
|
3064
|
+
s->data_parser.parsing_frame = nullptr;
|
3065
|
+
}
|
3066
|
+
} else if (s->read_closed) {
|
3067
|
+
if (bs->remaining_bytes_ != 0) {
|
3068
|
+
s->byte_stream_error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
|
3069
|
+
"Truncated message", &s->read_closed_error, 1);
|
3070
|
+
ExecCtx::Run(DEBUG_LOCATION, bs->next_action_.on_complete,
|
3071
|
+
GRPC_ERROR_REF(s->byte_stream_error));
|
3072
|
+
if (s->data_parser.parsing_frame != nullptr) {
|
3073
|
+
s->data_parser.parsing_frame->Unref();
|
3074
|
+
s->data_parser.parsing_frame = nullptr;
|
3075
|
+
}
|
3076
|
+
} else {
|
3077
|
+
// Should never reach here.
|
3078
|
+
GPR_ASSERT(false);
|
3079
|
+
}
|
3080
|
+
} else {
|
3081
|
+
s->on_next = bs->next_action_.on_complete;
|
3082
|
+
}
|
3083
|
+
bs->Unref();
|
3084
|
+
}
|
3085
|
+
|
3086
|
+
bool Chttp2IncomingByteStream::Next(size_t max_size_hint,
|
3087
|
+
grpc_closure* on_complete) {
|
3088
|
+
GPR_TIMER_SCOPE("incoming_byte_stream_next", 0);
|
3089
|
+
if (stream_->unprocessed_incoming_frames_buffer.length > 0) {
|
3090
|
+
return true;
|
3091
|
+
} else {
|
3092
|
+
Ref();
|
3093
|
+
next_action_.max_size_hint = max_size_hint;
|
3094
|
+
next_action_.on_complete = on_complete;
|
3095
|
+
transport_->combiner->Run(
|
3096
|
+
GRPC_CLOSURE_INIT(&next_action_.closure,
|
3097
|
+
&Chttp2IncomingByteStream::NextLocked, this, nullptr),
|
3098
|
+
GRPC_ERROR_NONE);
|
3099
|
+
return false;
|
3100
|
+
}
|
3101
|
+
}
|
3102
|
+
|
3103
|
+
grpc_error_handle Chttp2IncomingByteStream::Pull(grpc_slice* slice) {
|
3104
|
+
GPR_TIMER_SCOPE("incoming_byte_stream_pull", 0);
|
3105
|
+
grpc_error_handle error;
|
3106
|
+
if (stream_->unprocessed_incoming_frames_buffer.length > 0) {
|
3107
|
+
error = grpc_deframe_unprocessed_incoming_frames(
|
3108
|
+
&stream_->data_parser, stream_,
|
3109
|
+
&stream_->unprocessed_incoming_frames_buffer, slice, nullptr);
|
3110
|
+
if (error != GRPC_ERROR_NONE) {
|
3111
|
+
return error;
|
3112
|
+
}
|
3113
|
+
} else {
|
3114
|
+
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
|
3115
|
+
stream_->t->combiner->Run(&stream_->reset_byte_stream,
|
3116
|
+
GRPC_ERROR_REF(error));
|
3117
|
+
return error;
|
3118
|
+
}
|
3119
|
+
return GRPC_ERROR_NONE;
|
3120
|
+
}
|
3121
|
+
|
3122
|
+
void Chttp2IncomingByteStream::PublishError(grpc_error_handle error) {
|
3123
|
+
GPR_ASSERT(error != GRPC_ERROR_NONE);
|
3124
|
+
ExecCtx::Run(DEBUG_LOCATION, stream_->on_next, GRPC_ERROR_REF(error));
|
3125
|
+
stream_->on_next = nullptr;
|
3126
|
+
GRPC_ERROR_UNREF(stream_->byte_stream_error);
|
3127
|
+
stream_->byte_stream_error = GRPC_ERROR_REF(error);
|
3128
|
+
grpc_chttp2_cancel_stream(transport_, stream_, GRPC_ERROR_REF(error));
|
3129
|
+
}
|
3130
|
+
|
3131
|
+
grpc_error_handle Chttp2IncomingByteStream::Push(const grpc_slice& slice,
|
3132
|
+
grpc_slice* slice_out) {
|
3133
|
+
if (remaining_bytes_ < GRPC_SLICE_LENGTH(slice)) {
|
3134
|
+
grpc_error_handle error =
|
3135
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Too many bytes in stream");
|
3136
|
+
transport_->combiner->Run(&stream_->reset_byte_stream,
|
3137
|
+
GRPC_ERROR_REF(error));
|
3138
|
+
grpc_slice_unref_internal(slice);
|
3139
|
+
return error;
|
3140
|
+
} else {
|
3141
|
+
remaining_bytes_ -= static_cast<uint32_t> GRPC_SLICE_LENGTH(slice);
|
3142
|
+
if (slice_out != nullptr) {
|
3143
|
+
*slice_out = slice;
|
3144
|
+
}
|
3145
|
+
return GRPC_ERROR_NONE;
|
3146
|
+
}
|
3147
|
+
}
|
3148
|
+
|
3149
|
+
grpc_error_handle Chttp2IncomingByteStream::Finished(grpc_error_handle error,
|
3150
|
+
bool reset_on_error) {
|
3151
|
+
if (error == GRPC_ERROR_NONE) {
|
3152
|
+
if (remaining_bytes_ != 0) {
|
3153
|
+
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
|
3154
|
+
}
|
3155
|
+
}
|
3156
|
+
if (error != GRPC_ERROR_NONE && reset_on_error) {
|
3157
|
+
transport_->combiner->Run(&stream_->reset_byte_stream,
|
3158
|
+
GRPC_ERROR_REF(error));
|
3159
|
+
}
|
3160
|
+
Unref();
|
3161
|
+
return error;
|
3162
|
+
}
|
3163
|
+
|
3164
|
+
void Chttp2IncomingByteStream::Shutdown(grpc_error_handle error) {
|
3165
|
+
GRPC_ERROR_UNREF(Finished(error, true /* reset_on_error */));
|
3166
|
+
}
|
3167
|
+
|
3168
|
+
} // namespace grpc_core
|
3169
|
+
|
3170
|
+
//
|
3171
|
+
// RESOURCE QUOTAS
|
3172
|
+
//
|
3173
|
+
|
3174
|
+
static void post_benign_reclaimer(grpc_chttp2_transport* t) {
|
3175
|
+
if (!t->benign_reclaimer_registered) {
|
3176
|
+
t->benign_reclaimer_registered = true;
|
3177
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "benign_reclaimer");
|
3178
|
+
t->memory_owner.PostReclaimer(
|
3179
|
+
grpc_core::ReclamationPass::kBenign,
|
3180
|
+
[t](absl::optional<grpc_core::ReclamationSweep> sweep) {
|
3181
|
+
if (sweep.has_value()) {
|
3182
|
+
GRPC_CLOSURE_INIT(&t->benign_reclaimer_locked,
|
3183
|
+
benign_reclaimer_locked, t,
|
3184
|
+
grpc_schedule_on_exec_ctx);
|
3185
|
+
t->active_reclamation = std::move(*sweep);
|
3186
|
+
t->combiner->Run(&t->benign_reclaimer_locked, GRPC_ERROR_NONE);
|
3187
|
+
} else {
|
3188
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "benign_reclaimer");
|
3189
|
+
}
|
3190
|
+
});
|
3191
|
+
}
|
3192
|
+
}
|
3193
|
+
|
3194
|
+
static void post_destructive_reclaimer(grpc_chttp2_transport* t) {
|
3195
|
+
if (!t->destructive_reclaimer_registered) {
|
3196
|
+
t->destructive_reclaimer_registered = true;
|
3197
|
+
GRPC_CHTTP2_REF_TRANSPORT(t, "destructive_reclaimer");
|
3198
|
+
t->memory_owner.PostReclaimer(
|
3199
|
+
grpc_core::ReclamationPass::kDestructive,
|
3200
|
+
[t](absl::optional<grpc_core::ReclamationSweep> sweep) {
|
3201
|
+
if (sweep.has_value()) {
|
3202
|
+
GRPC_CLOSURE_INIT(&t->destructive_reclaimer_locked,
|
3203
|
+
destructive_reclaimer_locked, t,
|
3204
|
+
grpc_schedule_on_exec_ctx);
|
3205
|
+
t->active_reclamation = std::move(*sweep);
|
3206
|
+
t->combiner->Run(&t->destructive_reclaimer_locked, GRPC_ERROR_NONE);
|
3207
|
+
} else {
|
3208
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "benign_reclaimer");
|
3209
|
+
}
|
3210
|
+
});
|
3211
|
+
}
|
3212
|
+
}
|
3213
|
+
|
3214
|
+
static void benign_reclaimer_locked(void* arg, grpc_error_handle error) {
|
3215
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
3216
|
+
if (error == GRPC_ERROR_NONE &&
|
3217
|
+
grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
|
3218
|
+
// Channel with no active streams: send a goaway to try and make it
|
3219
|
+
// disconnect cleanly
|
3220
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) {
|
3221
|
+
gpr_log(GPR_INFO, "HTTP2: %s - send goaway to free memory",
|
3222
|
+
t->peer_string.c_str());
|
3223
|
+
}
|
3224
|
+
send_goaway(t,
|
3225
|
+
grpc_error_set_int(
|
3226
|
+
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Buffers full"),
|
3227
|
+
GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_ENHANCE_YOUR_CALM));
|
3228
|
+
} else if (error == GRPC_ERROR_NONE &&
|
3229
|
+
GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) {
|
3230
|
+
gpr_log(GPR_INFO,
|
3231
|
+
"HTTP2: %s - skip benign reclamation, there are still %" PRIdPTR
|
3232
|
+
" streams",
|
3233
|
+
t->peer_string.c_str(),
|
3234
|
+
grpc_chttp2_stream_map_size(&t->stream_map));
|
3235
|
+
}
|
3236
|
+
t->benign_reclaimer_registered = false;
|
3237
|
+
if (error != GRPC_ERROR_CANCELLED) {
|
3238
|
+
t->active_reclamation.Finish();
|
3239
|
+
}
|
3240
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "benign_reclaimer");
|
3241
|
+
}
|
3242
|
+
|
3243
|
+
static void destructive_reclaimer_locked(void* arg, grpc_error_handle error) {
|
3244
|
+
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(arg);
|
3245
|
+
size_t n = grpc_chttp2_stream_map_size(&t->stream_map);
|
3246
|
+
t->destructive_reclaimer_registered = false;
|
3247
|
+
if (error == GRPC_ERROR_NONE && n > 0) {
|
3248
|
+
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(
|
3249
|
+
grpc_chttp2_stream_map_rand(&t->stream_map));
|
3250
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) {
|
3251
|
+
gpr_log(GPR_INFO, "HTTP2: %s - abandon stream id %d",
|
3252
|
+
t->peer_string.c_str(), s->id);
|
3253
|
+
}
|
3254
|
+
grpc_chttp2_cancel_stream(
|
3255
|
+
t, s,
|
3256
|
+
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("Buffers full"),
|
3257
|
+
GRPC_ERROR_INT_HTTP2_ERROR,
|
3258
|
+
GRPC_HTTP2_ENHANCE_YOUR_CALM));
|
3259
|
+
if (n > 1) {
|
3260
|
+
// Since we cancel one stream per destructive reclamation, if
|
3261
|
+
// there are more streams left, we can immediately post a new
|
3262
|
+
// reclaimer in case the resource quota needs to free more
|
3263
|
+
// memory
|
3264
|
+
post_destructive_reclaimer(t);
|
3265
|
+
}
|
3266
|
+
}
|
3267
|
+
if (error != GRPC_ERROR_CANCELLED) {
|
3268
|
+
t->active_reclamation.Finish();
|
3269
|
+
}
|
3270
|
+
GRPC_CHTTP2_UNREF_TRANSPORT(t, "destructive_reclaimer");
|
3271
|
+
}
|
3272
|
+
|
3273
|
+
//
|
3274
|
+
// MONITORING
|
3275
|
+
//
|
3276
|
+
|
3277
|
+
const char* grpc_chttp2_initiate_write_reason_string(
|
3278
|
+
grpc_chttp2_initiate_write_reason reason) {
|
3279
|
+
switch (reason) {
|
3280
|
+
case GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE:
|
3281
|
+
return "INITIAL_WRITE";
|
3282
|
+
case GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM:
|
3283
|
+
return "START_NEW_STREAM";
|
3284
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE:
|
3285
|
+
return "SEND_MESSAGE";
|
3286
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA:
|
3287
|
+
return "SEND_INITIAL_METADATA";
|
3288
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA:
|
3289
|
+
return "SEND_TRAILING_METADATA";
|
3290
|
+
case GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING:
|
3291
|
+
return "RETRY_SEND_PING";
|
3292
|
+
case GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS:
|
3293
|
+
return "CONTINUE_PINGS";
|
3294
|
+
case GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT:
|
3295
|
+
return "GOAWAY_SENT";
|
3296
|
+
case GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM:
|
3297
|
+
return "RST_STREAM";
|
3298
|
+
case GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API:
|
3299
|
+
return "CLOSE_FROM_API";
|
3300
|
+
case GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL:
|
3301
|
+
return "STREAM_FLOW_CONTROL";
|
3302
|
+
case GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL:
|
3303
|
+
return "TRANSPORT_FLOW_CONTROL";
|
3304
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS:
|
3305
|
+
return "SEND_SETTINGS";
|
3306
|
+
case GRPC_CHTTP2_INITIATE_WRITE_SETTINGS_ACK:
|
3307
|
+
return "SETTINGS_ACK";
|
3308
|
+
case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING:
|
3309
|
+
return "FLOW_CONTROL_UNSTALLED_BY_SETTING";
|
3310
|
+
case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_UPDATE:
|
3311
|
+
return "FLOW_CONTROL_UNSTALLED_BY_UPDATE";
|
3312
|
+
case GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING:
|
3313
|
+
return "APPLICATION_PING";
|
3314
|
+
case GRPC_CHTTP2_INITIATE_WRITE_BDP_PING:
|
3315
|
+
return "BDP_PING";
|
3316
|
+
case GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING:
|
3317
|
+
return "KEEPALIVE_PING";
|
3318
|
+
case GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL_UNSTALLED:
|
3319
|
+
return "TRANSPORT_FLOW_CONTROL_UNSTALLED";
|
3320
|
+
case GRPC_CHTTP2_INITIATE_WRITE_PING_RESPONSE:
|
3321
|
+
return "PING_RESPONSE";
|
3322
|
+
case GRPC_CHTTP2_INITIATE_WRITE_FORCE_RST_STREAM:
|
3323
|
+
return "FORCE_RST_STREAM";
|
3324
|
+
}
|
3325
|
+
GPR_UNREACHABLE_CODE(return "unknown");
|
3326
|
+
}
|
3327
|
+
|
3328
|
+
static grpc_endpoint* chttp2_get_endpoint(grpc_transport* t) {
|
3329
|
+
return (reinterpret_cast<grpc_chttp2_transport*>(t))->ep;
|
3330
|
+
}
|
3331
|
+
|
3332
|
+
static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream),
|
3333
|
+
"chttp2",
|
3334
|
+
init_stream,
|
3335
|
+
nullptr,
|
3336
|
+
set_pollset,
|
3337
|
+
set_pollset_set,
|
3338
|
+
perform_stream_op,
|
3339
|
+
perform_transport_op,
|
3340
|
+
destroy_stream,
|
3341
|
+
destroy_transport,
|
3342
|
+
chttp2_get_endpoint};
|
3343
|
+
|
3344
|
+
static const grpc_transport_vtable* get_vtable(void) { return &vtable; }
|
3345
|
+
|
3346
|
+
grpc_core::RefCountedPtr<grpc_core::channelz::SocketNode>
|
3347
|
+
grpc_chttp2_transport_get_socket_node(grpc_transport* transport) {
|
3348
|
+
grpc_chttp2_transport* t =
|
3349
|
+
reinterpret_cast<grpc_chttp2_transport*>(transport);
|
3350
|
+
return t->channelz_socket;
|
3351
|
+
}
|
3352
|
+
|
3353
|
+
grpc_transport* grpc_create_chttp2_transport(
|
3354
|
+
const grpc_channel_args* channel_args, grpc_endpoint* ep, bool is_client) {
|
3355
|
+
auto t = new grpc_chttp2_transport(channel_args, ep, is_client);
|
3356
|
+
return &t->base;
|
3357
|
+
}
|
3358
|
+
|
3359
|
+
void grpc_chttp2_transport_start_reading(
|
3360
|
+
grpc_transport* transport, grpc_slice_buffer* read_buffer,
|
3361
|
+
grpc_closure* notify_on_receive_settings, grpc_closure* notify_on_close) {
|
3362
|
+
grpc_chttp2_transport* t =
|
3363
|
+
reinterpret_cast<grpc_chttp2_transport*>(transport);
|
3364
|
+
GRPC_CHTTP2_REF_TRANSPORT(
|
3365
|
+
t, "reading_action"); /* matches unref inside reading_action */
|
3366
|
+
if (read_buffer != nullptr) {
|
3367
|
+
grpc_slice_buffer_move_into(read_buffer, &t->read_buffer);
|
3368
|
+
gpr_free(read_buffer);
|
3369
|
+
}
|
3370
|
+
t->notify_on_receive_settings = notify_on_receive_settings;
|
3371
|
+
t->notify_on_close = notify_on_close;
|
3372
|
+
t->combiner->Run(
|
3373
|
+
GRPC_CLOSURE_INIT(&t->read_action_locked, read_action_locked, t, nullptr),
|
3374
|
+
GRPC_ERROR_NONE);
|
3375
|
+
}
|