grpc 1.55.0 → 1.56.0.pre3
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/Makefile +100 -68
- data/include/grpc/event_engine/event_engine.h +4 -3
- data/include/grpc/grpc_audit_logging.h +96 -0
- data/include/grpc/module.modulemap +2 -0
- data/include/grpc/support/json.h +218 -0
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +5 -0
- data/src/core/ext/filters/client_channel/backend_metric.cc +2 -0
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +4 -4
- data/src/core/ext/filters/client_channel/client_channel.cc +86 -104
- data/src/core/ext/filters/client_channel/client_channel.h +6 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +19 -18
- data/src/core/ext/filters/client_channel/client_channel_internal.h +16 -21
- data/src/core/ext/filters/client_channel/config_selector.h +9 -24
- data/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h +3 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +5 -4
- data/src/core/ext/filters/client_channel/lb_policy/health_check_client.cc +455 -0
- data/src/core/ext/filters/client_channel/lb_policy/health_check_client.h +54 -0
- data/src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h +186 -0
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc +2 -7
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc +52 -20
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h +23 -2
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +19 -6
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +1 -9
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +16 -7
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +18 -1
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +12 -9
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +6 -4
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +36 -13
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc +76 -6
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc +32 -39
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +4 -10
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +52 -47
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +1 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +14 -16
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +40 -43
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc +7 -12
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc +12 -19
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +35 -33
- data/src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +29 -4
- data/src/core/ext/filters/client_channel/resolver/dns/event_engine/service_config_helper.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +28 -27
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +163 -46
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +16 -1
- data/src/core/ext/filters/client_channel/retry_service_config.cc +1 -0
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +10 -40
- data/src/core/ext/filters/client_channel/subchannel.cc +10 -196
- data/src/core/ext/filters/client_channel/subchannel.h +3 -43
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +5 -5
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +100 -6
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.cc +6 -8
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +3 -3
- data/src/core/ext/filters/stateful_session/stateful_session_filter.h +16 -1
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +46 -95
- data/src/core/ext/transport/chttp2/transport/internal.h +1 -15
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +11 -2
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +15 -0
- data/src/core/ext/xds/certificate_provider_store.cc +4 -9
- data/src/core/ext/xds/certificate_provider_store.h +1 -1
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +30 -42
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +14 -9
- data/src/core/ext/xds/xds_api.cc +9 -6
- data/src/core/ext/xds/xds_api.h +3 -2
- data/src/core/ext/xds/xds_audit_logger_registry.cc +122 -0
- data/src/core/ext/xds/xds_audit_logger_registry.h +68 -0
- data/src/core/ext/xds/xds_bootstrap_grpc.cc +21 -9
- data/src/core/ext/xds/xds_bootstrap_grpc.h +5 -0
- data/src/core/ext/xds/xds_client.cc +5 -4
- data/src/core/ext/xds/xds_client_stats.h +1 -1
- data/src/core/ext/xds/xds_cluster.cc +20 -19
- data/src/core/ext/xds/xds_cluster_specifier_plugin.cc +11 -8
- data/src/core/ext/xds/xds_common_types.cc +3 -1
- data/src/core/ext/xds/xds_http_fault_filter.cc +16 -13
- data/src/core/ext/xds/xds_http_fault_filter.h +2 -1
- data/src/core/ext/xds/xds_http_filters.h +4 -2
- data/src/core/ext/xds/xds_http_rbac_filter.cc +154 -67
- data/src/core/ext/xds/xds_http_rbac_filter.h +2 -1
- data/src/core/ext/xds/xds_http_stateful_session_filter.cc +15 -11
- data/src/core/ext/xds/xds_http_stateful_session_filter.h +2 -1
- data/src/core/ext/xds/xds_lb_policy_registry.cc +22 -16
- data/src/core/ext/xds/xds_listener.cc +1 -0
- data/src/core/ext/xds/xds_route_config.cc +40 -3
- data/src/core/ext/xds/xds_routing.cc +2 -2
- data/src/core/ext/xds/xds_transport_grpc.cc +3 -1
- data/src/core/lib/avl/avl.h +5 -0
- data/src/core/lib/channel/channel_args.cc +80 -22
- data/src/core/lib/channel/channel_args.h +34 -1
- data/src/core/lib/channel/channel_trace.cc +16 -12
- data/src/core/lib/channel/channelz.cc +159 -132
- data/src/core/lib/channel/channelz.h +42 -35
- data/src/core/lib/channel/channelz_registry.cc +23 -20
- data/src/core/lib/channel/connected_channel.cc +17 -6
- data/src/core/lib/channel/promise_based_filter.cc +0 -4
- data/src/core/lib/channel/promise_based_filter.h +2 -0
- data/src/core/lib/compression/compression_internal.cc +2 -5
- data/src/core/lib/config/config_vars.cc +20 -18
- data/src/core/lib/config/config_vars.h +4 -4
- data/src/core/lib/config/load_config.cc +13 -0
- data/src/core/lib/config/load_config.h +6 -0
- data/src/core/lib/debug/event_log.h +1 -1
- data/src/core/lib/debug/stats_data.h +1 -1
- data/src/core/lib/debug/trace.cc +24 -55
- data/src/core/lib/debug/trace.h +3 -1
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +211 -0
- data/src/core/lib/event_engine/cf_engine/cf_engine.h +86 -0
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +354 -0
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +146 -0
- data/src/core/lib/event_engine/cf_engine/cftype_unique_ref.h +79 -0
- data/src/core/lib/event_engine/default_event_engine.cc +13 -1
- data/src/core/lib/event_engine/default_event_engine_factory.cc +14 -2
- data/src/core/lib/event_engine/poller.h +2 -2
- data/src/core/lib/event_engine/posix.h +4 -0
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +1 -1
- data/src/core/lib/event_engine/posix_engine/lockfree_event.cc +7 -18
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +9 -0
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +33 -19
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +1 -1
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +4 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +7 -8
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +1 -1
- data/src/core/lib/event_engine/shim.cc +7 -1
- data/src/core/lib/event_engine/{thread_pool.cc → thread_pool/original_thread_pool.cc} +28 -25
- data/src/core/lib/event_engine/{thread_pool.h → thread_pool/original_thread_pool.h} +11 -15
- data/src/core/lib/event_engine/thread_pool/thread_pool.h +50 -0
- data/src/core/lib/event_engine/{executor/executor.h → thread_pool/thread_pool_factory.cc} +17 -15
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +489 -0
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +249 -0
- data/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc +166 -0
- data/src/core/lib/event_engine/thready_event_engine/thready_event_engine.h +108 -0
- data/src/core/lib/event_engine/windows/iocp.cc +4 -3
- data/src/core/lib/event_engine/windows/iocp.h +3 -3
- data/src/core/lib/event_engine/windows/win_socket.cc +6 -6
- data/src/core/lib/event_engine/windows/win_socket.h +4 -4
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +11 -10
- data/src/core/lib/event_engine/windows/windows_endpoint.h +3 -2
- data/src/core/lib/event_engine/windows/windows_engine.cc +19 -17
- data/src/core/lib/event_engine/windows/windows_engine.h +6 -6
- data/src/core/lib/event_engine/windows/windows_listener.cc +3 -3
- data/src/core/lib/event_engine/windows/windows_listener.h +3 -2
- data/src/core/lib/event_engine/work_queue/basic_work_queue.cc +63 -0
- data/src/core/lib/event_engine/work_queue/basic_work_queue.h +71 -0
- data/src/core/lib/event_engine/work_queue/work_queue.h +62 -0
- data/src/core/lib/experiments/config.cc +38 -7
- data/src/core/lib/experiments/config.h +16 -0
- data/src/core/lib/experiments/experiments.cc +67 -20
- data/src/core/lib/experiments/experiments.h +27 -21
- data/src/core/lib/gpr/log_internal.h +55 -0
- data/src/core/lib/gprpp/crash.cc +10 -0
- data/src/core/lib/gprpp/crash.h +3 -0
- data/src/core/lib/gprpp/per_cpu.cc +33 -0
- data/src/core/lib/gprpp/per_cpu.h +29 -6
- data/src/core/lib/gprpp/time.cc +1 -0
- data/src/core/lib/iomgr/cfstream_handle.cc +1 -1
- data/src/core/lib/iomgr/endpoint_cfstream.cc +10 -8
- data/src/core/lib/iomgr/ev_apple.cc +12 -12
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +10 -3
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +15 -1
- data/src/core/lib/iomgr/iocp_windows.cc +24 -3
- data/src/core/lib/iomgr/iocp_windows.h +11 -0
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +1 -1
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +4 -2
- data/src/core/lib/iomgr/socket_windows.cc +61 -7
- data/src/core/lib/iomgr/socket_windows.h +9 -2
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +14 -3
- data/src/core/lib/iomgr/tcp_server_posix.cc +148 -107
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +1 -1
- data/src/core/lib/iomgr/tcp_server_windows.cc +1 -1
- data/src/core/lib/json/json.h +2 -166
- data/src/core/lib/json/json_object_loader.cc +8 -9
- data/src/core/lib/json/json_object_loader.h +25 -18
- data/src/core/lib/json/json_reader.cc +13 -6
- data/src/core/lib/json/json_util.cc +6 -11
- data/src/core/lib/json/json_writer.cc +7 -8
- data/src/core/lib/load_balancing/lb_policy.h +13 -0
- data/src/core/lib/load_balancing/lb_policy_registry.cc +2 -1
- data/src/core/lib/matchers/matchers.cc +3 -4
- data/src/core/lib/matchers/matchers.h +2 -1
- data/src/core/lib/promise/activity.cc +5 -0
- data/src/core/lib/promise/activity.h +10 -0
- data/src/core/lib/promise/detail/promise_factory.h +1 -1
- data/src/core/lib/promise/party.cc +31 -13
- data/src/core/lib/promise/party.h +11 -2
- data/src/core/lib/promise/pipe.h +9 -2
- data/src/core/lib/promise/prioritized_race.h +95 -0
- data/src/core/lib/promise/sleep.cc +2 -1
- data/src/core/lib/resolver/server_address.cc +0 -8
- data/src/core/lib/resolver/server_address.h +0 -6
- data/src/core/lib/resource_quota/memory_quota.cc +7 -7
- data/src/core/lib/resource_quota/memory_quota.h +1 -2
- data/src/core/lib/security/authorization/audit_logging.cc +98 -0
- data/src/core/lib/security/authorization/audit_logging.h +73 -0
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +47 -2
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +18 -1
- data/src/core/lib/security/authorization/rbac_policy.cc +36 -4
- data/src/core/lib/security/authorization/rbac_policy.h +19 -2
- data/src/core/lib/security/authorization/stdout_logger.cc +75 -0
- data/src/core/lib/security/authorization/stdout_logger.h +61 -0
- data/src/core/lib/security/certificate_provider/certificate_provider_factory.h +8 -4
- data/src/core/lib/security/certificate_provider/certificate_provider_registry.cc +8 -18
- data/src/core/lib/security/certificate_provider/certificate_provider_registry.h +14 -8
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +19 -12
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +4 -2
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +1 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +15 -14
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +4 -2
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +1 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +1 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +1 -5
- data/src/core/lib/security/util/json_util.cc +1 -0
- data/src/core/lib/service_config/service_config_call_data.h +49 -20
- data/src/core/lib/service_config/service_config_impl.cc +2 -1
- data/src/core/lib/surface/call.cc +38 -23
- data/src/core/lib/surface/completion_queue.cc +6 -2
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/batch_builder.cc +15 -12
- data/src/core/lib/transport/batch_builder.h +39 -35
- data/src/core/plugin_registry/grpc_plugin_registry.cc +0 -2
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +2 -0
- data/src/ruby/ext/grpc/extconf.rb +8 -9
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +9 -8
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +10 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +7 -4
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +6 -4
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +5 -9
- data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +31 -22
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c +29 -26
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +8 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +189 -13
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_openbsd.c +62 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_openbsd.c +31 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c +6 -4
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_tables.h +795 -795
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +1 -5
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c +18 -6
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +15 -7
- data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/dh.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +24 -24
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +74 -74
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c +1 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +11 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz.c +12 -12
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c +14 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c +10 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +23 -23
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c +13 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/{hkdf → fipsmodule/hkdf}/hkdf.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c +2 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c +1 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c +115 -133
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +12 -14
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +57 -47
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c +1 -8
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/polyval.c +27 -28
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +11 -23
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +21 -16
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/padding.c +5 -288
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +143 -83
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +95 -183
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +71 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h +8 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/kdf.c +33 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +162 -6
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +18 -0
- data/third_party/boringssl-with-bazel/src/crypto/kyber/kyber.c +18 -11
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +6 -13
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +18 -14
- data/third_party/boringssl-with-bazel/src/crypto/{refcount_lock.c → refcount_no_threads.c} +3 -13
- data/third_party/boringssl-with-bazel/src/crypto/refcount_win.c +89 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/internal.h +77 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_crypt.c +568 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +62 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +218 -44
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +35 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +588 -39
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c +27 -18
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +17 -39
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +39 -48
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +0 -140
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +72 -23
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +11 -14
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +33 -46
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +3 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +14 -46
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +14 -26
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +17 -10
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +5 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +6 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +32 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +0 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +1 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +3 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +28 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +2 -11
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +0 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +91 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +5 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +149 -20
- data/third_party/boringssl-with-bazel/src/include/openssl/thread.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +8 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +774 -615
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +42 -10
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +11 -6
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +2 -4
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +24 -16
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +65 -18
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +37 -18
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +187 -193
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +13 -129
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +85 -10
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +17 -4
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +27 -19
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +5 -21
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +5 -2
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64_msvc.h +1281 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64_msvc.h +2002 -0
- data/third_party/cares/cares/include/ares.h +23 -1
- data/third_party/cares/cares/{src/lib → include}/ares_nameser.h +9 -7
- data/third_party/cares/cares/include/ares_rules.h +2 -2
- data/third_party/cares/cares/include/ares_version.h +3 -3
- data/third_party/cares/cares/src/lib/ares__addrinfo2hostent.c +266 -0
- data/third_party/cares/cares/src/lib/ares__addrinfo_localhost.c +240 -0
- data/third_party/cares/cares/src/lib/ares__parse_into_addrinfo.c +49 -80
- data/third_party/cares/cares/src/lib/ares__readaddrinfo.c +37 -43
- data/third_party/cares/cares/src/lib/ares__sortaddrinfo.c +12 -4
- data/third_party/cares/cares/src/lib/ares_data.c +16 -0
- data/third_party/cares/cares/src/lib/ares_data.h +7 -0
- data/third_party/cares/cares/src/lib/ares_destroy.c +8 -0
- data/third_party/cares/cares/src/lib/ares_expand_name.c +17 -6
- data/third_party/cares/cares/src/lib/ares_freeaddrinfo.c +1 -0
- data/third_party/cares/cares/src/lib/ares_getaddrinfo.c +156 -78
- data/third_party/cares/cares/src/lib/ares_gethostbyname.c +130 -326
- data/third_party/cares/cares/src/lib/ares_init.c +97 -485
- data/third_party/cares/cares/src/lib/ares_library_init.c +2 -89
- data/third_party/cares/cares/src/lib/ares_parse_a_reply.c +23 -142
- data/third_party/cares/cares/src/lib/ares_parse_aaaa_reply.c +22 -142
- data/third_party/cares/cares/src/lib/ares_parse_uri_reply.c +184 -0
- data/third_party/cares/cares/src/lib/ares_private.h +30 -16
- data/third_party/cares/cares/src/lib/ares_process.c +55 -16
- data/third_party/cares/cares/src/lib/ares_query.c +1 -35
- data/third_party/cares/cares/src/lib/ares_rand.c +279 -0
- data/third_party/cares/cares/src/lib/ares_send.c +5 -7
- data/third_party/cares/cares/src/lib/ares_strdup.c +12 -19
- data/third_party/cares/cares/src/lib/ares_strsplit.c +44 -128
- data/third_party/cares/cares/src/lib/ares_strsplit.h +9 -10
- data/third_party/cares/cares/src/lib/inet_net_pton.c +78 -116
- data/third_party/cares/cares/src/tools/ares_getopt.h +53 -0
- metadata +50 -14
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +0 -175
- data/src/core/ext/filters/client_channel/health/health_check_client.h +0 -43
- data/third_party/cares/cares/src/lib/ares_library_init.h +0 -43
@@ -1,4 +1,4 @@
|
|
1
|
-
// Copyright
|
1
|
+
// Copyright 2023 gRPC authors.
|
2
2
|
//
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
// you may not use this file except in compliance with the License.
|
@@ -12,7 +12,7 @@
|
|
12
12
|
// See the License for the specific language governing permissions and
|
13
13
|
// limitations under the License.
|
14
14
|
|
15
|
-
//
|
15
|
+
// Auto generated by tools/codegen/core/gen_experiments.py
|
16
16
|
|
17
17
|
#include <grpc/support/port_platform.h>
|
18
18
|
|
@@ -25,66 +25,113 @@ const char* const description_tcp_frame_size_tuning =
|
|
25
25
|
"would not indicate completion of a read operation until a specified "
|
26
26
|
"number of bytes have been read over the socket. Buffers are also "
|
27
27
|
"allocated according to estimated RPC sizes.";
|
28
|
+
const char* const additional_constraints_tcp_frame_size_tuning = "{}";
|
28
29
|
const char* const description_tcp_rcv_lowat =
|
29
30
|
"Use SO_RCVLOWAT to avoid wakeups on the read path.";
|
31
|
+
const char* const additional_constraints_tcp_rcv_lowat = "{}";
|
30
32
|
const char* const description_peer_state_based_framing =
|
31
33
|
"If set, the max sizes of frames sent to lower layers is controlled based "
|
32
34
|
"on the peer's memory pressure which is reflected in its max http2 frame "
|
33
35
|
"size.";
|
34
|
-
const char* const
|
35
|
-
"Various fixes for flow control, max frame size setting.";
|
36
|
+
const char* const additional_constraints_peer_state_based_framing = "{}";
|
36
37
|
const char* const description_memory_pressure_controller =
|
37
38
|
"New memory pressure controller";
|
39
|
+
const char* const additional_constraints_memory_pressure_controller = "{}";
|
38
40
|
const char* const description_unconstrained_max_quota_buffer_size =
|
39
41
|
"Discard the cap on the max free pool size for one memory allocator";
|
42
|
+
const char* const additional_constraints_unconstrained_max_quota_buffer_size =
|
43
|
+
"{}";
|
40
44
|
const char* const description_event_engine_client =
|
41
45
|
"Use EventEngine clients instead of iomgr's grpc_tcp_client";
|
46
|
+
const char* const additional_constraints_event_engine_client = "{}";
|
42
47
|
const char* const description_monitoring_experiment =
|
43
48
|
"Placeholder experiment to prove/disprove our monitoring is working";
|
49
|
+
const char* const additional_constraints_monitoring_experiment = "{}";
|
44
50
|
const char* const description_promise_based_client_call =
|
45
51
|
"If set, use the new gRPC promise based call code when it's appropriate "
|
46
52
|
"(ie when all filters in a stack are promise based)";
|
53
|
+
const char* const additional_constraints_promise_based_client_call = "{}";
|
47
54
|
const char* const description_free_large_allocator =
|
48
55
|
"If set, return all free bytes from a \042big\042 allocator";
|
56
|
+
const char* const additional_constraints_free_large_allocator = "{}";
|
49
57
|
const char* const description_promise_based_server_call =
|
50
58
|
"If set, use the new gRPC promise based call code when it's appropriate "
|
51
59
|
"(ie when all filters in a stack are promise based)";
|
60
|
+
const char* const additional_constraints_promise_based_server_call = "{}";
|
52
61
|
const char* const description_transport_supplies_client_latency =
|
53
62
|
"If set, use the transport represented value for client latency in "
|
54
63
|
"opencensus";
|
64
|
+
const char* const additional_constraints_transport_supplies_client_latency =
|
65
|
+
"{}";
|
55
66
|
const char* const description_event_engine_listener =
|
56
67
|
"Use EventEngine listeners instead of iomgr's grpc_tcp_server";
|
68
|
+
const char* const additional_constraints_event_engine_listener = "{}";
|
57
69
|
const char* const description_schedule_cancellation_over_write =
|
58
70
|
"Allow cancellation op to be scheduled over a write";
|
71
|
+
const char* const additional_constraints_schedule_cancellation_over_write =
|
72
|
+
"{}";
|
59
73
|
const char* const description_trace_record_callops =
|
60
74
|
"Enables tracing of call batch initiation and completion.";
|
75
|
+
const char* const additional_constraints_trace_record_callops = "{}";
|
61
76
|
const char* const description_event_engine_dns =
|
62
77
|
"If set, use EventEngine DNSResolver for client channel resolution";
|
78
|
+
const char* const additional_constraints_event_engine_dns = "{}";
|
79
|
+
const char* const description_work_stealing =
|
80
|
+
"If set, use a work stealing thread pool implementation in EventEngine";
|
81
|
+
const char* const additional_constraints_work_stealing = "{}";
|
82
|
+
const char* const description_client_privacy = "If set, client privacy";
|
83
|
+
const char* const additional_constraints_client_privacy = "{}";
|
84
|
+
const char* const description_canary_client_privacy =
|
85
|
+
"If set, canary client privacy";
|
86
|
+
const char* const additional_constraints_canary_client_privacy = "{}";
|
87
|
+
const char* const description_server_privacy = "If set, server privacy";
|
88
|
+
const char* const additional_constraints_server_privacy = "{}";
|
63
89
|
} // namespace
|
64
90
|
|
65
91
|
namespace grpc_core {
|
66
92
|
|
67
93
|
const ExperimentMetadata g_experiment_metadata[] = {
|
68
|
-
{"tcp_frame_size_tuning", description_tcp_frame_size_tuning,
|
69
|
-
|
70
|
-
{"
|
71
|
-
|
94
|
+
{"tcp_frame_size_tuning", description_tcp_frame_size_tuning,
|
95
|
+
additional_constraints_tcp_frame_size_tuning, false, true},
|
96
|
+
{"tcp_rcv_lowat", description_tcp_rcv_lowat,
|
97
|
+
additional_constraints_tcp_rcv_lowat, false, true},
|
98
|
+
{"peer_state_based_framing", description_peer_state_based_framing,
|
99
|
+
additional_constraints_peer_state_based_framing, false, true},
|
72
100
|
{"memory_pressure_controller", description_memory_pressure_controller,
|
73
|
-
false},
|
101
|
+
additional_constraints_memory_pressure_controller, false, true},
|
74
102
|
{"unconstrained_max_quota_buffer_size",
|
75
|
-
description_unconstrained_max_quota_buffer_size,
|
76
|
-
|
77
|
-
{"
|
78
|
-
|
79
|
-
{"
|
80
|
-
|
103
|
+
description_unconstrained_max_quota_buffer_size,
|
104
|
+
additional_constraints_unconstrained_max_quota_buffer_size, false, true},
|
105
|
+
{"event_engine_client", description_event_engine_client,
|
106
|
+
additional_constraints_event_engine_client, false, true},
|
107
|
+
{"monitoring_experiment", description_monitoring_experiment,
|
108
|
+
additional_constraints_monitoring_experiment, true, true},
|
109
|
+
{"promise_based_client_call", description_promise_based_client_call,
|
110
|
+
additional_constraints_promise_based_client_call, false, true},
|
111
|
+
{"free_large_allocator", description_free_large_allocator,
|
112
|
+
additional_constraints_free_large_allocator, false, true},
|
113
|
+
{"promise_based_server_call", description_promise_based_server_call,
|
114
|
+
additional_constraints_promise_based_server_call, false, true},
|
81
115
|
{"transport_supplies_client_latency",
|
82
|
-
description_transport_supplies_client_latency,
|
83
|
-
|
116
|
+
description_transport_supplies_client_latency,
|
117
|
+
additional_constraints_transport_supplies_client_latency, false, true},
|
118
|
+
{"event_engine_listener", description_event_engine_listener,
|
119
|
+
additional_constraints_event_engine_listener, false, true},
|
84
120
|
{"schedule_cancellation_over_write",
|
85
|
-
description_schedule_cancellation_over_write,
|
86
|
-
|
87
|
-
{"
|
121
|
+
description_schedule_cancellation_over_write,
|
122
|
+
additional_constraints_schedule_cancellation_over_write, false, true},
|
123
|
+
{"trace_record_callops", description_trace_record_callops,
|
124
|
+
additional_constraints_trace_record_callops, false, true},
|
125
|
+
{"event_engine_dns", description_event_engine_dns,
|
126
|
+
additional_constraints_event_engine_dns, false, false},
|
127
|
+
{"work_stealing", description_work_stealing,
|
128
|
+
additional_constraints_work_stealing, false, false},
|
129
|
+
{"client_privacy", description_client_privacy,
|
130
|
+
additional_constraints_client_privacy, false, false},
|
131
|
+
{"canary_client_privacy", description_canary_client_privacy,
|
132
|
+
additional_constraints_canary_client_privacy, false, false},
|
133
|
+
{"server_privacy", description_server_privacy,
|
134
|
+
additional_constraints_server_privacy, false, false},
|
88
135
|
};
|
89
136
|
|
90
137
|
} // namespace grpc_core
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// Copyright
|
1
|
+
// Copyright 2023 gRPC authors.
|
2
2
|
//
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
// you may not use this file except in compliance with the License.
|
@@ -12,7 +12,7 @@
|
|
12
12
|
// See the License for the specific language governing permissions and
|
13
13
|
// limitations under the License.
|
14
14
|
|
15
|
-
//
|
15
|
+
// Auto generated by tools/codegen/core/gen_experiments.py
|
16
16
|
//
|
17
17
|
// This file contains the autogenerated parts of the experiments API.
|
18
18
|
//
|
@@ -60,8 +60,6 @@ namespace grpc_core {
|
|
60
60
|
inline bool IsTcpFrameSizeTuningEnabled() { return false; }
|
61
61
|
inline bool IsTcpRcvLowatEnabled() { return false; }
|
62
62
|
inline bool IsPeerStateBasedFramingEnabled() { return false; }
|
63
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_FLOW_CONTROL_FIXES
|
64
|
-
inline bool IsFlowControlFixesEnabled() { return true; }
|
65
63
|
inline bool IsMemoryPressureControllerEnabled() { return false; }
|
66
64
|
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; }
|
67
65
|
inline bool IsEventEngineClientEnabled() { return false; }
|
@@ -75,6 +73,10 @@ inline bool IsEventEngineListenerEnabled() { return false; }
|
|
75
73
|
inline bool IsScheduleCancellationOverWriteEnabled() { return false; }
|
76
74
|
inline bool IsTraceRecordCallopsEnabled() { return false; }
|
77
75
|
inline bool IsEventEngineDnsEnabled() { return false; }
|
76
|
+
inline bool IsWorkStealingEnabled() { return false; }
|
77
|
+
inline bool IsClientPrivacyEnabled() { return false; }
|
78
|
+
inline bool IsCanaryClientPrivacyEnabled() { return false; }
|
79
|
+
inline bool IsServerPrivacyEnabled() { return false; }
|
78
80
|
#else
|
79
81
|
#define GRPC_EXPERIMENT_IS_INCLUDED_TCP_FRAME_SIZE_TUNING
|
80
82
|
inline bool IsTcpFrameSizeTuningEnabled() { return IsExperimentEnabled(0); }
|
@@ -82,44 +84,48 @@ inline bool IsTcpFrameSizeTuningEnabled() { return IsExperimentEnabled(0); }
|
|
82
84
|
inline bool IsTcpRcvLowatEnabled() { return IsExperimentEnabled(1); }
|
83
85
|
#define GRPC_EXPERIMENT_IS_INCLUDED_PEER_STATE_BASED_FRAMING
|
84
86
|
inline bool IsPeerStateBasedFramingEnabled() { return IsExperimentEnabled(2); }
|
85
|
-
#define GRPC_EXPERIMENT_IS_INCLUDED_FLOW_CONTROL_FIXES
|
86
|
-
inline bool IsFlowControlFixesEnabled() { return IsExperimentEnabled(3); }
|
87
87
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MEMORY_PRESSURE_CONTROLLER
|
88
88
|
inline bool IsMemoryPressureControllerEnabled() {
|
89
|
-
return IsExperimentEnabled(
|
89
|
+
return IsExperimentEnabled(3);
|
90
90
|
}
|
91
91
|
#define GRPC_EXPERIMENT_IS_INCLUDED_UNCONSTRAINED_MAX_QUOTA_BUFFER_SIZE
|
92
92
|
inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() {
|
93
|
-
return IsExperimentEnabled(
|
93
|
+
return IsExperimentEnabled(4);
|
94
94
|
}
|
95
95
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT
|
96
|
-
inline bool IsEventEngineClientEnabled() { return IsExperimentEnabled(
|
96
|
+
inline bool IsEventEngineClientEnabled() { return IsExperimentEnabled(5); }
|
97
97
|
#define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT
|
98
|
-
inline bool IsMonitoringExperimentEnabled() { return IsExperimentEnabled(
|
98
|
+
inline bool IsMonitoringExperimentEnabled() { return IsExperimentEnabled(6); }
|
99
99
|
#define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_CLIENT_CALL
|
100
|
-
inline bool IsPromiseBasedClientCallEnabled() { return IsExperimentEnabled(
|
100
|
+
inline bool IsPromiseBasedClientCallEnabled() { return IsExperimentEnabled(7); }
|
101
101
|
#define GRPC_EXPERIMENT_IS_INCLUDED_FREE_LARGE_ALLOCATOR
|
102
|
-
inline bool IsFreeLargeAllocatorEnabled() { return IsExperimentEnabled(
|
102
|
+
inline bool IsFreeLargeAllocatorEnabled() { return IsExperimentEnabled(8); }
|
103
103
|
#define GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_SERVER_CALL
|
104
|
-
inline bool IsPromiseBasedServerCallEnabled() {
|
105
|
-
return IsExperimentEnabled(10);
|
106
|
-
}
|
104
|
+
inline bool IsPromiseBasedServerCallEnabled() { return IsExperimentEnabled(9); }
|
107
105
|
#define GRPC_EXPERIMENT_IS_INCLUDED_TRANSPORT_SUPPLIES_CLIENT_LATENCY
|
108
106
|
inline bool IsTransportSuppliesClientLatencyEnabled() {
|
109
|
-
return IsExperimentEnabled(
|
107
|
+
return IsExperimentEnabled(10);
|
110
108
|
}
|
111
109
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER
|
112
|
-
inline bool IsEventEngineListenerEnabled() { return IsExperimentEnabled(
|
110
|
+
inline bool IsEventEngineListenerEnabled() { return IsExperimentEnabled(11); }
|
113
111
|
#define GRPC_EXPERIMENT_IS_INCLUDED_SCHEDULE_CANCELLATION_OVER_WRITE
|
114
112
|
inline bool IsScheduleCancellationOverWriteEnabled() {
|
115
|
-
return IsExperimentEnabled(
|
113
|
+
return IsExperimentEnabled(12);
|
116
114
|
}
|
117
115
|
#define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS
|
118
|
-
inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(
|
116
|
+
inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(13); }
|
119
117
|
#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS
|
120
|
-
inline bool IsEventEngineDnsEnabled() { return IsExperimentEnabled(
|
118
|
+
inline bool IsEventEngineDnsEnabled() { return IsExperimentEnabled(14); }
|
119
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_WORK_STEALING
|
120
|
+
inline bool IsWorkStealingEnabled() { return IsExperimentEnabled(15); }
|
121
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_PRIVACY
|
122
|
+
inline bool IsClientPrivacyEnabled() { return IsExperimentEnabled(16); }
|
123
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_CANARY_CLIENT_PRIVACY
|
124
|
+
inline bool IsCanaryClientPrivacyEnabled() { return IsExperimentEnabled(17); }
|
125
|
+
#define GRPC_EXPERIMENT_IS_INCLUDED_SERVER_PRIVACY
|
126
|
+
inline bool IsServerPrivacyEnabled() { return IsExperimentEnabled(18); }
|
121
127
|
|
122
|
-
constexpr const size_t kNumExperiments =
|
128
|
+
constexpr const size_t kNumExperiments = 19;
|
123
129
|
extern const ExperimentMetadata g_experiment_metadata[kNumExperiments];
|
124
130
|
|
125
131
|
#endif
|
@@ -0,0 +1,55 @@
|
|
1
|
+
// Copyright 2022 gRPC authors.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
#ifndef GRPC_SRC_CORE_LIB_GPR_LOG_INTERNAL_H
|
15
|
+
#define GRPC_SRC_CORE_LIB_GPR_LOG_INTERNAL_H
|
16
|
+
|
17
|
+
#include <grpc/support/port_platform.h>
|
18
|
+
|
19
|
+
#include <stdio.h>
|
20
|
+
#include <stdlib.h>
|
21
|
+
|
22
|
+
#include <cstring>
|
23
|
+
|
24
|
+
/// abort() the process if x is zero, with rudimentary logging to prevent
|
25
|
+
/// circular dependencies with gpr_log.
|
26
|
+
|
27
|
+
/// Intended for internal invariants. If the error can be recovered from,
|
28
|
+
/// without the possibility of corruption, or might best be reflected via
|
29
|
+
/// an exception in a higher-level language, consider returning error code.
|
30
|
+
#define GPR_ASSERT_INTERNAL(x) \
|
31
|
+
do { \
|
32
|
+
if (GPR_UNLIKELY(!(x))) { \
|
33
|
+
fprintf(stderr, "assertion failed: %s", #x); \
|
34
|
+
abort(); \
|
35
|
+
} \
|
36
|
+
} while (0)
|
37
|
+
|
38
|
+
#ifndef NDEBUG
|
39
|
+
#define GPR_DEBUG_ASSERT_INTERNAL(x) GPR_ASSERT_INTERNAL(x)
|
40
|
+
#else
|
41
|
+
#define GPR_DEBUG_ASSERT_INTERNAL(x)
|
42
|
+
#endif
|
43
|
+
|
44
|
+
#define GPR_LOG_ERROR_INTERNAL(format, ...) \
|
45
|
+
do { \
|
46
|
+
char f[] = __FILE__; \
|
47
|
+
char* display_file = f; \
|
48
|
+
char* slash_pos = strrchr(f, '/'); \
|
49
|
+
if (slash_pos != nullptr) display_file = slash_pos + 1; \
|
50
|
+
char prefix[60]; \
|
51
|
+
sprintf(prefix, "INTERNAL %37s:%d]", display_file, __LINE__); \
|
52
|
+
fprintf(stderr, "%-60s " format "\n", prefix, __VA_ARGS__); \
|
53
|
+
} while (0)
|
54
|
+
|
55
|
+
#endif // GRPC_SRC_CORE_LIB_GPR_LOG_INTERNAL_H
|
data/src/core/lib/gprpp/crash.cc
CHANGED
@@ -16,10 +16,13 @@
|
|
16
16
|
|
17
17
|
#include "src/core/lib/gprpp/crash.h"
|
18
18
|
|
19
|
+
#include <stdio.h>
|
19
20
|
#include <stdlib.h>
|
20
21
|
|
21
22
|
#include <string>
|
22
23
|
|
24
|
+
#include "absl/strings/str_cat.h"
|
25
|
+
|
23
26
|
#include <grpc/support/log.h>
|
24
27
|
|
25
28
|
namespace grpc_core {
|
@@ -30,4 +33,11 @@ void Crash(absl::string_view message, SourceLocation location) {
|
|
30
33
|
abort();
|
31
34
|
}
|
32
35
|
|
36
|
+
void CrashWithStdio(absl::string_view message, SourceLocation location) {
|
37
|
+
fputs(absl::StrCat(location.file(), ":", location.line(), ": ", message, "\n")
|
38
|
+
.c_str(),
|
39
|
+
stderr);
|
40
|
+
abort();
|
41
|
+
}
|
42
|
+
|
33
43
|
} // namespace grpc_core
|
data/src/core/lib/gprpp/crash.h
CHANGED
@@ -29,6 +29,9 @@ namespace grpc_core {
|
|
29
29
|
[[noreturn]] void Crash(absl::string_view message,
|
30
30
|
::grpc_core::SourceLocation location = {});
|
31
31
|
|
32
|
+
[[noreturn]] void CrashWithStdio(absl::string_view message,
|
33
|
+
::grpc_core::SourceLocation location = {});
|
34
|
+
|
32
35
|
} // namespace grpc_core
|
33
36
|
|
34
37
|
#endif // GRPC_SRC_CORE_LIB_GPRPP_CRASH_H
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// Copyright 2023 gRPC authors.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
#include <grpc/support/port_platform.h>
|
16
|
+
|
17
|
+
#include "src/core/lib/gprpp/per_cpu.h"
|
18
|
+
|
19
|
+
#include <grpc/support/cpu.h>
|
20
|
+
|
21
|
+
#include "src/core/lib/gpr/useful.h"
|
22
|
+
|
23
|
+
namespace grpc_core {
|
24
|
+
|
25
|
+
size_t PerCpuOptions::Shards() {
|
26
|
+
return ShardsForCpuCount(gpr_cpu_num_cores());
|
27
|
+
}
|
28
|
+
|
29
|
+
size_t PerCpuOptions::ShardsForCpuCount(size_t cpu_count) {
|
30
|
+
return Clamp<size_t>(cpu_count / cpus_per_shard_, 1, max_shards_);
|
31
|
+
}
|
32
|
+
|
33
|
+
} // namespace grpc_core
|
@@ -22,18 +22,41 @@
|
|
22
22
|
#include <limits>
|
23
23
|
#include <memory>
|
24
24
|
|
25
|
-
#include <grpc/support/cpu.h>
|
26
|
-
|
27
25
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
28
26
|
|
29
27
|
namespace grpc_core {
|
30
28
|
|
29
|
+
class PerCpuOptions {
|
30
|
+
public:
|
31
|
+
// Set the number of cpus that colocate on the same shard
|
32
|
+
PerCpuOptions SetCpusPerShard(size_t cpus_per_shard) {
|
33
|
+
cpus_per_shard_ = std::max<size_t>(1, cpus_per_shard);
|
34
|
+
return *this;
|
35
|
+
}
|
36
|
+
|
37
|
+
// Set the maximum number of allowable shards
|
38
|
+
PerCpuOptions SetMaxShards(size_t max_shards) {
|
39
|
+
max_shards_ = std::max<size_t>(1, max_shards);
|
40
|
+
return *this;
|
41
|
+
}
|
42
|
+
|
43
|
+
size_t cpus_per_shard() const { return cpus_per_shard_; }
|
44
|
+
size_t max_shards() const { return max_shards_; }
|
45
|
+
|
46
|
+
size_t Shards();
|
47
|
+
size_t ShardsForCpuCount(size_t cpu_count);
|
48
|
+
|
49
|
+
private:
|
50
|
+
size_t cpus_per_shard_ = 1;
|
51
|
+
size_t max_shards_ = std::numeric_limits<size_t>::max();
|
52
|
+
};
|
53
|
+
|
31
54
|
template <typename T>
|
32
55
|
class PerCpu {
|
33
56
|
public:
|
34
|
-
|
35
|
-
|
36
|
-
|
57
|
+
// Options are not defaulted to try and force consideration of what the
|
58
|
+
// options specify.
|
59
|
+
explicit PerCpu(PerCpuOptions options) : cpus_(options.Shards()) {}
|
37
60
|
|
38
61
|
T& this_cpu() { return data_[ExecCtx::Get()->starting_cpu() % cpus_]; }
|
39
62
|
|
@@ -44,7 +67,7 @@ class PerCpu {
|
|
44
67
|
|
45
68
|
private:
|
46
69
|
const size_t cpus_;
|
47
|
-
std::unique_ptr<T[]> data_;
|
70
|
+
std::unique_ptr<T[]> data_{new T[cpus_]};
|
48
71
|
};
|
49
72
|
|
50
73
|
} // namespace grpc_core
|
data/src/core/lib/gprpp/time.cc
CHANGED
@@ -229,6 +229,7 @@ Duration::operator grpc_event_engine::experimental::EventEngine::Duration()
|
|
229
229
|
void TestOnlySetProcessEpoch(gpr_timespec epoch) {
|
230
230
|
g_process_epoch_seconds.store(
|
231
231
|
gpr_convert_clock_type(epoch, GPR_CLOCK_MONOTONIC).tv_sec);
|
232
|
+
g_process_epoch_cycles.store(gpr_get_cycle_counter());
|
232
233
|
}
|
233
234
|
|
234
235
|
std::ostream& operator<<(std::ostream& out, Timestamp timestamp) {
|
@@ -188,7 +188,7 @@ void CFStreamHandle::Ref(const char* file, int line, const char* reason) {
|
|
188
188
|
void CFStreamHandle::Unref(const char* file, int line, const char* reason) {
|
189
189
|
if (grpc_tcp_trace.enabled()) {
|
190
190
|
gpr_atm val = gpr_atm_no_barrier_load(&refcount_.count);
|
191
|
-
gpr_log(
|
191
|
+
gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
|
192
192
|
"CFStream Handle unref %p : %s %" PRIdPTR " -> %" PRIdPTR, this,
|
193
193
|
reason, val, val - 1);
|
194
194
|
}
|
@@ -240,7 +240,7 @@ static void WriteAction(void* arg, grpc_error_handle error) {
|
|
240
240
|
}
|
241
241
|
|
242
242
|
static void CFStreamRead(grpc_endpoint* ep, grpc_slice_buffer* slices,
|
243
|
-
grpc_closure* cb, bool urgent
|
243
|
+
grpc_closure* cb, bool /*urgent*/,
|
244
244
|
int /*min_progress_size*/) {
|
245
245
|
CFStreamEndpoint* ep_impl = reinterpret_cast<CFStreamEndpoint*>(ep);
|
246
246
|
if (grpc_tcp_trace.enabled()) {
|
@@ -258,7 +258,8 @@ static void CFStreamRead(grpc_endpoint* ep, grpc_slice_buffer* slices,
|
|
258
258
|
}
|
259
259
|
|
260
260
|
static void CFStreamWrite(grpc_endpoint* ep, grpc_slice_buffer* slices,
|
261
|
-
grpc_closure* cb, void* arg
|
261
|
+
grpc_closure* cb, void* /*arg*/,
|
262
|
+
int /*max_frame_size*/) {
|
262
263
|
CFStreamEndpoint* ep_impl = reinterpret_cast<CFStreamEndpoint*>(ep);
|
263
264
|
if (grpc_tcp_trace.enabled()) {
|
264
265
|
gpr_log(GPR_DEBUG, "CFStream endpoint:%p write (%p, %p) length:%zu",
|
@@ -304,14 +305,15 @@ absl::string_view CFStreamGetLocalAddress(grpc_endpoint* ep) {
|
|
304
305
|
return ep_impl->local_address;
|
305
306
|
}
|
306
307
|
|
307
|
-
int CFStreamGetFD(grpc_endpoint* ep) { return 0; }
|
308
|
+
int CFStreamGetFD(grpc_endpoint* /*ep*/) { return 0; }
|
308
309
|
|
309
|
-
bool CFStreamCanTrackErr(grpc_endpoint* ep) { return false; }
|
310
|
+
bool CFStreamCanTrackErr(grpc_endpoint* /*ep*/) { return false; }
|
310
311
|
|
311
|
-
void CFStreamAddToPollset(grpc_endpoint* ep
|
312
|
-
void CFStreamAddToPollsetSet(grpc_endpoint* ep
|
313
|
-
|
314
|
-
|
312
|
+
void CFStreamAddToPollset(grpc_endpoint* /*ep*/, grpc_pollset* /*pollset*/) {}
|
313
|
+
void CFStreamAddToPollsetSet(grpc_endpoint* /*ep*/,
|
314
|
+
grpc_pollset_set* /*pollset*/) {}
|
315
|
+
void CFStreamDeleteFromPollsetSet(grpc_endpoint* /*ep*/,
|
316
|
+
grpc_pollset_set* /*pollset*/) {}
|
315
317
|
|
316
318
|
static const grpc_endpoint_vtable vtable = {CFStreamRead,
|
317
319
|
CFStreamWrite,
|
@@ -118,7 +118,7 @@ static void grpc_apple_register_write_stream_queue(
|
|
118
118
|
/// be issued to the run loop when a network event happens and will be driven by
|
119
119
|
/// the global run loop thread gGlobalRunLoopThread.
|
120
120
|
static void grpc_apple_register_read_stream_run_loop(
|
121
|
-
CFReadStreamRef read_stream, dispatch_queue_t dispatch_queue) {
|
121
|
+
CFReadStreamRef read_stream, dispatch_queue_t /*dispatch_queue*/) {
|
122
122
|
GRPC_POLLING_TRACE("Register read stream: %p", read_stream);
|
123
123
|
grpc_core::MutexLock lock(&gGlobalRunLoopContext->mu);
|
124
124
|
CFReadStreamScheduleWithRunLoop(read_stream, gGlobalRunLoopContext->run_loop,
|
@@ -131,7 +131,7 @@ static void grpc_apple_register_read_stream_run_loop(
|
|
131
131
|
/// be issued to the run loop when a network event happens, and will be driven
|
132
132
|
/// by the global run loop thread gGlobalRunLoopThread.
|
133
133
|
static void grpc_apple_register_write_stream_run_loop(
|
134
|
-
CFWriteStreamRef write_stream, dispatch_queue_t dispatch_queue) {
|
134
|
+
CFWriteStreamRef write_stream, dispatch_queue_t /*dispatch_queue*/) {
|
135
135
|
GRPC_POLLING_TRACE("Register write stream: %p", write_stream);
|
136
136
|
grpc_core::MutexLock lock(&gGlobalRunLoopContext->mu);
|
137
137
|
CFWriteStreamScheduleWithRunLoop(
|
@@ -163,7 +163,7 @@ void grpc_apple_register_write_stream(CFWriteStreamRef write_stream,
|
|
163
163
|
|
164
164
|
/// Drive the run loop in a global singleton thread until the global run loop is
|
165
165
|
/// shutdown.
|
166
|
-
static void GlobalRunLoopFunc(void* arg) {
|
166
|
+
static void GlobalRunLoopFunc(void* /*arg*/) {
|
167
167
|
grpc_core::LockableAndReleasableMutexLock lock(&gGlobalRunLoopContext->mu);
|
168
168
|
gGlobalRunLoopContext->run_loop = CFRunLoopGetCurrent();
|
169
169
|
gGlobalRunLoopContext->init_cv.Signal();
|
@@ -342,15 +342,15 @@ grpc_pollset_vtable grpc_apple_pollset_vtable = {
|
|
342
342
|
// pollset_set implementation
|
343
343
|
|
344
344
|
grpc_pollset_set* pollset_set_create(void) { return nullptr; }
|
345
|
-
void pollset_set_destroy(grpc_pollset_set* pollset_set) {}
|
346
|
-
void pollset_set_add_pollset(grpc_pollset_set* pollset_set
|
347
|
-
grpc_pollset* pollset) {}
|
348
|
-
void pollset_set_del_pollset(grpc_pollset_set* pollset_set
|
349
|
-
grpc_pollset* pollset) {}
|
350
|
-
void pollset_set_add_pollset_set(grpc_pollset_set* bag
|
351
|
-
grpc_pollset_set* item) {}
|
352
|
-
void pollset_set_del_pollset_set(grpc_pollset_set* bag
|
353
|
-
grpc_pollset_set* item) {}
|
345
|
+
void pollset_set_destroy(grpc_pollset_set* /*pollset_set*/) {}
|
346
|
+
void pollset_set_add_pollset(grpc_pollset_set* /*pollset_set*/,
|
347
|
+
grpc_pollset* /*pollset*/) {}
|
348
|
+
void pollset_set_del_pollset(grpc_pollset_set* /*pollset_set*/,
|
349
|
+
grpc_pollset* /*pollset*/) {}
|
350
|
+
void pollset_set_add_pollset_set(grpc_pollset_set* /*bag*/,
|
351
|
+
grpc_pollset_set* /*item*/) {}
|
352
|
+
void pollset_set_del_pollset_set(grpc_pollset_set* /*bag*/,
|
353
|
+
grpc_pollset_set* /*item*/) {}
|
354
354
|
|
355
355
|
grpc_pollset_set_vtable grpc_apple_pollset_set_vtable = {
|
356
356
|
pollset_set_create, pollset_set_destroy,
|
@@ -61,6 +61,7 @@
|
|
61
61
|
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
|
62
62
|
|
63
63
|
static grpc_wakeup_fd global_wakeup_fd;
|
64
|
+
static bool g_is_shutdown = true;
|
64
65
|
|
65
66
|
//******************************************************************************
|
66
67
|
// Singleton epoll set related fields
|
@@ -1239,6 +1240,7 @@ static void shutdown_engine(void) {
|
|
1239
1240
|
gpr_mu_destroy(&fork_fd_list_mu);
|
1240
1241
|
grpc_core::Fork::SetResetChildPollingEngineFunc(nullptr);
|
1241
1242
|
}
|
1243
|
+
g_is_shutdown = true;
|
1242
1244
|
}
|
1243
1245
|
|
1244
1246
|
static bool init_epoll1_linux();
|
@@ -1278,10 +1280,13 @@ const grpc_event_engine_vtable grpc_ev_epoll1_posix = {
|
|
1278
1280
|
|
1279
1281
|
is_any_background_poller_thread,
|
1280
1282
|
/* name = */ "epoll1",
|
1281
|
-
/* check_engine_available = */
|
1282
|
-
|
1283
|
+
/* check_engine_available = */
|
1284
|
+
[](bool) { return init_epoll1_linux(); },
|
1285
|
+
/* init_engine = */
|
1286
|
+
[]() { GPR_ASSERT(init_epoll1_linux()); },
|
1283
1287
|
shutdown_background_closure,
|
1284
|
-
/* shutdown_engine = */
|
1288
|
+
/* shutdown_engine = */
|
1289
|
+
[]() { shutdown_engine(); },
|
1285
1290
|
add_closure_to_background_poller,
|
1286
1291
|
|
1287
1292
|
fd_set_pre_allocated,
|
@@ -1306,6 +1311,7 @@ static void reset_event_manager_on_fork() {
|
|
1306
1311
|
// Create epoll_fd (epoll_set_init() takes care of that) to make sure epoll
|
1307
1312
|
// support is available
|
1308
1313
|
static bool init_epoll1_linux() {
|
1314
|
+
if (!g_is_shutdown) return true;
|
1309
1315
|
if (!grpc_has_wakeup_fd()) {
|
1310
1316
|
gpr_log(GPR_ERROR, "Skipping epoll1 because of no wakeup fd.");
|
1311
1317
|
return false;
|
@@ -1328,6 +1334,7 @@ static bool init_epoll1_linux() {
|
|
1328
1334
|
grpc_core::Fork::SetResetChildPollingEngineFunc(
|
1329
1335
|
reset_event_manager_on_fork);
|
1330
1336
|
}
|
1337
|
+
g_is_shutdown = false;
|
1331
1338
|
return true;
|
1332
1339
|
}
|
1333
1340
|
|
@@ -256,6 +256,15 @@ class EventEngineEndpointWrapper {
|
|
256
256
|
}
|
257
257
|
}
|
258
258
|
|
259
|
+
bool CanTrackErrors() {
|
260
|
+
if (EventEngineSupportsFd()) {
|
261
|
+
return reinterpret_cast<PosixEndpointWithFdSupport*>(endpoint_.get())
|
262
|
+
->CanTrackErrors();
|
263
|
+
} else {
|
264
|
+
return false;
|
265
|
+
}
|
266
|
+
}
|
267
|
+
|
259
268
|
private:
|
260
269
|
void OnShutdownInternal() {
|
261
270
|
{
|
@@ -378,7 +387,12 @@ int EndpointGetFd(grpc_endpoint* ep) {
|
|
378
387
|
return eeep->wrapper->Fd();
|
379
388
|
}
|
380
389
|
|
381
|
-
bool EndpointCanTrackErr(grpc_endpoint*
|
390
|
+
bool EndpointCanTrackErr(grpc_endpoint* ep) {
|
391
|
+
auto* eeep =
|
392
|
+
reinterpret_cast<EventEngineEndpointWrapper::grpc_event_engine_endpoint*>(
|
393
|
+
ep);
|
394
|
+
return eeep->wrapper->CanTrackErrors();
|
395
|
+
}
|
382
396
|
|
383
397
|
grpc_endpoint_vtable grpc_event_engine_endpoint_vtable = {
|
384
398
|
EndpointRead,
|