From 2adc96b9c2bf648fb8e22918902b43fbb723c195 Mon Sep 17 00:00:00 2001 From: Alisha Nanda Date: Thu, 11 May 2023 17:17:52 -0700 Subject: [PATCH] [Misc] Add necessary things for privacy (#33078) --- src/core/lib/experiments/experiments.cc | 7 ++++ src/core/lib/experiments/experiments.h | 11 +++++- src/core/lib/experiments/experiments.yaml | 44 +++++++++++++++++------ 3 files changed, 51 insertions(+), 11 deletions(-) diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index ce9360977b1..43e60e719f3 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -62,6 +62,10 @@ const char* const description_event_engine_dns = "If set, use EventEngine DNSResolver for client channel resolution"; const char* const description_work_stealing = "If set, use a work stealing thread pool implementation in EventEngine"; +const char* const description_client_privacy = "If set, client privacy"; +const char* const description_canary_client_privacy = + "If set, canary client privacy"; +const char* const description_server_privacy = "If set, server privacy"; } // namespace namespace grpc_core { @@ -91,6 +95,9 @@ const ExperimentMetadata g_experiment_metadata[] = { {"trace_record_callops", description_trace_record_callops, false, true}, {"event_engine_dns", description_event_engine_dns, false, false}, {"work_stealing", description_work_stealing, false, false}, + {"client_privacy", description_client_privacy, false, false}, + {"canary_client_privacy", description_canary_client_privacy, false, false}, + {"server_privacy", description_server_privacy, false, false}, }; } // namespace grpc_core diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index 09787ac1ffc..f500e60adad 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -76,6 +76,9 @@ inline bool IsScheduleCancellationOverWriteEnabled() { return false; } inline bool IsTraceRecordCallopsEnabled() { return false; } inline bool IsEventEngineDnsEnabled() { return false; } inline bool IsWorkStealingEnabled() { return false; } +inline bool IsClientPrivacyEnabled() { return false; } +inline bool IsCanaryClientPrivacyEnabled() { return false; } +inline bool IsServerPrivacyEnabled() { return false; } #else #define GRPC_EXPERIMENT_IS_INCLUDED_TCP_FRAME_SIZE_TUNING inline bool IsTcpFrameSizeTuningEnabled() { return IsExperimentEnabled(0); } @@ -121,8 +124,14 @@ inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(14); } inline bool IsEventEngineDnsEnabled() { return IsExperimentEnabled(15); } #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_STEALING inline bool IsWorkStealingEnabled() { return IsExperimentEnabled(16); } +#define GRPC_EXPERIMENT_IS_INCLUDED_CLIENT_PRIVACY +inline bool IsClientPrivacyEnabled() { return IsExperimentEnabled(17); } +#define GRPC_EXPERIMENT_IS_INCLUDED_CANARY_CLIENT_PRIVACY +inline bool IsCanaryClientPrivacyEnabled() { return IsExperimentEnabled(18); } +#define GRPC_EXPERIMENT_IS_INCLUDED_SERVER_PRIVACY +inline bool IsServerPrivacyEnabled() { return IsExperimentEnabled(19); } -constexpr const size_t kNumExperiments = 17; +constexpr const size_t kNumExperiments = 20; extern const ExperimentMetadata g_experiment_metadata[kNumExperiments]; #endif diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index fab9ed7fc65..70dd6834d91 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -46,13 +46,13 @@ number of bytes have been read over the socket. Buffers are also allocated according to estimated RPC sizes. default: false - expiry: 2023/03/01 + expiry: 2023/06/01 owner: vigneshbabu@google.com test_tags: ["endpoint_test", "flow_control_test"] - name: tcp_rcv_lowat description: Use SO_RCVLOWAT to avoid wakeups on the read path. default: false - expiry: 2023/03/01 + expiry: 2023/06/01 owner: vigneshbabu@google.com test_tags: ["endpoint_test", "flow_control_test"] - name: peer_state_based_framing @@ -61,31 +61,31 @@ on the peer's memory pressure which is reflected in its max http2 frame size. default: false - expiry: 2023/03/01 + expiry: 2023/06/01 owner: vigneshbabu@google.com test_tags: ["flow_control_test"] - name: flow_control_fixes description: Various fixes for flow control, max frame size setting. default: true - expiry: 2023/04/01 + expiry: 2023/06/01 owner: ctiller@google.com test_tags: ["flow_control_test"] - name: memory_pressure_controller description: New memory pressure controller default: false - expiry: 2023/03/01 + expiry: 2023/06/01 owner: ctiller@google.com test_tags: [resource_quota_test] - name: unconstrained_max_quota_buffer_size description: Discard the cap on the max free pool size for one memory allocator default: false - expiry: 2023/03/01 + expiry: 2023/06/01 owner: ctiller@google.com test_tags: [resource_quota_test] - name: event_engine_client description: Use EventEngine clients instead of iomgr's grpc_tcp_client default: false - expiry: 2023/04/13 + expiry: 2023/06/13 owner: hork@google.com test_tags: ["core_end2end_test", "event_engine_client_test"] - name: monitoring_experiment @@ -99,13 +99,13 @@ If set, use the new gRPC promise based call code when it's appropriate (ie when all filters in a stack are promise based) default: false - expiry: 2023/03/01 + expiry: 2023/06/01 owner: ctiller@google.com test_tags: ["core_end2end_test", "lame_client_test"] - name: free_large_allocator description: If set, return all free bytes from a "big" allocator default: false - expiry: 2023/04/01 + expiry: 2023/11/01 owner: alishananda@google.com test_tags: [resource_quota_test] - name: promise_based_server_call @@ -126,7 +126,7 @@ - name: event_engine_listener description: Use EventEngine listeners instead of iomgr's grpc_tcp_server default: false - expiry: 2023/05/13 + expiry: 2023/06/13 owner: vigneshbabu@google.com test_tags: ["event_engine_listener_test"] - name: schedule_cancellation_over_write @@ -157,3 +157,27 @@ owner: hork@google.com test_tags: [] allow_in_fuzzing_config: false +- name: client_privacy + description: + If set, client privacy + default: false + expiry: 2023/11/01 + owner: alishananda@google.com + test_tags: [] + allow_in_fuzzing_config: false +- name: canary_client_privacy + description: + If set, canary client privacy + default: false + expiry: 2023/11/01 + owner: alishananda@google.com + test_tags: [] + allow_in_fuzzing_config: false +- name: server_privacy + description: + If set, server privacy + default: false + expiry: 2023/11/01 + owner: alishananda@google.com + test_tags: [] + allow_in_fuzzing_config: false