aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-10 22:13:40 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-10 22:13:40 -0700
commit0a64225aab8b8b66890839cd04655ca96f86d59a (patch)
treedfa2b18bd1bebf4273098b71b2bfcba43aea7e88 /src/core
parent131a25bc2d71b9c05138454db2281c2b968f159d (diff)
parentf78728a79a513332f0035cc12865eb5967d9537e (diff)
Merge branch 'chttp2_timer' into timer
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/census/base_resources.h2
-rw-r--r--src/core/ext/census/census_interface.h2
-rw-r--r--src/core/ext/census/census_log.h2
-rw-r--r--src/core/ext/census/hash_table.h2
-rw-r--r--src/core/ext/census/mlog.h2
-rw-r--r--src/core/ext/census/resource.h2
-rw-r--r--src/core/ext/census/trace_context.h2
-rw-r--r--src/core/ext/census/trace_propagation.h2
-rw-r--r--src/core/ext/census/tracing.h2
-rw-r--r--src/core/ext/census/window_stats.h2
-rw-r--r--src/core/ext/filters/client_channel/client_channel.h2
-rw-r--r--src/core/ext/filters/client_channel/client_channel_factory.h2
-rw-r--r--src/core/ext/filters/client_channel/connector.h2
-rw-r--r--src/core/ext/filters/client_channel/http_connect_handshaker.h2
-rw-r--r--src/core/ext/filters/client_channel/http_proxy.h2
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h2
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_factory.h2
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_registry.h2
-rw-r--r--src/core/ext/filters/client_channel/parse_address.h2
-rw-r--r--src/core/ext/filters/client_channel/proxy_mapper.h2
-rw-r--r--src/core/ext/filters/client_channel/proxy_mapper_registry.h2
-rw-r--r--src/core/ext/filters/client_channel/resolver_factory.h2
-rw-r--r--src/core/ext/filters/client_channel/resolver_registry.h2
-rw-r--r--src/core/ext/filters/client_channel/retry_throttle.h2
-rw-r--r--src/core/ext/filters/client_channel/subchannel_index.h2
-rw-r--r--src/core/ext/filters/client_channel/uri_parser.h2
-rw-r--r--src/core/ext/filters/deadline/deadline_filter.h2
-rw-r--r--src/core/ext/filters/workarounds/workaround_utils.h2
-rw-r--r--src/core/ext/transport/chttp2/alpn/alpn.h2
-rw-r--r--src/core/ext/transport/chttp2/server/chttp2_server.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/bin_decoder.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/bin_encoder.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_data.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_goaway.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_ping.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_rst_stream.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_settings.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_window_update.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_parser.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/http2_settings.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/incoming_metadata.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/internal.h4
-rw-r--r--src/core/ext/transport/chttp2/transport/stream_map.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.cc686
-rw-r--r--src/core/lib/channel/channel_args.h2
-rw-r--r--src/core/lib/channel/connected_channel.h2
-rw-r--r--src/core/lib/channel/handshaker.h2
-rw-r--r--src/core/lib/channel/handshaker_factory.h2
-rw-r--r--src/core/lib/channel/handshaker_registry.h2
-rw-r--r--src/core/lib/compression/algorithm_metadata.h2
-rw-r--r--src/core/lib/compression/message_compress.h2
-rw-r--r--src/core/lib/http/format_request.h2
-rw-r--r--src/core/lib/http/httpcli.h2
-rw-r--r--src/core/lib/http/parser.h2
-rw-r--r--src/core/lib/iomgr/endpoint.h2
-rw-r--r--src/core/lib/iomgr/endpoint_pair.h2
-rw-r--r--src/core/lib/iomgr/error_internal.h2
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.h2
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.h2
-rw-r--r--src/core/lib/iomgr/ev_epollsig_linux.cc2
-rw-r--r--src/core/lib/iomgr/ev_poll_posix.h2
-rw-r--r--src/core/lib/iomgr/ev_posix.h2
-rw-r--r--src/core/lib/iomgr/executor.h2
-rw-r--r--src/core/lib/iomgr/iocp_windows.cc9
-rw-r--r--src/core/lib/iomgr/iocp_windows.h2
-rw-r--r--src/core/lib/iomgr/iomgr.h2
-rw-r--r--src/core/lib/iomgr/iomgr_internal.h2
-rw-r--r--src/core/lib/iomgr/is_epollexclusive_available.h2
-rw-r--r--src/core/lib/iomgr/lockfree_event.h2
-rw-r--r--src/core/lib/iomgr/network_status_tracker.h2
-rw-r--r--src/core/lib/iomgr/polling_entity.h2
-rw-r--r--src/core/lib/iomgr/pollset_set.h2
-rw-r--r--src/core/lib/iomgr/pollset_uv.h2
-rw-r--r--src/core/lib/iomgr/pollset_windows.h2
-rw-r--r--src/core/lib/iomgr/resolve_address.h2
-rw-r--r--src/core/lib/iomgr/resource_quota.h2
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.h2
-rw-r--r--src/core/lib/iomgr/socket_utils.h2
-rw-r--r--src/core/lib/iomgr/socket_utils_posix.h2
-rw-r--r--src/core/lib/iomgr/socket_windows.h2
-rw-r--r--src/core/lib/iomgr/tcp_client.h2
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.h2
-rw-r--r--src/core/lib/iomgr/tcp_posix.h2
-rw-r--r--src/core/lib/iomgr/tcp_server.h2
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix.h2
-rw-r--r--src/core/lib/iomgr/tcp_uv.h2
-rw-r--r--src/core/lib/iomgr/time_averaged_stats.h2
-rw-r--r--src/core/lib/iomgr/timer_heap.h2
-rw-r--r--src/core/lib/iomgr/timer_manager.h2
-rw-r--r--src/core/lib/iomgr/udp_server.h2
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix.h2
-rw-r--r--src/core/lib/json/json.h2
-rw-r--r--src/core/lib/json/json_reader.h2
-rw-r--r--src/core/lib/json/json_writer.h2
-rw-r--r--src/core/lib/security/credentials/fake/fake_credentials.h2
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_credentials.h2
-rw-r--r--src/core/lib/security/credentials/oauth2/oauth2_credentials.h2
-rw-r--r--src/core/lib/security/transport/lb_targets_info.h2
-rw-r--r--src/core/lib/security/transport/secure_endpoint.h2
-rw-r--r--src/core/lib/security/transport/security_handshaker.h2
-rw-r--r--src/core/lib/security/transport/tsi_error.h2
-rw-r--r--src/core/lib/security/util/json_util.h2
-rw-r--r--src/core/lib/slice/b64.h2
-rw-r--r--src/core/lib/slice/percent_encoding.h2
-rw-r--r--src/core/lib/slice/slice_hash_table.h2
-rw-r--r--src/core/lib/slice/slice_internal.h2
-rw-r--r--src/core/lib/slice/slice_traits.h2
-rw-r--r--src/core/lib/support/env_windows.cc5
-rw-r--r--src/core/lib/surface/channel_stack_type.h2
-rw-r--r--src/core/lib/surface/completion_queue_factory.h2
-rw-r--r--src/core/lib/surface/event_string.h2
-rw-r--r--src/core/lib/surface/init.h2
-rw-r--r--src/core/lib/surface/server.h2
-rw-r--r--src/core/lib/surface/validate_metadata.h2
-rw-r--r--src/core/lib/transport/byte_stream.h2
-rw-r--r--src/core/lib/transport/connectivity_state.h2
-rw-r--r--src/core/lib/transport/error_utils.h2
-rw-r--r--src/core/lib/transport/pid_controller.h2
-rw-r--r--src/core/lib/transport/service_config.h2
-rw-r--r--src/core/lib/transport/status_conversion.h2
-rw-r--r--src/core/lib/transport/timeout_encoding.h2
-rw-r--r--src/core/lib/transport/transport_impl.h2
-rw-r--r--src/core/tsi/gts_transport_security.h2
124 files changed, 531 insertions, 413 deletions
diff --git a/src/core/ext/census/base_resources.h b/src/core/ext/census/base_resources.h
index 4b1b988e3f..d24923b597 100644
--- a/src/core/ext/census/base_resources.h
+++ b/src/core/ext/census/base_resources.h
@@ -29,4 +29,4 @@ void define_base_resources();
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H */
diff --git a/src/core/ext/census/census_interface.h b/src/core/ext/census/census_interface.h
index 12438e3c0a..113c2b16ef 100644
--- a/src/core/ext/census/census_interface.h
+++ b/src/core/ext/census/census_interface.h
@@ -66,4 +66,4 @@ void census_tracing_end_op(census_op_id op_id);
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_INTERFACE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_INTERFACE_H */
diff --git a/src/core/ext/census/census_log.h b/src/core/ext/census/census_log.h
index cc9e008907..ee336ae733 100644
--- a/src/core/ext/census/census_log.h
+++ b/src/core/ext/census/census_log.h
@@ -81,4 +81,4 @@ int census_log_out_of_space_count(void);
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_LOG_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_LOG_H */
diff --git a/src/core/ext/census/hash_table.h b/src/core/ext/census/hash_table.h
index c22ba8df9d..c3ed94ea14 100644
--- a/src/core/ext/census/hash_table.h
+++ b/src/core/ext/census/hash_table.h
@@ -121,4 +121,4 @@ uint64_t census_ht_for_all(const census_ht *ht, census_ht_itr_cb);
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_HASH_TABLE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_HASH_TABLE_H */
diff --git a/src/core/ext/census/mlog.h b/src/core/ext/census/mlog.h
index 7b4d39272b..8f74ba231d 100644
--- a/src/core/ext/census/mlog.h
+++ b/src/core/ext/census/mlog.h
@@ -85,4 +85,4 @@ int64_t census_log_out_of_space_count(void);
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_MLOG_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_MLOG_H */
diff --git a/src/core/ext/census/resource.h b/src/core/ext/census/resource.h
index 5f7ac2ad27..56aaaaf750 100644
--- a/src/core/ext/census/resource.h
+++ b/src/core/ext/census/resource.h
@@ -53,4 +53,4 @@ int32_t define_resource(const resource *base);
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_RESOURCE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_RESOURCE_H */
diff --git a/src/core/ext/census/trace_context.h b/src/core/ext/census/trace_context.h
index c707c63263..2b828ba4da 100644
--- a/src/core/ext/census/trace_context.h
+++ b/src/core/ext/census/trace_context.h
@@ -61,4 +61,4 @@ bool decode_trace_context(google_trace_TraceContext *ctxt, uint8_t *buffer,
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_TRACE_CONTEXT_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_TRACE_CONTEXT_H */
diff --git a/src/core/ext/census/trace_propagation.h b/src/core/ext/census/trace_propagation.h
index 3394e9e0fd..e05fd23a1f 100644
--- a/src/core/ext/census/trace_propagation.h
+++ b/src/core/ext/census/trace_propagation.h
@@ -53,4 +53,4 @@ size_t http_format_to_trace_span_context(const char *buf, size_t buf_size,
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_TRACE_PROPAGATION_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_TRACE_PROPAGATION_H */
diff --git a/src/core/ext/census/tracing.h b/src/core/ext/census/tracing.h
index 5fcbb1e1f7..0690de8655 100644
--- a/src/core/ext/census/tracing.h
+++ b/src/core/ext/census/tracing.h
@@ -114,4 +114,4 @@ void trace_end_span(const trace_status *status, trace_span_context *span_ctxt);
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_TRACING_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_TRACING_H */
diff --git a/src/core/ext/census/window_stats.h b/src/core/ext/census/window_stats.h
index 3b1d197f76..2a1d6d0d16 100644
--- a/src/core/ext/census/window_stats.h
+++ b/src/core/ext/census/window_stats.h
@@ -163,4 +163,4 @@ void census_window_stats_destroy(struct census_window_stats *wstats);
}
#endif
-#endif /* GRPC_CORE_EXT_CENSUS_WINDOW_STATS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_CENSUS_WINDOW_STATS_H */
diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h
index b32f378c6c..152fe2365a 100644
--- a/src/core/ext/filters/client_channel/client_channel.h
+++ b/src/core/ext/filters/client_channel/client_channel.h
@@ -60,4 +60,4 @@ grpc_subchannel_call *grpc_client_channel_get_subchannel_call(
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */
diff --git a/src/core/ext/filters/client_channel/client_channel_factory.h b/src/core/ext/filters/client_channel/client_channel_factory.h
index bad8b97042..4273c90058 100644
--- a/src/core/ext/filters/client_channel/client_channel_factory.h
+++ b/src/core/ext/filters/client_channel/client_channel_factory.h
@@ -82,4 +82,4 @@ grpc_arg grpc_client_channel_factory_create_channel_arg(
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */
diff --git a/src/core/ext/filters/client_channel/connector.h b/src/core/ext/filters/client_channel/connector.h
index b91c93e446..b71e0aab00 100644
--- a/src/core/ext/filters/client_channel/connector.h
+++ b/src/core/ext/filters/client_channel/connector.h
@@ -78,4 +78,4 @@ void grpc_connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *connector,
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H */
diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.h b/src/core/ext/filters/client_channel/http_connect_handshaker.h
index 5042c61bec..05a23cdba3 100644
--- a/src/core/ext/filters/client_channel/http_connect_handshaker.h
+++ b/src/core/ext/filters/client_channel/http_connect_handshaker.h
@@ -39,4 +39,4 @@ void grpc_http_connect_register_handshaker_factory();
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */
diff --git a/src/core/ext/filters/client_channel/http_proxy.h b/src/core/ext/filters/client_channel/http_proxy.h
index 65d52334af..bdad03def3 100644
--- a/src/core/ext/filters/client_channel/http_proxy.h
+++ b/src/core/ext/filters/client_channel/http_proxy.h
@@ -29,4 +29,4 @@ void grpc_register_http_proxy_mapper();
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H */
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
index c67df609fc..15c8a680b7 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
@@ -34,4 +34,4 @@ grpc_lb_policy_factory *grpc_glb_lb_factory_create();
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */
diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h
index 69bcba4232..8790ffdda3 100644
--- a/src/core/ext/filters/client_channel/lb_policy_factory.h
+++ b/src/core/ext/filters/client_channel/lb_policy_factory.h
@@ -138,4 +138,4 @@ grpc_lb_policy *grpc_lb_policy_factory_create_lb_policy(
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */
diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.h b/src/core/ext/filters/client_channel/lb_policy_registry.h
index 0867844c37..55154cb02a 100644
--- a/src/core/ext/filters/client_channel/lb_policy_registry.h
+++ b/src/core/ext/filters/client_channel/lb_policy_registry.h
@@ -45,4 +45,4 @@ grpc_lb_policy *grpc_lb_policy_create(grpc_exec_ctx *exec_ctx, const char *name,
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */
diff --git a/src/core/ext/filters/client_channel/parse_address.h b/src/core/ext/filters/client_channel/parse_address.h
index 742df380b7..27d06a1cb3 100644
--- a/src/core/ext/filters/client_channel/parse_address.h
+++ b/src/core/ext/filters/client_channel/parse_address.h
@@ -53,4 +53,4 @@ bool grpc_parse_ipv6_hostport(const char *hostport, grpc_resolved_address *addr,
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */
diff --git a/src/core/ext/filters/client_channel/proxy_mapper.h b/src/core/ext/filters/client_channel/proxy_mapper.h
index 1325a9f1f6..bb8259f854 100644
--- a/src/core/ext/filters/client_channel/proxy_mapper.h
+++ b/src/core/ext/filters/client_channel/proxy_mapper.h
@@ -79,4 +79,4 @@ void grpc_proxy_mapper_destroy(grpc_proxy_mapper* mapper);
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H */
diff --git a/src/core/ext/filters/client_channel/proxy_mapper_registry.h b/src/core/ext/filters/client_channel/proxy_mapper_registry.h
index 2d389f1c21..39c607cefc 100644
--- a/src/core/ext/filters/client_channel/proxy_mapper_registry.h
+++ b/src/core/ext/filters/client_channel/proxy_mapper_registry.h
@@ -49,4 +49,4 @@ bool grpc_proxy_mappers_map_address(grpc_exec_ctx* exec_ctx,
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */
diff --git a/src/core/ext/filters/client_channel/resolver_factory.h b/src/core/ext/filters/client_channel/resolver_factory.h
index 6e533e3248..c8b2c58db3 100644
--- a/src/core/ext/filters/client_channel/resolver_factory.h
+++ b/src/core/ext/filters/client_channel/resolver_factory.h
@@ -75,4 +75,4 @@ char *grpc_resolver_factory_get_default_authority(
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */
diff --git a/src/core/ext/filters/client_channel/resolver_registry.h b/src/core/ext/filters/client_channel/resolver_registry.h
index eb08d887b1..06d0b99a35 100644
--- a/src/core/ext/filters/client_channel/resolver_registry.h
+++ b/src/core/ext/filters/client_channel/resolver_registry.h
@@ -74,4 +74,4 @@ char *grpc_resolver_factory_add_default_prefix_if_needed(
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */
diff --git a/src/core/ext/filters/client_channel/retry_throttle.h b/src/core/ext/filters/client_channel/retry_throttle.h
index 3b849475b9..399383df78 100644
--- a/src/core/ext/filters/client_channel/retry_throttle.h
+++ b/src/core/ext/filters/client_channel/retry_throttle.h
@@ -55,4 +55,4 @@ grpc_server_retry_throttle_data* grpc_retry_throttle_map_get_data_for_server(
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H */
diff --git a/src/core/ext/filters/client_channel/subchannel_index.h b/src/core/ext/filters/client_channel/subchannel_index.h
index 09bac3592c..05c3878379 100644
--- a/src/core/ext/filters/client_channel/subchannel_index.h
+++ b/src/core/ext/filters/client_channel/subchannel_index.h
@@ -86,4 +86,4 @@ void grpc_subchannel_index_test_only_set_force_creation(bool force_creation);
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */
diff --git a/src/core/ext/filters/client_channel/uri_parser.h b/src/core/ext/filters/client_channel/uri_parser.h
index 43e8ae64e0..e78da5928b 100644
--- a/src/core/ext/filters/client_channel/uri_parser.h
+++ b/src/core/ext/filters/client_channel/uri_parser.h
@@ -55,4 +55,4 @@ void grpc_uri_destroy(grpc_uri *uri);
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */
diff --git a/src/core/ext/filters/deadline/deadline_filter.h b/src/core/ext/filters/deadline/deadline_filter.h
index 4a80535b14..e665dc53ee 100644
--- a/src/core/ext/filters/deadline/deadline_filter.h
+++ b/src/core/ext/filters/deadline/deadline_filter.h
@@ -98,4 +98,4 @@ extern const grpc_channel_filter grpc_server_deadline_filter;
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H */
diff --git a/src/core/ext/filters/workarounds/workaround_utils.h b/src/core/ext/filters/workarounds/workaround_utils.h
index afd5291333..3913cae6b2 100644
--- a/src/core/ext/filters/workarounds/workaround_utils.h
+++ b/src/core/ext/filters/workarounds/workaround_utils.h
@@ -42,4 +42,4 @@ void grpc_register_workaround(uint32_t id, user_agent_parser parser);
}
#endif
-#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H */
diff --git a/src/core/ext/transport/chttp2/alpn/alpn.h b/src/core/ext/transport/chttp2/alpn/alpn.h
index 5842204c20..99b928ea59 100644
--- a/src/core/ext/transport/chttp2/alpn/alpn.h
+++ b/src/core/ext/transport/chttp2/alpn/alpn.h
@@ -39,4 +39,4 @@ const char *grpc_chttp2_get_alpn_version_index(size_t i);
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H */
diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h
index e1df28ed11..2ac155160f 100644
--- a/src/core/ext/transport/chttp2/server/chttp2_server.h
+++ b/src/core/ext/transport/chttp2/server/chttp2_server.h
@@ -37,4 +37,4 @@ grpc_error *grpc_chttp2_server_add_port(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */
diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h
index f50e0a8ac4..1c0b2b7e97 100644
--- a/src/core/ext/transport/chttp2/transport/bin_decoder.h
+++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h
@@ -57,4 +57,4 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */
diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h
index ae8219c5ce..0be3633354 100644
--- a/src/core/ext/transport/chttp2/transport/bin_encoder.h
+++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h
@@ -44,4 +44,4 @@ grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(grpc_slice input);
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h
index 2df99ccf98..81ec5361a3 100644
--- a/src/core/ext/transport/chttp2/transport/frame_data.h
+++ b/src/core/ext/transport/chttp2/transport/frame_data.h
@@ -88,4 +88,4 @@ grpc_error *grpc_deframe_unprocessed_incoming_frames(
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h
index ce6f18b35c..7b3aa45f3f 100644
--- a/src/core/ext/transport/chttp2/transport/frame_goaway.h
+++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h
@@ -68,4 +68,4 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h
index 91f16f050f..ffc2f0cf2f 100644
--- a/src/core/ext/transport/chttp2/transport/frame_ping.h
+++ b/src/core/ext/transport/chttp2/transport/frame_ping.h
@@ -49,4 +49,4 @@ void grpc_set_disable_ping_ack(bool disable_ping_ack);
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
index bdca064a91..102ffdb3f3 100644
--- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
+++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
@@ -48,4 +48,4 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h
index f0793f0e73..3364da1520 100644
--- a/src/core/ext/transport/chttp2/transport/frame_settings.h
+++ b/src/core/ext/transport/chttp2/transport/frame_settings.h
@@ -66,4 +66,4 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h
index 29cf0cc740..400f9f5398 100644
--- a/src/core/ext/transport/chttp2/transport/frame_window_update.h
+++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h
@@ -47,4 +47,4 @@ grpc_error *grpc_chttp2_window_update_parser_parse(
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
index dc28b5566a..16316b63f7 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
@@ -99,4 +99,4 @@ void grpc_chttp2_encode_header(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h
index 6c36ebdf8d..52014175a0 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h
@@ -119,4 +119,4 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */
diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.h b/src/core/ext/transport/chttp2/transport/http2_settings.h
index 01e80b8d01..0f76106dce 100644
--- a/src/core/ext/transport/chttp2/transport/http2_settings.h
+++ b/src/core/ext/transport/chttp2/transport/http2_settings.h
@@ -64,4 +64,4 @@ extern const grpc_chttp2_setting_parameters
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H */
diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.h b/src/core/ext/transport/chttp2/transport/incoming_metadata.h
index 995e8001b1..a0e01f2c4d 100644
--- a/src/core/ext/transport/chttp2/transport/incoming_metadata.h
+++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.h
@@ -53,4 +53,4 @@ void grpc_chttp2_incoming_metadata_buffer_set_deadline(
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H */
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index b4eb033a47..739da497c1 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -663,8 +663,8 @@ bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport *t,
returns non-zero if there was a stream available */
bool grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport *t,
grpc_chttp2_stream **s);
-bool grpc_chttp2_list_remove_writable_stream(
- grpc_chttp2_transport *t, grpc_chttp2_stream *s) GRPC_MUST_USE_RESULT;
+bool grpc_chttp2_list_remove_writable_stream(grpc_chttp2_transport *t,
+ grpc_chttp2_stream *s);
bool grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport *t,
grpc_chttp2_stream *s);
diff --git a/src/core/ext/transport/chttp2/transport/stream_map.h b/src/core/ext/transport/chttp2/transport/stream_map.h
index 364d37c33a..7ab6a4f5ed 100644
--- a/src/core/ext/transport/chttp2/transport/stream_map.h
+++ b/src/core/ext/transport/chttp2/transport/stream_map.h
@@ -73,4 +73,4 @@ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map,
}
#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H */ \ No newline at end of file
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H */
diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc
index 4134890f3f..25c1a5ef05 100644
--- a/src/core/ext/transport/chttp2/transport/writing.cc
+++ b/src/core/ext/transport/chttp2/transport/writing.cc
@@ -174,343 +174,451 @@ static bool is_default_initial_metadata(grpc_metadata_batch *initial_metadata) {
return initial_metadata->list.default_count == initial_metadata->list.count;
}
-grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
- grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) {
- grpc_chttp2_stream *s;
-
- /* stats histogram counters: we increment these throughout this function,
- and at the end publish to the central stats histograms */
- int flow_control_writes = 0;
- int initial_metadata_writes = 0;
- int trailing_metadata_writes = 0;
- int message_writes = 0;
+namespace {
+class StreamWriteContext;
+
+class WriteContext {
+ public:
+ WriteContext(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) : t_(t) {
+ GRPC_STATS_INC_HTTP2_WRITES_BEGUN(exec_ctx);
+ GPR_TIMER_BEGIN("grpc_chttp2_begin_write", 0);
+ }
- GRPC_STATS_INC_HTTP2_WRITES_BEGUN(exec_ctx);
+ // TODO(ctiller): make this the destructor
+ void FlushStats(grpc_exec_ctx *exec_ctx) {
+ GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(
+ exec_ctx, initial_metadata_writes_);
+ GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(exec_ctx, message_writes_);
+ GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(
+ exec_ctx, trailing_metadata_writes_);
+ GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(exec_ctx, flow_control_writes_);
+ }
- GPR_TIMER_BEGIN("grpc_chttp2_begin_write", 0);
+ void FlushSettings(grpc_exec_ctx *exec_ctx) {
+ if (t_->dirtied_local_settings && !t_->sent_local_settings) {
+ grpc_slice_buffer_add(
+ &t_->outbuf, grpc_chttp2_settings_create(
+ t_->settings[GRPC_SENT_SETTINGS],
+ t_->settings[GRPC_LOCAL_SETTINGS],
+ t_->force_send_settings, GRPC_CHTTP2_NUM_SETTINGS));
+ t_->force_send_settings = false;
+ t_->dirtied_local_settings = false;
+ t_->sent_local_settings = true;
+ GRPC_STATS_INC_HTTP2_SETTINGS_WRITES(exec_ctx);
+ }
+ }
- if (t->dirtied_local_settings && !t->sent_local_settings) {
- grpc_slice_buffer_add(
- &t->outbuf,
- grpc_chttp2_settings_create(
- t->settings[GRPC_SENT_SETTINGS], t->settings[GRPC_LOCAL_SETTINGS],
- t->force_send_settings, GRPC_CHTTP2_NUM_SETTINGS));
- t->force_send_settings = 0;
- t->dirtied_local_settings = 0;
- t->sent_local_settings = 1;
- GRPC_STATS_INC_HTTP2_SETTINGS_WRITES(exec_ctx);
+ void FlushQueuedBuffers(grpc_exec_ctx *exec_ctx) {
+ /* simple writes are queued to qbuf, and flushed here */
+ grpc_slice_buffer_move_into(&t_->qbuf, &t_->outbuf);
+ GPR_ASSERT(t_->qbuf.count == 0);
}
- for (size_t i = 0; i < t->ping_ack_count; i++) {
- grpc_slice_buffer_add(&t->outbuf,
- grpc_chttp2_ping_create(1, t->ping_acks[i]));
+ void FlushWindowUpdates(grpc_exec_ctx *exec_ctx) {
+ uint32_t transport_announce =
+ grpc_chttp2_flowctl_maybe_send_transport_update(&t_->flow_control,
+ t_->outbuf.count > 0);
+ if (transport_announce) {
+ grpc_transport_one_way_stats throwaway_stats;
+ grpc_slice_buffer_add(
+ &t_->outbuf, grpc_chttp2_window_update_create(0, transport_announce,
+ &throwaway_stats));
+ ResetPingRecvClock();
+ }
}
- t->ping_ack_count = 0;
- /* simple writes are queued to qbuf, and flushed here */
- grpc_slice_buffer_move_into(&t->qbuf, &t->outbuf);
- GPR_ASSERT(t->qbuf.count == 0);
+ void FlushPingAcks() {
+ for (size_t i = 0; i < t_->ping_ack_count; i++) {
+ grpc_slice_buffer_add(&t_->outbuf,
+ grpc_chttp2_ping_create(true, t_->ping_acks[i]));
+ }
+ t_->ping_ack_count = 0;
+ }
- grpc_chttp2_hpack_compressor_set_max_table_size(
- &t->hpack_compressor,
- t->settings[GRPC_PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]);
+ void EnactHpackSettings(grpc_exec_ctx *exec_ctx) {
+ grpc_chttp2_hpack_compressor_set_max_table_size(
+ &t_->hpack_compressor,
+ t_->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]);
+ }
- if (t->flow_control.remote_window > 0) {
- while (grpc_chttp2_list_pop_stalled_by_transport(t, &s)) {
- if (!t->closed && grpc_chttp2_list_add_writable_stream(t, s)) {
- stream_ref_if_not_destroyed(&s->refcount->refs);
+ void UpdateStreamsNoLongerStalled() {
+ grpc_chttp2_stream *s;
+ while (grpc_chttp2_list_pop_stalled_by_transport(t_, &s)) {
+ if (!t_->closed && grpc_chttp2_list_add_writable_stream(t_, s)) {
+ if (!stream_ref_if_not_destroyed(&s->refcount->refs)) {
+ grpc_chttp2_list_remove_writable_stream(t_, s);
+ }
}
}
}
- grpc_chttp2_begin_write_result result = {false, false, false};
+ grpc_chttp2_stream *NextStream() {
+ if (t_->outbuf.length > target_write_size(t_)) {
+ result_.partial = true;
+ return nullptr;
+ }
- /* for each grpc_chttp2_stream that's become writable, frame it's data
- (according to available window sizes) and add to the output buffer */
- while (true) {
- if (t->outbuf.length > target_write_size(t)) {
- result.partial = true;
- break;
+ grpc_chttp2_stream *s;
+ if (!grpc_chttp2_list_pop_writable_stream(t_, &s)) {
+ return nullptr;
+ }
+
+ return s;
+ }
+
+ void ResetPingRecvClock() {
+ if (!t_->is_client) {
+ t_->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
+ t_->ping_recv_state.ping_strikes = 0;
+ }
+ }
+
+ void IncInitialMetadataWrites() { ++initial_metadata_writes_; }
+ void IncWindowUpdateWrites() { ++flow_control_writes_; }
+ void IncMessageWrites() { ++message_writes_; }
+ void IncTrailingMetadataWrites() { ++trailing_metadata_writes_; }
+
+ void NoteScheduledResults() { result_.early_results_scheduled = true; }
+
+ grpc_chttp2_transport *transport() const { return t_; }
+
+ grpc_chttp2_begin_write_result Result() {
+ result_.writing = t_->outbuf.count > 0;
+ return result_;
+ }
+
+ private:
+ grpc_chttp2_transport *const t_;
+
+ /* stats histogram counters: we increment these throughout this function,
+ and at the end publish to the central stats histograms */
+ int flow_control_writes_ = 0;
+ int initial_metadata_writes_ = 0;
+ int trailing_metadata_writes_ = 0;
+ int message_writes_ = 0;
+ grpc_chttp2_begin_write_result result_ = {false, false, false};
+};
+
+class DataSendContext {
+ public:
+ DataSendContext(WriteContext *write_context, grpc_chttp2_transport *t,
+ grpc_chttp2_stream *s)
+ : write_context_(write_context),
+ t_(t),
+ s_(s),
+ sending_bytes_before_(s_->sending_bytes) {}
+
+ uint32_t stream_remote_window() const {
+ return (uint32_t)GPR_MAX(
+ 0, s_->flow_control.remote_window_delta +
+ (int64_t)t_->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]);
+ }
+
+ uint32_t max_outgoing() const {
+ return (uint32_t)GPR_MIN(
+ t_->settings[GRPC_PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
+ GPR_MIN(stream_remote_window(), t_->flow_control.remote_window));
+ }
+
+ bool AnyOutgoing() const { return max_outgoing() != 0; }
+
+ void FlushCompressedBytes() {
+ uint32_t send_bytes =
+ (uint32_t)GPR_MIN(max_outgoing(), s_->compressed_data_buffer.length);
+ bool is_last_data_frame =
+ (send_bytes == s_->compressed_data_buffer.length &&
+ s_->flow_controlled_buffer.length == 0 &&
+ s_->fetching_send_message == NULL);
+ if (is_last_data_frame && s_->send_trailing_metadata != NULL &&
+ s_->stream_compression_ctx != NULL) {
+ if (!grpc_stream_compress(s_->stream_compression_ctx,
+ &s_->flow_controlled_buffer,
+ &s_->compressed_data_buffer, NULL, MAX_SIZE_T,
+ GRPC_STREAM_COMPRESSION_FLUSH_FINISH)) {
+ gpr_log(GPR_ERROR, "Stream compression failed.");
+ }
+ grpc_stream_compression_context_destroy(s_->stream_compression_ctx);
+ s_->stream_compression_ctx = NULL;
+ /* After finish, bytes in s->compressed_data_buffer may be
+ * more than max_outgoing. Start another round of the current
+ * while loop so that send_bytes and is_last_data_frame are
+ * recalculated. */
+ return;
+ }
+ is_last_frame_ = is_last_data_frame && s_->send_trailing_metadata != NULL &&
+ grpc_metadata_batch_is_empty(s_->send_trailing_metadata);
+ grpc_chttp2_encode_data(s_->id, &s_->compressed_data_buffer, send_bytes,
+ is_last_frame_, &s_->stats.outgoing, &t_->outbuf);
+ grpc_chttp2_flowctl_sent_data(&t_->flow_control, &s_->flow_control,
+ send_bytes);
+ if (s_->compressed_data_buffer.length == 0) {
+ s_->sending_bytes += s_->uncompressed_data_size;
}
+ }
- if (!grpc_chttp2_list_pop_writable_stream(t, &s)) {
- break;
+ void CompressMoreBytes() {
+ if (s_->stream_compression_ctx == NULL) {
+ s_->stream_compression_ctx =
+ grpc_stream_compression_context_create(s_->stream_compression_method);
+ }
+ s_->uncompressed_data_size = s_->flow_controlled_buffer.length;
+ if (!grpc_stream_compress(s_->stream_compression_ctx,
+ &s_->flow_controlled_buffer,
+ &s_->compressed_data_buffer, NULL, MAX_SIZE_T,
+ GRPC_STREAM_COMPRESSION_FLUSH_SYNC)) {
+ gpr_log(GPR_ERROR, "Stream compression failed.");
}
+ }
+
+ bool is_last_frame() const { return is_last_frame_; }
- bool sent_initial_metadata = s->sent_initial_metadata;
- bool now_writing = false;
+ void CallCallbacks(grpc_exec_ctx *exec_ctx) {
+ if (update_list(exec_ctx, t_, s_,
+ (int64_t)(s_->sending_bytes - sending_bytes_before_),
+ &s_->on_flow_controlled_cbs,
+ &s_->flow_controlled_bytes_flowed, GRPC_ERROR_NONE)) {
+ write_context_->NoteScheduledResults();
+ }
+ }
+ private:
+ WriteContext *write_context_;
+ grpc_chttp2_transport *t_;
+ grpc_chttp2_stream *s_;
+ const size_t sending_bytes_before_;
+ bool is_last_frame_ = false;
+};
+
+class StreamWriteContext {
+ public:
+ StreamWriteContext(WriteContext *write_context, grpc_chttp2_stream *s)
+ : write_context_(write_context), t_(write_context->transport()), s_(s) {
GRPC_CHTTP2_IF_TRACING(
- gpr_log(GPR_DEBUG, "W:%p %s[%d] im-(sent,send)=(%d,%d) announce=%d", t,
- t->is_client ? "CLIENT" : "SERVER", s->id,
- sent_initial_metadata, s->send_initial_metadata != NULL,
+ gpr_log(GPR_DEBUG, "W:%p %s[%d] im-(sent,send)=(%d,%d) announce=%d", t_,
+ t_->is_client ? "CLIENT" : "SERVER", s->id,
+ s->sent_initial_metadata, s->send_initial_metadata != NULL,
(int)(s->flow_control.local_window_delta -
s->flow_control.announced_window_delta)));
+ }
- grpc_mdelem *extra_headers_for_trailing_metadata[2];
- size_t num_extra_headers_for_trailing_metadata = 0;
-
+ void FlushInitialMetadata(grpc_exec_ctx *exec_ctx) {
/* send initial metadata if it's available */
- if (!sent_initial_metadata && s->send_initial_metadata != NULL) {
- // We skip this on the server side if there is no custom initial
- // metadata, there are no messages to send, and we are also sending
- // trailing metadata. This results in a Trailers-Only response,
- // which is required for retries, as per:
- // https://github.com/grpc/proposal/blob/master/A6-client-retries.md#when-retries-are-valid
- if (t->is_client || s->fetching_send_message != NULL ||
- s->flow_controlled_buffer.length != 0 ||
- s->send_trailing_metadata == NULL ||
- !is_default_initial_metadata(s->send_initial_metadata)) {
- grpc_encode_header_options hopt = {
- s->id, // stream_id
- false, // is_eof
- t->settings[GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA] !=
- 0, // use_true_binary_metadata
- t->settings[GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], // max_frame_size
- &s->stats.outgoing // stats
- };
- grpc_chttp2_encode_header(exec_ctx, &t->hpack_compressor, NULL, 0,
- s->send_initial_metadata, &hopt, &t->outbuf);
- now_writing = true;
- if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
- t->ping_recv_state.ping_strikes = 0;
- }
- initial_metadata_writes++;
- } else {
- GRPC_CHTTP2_IF_TRACING(
- gpr_log(GPR_INFO, "not sending initial_metadata (Trailers-Only)"));
- // When sending Trailers-Only, we need to move the :status and
- // content-type headers to the trailers.
- if (s->send_initial_metadata->idx.named.status != NULL) {
- extra_headers_for_trailing_metadata
- [num_extra_headers_for_trailing_metadata++] =
- &s->send_initial_metadata->idx.named.status->md;
- }
- if (s->send_initial_metadata->idx.named.content_type != NULL) {
- extra_headers_for_trailing_metadata
- [num_extra_headers_for_trailing_metadata++] =
- &s->send_initial_metadata->idx.named.content_type->md;
- }
- trailing_metadata_writes++;
- }
- s->send_initial_metadata = NULL;
- s->sent_initial_metadata = true;
- sent_initial_metadata = true;
- result.early_results_scheduled = true;
- grpc_chttp2_complete_closure_step(
- exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_NONE,
- "send_initial_metadata_finished");
+ if (s_->sent_initial_metadata) return;
+ if (s_->send_initial_metadata == nullptr) return;
+
+ // We skip this on the server side if there is no custom initial
+ // metadata, there are no messages to send, and we are also sending
+ // trailing metadata. This results in a Trailers-Only response,
+ // which is required for retries, as per:
+ // https://github.com/grpc/proposal/blob/master/A6-client-retries.md#when-retries-are-valid
+ if (!t_->is_client && s_->fetching_send_message == nullptr &&
+ s_->flow_controlled_buffer.length == 0 &&
+ s_->compressed_data_buffer.length == 0 &&
+ s_->send_trailing_metadata != nullptr &&
+ is_default_initial_metadata(s_->send_initial_metadata)) {
+ ConvertInitialMetadataToTrailingMetadata();
+ } else {
+ grpc_encode_header_options hopt = {
+ s_->id, // stream_id
+ false, // is_eof
+ t_->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA] !=
+ 0, // use_true_binary_metadata
+ t_->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], // max_frame_size
+ &s_->stats.outgoing // stats
+ };
+ grpc_chttp2_encode_header(exec_ctx, &t_->hpack_compressor, NULL, 0,
+ s_->send_initial_metadata, &hopt, &t_->outbuf);
+ write_context_->ResetPingRecvClock();
+ write_context_->IncInitialMetadataWrites();
}
+ s_->send_initial_metadata = NULL;
+ s_->sent_initial_metadata = true;
+ write_context_->NoteScheduledResults();
+ grpc_chttp2_complete_closure_step(
+ exec_ctx, t_, s_, &s_->send_initial_metadata_finished, GRPC_ERROR_NONE,
+ "send_initial_metadata_finished");
+ }
+
+ void FlushWindowUpdates(grpc_exec_ctx *exec_ctx) {
/* send any window updates */
uint32_t stream_announce = grpc_chttp2_flowctl_maybe_send_stream_update(
- &t->flow_control, &s->flow_control);
- if (stream_announce > 0) {
- grpc_slice_buffer_add(
- &t->outbuf, grpc_chttp2_window_update_create(s->id, stream_announce,
- &s->stats.outgoing));
- if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
- t->ping_recv_state.ping_strikes = 0;
+ &t_->flow_control, &s_->flow_control);
+ if (stream_announce == 0) return;
+
+ grpc_slice_buffer_add(
+ &t_->outbuf, grpc_chttp2_window_update_create(s_->id, stream_announce,
+ &s_->stats.outgoing));
+ write_context_->ResetPingRecvClock();
+ write_context_->IncWindowUpdateWrites();
+ }
+
+ void FlushData(grpc_exec_ctx *exec_ctx) {
+ if (!s_->sent_initial_metadata) return;
+
+ if (s_->flow_controlled_buffer.length == 0 &&
+ s_->compressed_data_buffer.length == 0) {
+ return; // early out: nothing to do
+ }
+
+ DataSendContext data_send_context(write_context_, t_, s_);
+
+ if (!data_send_context.AnyOutgoing()) {
+ if (t_->flow_control.remote_window == 0) {
+ report_stall(t_, s_, "transport");
+ grpc_chttp2_list_add_stalled_by_transport(t_, s_);
+ } else if (data_send_context.stream_remote_window() == 0) {
+ report_stall(t_, s_, "stream");
+ grpc_chttp2_list_add_stalled_by_stream(t_, s_);
}
- flow_control_writes++;
+ return; // early out: nothing to do
}
- if (sent_initial_metadata) {
- /* send any body bytes, if allowed by flow control */
- if (s->flow_controlled_buffer.length > 0 ||
- s->compressed_data_buffer.length > 0) {
- uint32_t stream_remote_window = (uint32_t)GPR_MAX(
- 0,
- s->flow_control.remote_window_delta +
- (int64_t)t->settings[GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]);
- uint32_t max_outgoing = (uint32_t)GPR_MIN(
- t->settings[GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
- GPR_MIN(stream_remote_window, t->flow_control.remote_window));
- if (max_outgoing > 0) {
- bool is_last_data_frame = false;
- bool is_last_frame = false;
- size_t sending_bytes_before = s->sending_bytes;
- while ((s->flow_controlled_buffer.length > 0 ||
- s->compressed_data_buffer.length > 0) &&
- max_outgoing > 0) {
- if (s->compressed_data_buffer.length > 0) {
- uint32_t send_bytes = (uint32_t)GPR_MIN(
- max_outgoing, s->compressed_data_buffer.length);
- is_last_data_frame =
- (send_bytes == s->compressed_data_buffer.length &&
- s->flow_controlled_buffer.length == 0 &&
- s->fetching_send_message == NULL);
- if (is_last_data_frame && s->send_trailing_metadata != NULL &&
- s->stream_compression_ctx != NULL) {
- if (!grpc_stream_compress(
- s->stream_compression_ctx, &s->flow_controlled_buffer,
- &s->compressed_data_buffer, NULL, MAX_SIZE_T,
- GRPC_STREAM_COMPRESSION_FLUSH_FINISH)) {
- gpr_log(GPR_ERROR, "Stream compression failed.");
- }
- grpc_stream_compression_context_destroy(
- s->stream_compression_ctx);
- s->stream_compression_ctx = NULL;
- /* After finish, bytes in s->compressed_data_buffer may be
- * more than max_outgoing. Start another round of the current
- * while loop so that send_bytes and is_last_data_frame are
- * recalculated. */
- continue;
- }
- is_last_frame =
- is_last_data_frame && s->send_trailing_metadata != NULL &&
- grpc_metadata_batch_is_empty(s->send_trailing_metadata);
- grpc_chttp2_encode_data(s->id, &s->compressed_data_buffer,
- send_bytes, is_last_frame,
- &s->stats.outgoing, &t->outbuf);
- grpc_chttp2_flowctl_sent_data(&t->flow_control, &s->flow_control,
- send_bytes);
- max_outgoing -= send_bytes;
- if (s->compressed_data_buffer.length == 0) {
- s->sending_bytes += s->uncompressed_data_size;
- }
- } else {
- if (s->stream_compression_ctx == NULL) {
- s->stream_compression_ctx =
- grpc_stream_compression_context_create(
- s->stream_compression_method);
- }
- s->uncompressed_data_size = s->flow_controlled_buffer.length;
- if (!grpc_stream_compress(
- s->stream_compression_ctx, &s->flow_controlled_buffer,
- &s->compressed_data_buffer, NULL, MAX_SIZE_T,
- GRPC_STREAM_COMPRESSION_FLUSH_SYNC)) {
- gpr_log(GPR_ERROR, "Stream compression failed.");
- }
- }
- }
- if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time = 0;
- t->ping_recv_state.ping_strikes = 0;
- }
- if (is_last_frame) {
- s->send_trailing_metadata = NULL;
- s->sent_trailing_metadata = true;
- if (!t->is_client && !s->read_closed) {
- grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create(
- s->id, GRPC_HTTP2_NO_ERROR,
- &s->stats.outgoing));
- }
- grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1,
- GRPC_ERROR_NONE);
- }
- result.early_results_scheduled |=
- update_list(exec_ctx, t, s,
- (int64_t)(s->sending_bytes - sending_bytes_before),
- &s->on_flow_controlled_cbs,
- &s->flow_controlled_bytes_flowed, GRPC_ERROR_NONE);
- now_writing = true;
- if (s->flow_controlled_buffer.length > 0 ||
- s->compressed_data_buffer.length > 0) {
- GRPC_CHTTP2_STREAM_REF(s, "chttp2_writing:fork");
- grpc_chttp2_list_add_writable_stream(t, s);
- }
- message_writes++;
- } else if (t->flow_control.remote_window == 0) {
- report_stall(t, s, "transport");
- grpc_chttp2_list_add_stalled_by_transport(t, s);
- now_writing = true;
- } else if (stream_remote_window == 0) {
- report_stall(t, s, "stream");
- grpc_chttp2_list_add_stalled_by_stream(t, s);
- now_writing = true;
- }
+
+ while ((s_->flow_controlled_buffer.length > 0 ||
+ s_->compressed_data_buffer.length > 0) &&
+ data_send_context.max_outgoing() > 0) {
+ if (s_->compressed_data_buffer.length > 0) {
+ data_send_context.FlushCompressedBytes();
+ } else {
+ data_send_context.CompressMoreBytes();
}
- if (s->send_trailing_metadata != NULL &&
- s->fetching_send_message == NULL &&
- s->flow_controlled_buffer.length == 0 &&
- s->compressed_data_buffer.length == 0) {
- GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_INFO, "sending trailing_metadata"));
- if (grpc_metadata_batch_is_empty(s->send_trailing_metadata)) {
- grpc_chttp2_encode_data(s->id, &s->flow_controlled_buffer, 0, true,
- &s->stats.outgoing, &t->outbuf);
- } else {
- grpc_encode_header_options hopt = {
- s->id, true,
-
- t->settings
- [GRPC_PEER_SETTINGS]
+ }
+ write_context_->ResetPingRecvClock();
+ if (data_send_context.is_last_frame()) {
+ SentLastFrame(exec_ctx);
+ }
+ data_send_context.CallCallbacks(exec_ctx);
+ stream_became_writable_ = true;
+ if (s_->flow_controlled_buffer.length > 0 ||
+ s_->compressed_data_buffer.length > 0) {
+ GRPC_CHTTP2_STREAM_REF(s_, "chttp2_writing:fork");
+ grpc_chttp2_list_add_writable_stream(t_, s_);
+ }
+ write_context_->IncMessageWrites();
+ }
+
+ void FlushTrailingMetadata(grpc_exec_ctx *exec_ctx) {
+ if (!s_->sent_initial_metadata) return;
+
+ if (s_->send_trailing_metadata == NULL) return;
+ if (s_->fetching_send_message != NULL) return;
+ if (s_->flow_controlled_buffer.length != 0) return;
+ if (s_->compressed_data_buffer.length != 0) return;
+
+ GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_INFO, "sending trailing_metadata"));
+ if (grpc_metadata_batch_is_empty(s_->send_trailing_metadata)) {
+ grpc_chttp2_encode_data(s_->id, &s_->flow_controlled_buffer, 0, true,
+ &s_->stats.outgoing, &t_->outbuf);
+ } else {
+ grpc_encode_header_options hopt = {
+ s_->id, true,
+ t_->settings[GRPC_PEER_SETTINGS]
[GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA] !=
- 0,
-
- t->settings[GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
- &s->stats.outgoing};
- grpc_chttp2_encode_header(exec_ctx, &t->hpack_compressor,
- extra_headers_for_trailing_metadata,
- num_extra_headers_for_trailing_metadata,
- s->send_trailing_metadata, &hopt,
- &t->outbuf);
- trailing_metadata_writes++;
- }
- s->send_trailing_metadata = NULL;
- s->sent_trailing_metadata = true;
- if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
- t->ping_recv_state.ping_strikes = 0;
- }
- if (!t->is_client && !s->read_closed) {
- grpc_slice_buffer_add(
- &t->outbuf, grpc_chttp2_rst_stream_create(
- s->id, GRPC_HTTP2_NO_ERROR, &s->stats.outgoing));
- }
- grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1,
- GRPC_ERROR_NONE);
- now_writing = true;
- result.early_results_scheduled = true;
- grpc_chttp2_complete_closure_step(
- exec_ctx, t, s, &s->send_trailing_metadata_finished,
- GRPC_ERROR_NONE, "send_trailing_metadata_finished");
- }
+ 0,
+
+ t_->settings[GRPC_PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
+ &s_->stats.outgoing};
+ grpc_chttp2_encode_header(exec_ctx, &t_->hpack_compressor,
+ extra_headers_for_trailing_metadata_,
+ num_extra_headers_for_trailing_metadata_,
+ s_->send_trailing_metadata, &hopt, &t_->outbuf);
+ }
+ write_context_->IncTrailingMetadataWrites();
+ write_context_->ResetPingRecvClock();
+ SentLastFrame(exec_ctx);
+
+ write_context_->NoteScheduledResults();
+ grpc_chttp2_complete_closure_step(
+ exec_ctx, t_, s_, &s_->send_trailing_metadata_finished, GRPC_ERROR_NONE,
+ "send_trailing_metadata_finished");
+ }
+
+ bool stream_became_writable() { return stream_became_writable_; }
+
+ private:
+ void ConvertInitialMetadataToTrailingMetadata() {
+ GRPC_CHTTP2_IF_TRACING(
+ gpr_log(GPR_INFO, "not sending initial_metadata (Trailers-Only)"));
+ // When sending Trailers-Only, we need to move the :status and
+ // content-type headers to the trailers.
+ if (s_->send_initial_metadata->idx.named.status != NULL) {
+ extra_headers_for_trailing_metadata_
+ [num_extra_headers_for_trailing_metadata_++] =
+ &s_->send_initial_metadata->idx.named.status->md;
}
+ if (s_->send_initial_metadata->idx.named.content_type != NULL) {
+ extra_headers_for_trailing_metadata_
+ [num_extra_headers_for_trailing_metadata_++] =
+ &s_->send_initial_metadata->idx.named.content_type->md;
+ }
+ }
+
+ void SentLastFrame(grpc_exec_ctx *exec_ctx) {
+ s_->send_trailing_metadata = NULL;
+ s_->sent_trailing_metadata = true;
+
+ if (!t_->is_client && !s_->read_closed) {
+ grpc_slice_buffer_add(
+ &t_->outbuf, grpc_chttp2_rst_stream_create(
+ s_->id, GRPC_HTTP2_NO_ERROR, &s_->stats.outgoing));
+ }
+ grpc_chttp2_mark_stream_closed(exec_ctx, t_, s_, !t_->is_client, true,
+ GRPC_ERROR_NONE);
+ }
- if (now_writing) {
- GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(
- exec_ctx, initial_metadata_writes);
- GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(exec_ctx, message_writes);
- GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(
- exec_ctx, trailing_metadata_writes);
- GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(exec_ctx,
- flow_control_writes);
+ WriteContext *const write_context_;
+ grpc_chttp2_transport *const t_;
+ grpc_chttp2_stream *const s_;
+ bool stream_became_writable_ = false;
+ grpc_mdelem *extra_headers_for_trailing_metadata_[2];
+ size_t num_extra_headers_for_trailing_metadata_ = 0;
+};
+} // namespace
+grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
+ grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) {
+ WriteContext ctx(exec_ctx, t);
+ ctx.FlushSettings(exec_ctx);
+ ctx.FlushPingAcks();
+ ctx.FlushQueuedBuffers(exec_ctx);
+ ctx.EnactHpackSettings(exec_ctx);
+
+ if (t->flow_control.remote_window > 0) {
+ ctx.UpdateStreamsNoLongerStalled();
+ }
+
+ /* for each grpc_chttp2_stream that's become writable, frame it's data
+ (according to available window sizes) and add to the output buffer */
+ while (grpc_chttp2_stream *s = ctx.NextStream()) {
+ StreamWriteContext stream_ctx(&ctx, s);
+ stream_ctx.FlushInitialMetadata(exec_ctx);
+ stream_ctx.FlushWindowUpdates(exec_ctx);
+ stream_ctx.FlushData(exec_ctx);
+ stream_ctx.FlushTrailingMetadata(exec_ctx);
+
+ if (stream_ctx.stream_became_writable()) {
if (!grpc_chttp2_list_add_writing_stream(t, s)) {
/* already in writing list: drop ref */
GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:already_writing");
+ } else {
+ /* ref will be dropped at end of write */
}
} else {
GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:no_write");
}
}
- maybe_initiate_ping(exec_ctx, t);
+ ctx.FlushWindowUpdates(exec_ctx);
- uint32_t transport_announce = grpc_chttp2_flowctl_maybe_send_transport_update(
- &t->flow_control, t->outbuf.count > 0);
- if (transport_announce) {
- grpc_transport_one_way_stats throwaway_stats;
- grpc_slice_buffer_add(
- &t->outbuf, grpc_chttp2_window_update_create(0, transport_announce,
- &throwaway_stats));
- if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
- t->ping_recv_state.ping_strikes = 0;
- }
- }
+ maybe_initiate_ping(exec_ctx, t);
GPR_TIMER_END("grpc_chttp2_begin_write", 0);
- result.writing = t->outbuf.count > 0;
- return result;
+ return ctx.Result();
}
void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h
index 2837174f49..1896d35cf4 100644
--- a/src/core/lib/channel/channel_args.h
+++ b/src/core/lib/channel/channel_args.h
@@ -157,4 +157,4 @@ grpc_arg grpc_channel_arg_pointer_create(char *name, void *value,
}
#endif
-#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H */
diff --git a/src/core/lib/channel/connected_channel.h b/src/core/lib/channel/connected_channel.h
index b55a1089a0..4615727baa 100644
--- a/src/core/lib/channel/connected_channel.h
+++ b/src/core/lib/channel/connected_channel.h
@@ -38,4 +38,4 @@ grpc_stream *grpc_connected_channel_get_stream(grpc_call_element *elem);
}
#endif
-#endif /* GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H */
diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h
index 51ee56af43..8ed38c15ba 100644
--- a/src/core/lib/channel/handshaker.h
+++ b/src/core/lib/channel/handshaker.h
@@ -172,4 +172,4 @@ void grpc_handshake_manager_pending_list_shutdown_all(
}
#endif
-#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H */
diff --git a/src/core/lib/channel/handshaker_factory.h b/src/core/lib/channel/handshaker_factory.h
index 2a130de252..59008adf05 100644
--- a/src/core/lib/channel/handshaker_factory.h
+++ b/src/core/lib/channel/handshaker_factory.h
@@ -56,4 +56,4 @@ void grpc_handshaker_factory_destroy(
}
#endif
-#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_FACTORY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_FACTORY_H */
diff --git a/src/core/lib/channel/handshaker_registry.h b/src/core/lib/channel/handshaker_registry.h
index e96bf06b6a..ddd280bea8 100644
--- a/src/core/lib/channel/handshaker_registry.h
+++ b/src/core/lib/channel/handshaker_registry.h
@@ -53,4 +53,4 @@ void grpc_handshakers_add(grpc_exec_ctx* exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_REGISTRY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_REGISTRY_H */
diff --git a/src/core/lib/compression/algorithm_metadata.h b/src/core/lib/compression/algorithm_metadata.h
index 3eb7088230..17caf58f69 100644
--- a/src/core/lib/compression/algorithm_metadata.h
+++ b/src/core/lib/compression/algorithm_metadata.h
@@ -57,4 +57,4 @@ grpc_stream_compression_algorithm grpc_stream_compression_algorithm_from_slice(
}
#endif
-#endif /* GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H */
diff --git a/src/core/lib/compression/message_compress.h b/src/core/lib/compression/message_compress.h
index d2545a02c2..fffe175fd2 100644
--- a/src/core/lib/compression/message_compress.h
+++ b/src/core/lib/compression/message_compress.h
@@ -44,4 +44,4 @@ int grpc_msg_decompress(grpc_exec_ctx* exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H */
diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h
index a559aac660..2e77e8661a 100644
--- a/src/core/lib/http/format_request.h
+++ b/src/core/lib/http/format_request.h
@@ -37,4 +37,4 @@ grpc_slice grpc_httpcli_format_connect_request(
}
#endif
-#endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */
diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h
index 3e6bdc0e46..76b790fa8a 100644
--- a/src/core/lib/http/httpcli.h
+++ b/src/core/lib/http/httpcli.h
@@ -131,4 +131,4 @@ void grpc_httpcli_set_override(grpc_httpcli_get_override get,
}
#endif
-#endif /* GRPC_CORE_LIB_HTTP_HTTPCLI_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_HTTP_HTTPCLI_H */
diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h
index 5484948bea..d2bda6ae0e 100644
--- a/src/core/lib/http/parser.h
+++ b/src/core/lib/http/parser.h
@@ -117,4 +117,4 @@ extern grpc_tracer_flag grpc_http1_trace;
}
#endif
-#endif /* GRPC_CORE_LIB_HTTP_PARSER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_HTTP_PARSER_H */
diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h
index 16ff0ab733..21347d9023 100644
--- a/src/core/lib/iomgr/endpoint.h
+++ b/src/core/lib/iomgr/endpoint.h
@@ -103,4 +103,4 @@ struct grpc_endpoint {
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_H */
diff --git a/src/core/lib/iomgr/endpoint_pair.h b/src/core/lib/iomgr/endpoint_pair.h
index f8830022f4..ee91795749 100644
--- a/src/core/lib/iomgr/endpoint_pair.h
+++ b/src/core/lib/iomgr/endpoint_pair.h
@@ -37,4 +37,4 @@ grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */
diff --git a/src/core/lib/iomgr/error_internal.h b/src/core/lib/iomgr/error_internal.h
index f718e06d4e..8746d5d353 100644
--- a/src/core/lib/iomgr/error_internal.h
+++ b/src/core/lib/iomgr/error_internal.h
@@ -65,4 +65,4 @@ bool grpc_error_is_special(grpc_error *err);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_ERROR_INTERNAL_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_ERROR_INTERNAL_H */
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.h b/src/core/lib/iomgr/ev_epoll1_linux.h
index 66fd826b49..b437032b36 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.h
+++ b/src/core/lib/iomgr/ev_epoll1_linux.h
@@ -34,4 +34,4 @@ const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL1_LINUX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL1_LINUX_H */
diff --git a/src/core/lib/iomgr/ev_epollex_linux.h b/src/core/lib/iomgr/ev_epollex_linux.h
index 58cc5a24f8..2849a23283 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.h
+++ b/src/core/lib/iomgr/ev_epollex_linux.h
@@ -33,4 +33,4 @@ const grpc_event_engine_vtable *grpc_init_epollex_linux(
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H */
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc
index 370ea1d50b..035bdc4cb5 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.cc
+++ b/src/core/lib/iomgr/ev_epollsig_linux.cc
@@ -18,6 +18,8 @@
#include "src/core/lib/iomgr/port.h"
+#include <grpc/grpc_posix.h>
+
/* This polling engine is only relevant on linux kernels supporting epoll() */
#ifdef GRPC_LINUX_EPOLL
diff --git a/src/core/lib/iomgr/ev_poll_posix.h b/src/core/lib/iomgr/ev_poll_posix.h
index 84b68155b5..861257204b 100644
--- a/src/core/lib/iomgr/ev_poll_posix.h
+++ b/src/core/lib/iomgr/ev_poll_posix.h
@@ -32,4 +32,4 @@ const grpc_event_engine_vtable *grpc_init_poll_cv_posix(bool explicit_request);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */
diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h
index 955326c5f7..bc4456c2a2 100644
--- a/src/core/lib/iomgr/ev_posix.h
+++ b/src/core/lib/iomgr/ev_posix.h
@@ -166,4 +166,4 @@ const grpc_event_engine_vtable *grpc_get_event_engine_test_only();
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_EV_POSIX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_EV_POSIX_H */
diff --git a/src/core/lib/iomgr/executor.h b/src/core/lib/iomgr/executor.h
index ab3fc901de..ef5ac56c83 100644
--- a/src/core/lib/iomgr/executor.h
+++ b/src/core/lib/iomgr/executor.h
@@ -53,4 +53,4 @@ void grpc_executor_set_threading(grpc_exec_ctx *exec_ctx, bool enable);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_EXECUTOR_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_EXECUTOR_H */
diff --git a/src/core/lib/iomgr/iocp_windows.cc b/src/core/lib/iomgr/iocp_windows.cc
index 336cc86c75..78185cc084 100644
--- a/src/core/lib/iomgr/iocp_windows.cc
+++ b/src/core/lib/iomgr/iocp_windows.cc
@@ -21,6 +21,7 @@
#ifdef GRPC_WINSOCK_SOCKET
#include <winsock2.h>
+#include <limits>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -43,11 +44,14 @@ static HANDLE g_iocp;
static DWORD deadline_to_millis_timeout(grpc_exec_ctx *exec_ctx,
grpc_millis deadline) {
- gpr_timespec timeout;
if (deadline == GRPC_MILLIS_INF_FUTURE) {
return INFINITE;
}
- return (DWORD)GPR_MAX(0, deadline - grpc_exec_ctx_now(exec_ctx));
+ grpc_millis now = grpc_exec_ctx_now(exec_ctx);
+ if (deadline < now) return 0;
+ grpc_millis timeout = deadline - now;
+ if (timeout > std::numeric_limits<DWORD>::max()) return INFINITE;
+ return static_cast<DWORD>(deadline - now);
}
grpc_iocp_work_status grpc_iocp_work(grpc_exec_ctx *exec_ctx,
@@ -63,6 +67,7 @@ grpc_iocp_work_status grpc_iocp_work(grpc_exec_ctx *exec_ctx,
success =
GetQueuedCompletionStatus(g_iocp, &bytes, &completion_key, &overlapped,
deadline_to_millis_timeout(exec_ctx, deadline));
+ grpc_exec_ctx_invalidate_now(exec_ctx);
if (success == 0 && overlapped == NULL) {
return GRPC_IOCP_WORK_TIMEOUT;
}
diff --git a/src/core/lib/iomgr/iocp_windows.h b/src/core/lib/iomgr/iocp_windows.h
index aefe7a294a..4efbc94645 100644
--- a/src/core/lib/iomgr/iocp_windows.h
+++ b/src/core/lib/iomgr/iocp_windows.h
@@ -45,4 +45,4 @@ void grpc_iocp_add_socket(grpc_winsocket *);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H */
diff --git a/src/core/lib/iomgr/iomgr.h b/src/core/lib/iomgr/iomgr.h
index fea08496fe..6c0a08b918 100644
--- a/src/core/lib/iomgr/iomgr.h
+++ b/src/core/lib/iomgr/iomgr.h
@@ -40,4 +40,4 @@ void grpc_iomgr_shutdown(grpc_exec_ctx *exec_ctx);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_H */
diff --git a/src/core/lib/iomgr/iomgr_internal.h b/src/core/lib/iomgr/iomgr_internal.h
index 005abbed13..52db37c89a 100644
--- a/src/core/lib/iomgr/iomgr_internal.h
+++ b/src/core/lib/iomgr/iomgr_internal.h
@@ -48,4 +48,4 @@ bool grpc_iomgr_abort_on_leaks(void);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H */
diff --git a/src/core/lib/iomgr/is_epollexclusive_available.h b/src/core/lib/iomgr/is_epollexclusive_available.h
index 5c3e483065..9ae9c5c191 100644
--- a/src/core/lib/iomgr/is_epollexclusive_available.h
+++ b/src/core/lib/iomgr/is_epollexclusive_available.h
@@ -31,4 +31,4 @@ bool grpc_is_epollexclusive_available(void);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_IS_EPOLLEXCLUSIVE_AVAILABLE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_IS_EPOLLEXCLUSIVE_AVAILABLE_H */
diff --git a/src/core/lib/iomgr/lockfree_event.h b/src/core/lib/iomgr/lockfree_event.h
index 925f004945..02229e569e 100644
--- a/src/core/lib/iomgr/lockfree_event.h
+++ b/src/core/lib/iomgr/lockfree_event.h
@@ -45,4 +45,4 @@ void grpc_lfev_set_ready(grpc_exec_ctx *exec_ctx, gpr_atm *state,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_LOCKFREE_EVENT_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_LOCKFREE_EVENT_H */
diff --git a/src/core/lib/iomgr/network_status_tracker.h b/src/core/lib/iomgr/network_status_tracker.h
index af50d51257..cba38d4530 100644
--- a/src/core/lib/iomgr/network_status_tracker.h
+++ b/src/core/lib/iomgr/network_status_tracker.h
@@ -35,4 +35,4 @@ void grpc_network_status_shutdown_all_endpoints();
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H */
diff --git a/src/core/lib/iomgr/polling_entity.h b/src/core/lib/iomgr/polling_entity.h
index 4a37acf212..009f968fac 100644
--- a/src/core/lib/iomgr/polling_entity.h
+++ b/src/core/lib/iomgr/polling_entity.h
@@ -72,4 +72,4 @@ void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H */
diff --git a/src/core/lib/iomgr/pollset_set.h b/src/core/lib/iomgr/pollset_set.h
index 17df86542d..5455eda02f 100644
--- a/src/core/lib/iomgr/pollset_set.h
+++ b/src/core/lib/iomgr/pollset_set.h
@@ -52,4 +52,4 @@ void grpc_pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_H */
diff --git a/src/core/lib/iomgr/pollset_uv.h b/src/core/lib/iomgr/pollset_uv.h
index d8f72ff867..5cc9faf4ff 100644
--- a/src/core/lib/iomgr/pollset_uv.h
+++ b/src/core/lib/iomgr/pollset_uv.h
@@ -32,4 +32,4 @@ void grpc_pollset_global_shutdown(void);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_UV_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_UV_H */
diff --git a/src/core/lib/iomgr/pollset_windows.h b/src/core/lib/iomgr/pollset_windows.h
index 7733d26471..2479b25286 100644
--- a/src/core/lib/iomgr/pollset_windows.h
+++ b/src/core/lib/iomgr/pollset_windows.h
@@ -68,4 +68,4 @@ void grpc_pollset_global_shutdown(void);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H */
diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h
index 4a6df2cf26..5f0634299e 100644
--- a/src/core/lib/iomgr/resolve_address.h
+++ b/src/core/lib/iomgr/resolve_address.h
@@ -60,4 +60,4 @@ extern grpc_error *(*grpc_blocking_resolve_address)(
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */
diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h
index 3afb525434..1d4249b7e2 100644
--- a/src/core/lib/iomgr/resource_quota.h
+++ b/src/core/lib/iomgr/resource_quota.h
@@ -158,4 +158,4 @@ grpc_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */
diff --git a/src/core/lib/iomgr/sockaddr_utils.h b/src/core/lib/iomgr/sockaddr_utils.h
index 129bb54fc9..1fd552febb 100644
--- a/src/core/lib/iomgr/sockaddr_utils.h
+++ b/src/core/lib/iomgr/sockaddr_utils.h
@@ -85,4 +85,4 @@ int grpc_sockaddr_get_family(const grpc_resolved_address *resolved_addr);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H */
diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h
index f319e931b6..d6c538ec6f 100644
--- a/src/core/lib/iomgr/socket_utils.h
+++ b/src/core/lib/iomgr/socket_utils.h
@@ -32,4 +32,4 @@ const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */
diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h
index 623b83f08b..73809b68d3 100644
--- a/src/core/lib/iomgr/socket_utils_posix.h
+++ b/src/core/lib/iomgr/socket_utils_posix.h
@@ -137,4 +137,4 @@ grpc_error *grpc_create_dualstack_socket_using_factory(
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H */
diff --git a/src/core/lib/iomgr/socket_windows.h b/src/core/lib/iomgr/socket_windows.h
index a00a7615a3..84fa071e89 100644
--- a/src/core/lib/iomgr/socket_windows.h
+++ b/src/core/lib/iomgr/socket_windows.h
@@ -115,4 +115,4 @@ void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H */
diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h
index 1b102b5784..b2f365f2af 100644
--- a/src/core/lib/iomgr/tcp_client.h
+++ b/src/core/lib/iomgr/tcp_client.h
@@ -45,4 +45,4 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */
diff --git a/src/core/lib/iomgr/tcp_client_posix.h b/src/core/lib/iomgr/tcp_client_posix.h
index 0b9775504c..8740511804 100644
--- a/src/core/lib/iomgr/tcp_client_posix.h
+++ b/src/core/lib/iomgr/tcp_client_posix.h
@@ -35,4 +35,4 @@ grpc_endpoint *grpc_tcp_client_create_from_fd(
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H */
diff --git a/src/core/lib/iomgr/tcp_posix.h b/src/core/lib/iomgr/tcp_posix.h
index dda78b2f8e..47e78fa67e 100644
--- a/src/core/lib/iomgr/tcp_posix.h
+++ b/src/core/lib/iomgr/tcp_posix.h
@@ -61,4 +61,4 @@ void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_POSIX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_POSIX_H */
diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h
index 3f190ac285..8f9ce3819e 100644
--- a/src/core/lib/iomgr/tcp_server.h
+++ b/src/core/lib/iomgr/tcp_server.h
@@ -106,4 +106,4 @@ void grpc_tcp_server_shutdown_listeners(grpc_exec_ctx *exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_H */
diff --git a/src/core/lib/iomgr/tcp_server_utils_posix.h b/src/core/lib/iomgr/tcp_server_utils_posix.h
index 4bb0660f09..6746333960 100644
--- a/src/core/lib/iomgr/tcp_server_utils_posix.h
+++ b/src/core/lib/iomgr/tcp_server_utils_posix.h
@@ -125,4 +125,4 @@ bool grpc_tcp_server_have_ifaddrs(void);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H */
diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h
index ba7db8a0f7..3399535b42 100644
--- a/src/core/lib/iomgr/tcp_uv.h
+++ b/src/core/lib/iomgr/tcp_uv.h
@@ -50,4 +50,4 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */
diff --git a/src/core/lib/iomgr/time_averaged_stats.h b/src/core/lib/iomgr/time_averaged_stats.h
index e255b58fee..d38ed272b6 100644
--- a/src/core/lib/iomgr/time_averaged_stats.h
+++ b/src/core/lib/iomgr/time_averaged_stats.h
@@ -78,4 +78,4 @@ double grpc_time_averaged_stats_update_average(grpc_time_averaged_stats* stats);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H */
diff --git a/src/core/lib/iomgr/timer_heap.h b/src/core/lib/iomgr/timer_heap.h
index f15e8a3abb..228d038ab3 100644
--- a/src/core/lib/iomgr/timer_heap.h
+++ b/src/core/lib/iomgr/timer_heap.h
@@ -47,4 +47,4 @@ int grpc_timer_heap_is_empty(grpc_timer_heap *heap);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H */
diff --git a/src/core/lib/iomgr/timer_manager.h b/src/core/lib/iomgr/timer_manager.h
index d8a59a9477..72960d6ffc 100644
--- a/src/core/lib/iomgr/timer_manager.h
+++ b/src/core/lib/iomgr/timer_manager.h
@@ -42,4 +42,4 @@ void grpc_timer_manager_tick(void);
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TIMER_MANAGER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_TIMER_MANAGER_H */
diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h
index bcd8572260..e887cb1bcf 100644
--- a/src/core/lib/iomgr/udp_server.h
+++ b/src/core/lib/iomgr/udp_server.h
@@ -81,4 +81,4 @@ void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server,
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_UDP_SERVER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_UDP_SERVER_H */
diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h
index b96131ae1c..3e7f9c7d1e 100644
--- a/src/core/lib/iomgr/unix_sockets_posix.h
+++ b/src/core/lib/iomgr/unix_sockets_posix.h
@@ -46,4 +46,4 @@ char *grpc_sockaddr_to_uri_unix_if_possible(
}
#endif
-#endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */
diff --git a/src/core/lib/json/json.h b/src/core/lib/json/json.h
index 81b7e0c9da..c9fdec4ecb 100644
--- a/src/core/lib/json/json.h
+++ b/src/core/lib/json/json.h
@@ -78,4 +78,4 @@ void grpc_json_destroy(grpc_json* json);
}
#endif
-#endif /* GRPC_CORE_LIB_JSON_JSON_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_JSON_JSON_H */
diff --git a/src/core/lib/json/json_reader.h b/src/core/lib/json/json_reader.h
index ab2384f7a7..7f14a9a9c8 100644
--- a/src/core/lib/json/json_reader.h
+++ b/src/core/lib/json/json_reader.h
@@ -150,4 +150,4 @@ int grpc_json_reader_is_complete(grpc_json_reader *reader);
}
#endif
-#endif /* GRPC_CORE_LIB_JSON_JSON_READER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_JSON_JSON_READER_H */
diff --git a/src/core/lib/json/json_writer.h b/src/core/lib/json/json_writer.h
index 18bd2a80fe..132d1f24e8 100644
--- a/src/core/lib/json/json_writer.h
+++ b/src/core/lib/json/json_writer.h
@@ -87,4 +87,4 @@ void grpc_json_writer_value_string(grpc_json_writer *writer,
}
#endif
-#endif /* GRPC_CORE_LIB_JSON_JSON_WRITER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_JSON_JSON_WRITER_H */
diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h
index 64f6f439f0..ed3f893c58 100644
--- a/src/core/lib/security/credentials/fake/fake_credentials.h
+++ b/src/core/lib/security/credentials/fake/fake_credentials.h
@@ -64,4 +64,4 @@ typedef struct {
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */
diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h
index c09485fd55..5cee6ed0da 100644
--- a/src/core/lib/security/credentials/jwt/jwt_credentials.h
+++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h
@@ -53,4 +53,4 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
index 4beaec93e3..c12db896f3 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
@@ -110,4 +110,4 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response(
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */
diff --git a/src/core/lib/security/transport/lb_targets_info.h b/src/core/lib/security/transport/lb_targets_info.h
index 705d33b0ab..43f0e64556 100644
--- a/src/core/lib/security/transport/lb_targets_info.h
+++ b/src/core/lib/security/transport/lb_targets_info.h
@@ -37,4 +37,4 @@ grpc_slice_hash_table *grpc_lb_targets_info_find_in_args(
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */
diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h
index 832cc1c0ce..980449c03e 100644
--- a/src/core/lib/security/transport/secure_endpoint.h
+++ b/src/core/lib/security/transport/secure_endpoint.h
@@ -44,4 +44,4 @@ grpc_endpoint *grpc_secure_endpoint_create(
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */
diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h
index 345065f26c..178099bb94 100644
--- a/src/core/lib/security/transport/security_handshaker.h
+++ b/src/core/lib/security/transport/security_handshaker.h
@@ -39,4 +39,4 @@ void grpc_security_register_handshaker_factories();
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */
diff --git a/src/core/lib/security/transport/tsi_error.h b/src/core/lib/security/transport/tsi_error.h
index 4c78b06603..4e19daf796 100644
--- a/src/core/lib/security/transport/tsi_error.h
+++ b/src/core/lib/security/transport/tsi_error.h
@@ -32,4 +32,4 @@ grpc_error *grpc_set_tsi_error_result(grpc_error *error, tsi_result result);
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */
diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h
index 43a2f6b9d1..cdd8a7198a 100644
--- a/src/core/lib/security/util/json_util.h
+++ b/src/core/lib/security/util/json_util.h
@@ -45,4 +45,4 @@ bool grpc_copy_json_string_property(const grpc_json *json,
}
#endif
-#endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */
diff --git a/src/core/lib/slice/b64.h b/src/core/lib/slice/b64.h
index c01da56575..9b4dc65dbb 100644
--- a/src/core/lib/slice/b64.h
+++ b/src/core/lib/slice/b64.h
@@ -55,4 +55,4 @@ grpc_slice grpc_base64_decode_with_len(grpc_exec_ctx *exec_ctx, const char *b64,
}
#endif
-#endif /* GRPC_CORE_LIB_SLICE_B64_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SLICE_B64_H */
diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h
index e6f85120c3..14a4deb44b 100644
--- a/src/core/lib/slice/percent_encoding.h
+++ b/src/core/lib/slice/percent_encoding.h
@@ -68,4 +68,4 @@ grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in);
}
#endif
-#endif /* GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H */
diff --git a/src/core/lib/slice/slice_hash_table.h b/src/core/lib/slice/slice_hash_table.h
index 3c3f0e61f3..41250df738 100644
--- a/src/core/lib/slice/slice_hash_table.h
+++ b/src/core/lib/slice/slice_hash_table.h
@@ -75,4 +75,4 @@ int grpc_slice_hash_table_cmp(const grpc_slice_hash_table *a,
}
#endif
-#endif /* GRPC_CORE_LIB_SLICE_SLICE_HASH_TABLE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SLICE_SLICE_HASH_TABLE_H */
diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h
index 8591185c53..fcf70a0e55 100644
--- a/src/core/lib/slice/slice_internal.h
+++ b/src/core/lib/slice/slice_internal.h
@@ -54,4 +54,4 @@ int grpc_static_slice_eq(grpc_slice a, grpc_slice b);
}
#endif
-#endif /* GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H */
diff --git a/src/core/lib/slice/slice_traits.h b/src/core/lib/slice/slice_traits.h
index 1eda17cf00..7fdb6752cb 100644
--- a/src/core/lib/slice/slice_traits.h
+++ b/src/core/lib/slice/slice_traits.h
@@ -34,4 +34,4 @@ bool grpc_slice_is_bin_suffixed(grpc_slice s);
}
#endif
-#endif /* GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H */
diff --git a/src/core/lib/support/env_windows.cc b/src/core/lib/support/env_windows.cc
index 73c643c560..c5a25dc201 100644
--- a/src/core/lib/support/env_windows.cc
+++ b/src/core/lib/support/env_windows.cc
@@ -43,7 +43,10 @@ char *gpr_getenv(const char *name) {
DWORD ret;
ret = GetEnvironmentVariable(tname, NULL, 0);
- if (ret == 0) return NULL;
+ if (ret == 0) {
+ gpr_free(tname);
+ return NULL;
+ }
size = ret * (DWORD)sizeof(TCHAR);
tresult = (LPTSTR)gpr_malloc(size);
ret = GetEnvironmentVariable(tname, tresult, size);
diff --git a/src/core/lib/surface/channel_stack_type.h b/src/core/lib/surface/channel_stack_type.h
index 903b90a071..c77848794c 100644
--- a/src/core/lib/surface/channel_stack_type.h
+++ b/src/core/lib/surface/channel_stack_type.h
@@ -50,4 +50,4 @@ const char *grpc_channel_stack_type_string(grpc_channel_stack_type type);
}
#endif
-#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H */
diff --git a/src/core/lib/surface/completion_queue_factory.h b/src/core/lib/surface/completion_queue_factory.h
index cb0af6f0fb..af8f3d60c3 100644
--- a/src/core/lib/surface/completion_queue_factory.h
+++ b/src/core/lib/surface/completion_queue_factory.h
@@ -41,4 +41,4 @@ struct grpc_completion_queue_factory {
}
#endif
-#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H */
diff --git a/src/core/lib/surface/event_string.h b/src/core/lib/surface/event_string.h
index 127609c404..2d53cf0fac 100644
--- a/src/core/lib/surface/event_string.h
+++ b/src/core/lib/surface/event_string.h
@@ -32,4 +32,4 @@ char *grpc_event_string(grpc_event *ev);
}
#endif
-#endif /* GRPC_CORE_LIB_SURFACE_EVENT_STRING_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SURFACE_EVENT_STRING_H */
diff --git a/src/core/lib/surface/init.h b/src/core/lib/surface/init.h
index b2f48576e5..d429026327 100644
--- a/src/core/lib/surface/init.h
+++ b/src/core/lib/surface/init.h
@@ -32,4 +32,4 @@ int grpc_is_initialized(void);
}
#endif
-#endif /* GRPC_CORE_LIB_SURFACE_INIT_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SURFACE_INIT_H */
diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h
index 1114715833..375eab4a04 100644
--- a/src/core/lib/surface/server.h
+++ b/src/core/lib/surface/server.h
@@ -62,4 +62,4 @@ void grpc_server_get_pollsets(grpc_server *server, grpc_pollset ***pollsets,
}
#endif
-#endif /* GRPC_CORE_LIB_SURFACE_SERVER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SURFACE_SERVER_H */
diff --git a/src/core/lib/surface/validate_metadata.h b/src/core/lib/surface/validate_metadata.h
index aa02419d9f..afc8be6dfd 100644
--- a/src/core/lib/surface/validate_metadata.h
+++ b/src/core/lib/surface/validate_metadata.h
@@ -33,4 +33,4 @@ grpc_error *grpc_validate_header_nonbin_value_is_legal(grpc_slice slice);
}
#endif
-#endif /* GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H */
diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h
index d3e04df5c0..c1d8ee543f 100644
--- a/src/core/lib/transport/byte_stream.h
+++ b/src/core/lib/transport/byte_stream.h
@@ -143,4 +143,4 @@ void grpc_caching_byte_stream_reset(grpc_caching_byte_stream *stream);
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */
diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h
index 1796a540a7..c0ba188148 100644
--- a/src/core/lib/transport/connectivity_state.h
+++ b/src/core/lib/transport/connectivity_state.h
@@ -92,4 +92,4 @@ bool grpc_connectivity_state_notify_on_state_change(
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H */
diff --git a/src/core/lib/transport/error_utils.h b/src/core/lib/transport/error_utils.h
index 2c97f9f0bc..b4f9df4bf1 100644
--- a/src/core/lib/transport/error_utils.h
+++ b/src/core/lib/transport/error_utils.h
@@ -48,4 +48,4 @@ bool grpc_error_has_clear_grpc_status(grpc_error *error);
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_ERROR_UTILS_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_ERROR_UTILS_H */
diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h
index 17feabfd39..80899e9a20 100644
--- a/src/core/lib/transport/pid_controller.h
+++ b/src/core/lib/transport/pid_controller.h
@@ -67,4 +67,4 @@ double grpc_pid_controller_last(grpc_pid_controller *pid_controller);
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H */
diff --git a/src/core/lib/transport/service_config.h b/src/core/lib/transport/service_config.h
index c485f52472..9c43093627 100644
--- a/src/core/lib/transport/service_config.h
+++ b/src/core/lib/transport/service_config.h
@@ -67,4 +67,4 @@ void* grpc_method_config_table_get(grpc_exec_ctx* exec_ctx,
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H */
diff --git a/src/core/lib/transport/status_conversion.h b/src/core/lib/transport/status_conversion.h
index fd58a82cb7..8ef91aecfe 100644
--- a/src/core/lib/transport/status_conversion.h
+++ b/src/core/lib/transport/status_conversion.h
@@ -41,4 +41,4 @@ int grpc_status_to_http2_status(grpc_status_code status);
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_STATUS_CONVERSION_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_STATUS_CONVERSION_H */
diff --git a/src/core/lib/transport/timeout_encoding.h b/src/core/lib/transport/timeout_encoding.h
index 25cb663959..91cdf0f728 100644
--- a/src/core/lib/transport/timeout_encoding.h
+++ b/src/core/lib/transport/timeout_encoding.h
@@ -40,4 +40,4 @@ int grpc_http2_decode_timeout(grpc_slice text, grpc_millis *timeout);
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H */
diff --git a/src/core/lib/transport/transport_impl.h b/src/core/lib/transport/transport_impl.h
index 41d34d3954..445fb41ab1 100644
--- a/src/core/lib/transport/transport_impl.h
+++ b/src/core/lib/transport/transport_impl.h
@@ -77,4 +77,4 @@ struct grpc_transport {
}
#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H */ \ No newline at end of file
+#endif /* GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H */
diff --git a/src/core/tsi/gts_transport_security.h b/src/core/tsi/gts_transport_security.h
index b988c3f861..9590038ed0 100644
--- a/src/core/tsi/gts_transport_security.h
+++ b/src/core/tsi/gts_transport_security.h
@@ -42,4 +42,4 @@ gts_shared_resource *gts_get_shared_resource(void);
}
#endif
-#endif /* GRPC_CORE_TSI_GTS_TRANSPORT_SECURITY_H */ \ No newline at end of file
+#endif /* GRPC_CORE_TSI_GTS_TRANSPORT_SECURITY_H */