From f3fba749aa5a74b64f0a2c9423d470708e648b9a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 11 Jun 2015 09:36:33 -0700 Subject: [PATCH 01/97] Ensure we dont destroy a call until it is closed --- src/core/surface/call.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index b5f8af3fc17..3803e648b42 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -148,6 +148,8 @@ struct grpc_call { gpr_uint8 receiving; /* are we currently completing requests */ gpr_uint8 completing; + /** has grpc_call_destroy been called */ + gpr_uint8 destroy_called; /* pairs with completed_requests */ gpr_uint8 num_completed_requests; /* are we currently reading a message? */ @@ -294,8 +296,8 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_completion_queue *cq, grpc_sopb_init(&call->send_ops); grpc_sopb_init(&call->recv_ops); gpr_slice_buffer_init(&call->incoming_message); - /* dropped in destroy */ - gpr_ref_init(&call->internal_refcount, 1); + /* dropped in destroy and when READ_STATE_STREAM_CLOSED received */ + gpr_ref_init(&call->internal_refcount, 2); /* server hack: start reads immediately so we can get initial metadata. TODO(ctiller): figure out a cleaner solution */ if (!call->is_client) { @@ -436,7 +438,8 @@ static int need_more_data(grpc_call *call) { (is_op_live(call, GRPC_IOREQ_RECV_CLOSE) && grpc_bbq_empty(&call->incoming_queue)) || (call->write_state == WRITE_STATE_INITIAL && !call->is_client) || - (call->cancel_with_status != GRPC_STATUS_OK); + (call->cancel_with_status != GRPC_STATUS_OK) || + call->destroy_called; } static void unlock(grpc_call *call) { @@ -774,6 +777,7 @@ static void call_on_done_recv(void *pc, int success) { grpc_alarm_cancel(&call->alarm); call->have_alarm = 0; } + GRPC_CALL_INTERNAL_UNREF(call, "closed", 0); } finish_read_ops(call); } else { @@ -1036,6 +1040,8 @@ grpc_call_error grpc_call_start_ioreq_and_call_back( void grpc_call_destroy(grpc_call *c) { int cancel; lock(c); + GPR_ASSERT(!c->destroy_called); + c->destroy_called = 1; if (c->have_alarm) { grpc_alarm_cancel(&c->alarm); c->have_alarm = 0; From e0617624bafca93f795f12483451583764fd8c80 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 11 Jun 2015 09:37:17 -0700 Subject: [PATCH 02/97] Exploratory work towards splitting parsing from the transport lock --- src/core/transport/chttp2_transport.c | 179 +++++++++++++++----------- 1 file changed, 101 insertions(+), 78 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index caaced75c44..f3af5b13208 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -104,6 +104,10 @@ typedef enum { /* streams that have finished reading: we wait until unlock to coalesce all changes into one callback */ FINISHED_READ_OP, + MAYBE_FINISH_READ_AFTER_PARSE, + PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE, + OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE, + NEW_OUTGOING_WINDOW, STREAM_LIST_COUNT /* must be last */ } stream_list_id; @@ -229,6 +233,7 @@ struct transport { /* basic state management - what are we doing at the moment? */ gpr_uint8 reading; + gpr_uint8 parsing; gpr_uint8 writing; /** are we calling back (via cb) with a channel-level event */ gpr_uint8 calling_back_channel; @@ -254,6 +259,7 @@ struct transport { /* window management */ gpr_uint32 outgoing_window; + gpr_uint32 outgoing_window_update; gpr_uint32 incoming_window; gpr_uint32 connection_window_target; @@ -319,6 +325,7 @@ struct stream { gpr_uint32 incoming_window; gpr_int64 outgoing_window; + gpr_uint32 outgoing_window_update; /* when the application requests writes be closed, the write_closed is 'queued'; when the close is flow controlled into the send path, we are 'sending' it; when the write has been performed it is 'sent' */ @@ -395,7 +402,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error); static void schedule_cb(transport *t, op_closure closure, int success); -static void maybe_finish_read(transport *t, stream *s); +static void maybe_finish_read(transport *t, stream *s, int is_parser); static void maybe_join_window_updates(transport *t, stream *s); static void finish_reads(transport *t); static void add_to_pollset_locked(transport *t, grpc_pollset *pollset); @@ -652,8 +659,8 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, ref_transport(t); + lock(t); if (!server_data) { - lock(t); s->id = 0; s->outgoing_window = 0; s->incoming_window = 0; @@ -675,9 +682,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, if (initial_op) perform_op_locked(t, s, initial_op); - if (!server_data) { - unlock(t); - } + unlock(t); return 0; } @@ -694,16 +699,11 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_lock(&t->mu); - /* stop parsing if we're currently parsing this stream */ - if (t->deframe_state == DTS_FRAME && t->incoming_stream_id == s->id && - s->id != 0) { - become_skip_parser(t); - } + GPR_ASSERT(s->published_state == GRPC_STREAM_CLOSED || s->id == 0); for (i = 0; i < STREAM_LIST_COUNT; i++) { stream_list_remove(t, s, i); } - remove_from_stream_map(t, s); gpr_mu_unlock(&t->mu); @@ -835,7 +835,9 @@ static void unlock(transport *t) { finalize_cancellations(t); } - finish_reads(t); + if (!t->parsing) { + finish_reads(t); + } /* gather any callbacks that need to be made */ if (!t->calling_back_ops) { @@ -850,7 +852,7 @@ static void unlock(transport *t) { t->cb = NULL; /* no more callbacks */ t->error_state = ERROR_STATE_NOTIFIED; } - if (t->num_pending_goaways) { + if (!t->parsing && t->num_pending_goaways) { goaways = t->pending_goaways; num_goaways = t->num_pending_goaways; t->pending_goaways = NULL; @@ -930,8 +932,10 @@ static int prepare_write(transport *t) { gpr_uint32 window_delta; /* simple writes are queued to qbuf, and flushed here */ - gpr_slice_buffer_swap(&t->qbuf, &t->outbuf); - GPR_ASSERT(t->qbuf.count == 0); + if (!t->parsing) { + gpr_slice_buffer_swap(&t->qbuf, &t->outbuf); + GPR_ASSERT(t->qbuf.count == 0); + } if (t->dirtied_local_settings && !t->sent_local_settings) { gpr_slice_buffer_add( @@ -976,26 +980,28 @@ static int prepare_write(transport *t) { } } - /* for each stream that wants to update its window, add that window here */ - while ((s = stream_list_remove_head(t, WINDOW_UPDATE))) { - window_delta = - t->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - - s->incoming_window; - if (!s->read_closed && window_delta) { - gpr_slice_buffer_add( - &t->outbuf, grpc_chttp2_window_update_create(s->id, window_delta)); - FLOWCTL_TRACE(t, s, incoming, s->id, window_delta); - s->incoming_window += window_delta; + if (!t->parsing) { + /* for each stream that wants to update its window, add that window here */ + while ((s = stream_list_remove_head(t, WINDOW_UPDATE))) { + window_delta = + t->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - + s->incoming_window; + if (!s->read_closed && window_delta) { + gpr_slice_buffer_add( + &t->outbuf, grpc_chttp2_window_update_create(s->id, window_delta)); + FLOWCTL_TRACE(t, s, incoming, s->id, window_delta); + s->incoming_window += window_delta; + } } - } - /* if the transport is ready to send a window update, do so here also */ - if (t->incoming_window < t->connection_window_target * 3 / 4) { - window_delta = t->connection_window_target - t->incoming_window; - gpr_slice_buffer_add(&t->outbuf, - grpc_chttp2_window_update_create(0, window_delta)); - FLOWCTL_TRACE(t, t, incoming, 0, window_delta); - t->incoming_window += window_delta; + /* if the transport is ready to send a window update, do so here also */ + if (t->incoming_window < t->connection_window_target * 3 / 4) { + window_delta = t->connection_window_target - t->incoming_window; + gpr_slice_buffer_add(&t->outbuf, + grpc_chttp2_window_update_create(0, window_delta)); + FLOWCTL_TRACE(t, t, incoming, 0, window_delta); + t->incoming_window += window_delta; + } } return t->outbuf.length > 0 || !stream_list_empty(t, WRITING); @@ -1031,7 +1037,7 @@ static void finish_write_common(transport *t, int success) { if (!t->is_client) { s->read_closed = 1; } - maybe_finish_read(t, s); + maybe_finish_read(t, s, 0); } t->outbuf.count = 0; t->outbuf.length = 0; @@ -1089,7 +1095,7 @@ static void add_goaway(transport *t, gpr_uint32 goaway_error, static void maybe_start_some_streams(transport *t) { /* start streams where we have free stream ids and free concurrency */ - while (t->next_stream_id <= MAX_CLIENT_STREAM_ID && + while (!t->parsing && t->next_stream_id <= MAX_CLIENT_STREAM_ID && grpc_chttp2_stream_map_size(&t->stream_map) < t->settings[PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS]) { @@ -1169,7 +1175,7 @@ static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { s->publish_state = op->recv_state; gpr_free(s->old_incoming_metadata); s->old_incoming_metadata = NULL; - maybe_finish_read(t, s); + maybe_finish_read(t, s, 0); maybe_join_window_updates(t, s); } @@ -1231,7 +1237,7 @@ static void finalize_cancellations(transport *t) { while ((s = stream_list_remove_head(t, CANCELLED))) { s->read_closed = 1; s->write_state = WRITE_STATE_SENT_CLOSE; - maybe_finish_read(t, s); + maybe_finish_read(t, s, 0); } } @@ -1249,7 +1255,8 @@ static void add_incoming_metadata(transport *t, stream *s, grpc_mdelem *elem) { static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, grpc_status_code local_status, grpc_chttp2_error_code error_code, - grpc_mdstr *optional_message, int send_rst) { + grpc_mdstr *optional_message, int send_rst, + int is_parser) { int had_outgoing; char buffer[GPR_LTOA_MIN_BUFSIZE]; @@ -1299,7 +1306,7 @@ static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, add_metadata_batch(t, s); } } - maybe_finish_read(t, s); + maybe_finish_read(t, s, is_parser); } if (!id) send_rst = 0; if (send_rst) { @@ -1314,8 +1321,10 @@ static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, static void cancel_stream_id(transport *t, gpr_uint32 id, grpc_status_code local_status, grpc_chttp2_error_code error_code, int send_rst) { + lock(t); cancel_stream_inner(t, lookup_stream(t, id), id, local_status, error_code, - NULL, send_rst); + NULL, send_rst, 1); + unlock(t); } static void cancel_stream(transport *t, stream *s, @@ -1323,7 +1332,7 @@ static void cancel_stream(transport *t, stream *s, grpc_chttp2_error_code error_code, grpc_mdstr *optional_message, int send_rst) { cancel_stream_inner(t, s, s->id, local_status, error_code, optional_message, - send_rst); + send_rst, 0); } static void cancel_stream_cb(void *user_data, gpr_uint32 id, void *stream) { @@ -1343,13 +1352,19 @@ static void drop_connection(transport *t) { end_all_the_calls(t); } -static void maybe_finish_read(transport *t, stream *s) { - if (s->incoming_sopb) { +static void maybe_finish_read(transport *t, stream *s, int is_parser) { + if (is_parser) { + stream_list_join(t, s, MAYBE_FINISH_READ_AFTER_PARSE); + } else if (s->incoming_sopb) { stream_list_join(t, s, FINISHED_READ_OP); } } static void maybe_join_window_updates(transport *t, stream *s) { + if (t->parsing) { + stream_list_join(t, s, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE); + return; + } if (s->incoming_sopb != NULL && s->incoming_window < t->settings[LOCAL_SETTINGS] @@ -1378,7 +1393,7 @@ static grpc_chttp2_parse_error update_incoming_window(transport *t, stream *s) { s->incoming_window -= t->incoming_frame_size; /* if the stream incoming window is getting low, schedule an update */ - maybe_join_window_updates(t, s); + stream_list_join(t, s, PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE); return GRPC_CHTTP2_PARSE_OK; } @@ -1475,7 +1490,7 @@ static void on_header(void *tp, grpc_mdelem *md) { } else { add_incoming_metadata(t, s, md); } - maybe_finish_read(t, s); + maybe_finish_read(t, s, 1); } static int init_header_frame_parser(transport *t, int is_continuation) { @@ -1667,9 +1682,11 @@ static int init_frame_parser(transport *t) { } } +/* static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) { return window + window_update < MAX_WINDOW; } +*/ static void add_metadata_batch(transport *t, stream *s) { grpc_metadata_batch b; @@ -1695,18 +1712,17 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { case GRPC_CHTTP2_PARSE_OK: if (st.end_of_stream) { t->incoming_stream->read_closed = 1; - maybe_finish_read(t, t->incoming_stream); + maybe_finish_read(t, t->incoming_stream, 1); } if (st.need_flush_reads) { - maybe_finish_read(t, t->incoming_stream); + maybe_finish_read(t, t->incoming_stream, 1); } if (st.metadata_boundary) { add_metadata_batch(t, t->incoming_stream); - maybe_finish_read(t, t->incoming_stream); + maybe_finish_read(t, t->incoming_stream, 1); } if (st.ack_settings) { gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_settings_ack_create()); - maybe_start_some_streams(t); } if (st.send_ping_ack) { gpr_slice_buffer_add( @@ -1737,13 +1753,8 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { if (st.initial_window_update) { for (i = 0; i < t->stream_map.count; i++) { stream *s = (stream *)(t->stream_map.values[i]); - int was_window_empty = s->outgoing_window <= 0; - FLOWCTL_TRACE(t, s, outgoing, s->id, st.initial_window_update); - s->outgoing_window += st.initial_window_update; - if (was_window_empty && s->outgoing_window > 0 && s->outgoing_sopb && - s->outgoing_sopb->nops > 0) { - stream_list_join(t, s, WRITABLE); - } + s->outgoing_window_update += st.initial_window_update; + stream_list_join(t, s, NEW_OUTGOING_WINDOW); } } if (st.window_update) { @@ -1751,30 +1762,12 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { /* if there was a stream id, this is for some stream */ stream *s = lookup_stream(t, t->incoming_stream_id); if (s) { - int was_window_empty = s->outgoing_window <= 0; - if (!is_window_update_legal(st.window_update, s->outgoing_window)) { - cancel_stream(t, s, grpc_chttp2_http2_error_to_grpc_status( - GRPC_CHTTP2_FLOW_CONTROL_ERROR), - GRPC_CHTTP2_FLOW_CONTROL_ERROR, NULL, 1); - } else { - FLOWCTL_TRACE(t, s, outgoing, s->id, st.window_update); - s->outgoing_window += st.window_update; - /* if this window update makes outgoing ops writable again, - flag that */ - if (was_window_empty && s->outgoing_sopb && - s->outgoing_sopb->nops > 0) { - stream_list_join(t, s, WRITABLE); - } - } + s->outgoing_window_update += st.window_update; + stream_list_join(t, s, NEW_OUTGOING_WINDOW); } } else { /* transport level window update */ - if (!is_window_update_legal(st.window_update, t->outgoing_window)) { - drop_connection(t); - } else { - FLOWCTL_TRACE(t, t, outgoing, 0, st.window_update); - t->outgoing_window += st.window_update; - } + t->outgoing_window_update += st.window_update; } } return 1; @@ -1979,6 +1972,7 @@ static int process_read(transport *t, gpr_slice slice) { static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { transport *t = tp; + stream *s; size_t i; int keep_reading = 0; @@ -1998,11 +1992,40 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, unref_transport(t); break; case GRPC_ENDPOINT_CB_OK: - lock(t); + gpr_mu_lock(&t->mu); + GPR_ASSERT(!t->parsing); + t->parsing = 1; + gpr_mu_unlock(&t->mu); if (t->cb) { for (i = 0; i < nslices && process_read(t, slices[i]); i++) ; } + lock(t); + t->parsing = 0; + while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { + maybe_finish_read(t, s, 0); + } + while ((s = stream_list_remove_head(t, PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE))) { + maybe_join_window_updates(t, s); + } + while ((s = stream_list_remove_head(t, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE))) { + maybe_join_window_updates(t, s); + } + while ((s = stream_list_remove_head(t, NEW_OUTGOING_WINDOW))) { + int was_window_empty = s->outgoing_window <= 0; + FLOWCTL_TRACE(t, s, outgoing, s->id, s->outgoing_window_update); + s->outgoing_window += s->outgoing_window_update; + s->outgoing_window_update = 0; + /* if this window update makes outgoing ops writable again, + flag that */ + if (was_window_empty && s->outgoing_sopb && + s->outgoing_sopb->nops > 0) { + stream_list_join(t, s, WRITABLE); + } + } + t->outgoing_window += t->outgoing_window_update; + t->outgoing_window_update = 0; + maybe_start_some_streams(t); unlock(t); keep_reading = 1; break; From 99f8055965d8577d876763a70d5feb75f5752d24 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 11 Jun 2015 16:26:03 -0700 Subject: [PATCH 03/97] Splitting progress --- src/core/transport/chttp2_transport.c | 149 +++++++++++++++++++------- 1 file changed, 111 insertions(+), 38 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index f3af5b13208..c4fa13c86c8 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -221,8 +221,6 @@ typedef struct { struct transport { grpc_transport base; /* must be first */ - const grpc_transport_callbacks *cb; - void *cb_user_data; grpc_endpoint *ep; grpc_mdctx *metadata_context; gpr_refcount refs; @@ -233,10 +231,6 @@ struct transport { /* basic state management - what are we doing at the moment? */ gpr_uint8 reading; - gpr_uint8 parsing; - gpr_uint8 writing; - /** are we calling back (via cb) with a channel-level event */ - gpr_uint8 calling_back_channel; /** are we calling back any grpc_transport_op completion events */ gpr_uint8 calling_back_ops; gpr_uint8 destroying; @@ -304,9 +298,6 @@ struct transport { grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); - gpr_slice_buffer outbuf; - gpr_slice_buffer qbuf; - stream_list lists[STREAM_LIST_COUNT]; grpc_chttp2_stream_map stream_map; @@ -318,9 +309,49 @@ struct transport { size_t ping_count; size_t ping_capacity; gpr_int64 ping_counter; + + struct { + /** data to write next write */ + gpr_slice_buffer qbuf; + } global; + + struct { + /** is a thread currently writing */ + gpr_uint8 executing; + /** closure to execute this action */ + grpc_iomgr_closure action; + /** data to write now */ + gpr_slice_buffer outbuf; + } writing; + + struct { + /** is a thread currently parsing */ + gpr_uint8 executing; + /** data to write later - after parsing */ + gpr_slice_buffer qbuf; + } parsing; + + struct { + /** is a thread currently performing channel callbacks */ + gpr_uint8 executing; + const grpc_transport_callbacks *cb; + void *cb_user_data; + } channel_callback; }; struct stream { + struct { + int unused; + } global; + + struct { + int unused; + } writing; + + struct { + int unused; + } parsing; + gpr_uint32 id; gpr_uint32 incoming_window; @@ -361,6 +392,13 @@ struct stream { grpc_stream_op_buffer callback_sopb; }; +#define MAX_POST_ACTIONS 8 + +typedef struct { + size_t num_post_actions; + grpc_iomgr_closure *post_actions[MAX_POST_ACTIONS]; +} unlock_ctx; + static const grpc_transport_vtable vtable; static void push_setting(transport *t, grpc_chttp2_setting_id id, @@ -376,6 +414,12 @@ static void perform_write(transport *t, grpc_endpoint *ep); static void lock(transport *t); static void unlock(transport *t); +static void unlock_check_writes(transport* t, unlock_ctx *uctx); + static void unlock_check_cancellations(transport* t, unlock_ctx *uctx); + static void unlock_check_parser(transport* t, unlock_ctx *uctx); + static void unlock_check_op_callbacks(transport* t, unlock_ctx *uctx); + static void unlock_check_channel_callbacks(transport* t, unlock_ctx *uctx); + static void drop_connection(transport *t); static void end_all_the_calls(transport *t); @@ -426,8 +470,9 @@ static void destruct_transport(transport *t) { GPR_ASSERT(t->ep == NULL); - gpr_slice_buffer_destroy(&t->outbuf); - gpr_slice_buffer_destroy(&t->qbuf); + gpr_slice_buffer_destroy(&t->global.qbuf); + gpr_slice_buffer_destroy(&t->writing.outbuf); + gpr_slice_buffer_destroy(&t->parsing.qbuf); grpc_chttp2_hpack_parser_destroy(&t->hpack_parser); grpc_chttp2_hpack_compressor_destroy(&t->hpack_compressor); grpc_chttp2_goaway_parser_destroy(&t->goaway_parser); @@ -509,12 +554,13 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup, t->ping_counter = gpr_now().tv_nsec; grpc_chttp2_hpack_compressor_init(&t->hpack_compressor, mdctx); grpc_chttp2_goaway_parser_init(&t->goaway_parser); - gpr_slice_buffer_init(&t->outbuf); - gpr_slice_buffer_init(&t->qbuf); + gpr_slice_buffer_init(&t->global.qbuf); + gpr_slice_buffer_init(&t->writing.outbuf); + gpr_slice_buffer_init(&t->parsing.qbuf); grpc_sopb_init(&t->nuke_later_sopb); grpc_chttp2_hpack_parser_init(&t->hpack_parser, t->metadata_context); if (is_client) { - gpr_slice_buffer_add(&t->qbuf, + gpr_slice_buffer_add(&t->global.qbuf, gpr_slice_from_copied_string(CLIENT_CONNECT_STRING)); } /* 8 is a random stab in the dark as to a good initial size: it's small enough @@ -575,16 +621,16 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup, } gpr_mu_lock(&t->mu); - t->calling_back_channel = 1; + t->channel_callback.executing = 1; ref_transport(t); /* matches unref at end of this function */ gpr_mu_unlock(&t->mu); sr = setup(arg, &t->base, t->metadata_context); lock(t); - t->cb = sr.callbacks; - t->cb_user_data = sr.user_data; - t->calling_back_channel = 0; + t->channel_callback.cb = sr.callbacks; + t->channel_callback.cb_user_data = sr.user_data; + t->channel_callback.executing = 0; if (t->destroying) gpr_cv_signal(&t->cv); unlock(t); @@ -605,7 +651,7 @@ static void destroy_transport(grpc_transport *gt) { We need to be not writing as cancellation finalization may produce some callbacks that NEED to be made to close out some streams when t->writing becomes 0. */ - while (t->calling_back_channel || t->writing) { + while (t->channel_callback.executing || t->writing.executing) { gpr_cv_wait(&t->cv, &t->mu, gpr_inf_future); } drop_connection(t); @@ -618,7 +664,7 @@ static void destroy_transport(grpc_transport *gt) { It's shutdown path, so I don't believe an extra lock pair is going to be problematic for performance. */ lock(t); - GPR_ASSERT(!t->cb); + GPR_ASSERT(!t->channel_callback.cb); unlock(t); unref_transport(t); @@ -646,7 +692,7 @@ static void goaway(grpc_transport *gt, grpc_status_code status, lock(t); grpc_chttp2_goaway_append(t->last_incoming_stream_id, grpc_chttp2_grpc_status_to_http2_error(status), - debug_data, &t->qbuf); + debug_data, &t->global.qbuf); unlock(t); } @@ -806,6 +852,26 @@ static void remove_from_stream_map(transport *t, stream *s) { static void lock(transport *t) { gpr_mu_lock(&t->mu); } static void unlock(transport *t) { + unlock_ctx uctx; + size_t i; + + memset(&uctx, 0, sizeof(uctx)); + + unlock_check_writes(t, &uctx); + unlock_check_cancellations(t, &uctx); + unlock_check_parser(t, &uctx); + unlock_check_op_callbacks(t, &uctx); + unlock_check_channel_callbacks(t, &uctx); + + gpr_mu_unlock(&t->mu); + + for (i = 0; i < uctx.num_post_actions; i++) { + grpc_iomgr_closure* closure = uctx.post_actions[i]; + closure->cb(closure->cb_arg, 1); + } + + +#if 0 int start_write = 0; int perform_callbacks = 0; int call_closed = 0; @@ -814,7 +880,7 @@ static void unlock(transport *t) { pending_goaway *goaways = NULL; grpc_endpoint *ep = t->ep; grpc_stream_op_buffer nuke_now; - const grpc_transport_callbacks *cb = t->cb; + const grpc_transport_callbacks *cb = t->channel_callback.cb; GRPC_TIMER_BEGIN(GRPC_PTAG_HTTP2_UNLOCK, 0); @@ -824,18 +890,18 @@ static void unlock(transport *t) { } /* see if we need to trigger a write - and if so, get the data ready */ - if (ep && !t->writing) { - t->writing = start_write = prepare_write(t); + if (ep && !t->writing.executing) { + t->writing.executing = start_write = prepare_write(t); if (start_write) { ref_transport(t); } } - if (!t->writing) { + if (!t->writing.executing) { finalize_cancellations(t); } - if (!t->parsing) { + if (!t->parsing.executing) { finish_reads(t); } @@ -845,8 +911,8 @@ static void unlock(transport *t) { if (perform_callbacks) ref_transport(t); } - if (!t->calling_back_channel && cb) { - if (t->error_state == ERROR_STATE_SEEN && !t->writing) { + if (!t->channel_callback.executing && cb) { + if (t->error_state == ERROR_STATE_SEEN && !t->writing.executing) { call_closed = 1; t->calling_back_channel = 1; t->cb = NULL; /* no more callbacks */ @@ -906,6 +972,7 @@ static void unlock(transport *t) { gpr_free(goaways); GRPC_TIMER_END(GRPC_PTAG_HTTP2_UNLOCK, 0); +#endif } /* @@ -927,19 +994,22 @@ static void push_setting(transport *t, grpc_chttp2_setting_id id, } } -static int prepare_write(transport *t) { +static void unlock_check_writes(transport *t, unlock_ctx *uctx) { stream *s; gpr_uint32 window_delta; - /* simple writes are queued to qbuf, and flushed here */ - if (!t->parsing) { - gpr_slice_buffer_swap(&t->qbuf, &t->outbuf); - GPR_ASSERT(t->qbuf.count == 0); + /* don't do anything if we are already writing */ + if (t->writing.executing) { + return; } + /* simple writes are queued to qbuf, and flushed here */ + gpr_slice_buffer_swap(&t->global.qbuf, &t->writing.outbuf); + GPR_ASSERT(t->global.qbuf.count == 0); + if (t->dirtied_local_settings && !t->sent_local_settings) { gpr_slice_buffer_add( - &t->outbuf, grpc_chttp2_settings_create( + &t->writing.outbuf, grpc_chttp2_settings_create( t->settings[SENT_SETTINGS], t->settings[LOCAL_SETTINGS], t->force_send_settings, GRPC_CHTTP2_NUM_SETTINGS)); t->force_send_settings = 0; @@ -980,7 +1050,7 @@ static int prepare_write(transport *t) { } } - if (!t->parsing) { + if (!t->parsing.executing) { /* for each stream that wants to update its window, add that window here */ while ((s = stream_list_remove_head(t, WINDOW_UPDATE))) { window_delta = @@ -988,7 +1058,7 @@ static int prepare_write(transport *t) { s->incoming_window; if (!s->read_closed && window_delta) { gpr_slice_buffer_add( - &t->outbuf, grpc_chttp2_window_update_create(s->id, window_delta)); + &t->writing.outbuf, grpc_chttp2_window_update_create(s->id, window_delta)); FLOWCTL_TRACE(t, s, incoming, s->id, window_delta); s->incoming_window += window_delta; } @@ -997,14 +1067,17 @@ static int prepare_write(transport *t) { /* if the transport is ready to send a window update, do so here also */ if (t->incoming_window < t->connection_window_target * 3 / 4) { window_delta = t->connection_window_target - t->incoming_window; - gpr_slice_buffer_add(&t->outbuf, + gpr_slice_buffer_add(&t->writing.outbuf, grpc_chttp2_window_update_create(0, window_delta)); FLOWCTL_TRACE(t, t, incoming, 0, window_delta); t->incoming_window += window_delta; } } - return t->outbuf.length > 0 || !stream_list_empty(t, WRITING); + if (t->writing.outbuf.length > 0) { + uctx->post_actions[uctx->num_post_actions++] = &t->writing.action; + t->writing.executing = 1; + } } static void finalize_outbuf(transport *t) { From 1e6facbfbf1e31b164161cd218971210c1e69a3d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 11 Jun 2015 22:47:11 -0700 Subject: [PATCH 04/97] Refactor progress --- src/core/channel/client_channel.c | 10 +- src/core/channel/http_client_filter.c | 13 +- src/core/channel/http_server_filter.c | 11 +- src/core/iomgr/iomgr.h | 2 + src/core/surface/call.c | 37 ++- src/core/surface/lame_client.c | 6 +- src/core/surface/server.c | 12 +- src/core/transport/chttp2_transport.c | 330 ++++++++++++++------------ src/core/transport/transport.c | 6 +- src/core/transport/transport.h | 9 +- 10 files changed, 243 insertions(+), 193 deletions(-) diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c index 726196e9968..711e1054647 100644 --- a/src/core/channel/client_channel.c +++ b/src/core/channel/client_channel.c @@ -157,7 +157,7 @@ static void handle_op_after_cancellation(grpc_call_element *elem, channel_data *chand = elem->channel_data; if (op->send_ops) { grpc_stream_ops_unref_owned_objects(op->send_ops->ops, op->send_ops->nops); - op->on_done_send(op->send_user_data, 0); + op->on_done_send->cb(op->on_done_send->cb_arg, 0); } if (op->recv_ops) { char status[GPR_LTOA_MIN_BUFSIZE]; @@ -176,10 +176,10 @@ static void handle_op_after_cancellation(grpc_call_element *elem, mdb.deadline = gpr_inf_future; grpc_sopb_add_metadata(op->recv_ops, mdb); *op->recv_state = GRPC_STREAM_CLOSED; - op->on_done_recv(op->recv_user_data, 1); + op->on_done_recv->cb(op->on_done_recv->cb_arg, 1); } if (op->on_consumed) { - op->on_consumed(op->on_consumed_user_data, 0); + op->on_consumed->cb(op->on_consumed->cb_arg, 0); } } @@ -266,17 +266,15 @@ static void cc_start_transport_op(grpc_call_element *elem, calld->s.waiting_op.send_ops = op->send_ops; calld->s.waiting_op.is_last_send = op->is_last_send; calld->s.waiting_op.on_done_send = op->on_done_send; - calld->s.waiting_op.send_user_data = op->send_user_data; } if (op->recv_ops) { calld->s.waiting_op.recv_ops = op->recv_ops; calld->s.waiting_op.recv_state = op->recv_state; calld->s.waiting_op.on_done_recv = op->on_done_recv; - calld->s.waiting_op.recv_user_data = op->recv_user_data; } gpr_mu_unlock(&chand->mu); if (op->on_consumed) { - op->on_consumed(op->on_consumed_user_data, 0); + op->on_consumed->cb(op->on_consumed->cb_arg, 0); } } break; diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c index 9805f325a64..62a7a1e7d9f 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/channel/http_client_filter.c @@ -43,8 +43,9 @@ typedef struct call_data { int got_initial_metadata; grpc_stream_op_buffer *recv_ops; - void (*on_done_recv)(void *user_data, int success); - void *recv_user_data; + grpc_iomgr_closure *on_done_recv; + + grpc_iomgr_closure hc_on_recv; } call_data; typedef struct channel_data { @@ -84,7 +85,7 @@ static void hc_on_recv(void *user_data, int success) { grpc_metadata_batch_filter(&op->data.metadata, client_filter, elem); } } - calld->on_done_recv(calld->recv_user_data, success); + calld->on_done_recv->cb(calld->on_done_recv->cb_arg, success); } static void hc_mutate_op(grpc_call_element *elem, grpc_transport_op *op) { @@ -117,9 +118,7 @@ static void hc_mutate_op(grpc_call_element *elem, grpc_transport_op *op) { /* substitute our callback for the higher callback */ calld->recv_ops = op->recv_ops; calld->on_done_recv = op->on_done_recv; - calld->recv_user_data = op->recv_user_data; - op->on_done_recv = hc_on_recv; - op->recv_user_data = elem; + op->on_done_recv = &calld->hc_on_recv; } } @@ -154,6 +153,8 @@ static void init_call_elem(grpc_call_element *elem, call_data *calld = elem->call_data; calld->sent_initial_metadata = 0; calld->got_initial_metadata = 0; + calld->on_done_recv = NULL; + grpc_iomgr_closure_init(&calld->hc_on_recv, hc_on_recv, elem); if (initial_op) hc_mutate_op(elem, initial_op); } diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c index 11a53b1e70c..e5ce7a5dd87 100644 --- a/src/core/channel/http_server_filter.c +++ b/src/core/channel/http_server_filter.c @@ -47,8 +47,8 @@ typedef struct call_data { grpc_linked_mdelem status; grpc_stream_op_buffer *recv_ops; - void (*on_done_recv)(void *user_data, int success); - void *recv_user_data; + grpc_iomgr_closure *on_done_recv; + grpc_iomgr_closure hs_on_recv; } call_data; typedef struct channel_data { @@ -174,7 +174,7 @@ static void hs_on_recv(void *user_data, int success) { } } } - calld->on_done_recv(calld->recv_user_data, success); + calld->on_done_recv->cb(calld->on_done_recv->cb_arg, success); } static void hs_mutate_op(grpc_call_element *elem, grpc_transport_op *op) { @@ -200,9 +200,7 @@ static void hs_mutate_op(grpc_call_element *elem, grpc_transport_op *op) { /* substitute our callback for the higher callback */ calld->recv_ops = op->recv_ops; calld->on_done_recv = op->on_done_recv; - calld->recv_user_data = op->recv_user_data; - op->on_done_recv = hs_on_recv; - op->recv_user_data = elem; + op->on_done_recv = &calld->hs_on_recv; } } @@ -238,6 +236,7 @@ static void init_call_elem(grpc_call_element *elem, call_data *calld = elem->call_data; /* initialize members */ memset(calld, 0, sizeof(*calld)); + grpc_iomgr_closure_init(&calld->hs_on_recv, hs_on_recv, elem); if (initial_op) hs_mutate_op(elem, initial_op); } diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h index a10e481e481..265c817db1d 100644 --- a/src/core/iomgr/iomgr.h +++ b/src/core/iomgr/iomgr.h @@ -73,4 +73,6 @@ void grpc_iomgr_shutdown(void); * Can be called from within a callback or from anywhere else */ void grpc_iomgr_add_callback(grpc_iomgr_closure *closure); +void grpc_iomgr_add_delayed_callback(grpc_iomgr_closure *iocb, int success); + #endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_H */ diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 641c1cd4359..872705e996d 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -237,6 +237,9 @@ struct grpc_call { gpr_slice_buffer incoming_message; gpr_uint32 incoming_message_length; grpc_iomgr_closure destroy_closure; + grpc_iomgr_closure on_done_recv; + grpc_iomgr_closure on_done_send; + grpc_iomgr_closure on_done_bind; }; #define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call) + 1)) @@ -255,6 +258,7 @@ static void recv_metadata(grpc_call *call, grpc_metadata_batch *metadata); static void finish_read_ops(grpc_call *call); static grpc_call_error cancel_with_status(grpc_call *c, grpc_status_code status, const char *description); +static void finished_loose_op(void *call, int success); static void lock(grpc_call *call); static void unlock(grpc_call *call); @@ -298,6 +302,9 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_completion_queue *cq, grpc_sopb_init(&call->send_ops); grpc_sopb_init(&call->recv_ops); gpr_slice_buffer_init(&call->incoming_message); + grpc_iomgr_closure_init(&call->on_done_recv, call_on_done_recv, call); + grpc_iomgr_closure_init(&call->on_done_send, call_on_done_send, call); + grpc_iomgr_closure_init(&call->on_done_bind, finished_loose_op, call); /* dropped in destroy and when READ_STATE_STREAM_CLOSED received */ gpr_ref_init(&call->internal_refcount, 2); /* server hack: start reads immediately so we can get initial metadata. @@ -306,8 +313,7 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_completion_queue *cq, memset(&initial_op, 0, sizeof(initial_op)); initial_op.recv_ops = &call->recv_ops; initial_op.recv_state = &call->recv_state; - initial_op.on_done_recv = call_on_done_recv; - initial_op.recv_user_data = call; + initial_op.on_done_recv = &call->on_done_recv; initial_op.context = call->context; call->receiving = 1; GRPC_CALL_INTERNAL_REF(call, "receiving"); @@ -460,8 +466,7 @@ static void unlock(grpc_call *call) { if (!call->receiving && need_more_data(call)) { op.recv_ops = &call->recv_ops; op.recv_state = &call->recv_state; - op.on_done_recv = call_on_done_recv; - op.recv_user_data = call; + op.on_done_recv = &call->on_done_recv; call->receiving = 1; GRPC_CALL_INTERNAL_REF(call, "receiving"); start_op = 1; @@ -929,8 +934,7 @@ static int fill_send_ops(grpc_call *call, grpc_transport_op *op) { break; } if (op->send_ops) { - op->on_done_send = call_on_done_send; - op->send_user_data = call; + op->on_done_send = &call->on_done_send; } return op->send_ops != NULL; } @@ -1105,14 +1109,31 @@ static void finished_loose_op(void *call, int success_ignored) { GRPC_CALL_INTERNAL_UNREF(call, "loose-op", 0); } +typedef struct { + grpc_call *call; + grpc_iomgr_closure closure; +} finished_loose_op_allocated_args; + +static void finished_loose_op_allocated(void *alloc, int success) { + finished_loose_op_allocated_args *args = alloc; + finished_loose_op(args->call, success); + gpr_free(args); +} + static void execute_op(grpc_call *call, grpc_transport_op *op) { grpc_call_element *elem; GPR_ASSERT(op->on_consumed == NULL); if (op->cancel_with_status != GRPC_STATUS_OK || op->bind_pollset) { GRPC_CALL_INTERNAL_REF(call, "loose-op"); - op->on_consumed = finished_loose_op; - op->on_consumed_user_data = call; + if (op->bind_pollset) { + op->on_consumed = &call->on_done_bind; + } else { + finished_loose_op_allocated_args *args = gpr_malloc(sizeof(*args)); + args->call = call; + grpc_iomgr_closure_init(&args->closure, finished_loose_op_allocated, args); + op->on_consumed = &args->closure; + } } elem = CALL_ELEM_FROM_CALL(call, 0); diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c index b667128aef2..85e1ab5554c 100644 --- a/src/core/surface/lame_client.c +++ b/src/core/surface/lame_client.c @@ -56,7 +56,7 @@ static void lame_start_transport_op(grpc_call_element *elem, GRPC_CALL_LOG_OP(GPR_INFO, elem, op); if (op->send_ops) { grpc_stream_ops_unref_owned_objects(op->send_ops->ops, op->send_ops->nops); - op->on_done_send(op->send_user_data, 0); + op->on_done_send->cb(op->on_done_send->cb_arg, 0); } if (op->recv_ops) { char tmp[GPR_LTOA_MIN_BUFSIZE]; @@ -75,10 +75,10 @@ static void lame_start_transport_op(grpc_call_element *elem, mdb.deadline = gpr_inf_future; grpc_sopb_add_metadata(op->recv_ops, mdb); *op->recv_state = GRPC_STREAM_CLOSED; - op->on_done_recv(op->recv_user_data, 1); + op->on_done_recv->cb(op->on_done_recv->cb_arg, 1); } if (op->on_consumed) { - op->on_consumed(op->on_consumed_user_data, 0); + op->on_consumed->cb(op->on_consumed->cb_arg, 0); } } diff --git a/src/core/surface/server.c b/src/core/surface/server.c index 3671efe0d0d..a76a6c78120 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -183,9 +183,9 @@ struct call_data { grpc_stream_op_buffer *recv_ops; grpc_stream_state *recv_state; - void (*on_done_recv)(void *user_data, int success); - void *recv_user_data; + grpc_iomgr_closure *on_done_recv; + grpc_iomgr_closure server_on_recv; grpc_iomgr_closure kill_zombie_closure; call_data **root[CALL_LIST_COUNT]; @@ -503,7 +503,7 @@ static void server_on_recv(void *ptr, int success) { break; } - calld->on_done_recv(calld->recv_user_data, success); + calld->on_done_recv->cb(calld->on_done_recv->cb_arg, success); } static void server_mutate_op(grpc_call_element *elem, grpc_transport_op *op) { @@ -514,9 +514,7 @@ static void server_mutate_op(grpc_call_element *elem, grpc_transport_op *op) { calld->recv_ops = op->recv_ops; calld->recv_state = op->recv_state; calld->on_done_recv = op->on_done_recv; - calld->recv_user_data = op->recv_user_data; - op->on_done_recv = server_on_recv; - op->recv_user_data = elem; + op->on_done_recv = &calld->server_on_recv; } } @@ -612,6 +610,8 @@ static void init_call_elem(grpc_call_element *elem, calld->deadline = gpr_inf_future; calld->call = grpc_call_from_top_element(elem); + grpc_iomgr_closure_init(&calld->server_on_recv, server_on_recv, elem); + gpr_mu_lock(&chand->server->mu); call_list_join(&chand->server->lists[ALL_CALLS], calld, ALL_CALLS); chand->num_calls++; diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index c4fa13c86c8..f354c9441a1 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -207,18 +207,6 @@ typedef struct { gpr_slice debug; } pending_goaway; -typedef struct { - void (*cb)(void *user_data, int success); - void *user_data; - int success; -} op_closure; - -typedef struct { - op_closure *callbacks; - size_t count; - size_t capacity; -} op_closure_array; - struct transport { grpc_transport base; /* must be first */ grpc_endpoint *ep; @@ -237,10 +225,6 @@ struct transport { gpr_uint8 closed; error_state error_state; - /* queued callbacks */ - op_closure_array pending_callbacks; - op_closure_array executing_callbacks; - /* stream indexing */ gpr_uint32 next_stream_id; gpr_uint32 last_incoming_stream_id; @@ -266,9 +250,6 @@ struct transport { gpr_uint32 incoming_frame_size; gpr_uint32 incoming_stream_id; - /* hpack encoding */ - grpc_chttp2_hpack_compressor hpack_compressor; - /* various parsers */ grpc_chttp2_hpack_parser hpack_parser; /* simple one shot parsers */ @@ -313,6 +294,8 @@ struct transport { struct { /** data to write next write */ gpr_slice_buffer qbuf; + /* queued callbacks */ + grpc_iomgr_closure *pending_closures; } global; struct { @@ -322,6 +305,8 @@ struct transport { grpc_iomgr_closure action; /** data to write now */ gpr_slice_buffer outbuf; + /* hpack encoding */ + grpc_chttp2_hpack_compressor hpack_compressor; } writing; struct { @@ -334,18 +319,26 @@ struct transport { struct { /** is a thread currently performing channel callbacks */ gpr_uint8 executing; + /** transport channel-level callback */ const grpc_transport_callbacks *cb; + /** user data for cb calls */ void *cb_user_data; + /** closure for notifying transport closure */ + grpc_iomgr_closure notify_closed; } channel_callback; }; struct stream { struct { - int unused; + grpc_iomgr_closure *send_done_closure; + grpc_iomgr_closure *recv_done_closure; } global; struct { - int unused; + /* sops that have passed flow control to be written */ + grpc_stream_op_buffer sopb; + /* how strongly should we indicate closure with the next write */ + send_closed send_closed; } writing; struct { @@ -361,13 +354,9 @@ struct stream { 'queued'; when the close is flow controlled into the send path, we are 'sending' it; when the write has been performed it is 'sent' */ write_state write_state; - send_closed send_closed; gpr_uint8 read_closed; gpr_uint8 cancelled; - op_closure send_done_closure; - op_closure recv_done_closure; - stream_link links[STREAM_LIST_COUNT]; gpr_uint8 included[STREAM_LIST_COUNT]; @@ -383,8 +372,6 @@ struct stream { grpc_stream_op_buffer *incoming_sopb; grpc_stream_state *publish_state; grpc_stream_state published_state; - /* sops that have passed flow control to be written */ - grpc_stream_op_buffer writing_sopb; grpc_chttp2_data_parser parser; @@ -392,33 +379,21 @@ struct stream { grpc_stream_op_buffer callback_sopb; }; -#define MAX_POST_ACTIONS 8 - -typedef struct { - size_t num_post_actions; - grpc_iomgr_closure *post_actions[MAX_POST_ACTIONS]; -} unlock_ctx; - static const grpc_transport_vtable vtable; static void push_setting(transport *t, grpc_chttp2_setting_id id, gpr_uint32 value); -static int prepare_callbacks(transport *t); -static void run_callbacks(transport *t); -static void call_cb_closed(transport *t, const grpc_transport_callbacks *cb); - -static int prepare_write(transport *t); -static void perform_write(transport *t, grpc_endpoint *ep); - static void lock(transport *t); static void unlock(transport *t); -static void unlock_check_writes(transport* t, unlock_ctx *uctx); - static void unlock_check_cancellations(transport* t, unlock_ctx *uctx); - static void unlock_check_parser(transport* t, unlock_ctx *uctx); - static void unlock_check_op_callbacks(transport* t, unlock_ctx *uctx); - static void unlock_check_channel_callbacks(transport* t, unlock_ctx *uctx); +static void unlock_check_writes(transport* t); + static void unlock_check_cancellations(transport* t); + static void unlock_check_parser(transport* t); + static void unlock_check_channel_callbacks(transport* t); + +static void writing_action(void *t, int iomgr_success_ignored); +static void notify_closed(void *t, int iomgr_success_ignored); static void drop_connection(transport *t); static void end_all_the_calls(transport *t); @@ -435,7 +410,6 @@ static void cancel_stream(transport *t, stream *s, grpc_status_code local_status, grpc_chttp2_error_code error_code, grpc_mdstr *optional_message, int send_rst); -static void finalize_cancellations(transport *t); static stream *lookup_stream(transport *t, gpr_uint32 id); static void remove_from_stream_map(transport *t, stream *s); static void maybe_start_some_streams(transport *t); @@ -445,10 +419,9 @@ static void become_skip_parser(transport *t); static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error); -static void schedule_cb(transport *t, op_closure closure, int success); +static void schedule_cb(transport *t, grpc_iomgr_closure *closure, int success); static void maybe_finish_read(transport *t, stream *s, int is_parser); static void maybe_join_window_updates(transport *t, stream *s); -static void finish_reads(transport *t); static void add_to_pollset_locked(transport *t, grpc_pollset *pollset); static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op); static void add_metadata_batch(transport *t, stream *s); @@ -471,10 +444,12 @@ static void destruct_transport(transport *t) { GPR_ASSERT(t->ep == NULL); gpr_slice_buffer_destroy(&t->global.qbuf); + gpr_slice_buffer_destroy(&t->writing.outbuf); + grpc_chttp2_hpack_compressor_destroy(&t->writing.hpack_compressor); + gpr_slice_buffer_destroy(&t->parsing.qbuf); grpc_chttp2_hpack_parser_destroy(&t->hpack_parser); - grpc_chttp2_hpack_compressor_destroy(&t->hpack_compressor); grpc_chttp2_goaway_parser_destroy(&t->goaway_parser); grpc_mdstr_unref(t->str_grpc_timeout); @@ -499,9 +474,6 @@ static void destruct_transport(transport *t) { } gpr_free(t->pings); - gpr_free(t->pending_callbacks.callbacks); - gpr_free(t->executing_callbacks.callbacks); - for (i = 0; i < t->num_pending_goaways; i++) { gpr_slice_unref(t->pending_goaways[i].debug); } @@ -552,11 +524,13 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup, t->connection_window_target = DEFAULT_CONNECTION_WINDOW_TARGET; t->deframe_state = is_client ? DTS_FH_0 : DTS_CLIENT_PREFIX_0; t->ping_counter = gpr_now().tv_nsec; - grpc_chttp2_hpack_compressor_init(&t->hpack_compressor, mdctx); grpc_chttp2_goaway_parser_init(&t->goaway_parser); gpr_slice_buffer_init(&t->global.qbuf); gpr_slice_buffer_init(&t->writing.outbuf); + grpc_chttp2_hpack_compressor_init(&t->writing.hpack_compressor, mdctx); + grpc_iomgr_closure_init(&t->writing.action, writing_action, t); gpr_slice_buffer_init(&t->parsing.qbuf); + grpc_iomgr_closure_init(&t->channel_callback.notify_closed, notify_closed, t); grpc_sopb_init(&t->nuke_later_sopb); grpc_chttp2_hpack_parser_init(&t->hpack_parser, t->metadata_context); if (is_client) { @@ -664,7 +638,7 @@ static void destroy_transport(grpc_transport *gt) { It's shutdown path, so I don't believe an extra lock pair is going to be problematic for performance. */ lock(t); - GPR_ASSERT(!t->channel_callback.cb); + GPR_ASSERT(t->error_state == ERROR_STATE_NOTIFIED); unlock(t); unref_transport(t); @@ -722,7 +696,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, } s->incoming_deadline = gpr_inf_future; - grpc_sopb_init(&s->writing_sopb); + grpc_sopb_init(&s->writing.sopb); grpc_sopb_init(&s->callback_sopb); grpc_chttp2_data_parser_init(&s->parser); @@ -755,7 +729,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { GPR_ASSERT(s->outgoing_sopb == NULL); GPR_ASSERT(s->incoming_sopb == NULL); - grpc_sopb_destroy(&s->writing_sopb); + grpc_sopb_destroy(&s->writing.sopb); grpc_sopb_destroy(&s->callback_sopb); grpc_chttp2_data_parser_destroy(&s->parser); for (i = 0; i < s->incoming_metadata_count; i++) { @@ -771,9 +745,11 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { * LIST MANAGEMENT */ +#if 0 static int stream_list_empty(transport *t, stream_list_id id) { return t->lists[id].head == NULL; } +#endif static stream *stream_list_remove_head(transport *t, stream_list_id id) { stream *s = t->lists[id].head; @@ -852,25 +828,24 @@ static void remove_from_stream_map(transport *t, stream *s) { static void lock(transport *t) { gpr_mu_lock(&t->mu); } static void unlock(transport *t) { - unlock_ctx uctx; - size_t i; + grpc_iomgr_closure *run_closures; - memset(&uctx, 0, sizeof(uctx)); + unlock_check_writes(t); + unlock_check_cancellations(t); + unlock_check_parser(t); + unlock_check_channel_callbacks(t); - unlock_check_writes(t, &uctx); - unlock_check_cancellations(t, &uctx); - unlock_check_parser(t, &uctx); - unlock_check_op_callbacks(t, &uctx); - unlock_check_channel_callbacks(t, &uctx); + run_closures = t->global.pending_closures; + t->global.pending_closures = NULL; gpr_mu_unlock(&t->mu); - for (i = 0; i < uctx.num_post_actions; i++) { - grpc_iomgr_closure* closure = uctx.post_actions[i]; - closure->cb(closure->cb_arg, 1); + while (run_closures) { + grpc_iomgr_closure *next = run_closures->next; + run_closures->cb(run_closures->cb_arg, run_closures->success); + run_closures = next; } - #if 0 int start_write = 0; int perform_callbacks = 0; @@ -994,7 +969,7 @@ static void push_setting(transport *t, grpc_chttp2_setting_id id, } } -static void unlock_check_writes(transport *t, unlock_ctx *uctx) { +static void unlock_check_writes(transport *t) { stream *s; gpr_uint32 window_delta; @@ -1023,7 +998,7 @@ static void unlock_check_writes(transport *t, unlock_ctx *uctx) { s->outgoing_window > 0) { window_delta = grpc_chttp2_preencode( s->outgoing_sopb->ops, &s->outgoing_sopb->nops, - GPR_MIN(t->outgoing_window, s->outgoing_window), &s->writing_sopb); + GPR_MIN(t->outgoing_window, s->outgoing_window), &s->writing.sopb); FLOWCTL_TRACE(t, t, outgoing, 0, -(gpr_int64)window_delta); FLOWCTL_TRACE(t, s, outgoing, s->id, -(gpr_int64)window_delta); t->outgoing_window -= window_delta; @@ -1032,19 +1007,19 @@ static void unlock_check_writes(transport *t, unlock_ctx *uctx) { if (s->write_state == WRITE_STATE_QUEUED_CLOSE && s->outgoing_sopb->nops == 0) { if (!t->is_client && !s->read_closed) { - s->send_closed = SEND_CLOSED_WITH_RST_STREAM; + s->writing.send_closed = SEND_CLOSED_WITH_RST_STREAM; } else { - s->send_closed = SEND_CLOSED; + s->writing.send_closed = SEND_CLOSED; } } - if (s->writing_sopb.nops > 0 || s->send_closed) { + if (s->writing.sopb.nops > 0 || s->writing.send_closed) { stream_list_join(t, s, WRITING); } /* we should either exhaust window or have no ops left, but not both */ if (s->outgoing_sopb->nops == 0) { s->outgoing_sopb = NULL; - schedule_cb(t, s->send_done_closure, 1); + schedule_cb(t, s->global.send_done_closure, 1); } else if (s->outgoing_window) { stream_list_add_tail(t, s, WRITABLE); } @@ -1075,30 +1050,31 @@ static void unlock_check_writes(transport *t, unlock_ctx *uctx) { } if (t->writing.outbuf.length > 0) { - uctx->post_actions[uctx->num_post_actions++] = &t->writing.action; t->writing.executing = 1; + ref_transport(t); + schedule_cb(t, &t->writing.action, 1); } } -static void finalize_outbuf(transport *t) { +static void writing_finalize_outbuf(transport *t) { stream *s; while ((s = stream_list_remove_head(t, WRITING))) { - grpc_chttp2_encode(s->writing_sopb.ops, s->writing_sopb.nops, - s->send_closed != DONT_SEND_CLOSED, s->id, - &t->hpack_compressor, &t->outbuf); - s->writing_sopb.nops = 0; - if (s->send_closed == SEND_CLOSED_WITH_RST_STREAM) { - gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( + grpc_chttp2_encode(s->writing.sopb.ops, s->writing.sopb.nops, + s->writing.send_closed != DONT_SEND_CLOSED, s->id, + &t->writing.hpack_compressor, &t->writing.outbuf); + s->writing.sopb.nops = 0; + if (s->writing.send_closed == SEND_CLOSED_WITH_RST_STREAM) { + gpr_slice_buffer_add(&t->writing.outbuf, grpc_chttp2_rst_stream_create( s->id, GRPC_CHTTP2_NO_ERROR)); } - if (s->send_closed != DONT_SEND_CLOSED) { + if (s->writing.send_closed != DONT_SEND_CLOSED) { stream_list_join(t, s, WRITTEN_CLOSED); } } } -static void finish_write_common(transport *t, int success) { +static void writing_finish(transport *t, int success) { stream *s; lock(t); @@ -1112,11 +1088,11 @@ static void finish_write_common(transport *t, int success) { } maybe_finish_read(t, s, 0); } - t->outbuf.count = 0; - t->outbuf.length = 0; + t->writing.outbuf.count = 0; + t->writing.outbuf.length = 0; /* leave the writing flag up on shutdown to prevent further writes in unlock() from starting */ - t->writing = 0; + t->writing.executing = 0; if (t->destroying) { gpr_cv_signal(&t->cv); } @@ -1130,27 +1106,35 @@ static void finish_write_common(transport *t, int success) { unref_transport(t); } -static void finish_write(void *tp, grpc_endpoint_cb_status error) { +static void writing_finish_write_cb(void *tp, grpc_endpoint_cb_status error) { transport *t = tp; - finish_write_common(t, error == GRPC_ENDPOINT_CB_OK); + writing_finish(t, error == GRPC_ENDPOINT_CB_OK); } -static void perform_write(transport *t, grpc_endpoint *ep) { - finalize_outbuf(t); +static void writing_action(void *gt, int iomgr_success_ignored) { + transport *t = gt; - GPR_ASSERT(t->outbuf.count > 0); + writing_finalize_outbuf(t); - switch (grpc_endpoint_write(ep, t->outbuf.slices, t->outbuf.count, - finish_write, t)) { + GPR_ASSERT(t->writing.outbuf.count > 0); + + switch (grpc_endpoint_write(t->ep, t->writing.outbuf.slices, t->writing.outbuf.count, + writing_finish_write_cb, t)) { case GRPC_ENDPOINT_WRITE_DONE: - finish_write_common(t, 1); + writing_finish(t, 1); break; case GRPC_ENDPOINT_WRITE_ERROR: - finish_write_common(t, 0); + writing_finish(t, 0); break; case GRPC_ENDPOINT_WRITE_PENDING: break; } + + lock(t); + t->writing.executing = 0; + unlock(t); + + unref_transport(t); } static void add_goaway(transport *t, gpr_uint32 goaway_error, @@ -1168,7 +1152,7 @@ static void add_goaway(transport *t, gpr_uint32 goaway_error, static void maybe_start_some_streams(transport *t) { /* start streams where we have free stream ids and free concurrency */ - while (!t->parsing && t->next_stream_id <= MAX_CLIENT_STREAM_ID && + while (!t->parsing.executing && t->next_stream_id <= MAX_CLIENT_STREAM_ID && grpc_chttp2_stream_map_size(&t->stream_map) < t->settings[PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS]) { @@ -1216,8 +1200,7 @@ static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { if (op->send_ops) { GPR_ASSERT(s->outgoing_sopb == NULL); - s->send_done_closure.cb = op->on_done_send; - s->send_done_closure.user_data = op->send_user_data; + s->global.send_done_closure = op->on_done_send; if (!s->cancelled) { s->outgoing_sopb = op->send_ops; if (op->is_last_send && s->write_state == WRITE_STATE_OPEN) { @@ -1234,15 +1217,14 @@ static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { } } else { schedule_nuke_sopb(t, op->send_ops); - schedule_cb(t, s->send_done_closure, 0); + schedule_cb(t, s->global.send_done_closure, 0); } } if (op->recv_ops) { GPR_ASSERT(s->incoming_sopb == NULL); GPR_ASSERT(s->published_state != GRPC_STREAM_CLOSED); - s->recv_done_closure.cb = op->on_done_recv; - s->recv_done_closure.user_data = op->recv_user_data; + s->global.recv_done_closure = op->on_done_recv; s->incoming_sopb = op->recv_ops; s->incoming_sopb->nops = 0; s->publish_state = op->recv_state; @@ -1257,10 +1239,7 @@ static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { } if (op->on_consumed) { - op_closure c; - c.cb = op->on_consumed; - c.user_data = op->on_consumed_user_data; - schedule_cb(t, c, 1); + schedule_cb(t, op->on_consumed, 1); } } @@ -1296,7 +1275,7 @@ static void send_ping(grpc_transport *gt, void (*cb)(void *user_data), p->id[7] = t->ping_counter & 0xff; p->cb = cb; p->user_data = user_data; - gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(0, p->id)); + gpr_slice_buffer_add(&t->global.qbuf, grpc_chttp2_ping_create(0, p->id)); unlock(t); } @@ -1304,9 +1283,13 @@ static void send_ping(grpc_transport *gt, void (*cb)(void *user_data), * INPUT PROCESSING */ -static void finalize_cancellations(transport *t) { +static void unlock_check_cancellations(transport *t) { stream *s; + if (t->writing.executing) { + return; + } + while ((s = stream_list_remove_head(t, CANCELLED))) { s->read_closed = 1; s->write_state = WRITE_STATE_SENT_CLOSE; @@ -1342,7 +1325,7 @@ static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, schedule_nuke_sopb(t, s->outgoing_sopb); s->outgoing_sopb = NULL; stream_list_remove(t, s, WRITABLE); - schedule_cb(t, s->send_done_closure, 0); + schedule_cb(t, s->global.send_done_closure, 0); } } if (s->cancelled) { @@ -1383,7 +1366,7 @@ static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, } if (!id) send_rst = 0; if (send_rst) { - gpr_slice_buffer_add(&t->qbuf, + gpr_slice_buffer_add(&t->global.qbuf, grpc_chttp2_rst_stream_create(id, error_code)); } if (optional_message) { @@ -1434,7 +1417,7 @@ static void maybe_finish_read(transport *t, stream *s, int is_parser) { } static void maybe_join_window_updates(transport *t, stream *s) { - if (t->parsing) { + if (t->parsing.executing) { stream_list_join(t, s, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE); return; } @@ -1610,7 +1593,7 @@ static int init_header_frame_parser(transport *t, int is_continuation) { } t->incoming_stream = NULL; /* if stream is accepted, we set incoming_stream in init_stream */ - t->cb->accept_stream(t->cb_user_data, &t->base, + t->channel_callback.cb->accept_stream(t->channel_callback.cb_user_data, &t->base, (void *)(gpr_uintptr)t->incoming_stream_id); s = t->incoming_stream; if (!s) { @@ -1795,11 +1778,11 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { maybe_finish_read(t, t->incoming_stream, 1); } if (st.ack_settings) { - gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_settings_ack_create()); + gpr_slice_buffer_add(&t->parsing.qbuf, grpc_chttp2_settings_ack_create()); } if (st.send_ping_ack) { gpr_slice_buffer_add( - &t->qbuf, + &t->parsing.qbuf, grpc_chttp2_ping_create(1, t->simple_parsers.ping.opaque_8bytes)); } if (st.goaway) { @@ -2056,7 +2039,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, lock(t); drop_connection(t); t->reading = 0; - if (!t->writing && t->ep) { + if (!t->writing.executing && t->ep) { grpc_endpoint_destroy(t->ep); t->ep = NULL; unref_transport(t); /* safe as we still have a ref for read */ @@ -2065,16 +2048,16 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, unref_transport(t); break; case GRPC_ENDPOINT_CB_OK: - gpr_mu_lock(&t->mu); - GPR_ASSERT(!t->parsing); - t->parsing = 1; - gpr_mu_unlock(&t->mu); - if (t->cb) { + lock(t); + GPR_ASSERT(!t->parsing.executing); + t->parsing.executing = 1; + if (t->error_state == ERROR_STATE_NONE) { + gpr_mu_unlock(&t->mu); for (i = 0; i < nslices && process_read(t, slices[i]); i++) ; + gpr_mu_unlock(&t->mu); } - lock(t); - t->parsing = 0; + t->parsing.executing = 0; while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { maybe_finish_read(t, s, 0); } @@ -2176,9 +2159,13 @@ static void patch_metadata_ops(stream *s) { } } -static void finish_reads(transport *t) { +static void unlock_check_parser(transport *t) { stream *s; + if (t->parsing.executing) { + return; + } + while ((s = stream_list_remove_head(t, FINISHED_READ_OP)) != NULL) { int publish = 0; GPR_ASSERT(s->incoming_sopb); @@ -2200,42 +2187,87 @@ static void finish_reads(transport *t) { patch_metadata_ops(s); } s->incoming_sopb = NULL; - schedule_cb(t, s->recv_done_closure, 1); + schedule_cb(t, s->global.recv_done_closure, 1); } } } -static void schedule_cb(transport *t, op_closure closure, int success) { - if (t->pending_callbacks.capacity == t->pending_callbacks.count) { - t->pending_callbacks.capacity = - GPR_MAX(t->pending_callbacks.capacity * 2, 8); - t->pending_callbacks.callbacks = - gpr_realloc(t->pending_callbacks.callbacks, - t->pending_callbacks.capacity * - sizeof(*t->pending_callbacks.callbacks)); +typedef struct { + transport *t; + pending_goaway *goaways; + size_t num_goaways; + grpc_iomgr_closure closure; +} notify_goaways_args; + +static void notify_goaways(void *p, int iomgr_success_ignored) { + size_t i; + notify_goaways_args *a = p; + transport *t = a->t; + + for (i = 0; i < a->num_goaways; i++) { + t->channel_callback.cb->goaway( + t->channel_callback.cb_user_data, + &t->base, + a->goaways[i].status, + a->goaways[i].debug); } - closure.success = success; - t->pending_callbacks.callbacks[t->pending_callbacks.count++] = closure; -} -static int prepare_callbacks(transport *t) { - op_closure_array temp = t->pending_callbacks; - t->pending_callbacks = t->executing_callbacks; - t->executing_callbacks = temp; - return t->executing_callbacks.count > 0; + gpr_free(a->goaways); + gpr_free(a); + + lock(t); + t->channel_callback.executing = 0; + unlock(t); + + unref_transport(t); } -static void run_callbacks(transport *t) { - size_t i; - for (i = 0; i < t->executing_callbacks.count; i++) { - op_closure c = t->executing_callbacks.callbacks[i]; - c.cb(c.user_data, c.success); +static void unlock_check_channel_callbacks(transport *t) { + if (t->channel_callback.executing) { + return; } - t->executing_callbacks.count = 0; + if (t->parsing.executing) { + return; + } + if (t->num_pending_goaways) { + notify_goaways_args *a = gpr_malloc(sizeof(*a)); + a->goaways = t->pending_goaways; + a->num_goaways = t->num_pending_goaways; + t->pending_goaways = NULL; + t->num_pending_goaways = 0; + t->cap_pending_goaways = 0; + t->channel_callback.executing = 1; + grpc_iomgr_closure_init(&a->closure, notify_goaways, a); + ref_transport(t); + schedule_cb(t, &a->closure, 1); + return; + } + if (t->writing.executing) { + return; + } + if (t->error_state == ERROR_STATE_SEEN) { + t->error_state = ERROR_STATE_NOTIFIED; + t->channel_callback.executing = 1; + ref_transport(t); + schedule_cb(t, &t->channel_callback.notify_closed, 1); + } +} + +static void notify_closed(void *gt, int iomgr_success_ignored) { + transport *t = gt; + t->channel_callback.cb->closed(t->channel_callback.cb_user_data, &t->base); + + lock(t); + t->channel_callback.executing = 0; + unlock(t); + + unref_transport(t); } -static void call_cb_closed(transport *t, const grpc_transport_callbacks *cb) { - cb->closed(t->cb_user_data, &t->base); +static void schedule_cb(transport *t, grpc_iomgr_closure *closure, int success) { + closure->success = success; + closure->next = t->global.pending_closures; + t->global.pending_closures = closure; } /* diff --git a/src/core/transport/transport.c b/src/core/transport/transport.c index a9948cd4b2a..167970d992e 100644 --- a/src/core/transport/transport.c +++ b/src/core/transport/transport.c @@ -98,13 +98,13 @@ void grpc_transport_setup_del_interested_party(grpc_transport_setup *setup, void grpc_transport_op_finish_with_failure(grpc_transport_op *op) { if (op->send_ops) { - op->on_done_send(op->send_user_data, 0); + op->on_done_send->cb(op->on_done_send->cb_arg, 0); } if (op->recv_ops) { - op->on_done_recv(op->recv_user_data, 0); + op->on_done_recv->cb(op->on_done_recv->cb_arg, 0); } if (op->on_consumed) { - op->on_consumed(op->on_consumed_user_data, 0); + op->on_consumed->cb(op->on_consumed->cb_arg, 0); } } diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 7f60fdc0374..9d43581a0ac 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -64,18 +64,15 @@ typedef enum grpc_stream_state { /* Transport op: a set of operations to perform on a transport */ typedef struct grpc_transport_op { - void (*on_consumed)(void *user_data, int success); - void *on_consumed_user_data; + grpc_iomgr_closure *on_consumed; grpc_stream_op_buffer *send_ops; int is_last_send; - void (*on_done_send)(void *user_data, int success); - void *send_user_data; + grpc_iomgr_closure *on_done_send; grpc_stream_op_buffer *recv_ops; grpc_stream_state *recv_state; - void (*on_done_recv)(void *user_data, int success); - void *recv_user_data; + grpc_iomgr_closure *on_done_recv; grpc_pollset *bind_pollset; From 02f254eaf0869ec02a65aaca45162b38ae97acd0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 11 Jun 2015 23:06:07 -0700 Subject: [PATCH 05/97] Fix refcounting, write starts --- src/core/transport/chttp2_transport.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index f354c9441a1..4fb86f8b219 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -745,11 +745,9 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { * LIST MANAGEMENT */ -#if 0 static int stream_list_empty(transport *t, stream_list_id id) { return t->lists[id].head == NULL; } -#endif static stream *stream_list_remove_head(transport *t, stream_list_id id) { stream *s = t->lists[id].head; @@ -1049,9 +1047,10 @@ static void unlock_check_writes(transport *t) { } } - if (t->writing.outbuf.length > 0) { + if (t->writing.outbuf.length > 0 || !stream_list_empty(t, WRITING)) { t->writing.executing = 1; ref_transport(t); + gpr_log(GPR_DEBUG, "schedule write"); schedule_cb(t, &t->writing.action, 1); } } @@ -1114,6 +1113,8 @@ static void writing_finish_write_cb(void *tp, grpc_endpoint_cb_status error) { static void writing_action(void *gt, int iomgr_success_ignored) { transport *t = gt; + gpr_log(GPR_DEBUG, "writing_action"); + writing_finalize_outbuf(t); GPR_ASSERT(t->writing.outbuf.count > 0); @@ -1129,12 +1130,6 @@ static void writing_action(void *gt, int iomgr_success_ignored) { case GRPC_ENDPOINT_WRITE_PENDING: break; } - - lock(t); - t->writing.executing = 0; - unlock(t); - - unref_transport(t); } static void add_goaway(transport *t, gpr_uint32 goaway_error, @@ -2055,7 +2050,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, gpr_mu_unlock(&t->mu); for (i = 0; i < nslices && process_read(t, slices[i]); i++) ; - gpr_mu_unlock(&t->mu); + gpr_mu_lock(&t->mu); } t->parsing.executing = 0; while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { From e01ad5c55502e1e1a8c81b4acf8d862e88e839a9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 06:42:53 -0700 Subject: [PATCH 06/97] Start splitting constants out --- src/core/transport/chttp2_transport.c | 117 ++------------------------ 1 file changed, 8 insertions(+), 109 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 4fb86f8b219..b2e5ca491ca 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -282,15 +282,17 @@ struct transport { stream_list lists[STREAM_LIST_COUNT]; grpc_chttp2_stream_map stream_map; - /* metadata object cache */ - grpc_mdstr *str_grpc_timeout; - /* pings */ outstanding_ping *pings; size_t ping_count; size_t ping_capacity; gpr_int64 ping_counter; + struct { + /* metadata object cache */ + grpc_mdstr *str_grpc_timeout; + } constants; + struct { /** data to write next write */ gpr_slice_buffer qbuf; @@ -452,7 +454,7 @@ static void destruct_transport(transport *t) { grpc_chttp2_hpack_parser_destroy(&t->hpack_parser); grpc_chttp2_goaway_parser_destroy(&t->goaway_parser); - grpc_mdstr_unref(t->str_grpc_timeout); + grpc_mdstr_unref(t->constants.str_grpc_timeout); for (i = 0; i < STREAM_LIST_COUNT; i++) { GPR_ASSERT(t->lists[i].head == NULL); @@ -513,7 +515,7 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup, gpr_cv_init(&t->cv); grpc_mdctx_ref(mdctx); t->metadata_context = mdctx; - t->str_grpc_timeout = + t->constants.str_grpc_timeout = grpc_mdstr_from_string(t->metadata_context, "grpc-timeout"); t->reading = 1; t->error_state = ERROR_STATE_NONE; @@ -843,109 +845,6 @@ static void unlock(transport *t) { run_closures->cb(run_closures->cb_arg, run_closures->success); run_closures = next; } - -#if 0 - int start_write = 0; - int perform_callbacks = 0; - int call_closed = 0; - int num_goaways = 0; - int i; - pending_goaway *goaways = NULL; - grpc_endpoint *ep = t->ep; - grpc_stream_op_buffer nuke_now; - const grpc_transport_callbacks *cb = t->channel_callback.cb; - - GRPC_TIMER_BEGIN(GRPC_PTAG_HTTP2_UNLOCK, 0); - - grpc_sopb_init(&nuke_now); - if (t->nuke_later_sopb.nops) { - grpc_sopb_swap(&nuke_now, &t->nuke_later_sopb); - } - - /* see if we need to trigger a write - and if so, get the data ready */ - if (ep && !t->writing.executing) { - t->writing.executing = start_write = prepare_write(t); - if (start_write) { - ref_transport(t); - } - } - - if (!t->writing.executing) { - finalize_cancellations(t); - } - - if (!t->parsing.executing) { - finish_reads(t); - } - - /* gather any callbacks that need to be made */ - if (!t->calling_back_ops) { - t->calling_back_ops = perform_callbacks = prepare_callbacks(t); - if (perform_callbacks) ref_transport(t); - } - - if (!t->channel_callback.executing && cb) { - if (t->error_state == ERROR_STATE_SEEN && !t->writing.executing) { - call_closed = 1; - t->calling_back_channel = 1; - t->cb = NULL; /* no more callbacks */ - t->error_state = ERROR_STATE_NOTIFIED; - } - if (!t->parsing && t->num_pending_goaways) { - goaways = t->pending_goaways; - num_goaways = t->num_pending_goaways; - t->pending_goaways = NULL; - t->num_pending_goaways = 0; - t->cap_pending_goaways = 0; - t->calling_back_channel = 1; - } - if (call_closed || num_goaways) { - ref_transport(t); - } - } - - /* finally unlock */ - gpr_mu_unlock(&t->mu); - - GRPC_TIMER_MARK(GRPC_PTAG_HTTP2_UNLOCK_CLEANUP, 0); - - /* perform some callbacks if necessary */ - for (i = 0; i < num_goaways; i++) { - cb->goaway(t->cb_user_data, &t->base, goaways[i].status, goaways[i].debug); - } - - if (perform_callbacks) { - run_callbacks(t); - lock(t); - t->calling_back_ops = 0; - unlock(t); - unref_transport(t); - } - - if (call_closed) { - call_cb_closed(t, cb); - } - - /* write some bytes if necessary */ - if (start_write) { - /* ultimately calls unref_transport(t); and clears t->writing */ - perform_write(t, ep); - } - - if (call_closed || num_goaways) { - lock(t); - t->calling_back_channel = 0; - if (t->destroying) gpr_cv_signal(&t->cv); - unlock(t); - unref_transport(t); - } - - grpc_sopb_destroy(&nuke_now); - - gpr_free(goaways); - - GRPC_TIMER_END(GRPC_PTAG_HTTP2_UNLOCK, 0); -#endif } /* @@ -1523,7 +1422,7 @@ static void on_header(void *tp, grpc_mdelem *md) { GPR_INFO, "HTTP:%d:%s:HDR: %s: %s", s->id, t->is_client ? "CLI" : "SVR", grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value))); - if (md->key == t->str_grpc_timeout) { + if (md->key == t->constants.str_grpc_timeout) { gpr_timespec *cached_timeout = grpc_mdelem_get_user_data(md, free_timeout); if (!cached_timeout) { /* not already parsed: parse it now, and store the result away */ From 42cdf94d11db1f7cf8dadfb551b87703ca27f630 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:35:44 -0700 Subject: [PATCH 07/97] Rename some more stuff --- src/core/transport/chttp2_transport.c | 140 +++++++++++++------------- 1 file changed, 72 insertions(+), 68 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index b2e5ca491ca..ca1a325fdc7 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -250,18 +250,7 @@ struct transport { gpr_uint32 incoming_frame_size; gpr_uint32 incoming_stream_id; - /* various parsers */ - grpc_chttp2_hpack_parser hpack_parser; - /* simple one shot parsers */ - union { - grpc_chttp2_window_update_parser window_update; - grpc_chttp2_settings_parser settings; - grpc_chttp2_ping_parser ping; - grpc_chttp2_rst_stream_parser rst_stream; - } simple_parsers; - /* goaway */ - grpc_chttp2_goaway_parser goaway_parser; pending_goaway *pending_goaways; size_t num_pending_goaways; size_t cap_pending_goaways; @@ -316,6 +305,17 @@ struct transport { gpr_uint8 executing; /** data to write later - after parsing */ gpr_slice_buffer qbuf; + /** parser for headers */ + grpc_chttp2_hpack_parser hpack_parser; + /** simple one shot parsers */ + union { + grpc_chttp2_window_update_parser window_update; + grpc_chttp2_settings_parser settings; + grpc_chttp2_ping_parser ping; + grpc_chttp2_rst_stream_parser rst_stream; + } simple; + /** parser for goaway frames */ + grpc_chttp2_goaway_parser goaway_parser; } parsing; struct { @@ -416,7 +416,7 @@ static stream *lookup_stream(transport *t, gpr_uint32 id); static void remove_from_stream_map(transport *t, stream *s); static void maybe_start_some_streams(transport *t); -static void become_skip_parser(transport *t); +static void parsing_become_skip_parser(transport *t); static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error); @@ -451,8 +451,8 @@ static void destruct_transport(transport *t) { grpc_chttp2_hpack_compressor_destroy(&t->writing.hpack_compressor); gpr_slice_buffer_destroy(&t->parsing.qbuf); - grpc_chttp2_hpack_parser_destroy(&t->hpack_parser); - grpc_chttp2_goaway_parser_destroy(&t->goaway_parser); + grpc_chttp2_hpack_parser_destroy(&t->parsing.hpack_parser); + grpc_chttp2_goaway_parser_destroy(&t->parsing.goaway_parser); grpc_mdstr_unref(t->constants.str_grpc_timeout); @@ -526,15 +526,19 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup, t->connection_window_target = DEFAULT_CONNECTION_WINDOW_TARGET; t->deframe_state = is_client ? DTS_FH_0 : DTS_CLIENT_PREFIX_0; t->ping_counter = gpr_now().tv_nsec; - grpc_chttp2_goaway_parser_init(&t->goaway_parser); + gpr_slice_buffer_init(&t->global.qbuf); + gpr_slice_buffer_init(&t->writing.outbuf); grpc_chttp2_hpack_compressor_init(&t->writing.hpack_compressor, mdctx); grpc_iomgr_closure_init(&t->writing.action, writing_action, t); + gpr_slice_buffer_init(&t->parsing.qbuf); + grpc_chttp2_goaway_parser_init(&t->parsing.goaway_parser); + grpc_chttp2_hpack_parser_init(&t->parsing.hpack_parser, t->metadata_context); + grpc_iomgr_closure_init(&t->channel_callback.notify_closed, notify_closed, t); grpc_sopb_init(&t->nuke_later_sopb); - grpc_chttp2_hpack_parser_init(&t->hpack_parser, t->metadata_context); if (is_client) { gpr_slice_buffer_add(&t->global.qbuf, gpr_slice_from_copied_string(CLIENT_CONNECT_STRING)); @@ -1360,29 +1364,29 @@ static grpc_chttp2_parse_error skip_parser(void *parser, static void skip_header(void *tp, grpc_mdelem *md) { grpc_mdelem_unref(md); } -static int init_skip_frame(transport *t, int is_header) { +static int parsing_init_skip_frame(transport *t, int is_header) { if (is_header) { int is_eoh = t->expect_continuation_stream_id != 0; t->parser = grpc_chttp2_header_parser_parse; - t->parser_data = &t->hpack_parser; - t->hpack_parser.on_header = skip_header; - t->hpack_parser.on_header_user_data = NULL; - t->hpack_parser.is_boundary = is_eoh; - t->hpack_parser.is_eof = is_eoh ? t->header_eof : 0; + t->parser_data = &t->parsing.hpack_parser; + t->parsing.hpack_parser.on_header = skip_header; + t->parsing.hpack_parser.on_header_user_data = NULL; + t->parsing.hpack_parser.is_boundary = is_eoh; + t->parsing.hpack_parser.is_eof = is_eoh ? t->header_eof : 0; } else { t->parser = skip_parser; } return 1; } -static void become_skip_parser(transport *t) { - init_skip_frame(t, t->parser == grpc_chttp2_header_parser_parse); +static void parsing_become_skip_parser(transport *t) { + parsing_init_skip_frame(t, t->parser == grpc_chttp2_header_parser_parse); } -static int init_data_frame_parser(transport *t) { +static int parsing_init_data_frame_parser(transport *t) { stream *s = lookup_stream(t, t->incoming_stream_id); grpc_chttp2_parse_error err = GRPC_CHTTP2_PARSE_OK; - if (!s || s->read_closed) return init_skip_frame(t, 0); + if (!s || s->read_closed) return parsing_init_skip_frame(t, 0); if (err == GRPC_CHTTP2_PARSE_OK) { err = update_incoming_window(t, s); } @@ -1400,7 +1404,7 @@ static int init_data_frame_parser(transport *t) { cancel_stream(t, s, grpc_chttp2_http2_error_to_grpc_status( GRPC_CHTTP2_INTERNAL_ERROR), GRPC_CHTTP2_INTERNAL_ERROR, NULL, 1); - return init_skip_frame(t, 0); + return parsing_init_skip_frame(t, 0); case GRPC_CHTTP2_CONNECTION_ERROR: drop_connection(t); return 0; @@ -1412,7 +1416,7 @@ static int init_data_frame_parser(transport *t) { static void free_timeout(void *p) { gpr_free(p); } -static void on_header(void *tp, grpc_mdelem *md) { +static void parsing_on_header(void *tp, grpc_mdelem *md) { transport *t = tp; stream *s = t->incoming_stream; @@ -1443,7 +1447,7 @@ static void on_header(void *tp, grpc_mdelem *md) { maybe_finish_read(t, s, 1); } -static int init_header_frame_parser(transport *t, int is_continuation) { +static int parsing_init_header_frame_parser(transport *t, int is_continuation) { int is_eoh = (t->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_HEADERS) != 0; stream *s; @@ -1464,7 +1468,7 @@ static int init_header_frame_parser(transport *t, int is_continuation) { if (!s) { if (is_continuation) { gpr_log(GPR_ERROR, "stream disbanded before CONTINUATION received"); - return init_skip_frame(t, 1); + return parsing_init_skip_frame(t, 1); } if (t->is_client) { if ((t->incoming_stream_id & 1) && @@ -1473,17 +1477,17 @@ static int init_header_frame_parser(transport *t, int is_continuation) { } else { gpr_log(GPR_ERROR, "ignoring new stream creation on client"); } - return init_skip_frame(t, 1); + return parsing_init_skip_frame(t, 1); } else if (t->last_incoming_stream_id > t->incoming_stream_id) { gpr_log(GPR_ERROR, "ignoring out of order new stream request on server; last stream " "id=%d, new stream id=%d", t->last_incoming_stream_id, t->incoming_stream_id); - return init_skip_frame(t, 1); + return parsing_init_skip_frame(t, 1); } else if ((t->incoming_stream_id & 1) == 0) { gpr_log(GPR_ERROR, "ignoring stream with non-client generated index %d", t->incoming_stream_id); - return init_skip_frame(t, 1); + return parsing_init_skip_frame(t, 1); } t->incoming_stream = NULL; /* if stream is accepted, we set incoming_stream in init_stream */ @@ -1492,7 +1496,7 @@ static int init_header_frame_parser(transport *t, int is_continuation) { s = t->incoming_stream; if (!s) { gpr_log(GPR_ERROR, "stream not accepted"); - return init_skip_frame(t, 1); + return parsing_init_skip_frame(t, 1); } } else { t->incoming_stream = s; @@ -1500,74 +1504,74 @@ static int init_header_frame_parser(transport *t, int is_continuation) { if (t->incoming_stream->read_closed) { gpr_log(GPR_ERROR, "skipping already closed stream header"); t->incoming_stream = NULL; - return init_skip_frame(t, 1); + return parsing_init_skip_frame(t, 1); } t->parser = grpc_chttp2_header_parser_parse; - t->parser_data = &t->hpack_parser; - t->hpack_parser.on_header = on_header; - t->hpack_parser.on_header_user_data = t; - t->hpack_parser.is_boundary = is_eoh; - t->hpack_parser.is_eof = is_eoh ? t->header_eof : 0; + t->parser_data = &t->parsing.hpack_parser; + t->parsing.hpack_parser.on_header = parsing_on_header; + t->parsing.hpack_parser.on_header_user_data = t; + t->parsing.hpack_parser.is_boundary = is_eoh; + t->parsing.hpack_parser.is_eof = is_eoh ? t->header_eof : 0; if (!is_continuation && (t->incoming_frame_flags & GRPC_CHTTP2_FLAG_HAS_PRIORITY)) { - grpc_chttp2_hpack_parser_set_has_priority(&t->hpack_parser); + grpc_chttp2_hpack_parser_set_has_priority(&t->parsing.hpack_parser); } return 1; } -static int init_window_update_frame_parser(transport *t) { +static int parsing_init_window_update_frame_parser(transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_window_update_parser_begin_frame( - &t->simple_parsers.window_update, + &t->parsing.simple.window_update, t->incoming_frame_size, t->incoming_frame_flags); if (!ok) { drop_connection(t); } t->parser = grpc_chttp2_window_update_parser_parse; - t->parser_data = &t->simple_parsers.window_update; + t->parser_data = &t->parsing.simple.window_update; return ok; } -static int init_ping_parser(transport *t) { +static int parsing_init_ping_parser(transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == - grpc_chttp2_ping_parser_begin_frame(&t->simple_parsers.ping, + grpc_chttp2_ping_parser_begin_frame(&t->parsing.simple.ping, t->incoming_frame_size, t->incoming_frame_flags); if (!ok) { drop_connection(t); } t->parser = grpc_chttp2_ping_parser_parse; - t->parser_data = &t->simple_parsers.ping; + t->parser_data = &t->parsing.simple.ping; return ok; } -static int init_rst_stream_parser(transport *t) { +static int parsing_init_rst_stream_parser(transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_rst_stream_parser_begin_frame( - &t->simple_parsers.rst_stream, + &t->parsing.simple.rst_stream, t->incoming_frame_size, t->incoming_frame_flags); if (!ok) { drop_connection(t); } t->parser = grpc_chttp2_rst_stream_parser_parse; - t->parser_data = &t->simple_parsers.rst_stream; + t->parser_data = &t->parsing.simple.rst_stream; return ok; } -static int init_goaway_parser(transport *t) { +static int parsing_init_goaway_parser(transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_goaway_parser_begin_frame( - &t->goaway_parser, t->incoming_frame_size, t->incoming_frame_flags); + &t->parsing.goaway_parser, t->incoming_frame_size, t->incoming_frame_flags); if (!ok) { drop_connection(t); } t->parser = grpc_chttp2_goaway_parser_parse; - t->parser_data = &t->goaway_parser; + t->parser_data = &t->parsing.goaway_parser; return ok; } -static int init_settings_frame_parser(transport *t) { +static int parsing_init_settings_frame_parser(transport *t) { int ok; if (t->incoming_stream_id != 0) { @@ -1578,7 +1582,7 @@ static int init_settings_frame_parser(transport *t) { ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_settings_parser_begin_frame( - &t->simple_parsers.settings, t->incoming_frame_size, + &t->parsing.simple.settings, t->incoming_frame_size, t->incoming_frame_flags, t->settings[PEER_SETTINGS]); if (!ok) { drop_connection(t); @@ -1589,7 +1593,7 @@ static int init_settings_frame_parser(transport *t) { GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); } t->parser = grpc_chttp2_settings_parser_parse; - t->parser_data = &t->simple_parsers.settings; + t->parser_data = &t->parsing.simple.settings; return ok; } @@ -1606,29 +1610,29 @@ static int init_frame_parser(transport *t) { t->expect_continuation_stream_id, t->incoming_stream_id); return 0; } - return init_header_frame_parser(t, 1); + return parsing_init_header_frame_parser(t, 1); } switch (t->incoming_frame_type) { case GRPC_CHTTP2_FRAME_DATA: - return init_data_frame_parser(t); + return parsing_init_data_frame_parser(t); case GRPC_CHTTP2_FRAME_HEADER: - return init_header_frame_parser(t, 0); + return parsing_init_header_frame_parser(t, 0); case GRPC_CHTTP2_FRAME_CONTINUATION: gpr_log(GPR_ERROR, "Unexpected CONTINUATION frame"); return 0; case GRPC_CHTTP2_FRAME_RST_STREAM: - return init_rst_stream_parser(t); + return parsing_init_rst_stream_parser(t); case GRPC_CHTTP2_FRAME_SETTINGS: - return init_settings_frame_parser(t); + return parsing_init_settings_frame_parser(t); case GRPC_CHTTP2_FRAME_WINDOW_UPDATE: - return init_window_update_frame_parser(t); + return parsing_init_window_update_frame_parser(t); case GRPC_CHTTP2_FRAME_PING: - return init_ping_parser(t); + return parsing_init_ping_parser(t); case GRPC_CHTTP2_FRAME_GOAWAY: - return init_goaway_parser(t); + return parsing_init_goaway_parser(t); default: gpr_log(GPR_ERROR, "Unknown frame type %02x", t->incoming_frame_type); - return init_skip_frame(t, 0); + return parsing_init_skip_frame(t, 0); } } @@ -1677,7 +1681,7 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { if (st.send_ping_ack) { gpr_slice_buffer_add( &t->parsing.qbuf, - grpc_chttp2_ping_create(1, t->simple_parsers.ping.opaque_8bytes)); + grpc_chttp2_ping_create(1, t->parsing.simple.ping.opaque_8bytes)); } if (st.goaway) { add_goaway(t, st.goaway_error, st.goaway_text); @@ -1691,7 +1695,7 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { if (st.process_ping_reply) { for (i = 0; i < t->ping_count; i++) { if (0 == - memcmp(t->pings[i].id, t->simple_parsers.ping.opaque_8bytes, 8)) { + memcmp(t->pings[i].id, t->parsing.simple.ping.opaque_8bytes, 8)) { t->pings[i].cb(t->pings[i].user_data); memmove(&t->pings[i], &t->pings[i + 1], (t->ping_count - i - 1) * sizeof(outstanding_ping)); @@ -1722,7 +1726,7 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { } return 1; case GRPC_CHTTP2_STREAM_ERROR: - become_skip_parser(t); + parsing_become_skip_parser(t); cancel_stream_id( t, t->incoming_stream_id, grpc_chttp2_http2_error_to_grpc_status(GRPC_CHTTP2_INTERNAL_ERROR), From 9b8671c7395bddb8b99723cf75f521b6780983bd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:41:54 -0700 Subject: [PATCH 08/97] Initial data movement out of chttp2_transport --- src/core/transport/chttp2/internal.h | 306 ++++++++++++++++++++++++++ src/core/transport/chttp2_transport.c | 301 +------------------------ 2 files changed, 307 insertions(+), 300 deletions(-) create mode 100644 src/core/transport/chttp2/internal.h diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h new file mode 100644 index 00000000000..e09c6bc7423 --- /dev/null +++ b/src/core/transport/chttp2/internal.h @@ -0,0 +1,306 @@ +#ifndef GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H +#define GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H + +#include "src/core/transport/transport_impl.h" + +typedef struct transport transport; +typedef struct stream stream; + +/* streams are kept in various linked lists depending on what things need to + happen to them... this enum labels each list */ +typedef enum { + /* streams that have pending writes */ + WRITABLE = 0, + /* streams that have been selected to be written */ + WRITING, + /* streams that have just been written, and included a close */ + WRITTEN_CLOSED, + /* streams that have been cancelled and have some pending state updates + to perform */ + CANCELLED, + /* streams that want to send window updates */ + WINDOW_UPDATE, + /* streams that are waiting to start because there are too many concurrent + streams on the connection */ + WAITING_FOR_CONCURRENCY, + /* streams that have finished reading: we wait until unlock to coalesce + all changes into one callback */ + FINISHED_READ_OP, + MAYBE_FINISH_READ_AFTER_PARSE, + PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE, + OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE, + NEW_OUTGOING_WINDOW, + STREAM_LIST_COUNT /* must be last */ +} stream_list_id; + +/* deframer state for the overall http2 stream of bytes */ +typedef enum { + /* prefix: one entry per http2 connection prefix byte */ + DTS_CLIENT_PREFIX_0 = 0, + DTS_CLIENT_PREFIX_1, + DTS_CLIENT_PREFIX_2, + DTS_CLIENT_PREFIX_3, + DTS_CLIENT_PREFIX_4, + DTS_CLIENT_PREFIX_5, + DTS_CLIENT_PREFIX_6, + DTS_CLIENT_PREFIX_7, + DTS_CLIENT_PREFIX_8, + DTS_CLIENT_PREFIX_9, + DTS_CLIENT_PREFIX_10, + DTS_CLIENT_PREFIX_11, + DTS_CLIENT_PREFIX_12, + DTS_CLIENT_PREFIX_13, + DTS_CLIENT_PREFIX_14, + DTS_CLIENT_PREFIX_15, + DTS_CLIENT_PREFIX_16, + DTS_CLIENT_PREFIX_17, + DTS_CLIENT_PREFIX_18, + DTS_CLIENT_PREFIX_19, + DTS_CLIENT_PREFIX_20, + DTS_CLIENT_PREFIX_21, + DTS_CLIENT_PREFIX_22, + DTS_CLIENT_PREFIX_23, + /* frame header byte 0... */ + /* must follow from the prefix states */ + DTS_FH_0, + DTS_FH_1, + DTS_FH_2, + DTS_FH_3, + DTS_FH_4, + DTS_FH_5, + DTS_FH_6, + DTS_FH_7, + /* ... frame header byte 8 */ + DTS_FH_8, + /* inside a http2 frame */ + DTS_FRAME +} deframe_transport_state; + +typedef enum { + WRITE_STATE_OPEN, + WRITE_STATE_QUEUED_CLOSE, + WRITE_STATE_SENT_CLOSE +} write_state; + +typedef enum { + DONT_SEND_CLOSED = 0, + SEND_CLOSED, + SEND_CLOSED_WITH_RST_STREAM +} send_closed; + +typedef struct { + stream *head; + stream *tail; +} stream_list; + +typedef struct { + stream *next; + stream *prev; +} stream_link; + +typedef enum { + ERROR_STATE_NONE, + ERROR_STATE_SEEN, + ERROR_STATE_NOTIFIED +} error_state; + +/* We keep several sets of connection wide parameters */ +typedef enum { + /* The settings our peer has asked for (and we have acked) */ + PEER_SETTINGS = 0, + /* The settings we'd like to have */ + LOCAL_SETTINGS, + /* The settings we've published to our peer */ + SENT_SETTINGS, + /* The settings the peer has acked */ + ACKED_SETTINGS, + NUM_SETTING_SETS +} setting_set; + +/* Outstanding ping request data */ +typedef struct { + gpr_uint8 id[8]; + void (*cb)(void *user_data); + void *user_data; +} outstanding_ping; + +typedef struct { + grpc_status_code status; + gpr_slice debug; +} pending_goaway; + +struct transport { + grpc_transport base; /* must be first */ + grpc_endpoint *ep; + grpc_mdctx *metadata_context; + gpr_refcount refs; + gpr_uint8 is_client; + + gpr_mu mu; + gpr_cv cv; + + /* basic state management - what are we doing at the moment? */ + gpr_uint8 reading; + /** are we calling back any grpc_transport_op completion events */ + gpr_uint8 calling_back_ops; + gpr_uint8 destroying; + gpr_uint8 closed; + error_state error_state; + + /* stream indexing */ + gpr_uint32 next_stream_id; + gpr_uint32 last_incoming_stream_id; + + /* settings */ + gpr_uint32 settings[NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; + gpr_uint32 force_send_settings; /* bitmask of setting indexes to send out */ + gpr_uint8 sent_local_settings; /* have local settings been sent? */ + gpr_uint8 dirtied_local_settings; /* are the local settings dirty? */ + + /* window management */ + gpr_uint32 outgoing_window; + gpr_uint32 outgoing_window_update; + gpr_uint32 incoming_window; + gpr_uint32 connection_window_target; + + /* deframing */ + deframe_transport_state deframe_state; + gpr_uint8 incoming_frame_type; + gpr_uint8 incoming_frame_flags; + gpr_uint8 header_eof; + gpr_uint32 expect_continuation_stream_id; + gpr_uint32 incoming_frame_size; + gpr_uint32 incoming_stream_id; + + /* goaway */ + pending_goaway *pending_goaways; + size_t num_pending_goaways; + size_t cap_pending_goaways; + + /* state for a stream that's not yet been created */ + grpc_stream_op_buffer new_stream_sopb; + + /* stream ops that need to be destroyed, but outside of the lock */ + grpc_stream_op_buffer nuke_later_sopb; + + /* active parser */ + void *parser_data; + stream *incoming_stream; + grpc_chttp2_parse_error (*parser)(void *parser_user_data, + grpc_chttp2_parse_state *state, + gpr_slice slice, int is_last); + + stream_list lists[STREAM_LIST_COUNT]; + grpc_chttp2_stream_map stream_map; + + /* pings */ + outstanding_ping *pings; + size_t ping_count; + size_t ping_capacity; + gpr_int64 ping_counter; + + struct { + /* metadata object cache */ + grpc_mdstr *str_grpc_timeout; + } constants; + + struct { + /** data to write next write */ + gpr_slice_buffer qbuf; + /* queued callbacks */ + grpc_iomgr_closure *pending_closures; + } global; + + struct { + /** is a thread currently writing */ + gpr_uint8 executing; + /** closure to execute this action */ + grpc_iomgr_closure action; + /** data to write now */ + gpr_slice_buffer outbuf; + /* hpack encoding */ + grpc_chttp2_hpack_compressor hpack_compressor; + } writing; + + struct { + /** is a thread currently parsing */ + gpr_uint8 executing; + /** data to write later - after parsing */ + gpr_slice_buffer qbuf; + /** parser for headers */ + grpc_chttp2_hpack_parser hpack_parser; + /** simple one shot parsers */ + union { + grpc_chttp2_window_update_parser window_update; + grpc_chttp2_settings_parser settings; + grpc_chttp2_ping_parser ping; + grpc_chttp2_rst_stream_parser rst_stream; + } simple; + /** parser for goaway frames */ + grpc_chttp2_goaway_parser goaway_parser; + } parsing; + + struct { + /** is a thread currently performing channel callbacks */ + gpr_uint8 executing; + /** transport channel-level callback */ + const grpc_transport_callbacks *cb; + /** user data for cb calls */ + void *cb_user_data; + /** closure for notifying transport closure */ + grpc_iomgr_closure notify_closed; + } channel_callback; +}; + +struct stream { + struct { + grpc_iomgr_closure *send_done_closure; + grpc_iomgr_closure *recv_done_closure; + } global; + + struct { + /* sops that have passed flow control to be written */ + grpc_stream_op_buffer sopb; + /* how strongly should we indicate closure with the next write */ + send_closed send_closed; + } writing; + + struct { + int unused; + } parsing; + + gpr_uint32 id; + + gpr_uint32 incoming_window; + gpr_int64 outgoing_window; + gpr_uint32 outgoing_window_update; + /* when the application requests writes be closed, the write_closed is + 'queued'; when the close is flow controlled into the send path, we are + 'sending' it; when the write has been performed it is 'sent' */ + write_state write_state; + gpr_uint8 read_closed; + gpr_uint8 cancelled; + + stream_link links[STREAM_LIST_COUNT]; + gpr_uint8 included[STREAM_LIST_COUNT]; + + /* incoming metadata */ + grpc_linked_mdelem *incoming_metadata; + size_t incoming_metadata_count; + size_t incoming_metadata_capacity; + grpc_linked_mdelem *old_incoming_metadata; + gpr_timespec incoming_deadline; + + /* sops from application */ + grpc_stream_op_buffer *outgoing_sopb; + grpc_stream_op_buffer *incoming_sopb; + grpc_stream_state *publish_state; + grpc_stream_state published_state; + + grpc_chttp2_data_parser parser; + + grpc_stream_state callback_state; + grpc_stream_op_buffer callback_sopb; +}; + +#endif diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index ca1a325fdc7..e69d9902152 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -51,6 +51,7 @@ #include "src/core/transport/chttp2/stream_encoder.h" #include "src/core/transport/chttp2/stream_map.h" #include "src/core/transport/chttp2/timeout_encoding.h" +#include "src/core/transport/chttp2/internal.h" #include "src/core/transport/transport_impl.h" #include #include @@ -69,9 +70,6 @@ int grpc_http_trace = 0; int grpc_flowctl_trace = 0; -typedef struct transport transport; -typedef struct stream stream; - #define IF_TRACING(stmt) \ if (!(grpc_http_trace)) \ ; \ @@ -84,303 +82,6 @@ typedef struct stream stream; else \ flowctl_trace(t, #dir, obj->dir##_window, id, delta) -/* streams are kept in various linked lists depending on what things need to - happen to them... this enum labels each list */ -typedef enum { - /* streams that have pending writes */ - WRITABLE = 0, - /* streams that have been selected to be written */ - WRITING, - /* streams that have just been written, and included a close */ - WRITTEN_CLOSED, - /* streams that have been cancelled and have some pending state updates - to perform */ - CANCELLED, - /* streams that want to send window updates */ - WINDOW_UPDATE, - /* streams that are waiting to start because there are too many concurrent - streams on the connection */ - WAITING_FOR_CONCURRENCY, - /* streams that have finished reading: we wait until unlock to coalesce - all changes into one callback */ - FINISHED_READ_OP, - MAYBE_FINISH_READ_AFTER_PARSE, - PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE, - OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE, - NEW_OUTGOING_WINDOW, - STREAM_LIST_COUNT /* must be last */ -} stream_list_id; - -/* deframer state for the overall http2 stream of bytes */ -typedef enum { - /* prefix: one entry per http2 connection prefix byte */ - DTS_CLIENT_PREFIX_0 = 0, - DTS_CLIENT_PREFIX_1, - DTS_CLIENT_PREFIX_2, - DTS_CLIENT_PREFIX_3, - DTS_CLIENT_PREFIX_4, - DTS_CLIENT_PREFIX_5, - DTS_CLIENT_PREFIX_6, - DTS_CLIENT_PREFIX_7, - DTS_CLIENT_PREFIX_8, - DTS_CLIENT_PREFIX_9, - DTS_CLIENT_PREFIX_10, - DTS_CLIENT_PREFIX_11, - DTS_CLIENT_PREFIX_12, - DTS_CLIENT_PREFIX_13, - DTS_CLIENT_PREFIX_14, - DTS_CLIENT_PREFIX_15, - DTS_CLIENT_PREFIX_16, - DTS_CLIENT_PREFIX_17, - DTS_CLIENT_PREFIX_18, - DTS_CLIENT_PREFIX_19, - DTS_CLIENT_PREFIX_20, - DTS_CLIENT_PREFIX_21, - DTS_CLIENT_PREFIX_22, - DTS_CLIENT_PREFIX_23, - /* frame header byte 0... */ - /* must follow from the prefix states */ - DTS_FH_0, - DTS_FH_1, - DTS_FH_2, - DTS_FH_3, - DTS_FH_4, - DTS_FH_5, - DTS_FH_6, - DTS_FH_7, - /* ... frame header byte 8 */ - DTS_FH_8, - /* inside a http2 frame */ - DTS_FRAME -} deframe_transport_state; - -typedef enum { - WRITE_STATE_OPEN, - WRITE_STATE_QUEUED_CLOSE, - WRITE_STATE_SENT_CLOSE -} write_state; - -typedef enum { - DONT_SEND_CLOSED = 0, - SEND_CLOSED, - SEND_CLOSED_WITH_RST_STREAM -} send_closed; - -typedef struct { - stream *head; - stream *tail; -} stream_list; - -typedef struct { - stream *next; - stream *prev; -} stream_link; - -typedef enum { - ERROR_STATE_NONE, - ERROR_STATE_SEEN, - ERROR_STATE_NOTIFIED -} error_state; - -/* We keep several sets of connection wide parameters */ -typedef enum { - /* The settings our peer has asked for (and we have acked) */ - PEER_SETTINGS = 0, - /* The settings we'd like to have */ - LOCAL_SETTINGS, - /* The settings we've published to our peer */ - SENT_SETTINGS, - /* The settings the peer has acked */ - ACKED_SETTINGS, - NUM_SETTING_SETS -} setting_set; - -/* Outstanding ping request data */ -typedef struct { - gpr_uint8 id[8]; - void (*cb)(void *user_data); - void *user_data; -} outstanding_ping; - -typedef struct { - grpc_status_code status; - gpr_slice debug; -} pending_goaway; - -struct transport { - grpc_transport base; /* must be first */ - grpc_endpoint *ep; - grpc_mdctx *metadata_context; - gpr_refcount refs; - gpr_uint8 is_client; - - gpr_mu mu; - gpr_cv cv; - - /* basic state management - what are we doing at the moment? */ - gpr_uint8 reading; - /** are we calling back any grpc_transport_op completion events */ - gpr_uint8 calling_back_ops; - gpr_uint8 destroying; - gpr_uint8 closed; - error_state error_state; - - /* stream indexing */ - gpr_uint32 next_stream_id; - gpr_uint32 last_incoming_stream_id; - - /* settings */ - gpr_uint32 settings[NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; - gpr_uint32 force_send_settings; /* bitmask of setting indexes to send out */ - gpr_uint8 sent_local_settings; /* have local settings been sent? */ - gpr_uint8 dirtied_local_settings; /* are the local settings dirty? */ - - /* window management */ - gpr_uint32 outgoing_window; - gpr_uint32 outgoing_window_update; - gpr_uint32 incoming_window; - gpr_uint32 connection_window_target; - - /* deframing */ - deframe_transport_state deframe_state; - gpr_uint8 incoming_frame_type; - gpr_uint8 incoming_frame_flags; - gpr_uint8 header_eof; - gpr_uint32 expect_continuation_stream_id; - gpr_uint32 incoming_frame_size; - gpr_uint32 incoming_stream_id; - - /* goaway */ - pending_goaway *pending_goaways; - size_t num_pending_goaways; - size_t cap_pending_goaways; - - /* state for a stream that's not yet been created */ - grpc_stream_op_buffer new_stream_sopb; - - /* stream ops that need to be destroyed, but outside of the lock */ - grpc_stream_op_buffer nuke_later_sopb; - - /* active parser */ - void *parser_data; - stream *incoming_stream; - grpc_chttp2_parse_error (*parser)(void *parser_user_data, - grpc_chttp2_parse_state *state, - gpr_slice slice, int is_last); - - stream_list lists[STREAM_LIST_COUNT]; - grpc_chttp2_stream_map stream_map; - - /* pings */ - outstanding_ping *pings; - size_t ping_count; - size_t ping_capacity; - gpr_int64 ping_counter; - - struct { - /* metadata object cache */ - grpc_mdstr *str_grpc_timeout; - } constants; - - struct { - /** data to write next write */ - gpr_slice_buffer qbuf; - /* queued callbacks */ - grpc_iomgr_closure *pending_closures; - } global; - - struct { - /** is a thread currently writing */ - gpr_uint8 executing; - /** closure to execute this action */ - grpc_iomgr_closure action; - /** data to write now */ - gpr_slice_buffer outbuf; - /* hpack encoding */ - grpc_chttp2_hpack_compressor hpack_compressor; - } writing; - - struct { - /** is a thread currently parsing */ - gpr_uint8 executing; - /** data to write later - after parsing */ - gpr_slice_buffer qbuf; - /** parser for headers */ - grpc_chttp2_hpack_parser hpack_parser; - /** simple one shot parsers */ - union { - grpc_chttp2_window_update_parser window_update; - grpc_chttp2_settings_parser settings; - grpc_chttp2_ping_parser ping; - grpc_chttp2_rst_stream_parser rst_stream; - } simple; - /** parser for goaway frames */ - grpc_chttp2_goaway_parser goaway_parser; - } parsing; - - struct { - /** is a thread currently performing channel callbacks */ - gpr_uint8 executing; - /** transport channel-level callback */ - const grpc_transport_callbacks *cb; - /** user data for cb calls */ - void *cb_user_data; - /** closure for notifying transport closure */ - grpc_iomgr_closure notify_closed; - } channel_callback; -}; - -struct stream { - struct { - grpc_iomgr_closure *send_done_closure; - grpc_iomgr_closure *recv_done_closure; - } global; - - struct { - /* sops that have passed flow control to be written */ - grpc_stream_op_buffer sopb; - /* how strongly should we indicate closure with the next write */ - send_closed send_closed; - } writing; - - struct { - int unused; - } parsing; - - gpr_uint32 id; - - gpr_uint32 incoming_window; - gpr_int64 outgoing_window; - gpr_uint32 outgoing_window_update; - /* when the application requests writes be closed, the write_closed is - 'queued'; when the close is flow controlled into the send path, we are - 'sending' it; when the write has been performed it is 'sent' */ - write_state write_state; - gpr_uint8 read_closed; - gpr_uint8 cancelled; - - stream_link links[STREAM_LIST_COUNT]; - gpr_uint8 included[STREAM_LIST_COUNT]; - - /* incoming metadata */ - grpc_linked_mdelem *incoming_metadata; - size_t incoming_metadata_count; - size_t incoming_metadata_capacity; - grpc_linked_mdelem *old_incoming_metadata; - gpr_timespec incoming_deadline; - - /* sops from application */ - grpc_stream_op_buffer *outgoing_sopb; - grpc_stream_op_buffer *incoming_sopb; - grpc_stream_state *publish_state; - grpc_stream_state published_state; - - grpc_chttp2_data_parser parser; - - grpc_stream_state callback_state; - grpc_stream_op_buffer callback_sopb; -}; - static const grpc_transport_vtable vtable; static void push_setting(transport *t, grpc_chttp2_setting_id id, From b084d90151b18d4d61f937ac0607650911c2b520 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:50:02 -0700 Subject: [PATCH 09/97] Rename some things --- src/core/transport/chttp2/internal.h | 54 ++--- src/core/transport/chttp2_transport.c | 292 +++++++++++++------------- 2 files changed, 173 insertions(+), 173 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index e09c6bc7423..caf2092a18a 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -3,8 +3,8 @@ #include "src/core/transport/transport_impl.h" -typedef struct transport transport; -typedef struct stream stream; +typedef struct grpc_chttp2_transport grpc_chttp2_transport; +typedef struct grpc_chttp2_stream grpc_chttp2_stream; /* streams are kept in various linked lists depending on what things need to happen to them... this enum labels each list */ @@ -31,7 +31,7 @@ typedef enum { OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE, NEW_OUTGOING_WINDOW, STREAM_LIST_COUNT /* must be last */ -} stream_list_id; +} grpc_chttp2_stream_list_id; /* deframer state for the overall http2 stream of bytes */ typedef enum { @@ -74,35 +74,35 @@ typedef enum { DTS_FH_8, /* inside a http2 frame */ DTS_FRAME -} deframe_transport_state; +} grpc_chttp2_deframe_transport_state; typedef enum { WRITE_STATE_OPEN, WRITE_STATE_QUEUED_CLOSE, WRITE_STATE_SENT_CLOSE -} write_state; +} grpc_chttp2_write_state; typedef enum { DONT_SEND_CLOSED = 0, SEND_CLOSED, SEND_CLOSED_WITH_RST_STREAM -} send_closed; +} grpc_chttp2_send_closed; typedef struct { - stream *head; - stream *tail; -} stream_list; + grpc_chttp2_stream *head; + grpc_chttp2_stream *tail; +} grpc_chttp2_stream_list; typedef struct { - stream *next; - stream *prev; -} stream_link; + grpc_chttp2_stream *next; + grpc_chttp2_stream *prev; +} grpc_chttp2_stream_link; typedef enum { ERROR_STATE_NONE, ERROR_STATE_SEEN, ERROR_STATE_NOTIFIED -} error_state; +} grpc_chttp2_error_state; /* We keep several sets of connection wide parameters */ typedef enum { @@ -115,21 +115,21 @@ typedef enum { /* The settings the peer has acked */ ACKED_SETTINGS, NUM_SETTING_SETS -} setting_set; +} grpc_chttp2_setting_set; /* Outstanding ping request data */ typedef struct { gpr_uint8 id[8]; void (*cb)(void *user_data); void *user_data; -} outstanding_ping; +} grpc_chttp2_outstanding_ping; typedef struct { grpc_status_code status; gpr_slice debug; -} pending_goaway; +} grpc_chttp2_pending_goaway; -struct transport { +struct grpc_chttp2_transport { grpc_transport base; /* must be first */ grpc_endpoint *ep; grpc_mdctx *metadata_context; @@ -145,7 +145,7 @@ struct transport { gpr_uint8 calling_back_ops; gpr_uint8 destroying; gpr_uint8 closed; - error_state error_state; + grpc_chttp2_error_state error_state; /* stream indexing */ gpr_uint32 next_stream_id; @@ -164,7 +164,7 @@ struct transport { gpr_uint32 connection_window_target; /* deframing */ - deframe_transport_state deframe_state; + grpc_chttp2_deframe_transport_state deframe_state; gpr_uint8 incoming_frame_type; gpr_uint8 incoming_frame_flags; gpr_uint8 header_eof; @@ -173,7 +173,7 @@ struct transport { gpr_uint32 incoming_stream_id; /* goaway */ - pending_goaway *pending_goaways; + grpc_chttp2_pending_goaway *pending_goaways; size_t num_pending_goaways; size_t cap_pending_goaways; @@ -185,16 +185,16 @@ struct transport { /* active parser */ void *parser_data; - stream *incoming_stream; + grpc_chttp2_stream *incoming_stream; grpc_chttp2_parse_error (*parser)(void *parser_user_data, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); - stream_list lists[STREAM_LIST_COUNT]; + grpc_chttp2_stream_list lists[STREAM_LIST_COUNT]; grpc_chttp2_stream_map stream_map; /* pings */ - outstanding_ping *pings; + grpc_chttp2_outstanding_ping *pings; size_t ping_count; size_t ping_capacity; gpr_int64 ping_counter; @@ -252,7 +252,7 @@ struct transport { } channel_callback; }; -struct stream { +struct grpc_chttp2_stream { struct { grpc_iomgr_closure *send_done_closure; grpc_iomgr_closure *recv_done_closure; @@ -262,7 +262,7 @@ struct stream { /* sops that have passed flow control to be written */ grpc_stream_op_buffer sopb; /* how strongly should we indicate closure with the next write */ - send_closed send_closed; + grpc_chttp2_send_closed send_closed; } writing; struct { @@ -277,11 +277,11 @@ struct stream { /* when the application requests writes be closed, the write_closed is 'queued'; when the close is flow controlled into the send path, we are 'sending' it; when the write has been performed it is 'sent' */ - write_state write_state; + grpc_chttp2_write_state write_state; gpr_uint8 read_closed; gpr_uint8 cancelled; - stream_link links[STREAM_LIST_COUNT]; + grpc_chttp2_stream_link links[STREAM_LIST_COUNT]; gpr_uint8 included[STREAM_LIST_COUNT]; /* incoming metadata */ diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index e69d9902152..96df8bdf274 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -84,52 +84,52 @@ int grpc_flowctl_trace = 0; static const grpc_transport_vtable vtable; -static void push_setting(transport *t, grpc_chttp2_setting_id id, +static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, gpr_uint32 value); -static void lock(transport *t); -static void unlock(transport *t); +static void lock(grpc_chttp2_transport *t); +static void unlock(grpc_chttp2_transport *t); -static void unlock_check_writes(transport* t); - static void unlock_check_cancellations(transport* t); - static void unlock_check_parser(transport* t); - static void unlock_check_channel_callbacks(transport* t); +static void unlock_check_writes(grpc_chttp2_transport* t); + static void unlock_check_cancellations(grpc_chttp2_transport* t); + static void unlock_check_parser(grpc_chttp2_transport* t); + static void unlock_check_channel_callbacks(grpc_chttp2_transport* t); static void writing_action(void *t, int iomgr_success_ignored); static void notify_closed(void *t, int iomgr_success_ignored); -static void drop_connection(transport *t); -static void end_all_the_calls(transport *t); +static void drop_connection(grpc_chttp2_transport *t); +static void end_all_the_calls(grpc_chttp2_transport *t); -static stream *stream_list_remove_head(transport *t, stream_list_id id); -static void stream_list_remove(transport *t, stream *s, stream_list_id id); -static void stream_list_add_tail(transport *t, stream *s, stream_list_id id); -static void stream_list_join(transport *t, stream *s, stream_list_id id); +static grpc_chttp2_stream *stream_list_remove_head(grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id); +static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id); +static void stream_list_add_tail(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id); +static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id); -static void cancel_stream_id(transport *t, gpr_uint32 id, +static void cancel_stream_id(grpc_chttp2_transport *t, gpr_uint32 id, grpc_status_code local_status, grpc_chttp2_error_code error_code, int send_rst); -static void cancel_stream(transport *t, stream *s, +static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_status_code local_status, grpc_chttp2_error_code error_code, grpc_mdstr *optional_message, int send_rst); -static stream *lookup_stream(transport *t, gpr_uint32 id); -static void remove_from_stream_map(transport *t, stream *s); -static void maybe_start_some_streams(transport *t); +static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id); +static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s); +static void maybe_start_some_streams(grpc_chttp2_transport *t); -static void parsing_become_skip_parser(transport *t); +static void parsing_become_skip_parser(grpc_chttp2_transport *t); static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error); -static void schedule_cb(transport *t, grpc_iomgr_closure *closure, int success); -static void maybe_finish_read(transport *t, stream *s, int is_parser); -static void maybe_join_window_updates(transport *t, stream *s); -static void add_to_pollset_locked(transport *t, grpc_pollset *pollset); -static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op); -static void add_metadata_batch(transport *t, stream *s); +static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, int success); +static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, int is_parser); +static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stream *s); +static void add_to_pollset_locked(grpc_chttp2_transport *t, grpc_pollset *pollset); +static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_transport_op *op); +static void add_metadata_batch(grpc_chttp2_transport *t, grpc_chttp2_stream *s); -static void flowctl_trace(transport *t, const char *flow, gpr_int32 window, +static void flowctl_trace(grpc_chttp2_transport *t, const char *flow, gpr_int32 window, gpr_uint32 id, gpr_int32 delta) { gpr_log(GPR_DEBUG, "HTTP:FLOW:%p:%d:%s: %d + %d = %d", t, id, flow, window, delta, window + delta); @@ -139,7 +139,7 @@ static void flowctl_trace(transport *t, const char *flow, gpr_int32 window, * CONSTRUCTION/DESTRUCTION/REFCOUNTING */ -static void destruct_transport(transport *t) { +static void destruct_transport(grpc_chttp2_transport *t) { size_t i; gpr_mu_lock(&t->mu); @@ -189,14 +189,14 @@ static void destruct_transport(transport *t) { gpr_free(t); } -static void unref_transport(transport *t) { +static void unref_transport(grpc_chttp2_transport *t) { if (!gpr_unref(&t->refs)) return; destruct_transport(t); } -static void ref_transport(transport *t) { gpr_ref(&t->refs); } +static void ref_transport(grpc_chttp2_transport *t) { gpr_ref(&t->refs); } -static void init_transport(transport *t, grpc_transport_setup_callback setup, +static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callback setup, void *arg, const grpc_channel_args *channel_args, grpc_endpoint *ep, gpr_slice *slices, size_t nslices, grpc_mdctx *mdctx, int is_client) { @@ -322,7 +322,7 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup, } static void destroy_transport(grpc_transport *gt) { - transport *t = (transport *)gt; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; lock(t); t->destroying = 1; @@ -338,7 +338,7 @@ static void destroy_transport(grpc_transport *gt) { drop_connection(t); unlock(t); - /* The drop_connection() above puts the transport into an error state, and + /* The drop_connection() above puts the grpc_chttp2_transport into an error state, and the follow-up unlock should then (as part of the cleanup work it does) ensure that cb is NULL, and therefore not call back anything further. This check validates this very subtle behavior. @@ -351,7 +351,7 @@ static void destroy_transport(grpc_transport *gt) { unref_transport(t); } -static void close_transport_locked(transport *t) { +static void close_transport_locked(grpc_chttp2_transport *t) { if (!t->closed) { t->closed = 1; if (t->ep) { @@ -361,7 +361,7 @@ static void close_transport_locked(transport *t) { } static void close_transport(grpc_transport *gt) { - transport *t = (transport *)gt; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; gpr_mu_lock(&t->mu); close_transport_locked(t); gpr_mu_unlock(&t->mu); @@ -369,7 +369,7 @@ static void close_transport(grpc_transport *gt) { static void goaway(grpc_transport *gt, grpc_status_code status, gpr_slice debug_data) { - transport *t = (transport *)gt; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; lock(t); grpc_chttp2_goaway_append(t->last_incoming_stream_id, grpc_chttp2_grpc_status_to_http2_error(status), @@ -379,8 +379,8 @@ static void goaway(grpc_transport *gt, grpc_status_code status, static int init_stream(grpc_transport *gt, grpc_stream *gs, const void *server_data, grpc_transport_op *initial_op) { - transport *t = (transport *)gt; - stream *s = (stream *)gs; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; memset(s, 0, sizeof(*s)); @@ -414,14 +414,14 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, return 0; } -static void schedule_nuke_sopb(transport *t, grpc_stream_op_buffer *sopb) { +static void schedule_nuke_sopb(grpc_chttp2_transport *t, grpc_stream_op_buffer *sopb) { grpc_sopb_append(&t->nuke_later_sopb, sopb->ops, sopb->nops); sopb->nops = 0; } static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { - transport *t = (transport *)gt; - stream *s = (stream *)gs; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; size_t i; gpr_mu_lock(&t->mu); @@ -452,14 +452,14 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { * LIST MANAGEMENT */ -static int stream_list_empty(transport *t, stream_list_id id) { +static int stream_list_empty(grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { return t->lists[id].head == NULL; } -static stream *stream_list_remove_head(transport *t, stream_list_id id) { - stream *s = t->lists[id].head; +static grpc_chttp2_stream *stream_list_remove_head(grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { + grpc_chttp2_stream *s = t->lists[id].head; if (s) { - stream *new_head = s->links[id].next; + grpc_chttp2_stream *new_head = s->links[id].next; GPR_ASSERT(s->included[id]); if (new_head) { t->lists[id].head = new_head; @@ -473,7 +473,7 @@ static stream *stream_list_remove_head(transport *t, stream_list_id id) { return s; } -static void stream_list_remove(transport *t, stream *s, stream_list_id id) { +static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { if (!s->included[id]) return; s->included[id] = 0; if (s->links[id].prev) { @@ -489,8 +489,8 @@ static void stream_list_remove(transport *t, stream *s, stream_list_id id) { } } -static void stream_list_add_tail(transport *t, stream *s, stream_list_id id) { - stream *old_tail; +static void stream_list_add_tail(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { + grpc_chttp2_stream *old_tail; GPR_ASSERT(!s->included[id]); old_tail = t->lists[id].tail; s->links[id].next = NULL; @@ -505,16 +505,16 @@ static void stream_list_add_tail(transport *t, stream *s, stream_list_id id) { s->included[id] = 1; } -static void stream_list_join(transport *t, stream *s, stream_list_id id) { +static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { if (s->included[id]) { return; } stream_list_add_tail(t, s, id); } -static void remove_from_stream_map(transport *t, stream *s) { +static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (s->id == 0) return; - IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Removing stream %d", + IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Removing grpc_chttp2_stream %d", t->is_client ? "CLI" : "SVR", s->id)); if (grpc_chttp2_stream_map_delete(&t->stream_map, s->id)) { maybe_start_some_streams(t); @@ -525,14 +525,14 @@ static void remove_from_stream_map(transport *t, stream *s) { * LOCK MANAGEMENT */ -/* We take a transport-global lock in response to calls coming in from above, +/* We take a grpc_chttp2_transport-global lock in response to calls coming in from above, and in response to data being received from below. New data to be written is always queued, as are callbacks to process data. During unlock() we check our todo lists and initiate callbacks and flush writes. */ -static void lock(transport *t) { gpr_mu_lock(&t->mu); } +static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } -static void unlock(transport *t) { +static void unlock(grpc_chttp2_transport *t) { grpc_iomgr_closure *run_closures; unlock_check_writes(t); @@ -556,7 +556,7 @@ static void unlock(transport *t) { * OUTPUT PROCESSING */ -static void push_setting(transport *t, grpc_chttp2_setting_id id, +static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, gpr_uint32 value) { const grpc_chttp2_setting_parameters *sp = &grpc_chttp2_settings_parameters[id]; @@ -571,8 +571,8 @@ static void push_setting(transport *t, grpc_chttp2_setting_id id, } } -static void unlock_check_writes(transport *t) { - stream *s; +static void unlock_check_writes(grpc_chttp2_transport *t) { + grpc_chttp2_stream *s; gpr_uint32 window_delta; /* don't do anything if we are already writing */ @@ -594,7 +594,7 @@ static void unlock_check_writes(transport *t) { t->sent_local_settings = 1; } - /* for each stream that's become writable, frame it's data (according to + /* 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 (t->outgoing_window && (s = stream_list_remove_head(t, WRITABLE)) && s->outgoing_window > 0) { @@ -628,7 +628,7 @@ static void unlock_check_writes(transport *t) { } if (!t->parsing.executing) { - /* for each stream that wants to update its window, add that window here */ + /* for each grpc_chttp2_stream that wants to update its window, add that window here */ while ((s = stream_list_remove_head(t, WINDOW_UPDATE))) { window_delta = t->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - @@ -641,7 +641,7 @@ static void unlock_check_writes(transport *t) { } } - /* if the transport is ready to send a window update, do so here also */ + /* if the grpc_chttp2_transport is ready to send a window update, do so here also */ if (t->incoming_window < t->connection_window_target * 3 / 4) { window_delta = t->connection_window_target - t->incoming_window; gpr_slice_buffer_add(&t->writing.outbuf, @@ -659,8 +659,8 @@ static void unlock_check_writes(transport *t) { } } -static void writing_finalize_outbuf(transport *t) { - stream *s; +static void writing_finalize_outbuf(grpc_chttp2_transport *t) { + grpc_chttp2_stream *s; while ((s = stream_list_remove_head(t, WRITING))) { grpc_chttp2_encode(s->writing.sopb.ops, s->writing.sopb.nops, @@ -677,8 +677,8 @@ static void writing_finalize_outbuf(transport *t) { } } -static void writing_finish(transport *t, int success) { - stream *s; +static void writing_finish(grpc_chttp2_transport *t, int success) { + grpc_chttp2_stream *s; lock(t); if (!success) { @@ -710,12 +710,12 @@ static void writing_finish(transport *t, int success) { } static void writing_finish_write_cb(void *tp, grpc_endpoint_cb_status error) { - transport *t = tp; + grpc_chttp2_transport *t = tp; writing_finish(t, error == GRPC_ENDPOINT_CB_OK); } static void writing_action(void *gt, int iomgr_success_ignored) { - transport *t = gt; + grpc_chttp2_transport *t = gt; gpr_log(GPR_DEBUG, "writing_action"); @@ -736,12 +736,12 @@ static void writing_action(void *gt, int iomgr_success_ignored) { } } -static void add_goaway(transport *t, gpr_uint32 goaway_error, +static void add_goaway(grpc_chttp2_transport *t, gpr_uint32 goaway_error, gpr_slice goaway_text) { if (t->num_pending_goaways == t->cap_pending_goaways) { t->cap_pending_goaways = GPR_MAX(1, t->cap_pending_goaways * 2); t->pending_goaways = gpr_realloc( - t->pending_goaways, sizeof(pending_goaway) * t->cap_pending_goaways); + t->pending_goaways, sizeof(grpc_chttp2_pending_goaway) * t->cap_pending_goaways); } t->pending_goaways[t->num_pending_goaways].status = grpc_chttp2_http2_error_to_grpc_status(goaway_error); @@ -749,16 +749,16 @@ static void add_goaway(transport *t, gpr_uint32 goaway_error, t->num_pending_goaways++; } -static void maybe_start_some_streams(transport *t) { - /* start streams where we have free stream ids and free concurrency */ +static void maybe_start_some_streams(grpc_chttp2_transport *t) { + /* start streams where we have free grpc_chttp2_stream ids and free concurrency */ while (!t->parsing.executing && t->next_stream_id <= MAX_CLIENT_STREAM_ID && grpc_chttp2_stream_map_size(&t->stream_map) < t->settings[PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS]) { - stream *s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY); + grpc_chttp2_stream *s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY); if (!s) return; - IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Allocating new stream %p to id %d", + IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", t->is_client ? "CLI" : "SVR", s, t->next_stream_id)); if (t->next_stream_id == MAX_CLIENT_STREAM_ID) { @@ -779,7 +779,7 @@ static void maybe_start_some_streams(transport *t) { } /* cancel out streams that will never be started */ while (t->next_stream_id > MAX_CLIENT_STREAM_ID) { - stream *s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY); + grpc_chttp2_stream *s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY); if (!s) return; cancel_stream( @@ -789,7 +789,7 @@ static void maybe_start_some_streams(transport *t) { } } -static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { +static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_transport_op *op) { if (op->cancel_with_status != GRPC_STATUS_OK) { cancel_stream( t, s, op->cancel_with_status, @@ -807,7 +807,7 @@ static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { } if (s->id == 0) { IF_TRACING(gpr_log(GPR_DEBUG, - "HTTP:%s: New stream %p waiting for concurrency", + "HTTP:%s: New grpc_chttp2_stream %p waiting for concurrency", t->is_client ? "CLI" : "SVR", s)); stream_list_join(t, s, WAITING_FOR_CONCURRENCY); maybe_start_some_streams(t); @@ -844,8 +844,8 @@ static void perform_op_locked(transport *t, stream *s, grpc_transport_op *op) { static void perform_op(grpc_transport *gt, grpc_stream *gs, grpc_transport_op *op) { - transport *t = (transport *)gt; - stream *s = (stream *)gs; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; lock(t); perform_op_locked(t, s, op); @@ -854,14 +854,14 @@ static void perform_op(grpc_transport *gt, grpc_stream *gs, static void send_ping(grpc_transport *gt, void (*cb)(void *user_data), void *user_data) { - transport *t = (transport *)gt; - outstanding_ping *p; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + grpc_chttp2_outstanding_ping *p; lock(t); if (t->ping_capacity == t->ping_count) { t->ping_capacity = GPR_MAX(1, t->ping_capacity * 3 / 2); t->pings = - gpr_realloc(t->pings, sizeof(outstanding_ping) * t->ping_capacity); + gpr_realloc(t->pings, sizeof(grpc_chttp2_outstanding_ping) * t->ping_capacity); } p = &t->pings[t->ping_count++]; p->id[0] = (t->ping_counter >> 56) & 0xff; @@ -882,8 +882,8 @@ static void send_ping(grpc_transport *gt, void (*cb)(void *user_data), * INPUT PROCESSING */ -static void unlock_check_cancellations(transport *t) { - stream *s; +static void unlock_check_cancellations(grpc_chttp2_transport *t) { + grpc_chttp2_stream *s; if (t->writing.executing) { return; @@ -896,7 +896,7 @@ static void unlock_check_cancellations(transport *t) { } } -static void add_incoming_metadata(transport *t, stream *s, grpc_mdelem *elem) { +static void add_incoming_metadata(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_mdelem *elem) { if (s->incoming_metadata_capacity == s->incoming_metadata_count) { s->incoming_metadata_capacity = GPR_MAX(8, 2 * s->incoming_metadata_capacity); @@ -907,7 +907,7 @@ static void add_incoming_metadata(transport *t, stream *s, grpc_mdelem *elem) { s->incoming_metadata[s->incoming_metadata_count++].md = elem; } -static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, +static void cancel_stream_inner(grpc_chttp2_transport *t, grpc_chttp2_stream *s, gpr_uint32 id, grpc_status_code local_status, grpc_chttp2_error_code error_code, grpc_mdstr *optional_message, int send_rst, @@ -973,7 +973,7 @@ static void cancel_stream_inner(transport *t, stream *s, gpr_uint32 id, } } -static void cancel_stream_id(transport *t, gpr_uint32 id, +static void cancel_stream_id(grpc_chttp2_transport *t, gpr_uint32 id, grpc_status_code local_status, grpc_chttp2_error_code error_code, int send_rst) { lock(t); @@ -982,7 +982,7 @@ static void cancel_stream_id(transport *t, gpr_uint32 id, unlock(t); } -static void cancel_stream(transport *t, stream *s, +static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_status_code local_status, grpc_chttp2_error_code error_code, grpc_mdstr *optional_message, int send_rst) { @@ -990,16 +990,16 @@ static void cancel_stream(transport *t, stream *s, send_rst, 0); } -static void cancel_stream_cb(void *user_data, gpr_uint32 id, void *stream) { - cancel_stream(user_data, stream, GRPC_STATUS_UNAVAILABLE, +static void cancel_stream_cb(void *user_data, gpr_uint32 id, void *grpc_chttp2_stream) { + cancel_stream(user_data, grpc_chttp2_stream, GRPC_STATUS_UNAVAILABLE, GRPC_CHTTP2_INTERNAL_ERROR, NULL, 0); } -static void end_all_the_calls(transport *t) { +static void end_all_the_calls(grpc_chttp2_transport *t) { grpc_chttp2_stream_map_for_each(&t->stream_map, cancel_stream_cb, t); } -static void drop_connection(transport *t) { +static void drop_connection(grpc_chttp2_transport *t) { if (t->error_state == ERROR_STATE_NONE) { t->error_state = ERROR_STATE_SEEN; } @@ -1007,7 +1007,7 @@ static void drop_connection(transport *t) { end_all_the_calls(t); } -static void maybe_finish_read(transport *t, stream *s, int is_parser) { +static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, int is_parser) { if (is_parser) { stream_list_join(t, s, MAYBE_FINISH_READ_AFTER_PARSE); } else if (s->incoming_sopb) { @@ -1015,7 +1015,7 @@ static void maybe_finish_read(transport *t, stream *s, int is_parser) { } } -static void maybe_join_window_updates(transport *t, stream *s) { +static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (t->parsing.executing) { stream_list_join(t, s, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE); return; @@ -1029,7 +1029,7 @@ static void maybe_join_window_updates(transport *t, stream *s) { } } -static grpc_chttp2_parse_error update_incoming_window(transport *t, stream *s) { +static grpc_chttp2_parse_error update_incoming_window(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (t->incoming_frame_size > t->incoming_window) { gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", t->incoming_frame_size, t->incoming_window); @@ -1047,13 +1047,13 @@ static grpc_chttp2_parse_error update_incoming_window(transport *t, stream *s) { t->incoming_window -= t->incoming_frame_size; s->incoming_window -= t->incoming_frame_size; - /* if the stream incoming window is getting low, schedule an update */ + /* if the grpc_chttp2_stream incoming window is getting low, schedule an update */ stream_list_join(t, s, PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE); return GRPC_CHTTP2_PARSE_OK; } -static stream *lookup_stream(transport *t, gpr_uint32 id) { +static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id) { return grpc_chttp2_stream_map_find(&t->stream_map, id); } @@ -1065,7 +1065,7 @@ static grpc_chttp2_parse_error skip_parser(void *parser, static void skip_header(void *tp, grpc_mdelem *md) { grpc_mdelem_unref(md); } -static int parsing_init_skip_frame(transport *t, int is_header) { +static int parsing_init_skip_frame(grpc_chttp2_transport *t, int is_header) { if (is_header) { int is_eoh = t->expect_continuation_stream_id != 0; t->parser = grpc_chttp2_header_parser_parse; @@ -1080,12 +1080,12 @@ static int parsing_init_skip_frame(transport *t, int is_header) { return 1; } -static void parsing_become_skip_parser(transport *t) { +static void parsing_become_skip_parser(grpc_chttp2_transport *t) { parsing_init_skip_frame(t, t->parser == grpc_chttp2_header_parser_parse); } -static int parsing_init_data_frame_parser(transport *t) { - stream *s = lookup_stream(t, t->incoming_stream_id); +static int parsing_init_data_frame_parser(grpc_chttp2_transport *t) { + grpc_chttp2_stream *s = lookup_stream(t, t->incoming_stream_id); grpc_chttp2_parse_error err = GRPC_CHTTP2_PARSE_OK; if (!s || s->read_closed) return parsing_init_skip_frame(t, 0); if (err == GRPC_CHTTP2_PARSE_OK) { @@ -1118,8 +1118,8 @@ static int parsing_init_data_frame_parser(transport *t) { static void free_timeout(void *p) { gpr_free(p); } static void parsing_on_header(void *tp, grpc_mdelem *md) { - transport *t = tp; - stream *s = t->incoming_stream; + grpc_chttp2_transport *t = tp; + grpc_chttp2_stream *s = t->incoming_stream; GPR_ASSERT(s); @@ -1148,10 +1148,10 @@ static void parsing_on_header(void *tp, grpc_mdelem *md) { maybe_finish_read(t, s, 1); } -static int parsing_init_header_frame_parser(transport *t, int is_continuation) { +static int parsing_init_header_frame_parser(grpc_chttp2_transport *t, int is_continuation) { int is_eoh = (t->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_HEADERS) != 0; - stream *s; + grpc_chttp2_stream *s; if (is_eoh) { t->expect_continuation_stream_id = 0; @@ -1164,46 +1164,46 @@ static int parsing_init_header_frame_parser(transport *t, int is_continuation) { (t->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_STREAM) != 0; } - /* could be a new stream or an existing stream */ + /* could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream */ s = lookup_stream(t, t->incoming_stream_id); if (!s) { if (is_continuation) { - gpr_log(GPR_ERROR, "stream disbanded before CONTINUATION received"); + gpr_log(GPR_ERROR, "grpc_chttp2_stream disbanded before CONTINUATION received"); return parsing_init_skip_frame(t, 1); } if (t->is_client) { if ((t->incoming_stream_id & 1) && t->incoming_stream_id < t->next_stream_id) { - /* this is an old (probably cancelled) stream */ + /* this is an old (probably cancelled) grpc_chttp2_stream */ } else { - gpr_log(GPR_ERROR, "ignoring new stream creation on client"); + gpr_log(GPR_ERROR, "ignoring new grpc_chttp2_stream creation on client"); } return parsing_init_skip_frame(t, 1); } else if (t->last_incoming_stream_id > t->incoming_stream_id) { gpr_log(GPR_ERROR, - "ignoring out of order new stream request on server; last stream " - "id=%d, new stream id=%d", + "ignoring out of order new grpc_chttp2_stream request on server; last grpc_chttp2_stream " + "id=%d, new grpc_chttp2_stream id=%d", t->last_incoming_stream_id, t->incoming_stream_id); return parsing_init_skip_frame(t, 1); } else if ((t->incoming_stream_id & 1) == 0) { - gpr_log(GPR_ERROR, "ignoring stream with non-client generated index %d", + gpr_log(GPR_ERROR, "ignoring grpc_chttp2_stream with non-client generated index %d", t->incoming_stream_id); return parsing_init_skip_frame(t, 1); } t->incoming_stream = NULL; - /* if stream is accepted, we set incoming_stream in init_stream */ + /* if grpc_chttp2_stream is accepted, we set incoming_stream in init_stream */ t->channel_callback.cb->accept_stream(t->channel_callback.cb_user_data, &t->base, (void *)(gpr_uintptr)t->incoming_stream_id); s = t->incoming_stream; if (!s) { - gpr_log(GPR_ERROR, "stream not accepted"); + gpr_log(GPR_ERROR, "grpc_chttp2_stream not accepted"); return parsing_init_skip_frame(t, 1); } } else { t->incoming_stream = s; } if (t->incoming_stream->read_closed) { - gpr_log(GPR_ERROR, "skipping already closed stream header"); + gpr_log(GPR_ERROR, "skipping already closed grpc_chttp2_stream header"); t->incoming_stream = NULL; return parsing_init_skip_frame(t, 1); } @@ -1220,7 +1220,7 @@ static int parsing_init_header_frame_parser(transport *t, int is_continuation) { return 1; } -static int parsing_init_window_update_frame_parser(transport *t) { +static int parsing_init_window_update_frame_parser(grpc_chttp2_transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_window_update_parser_begin_frame( &t->parsing.simple.window_update, t->incoming_frame_size, @@ -1233,7 +1233,7 @@ static int parsing_init_window_update_frame_parser(transport *t) { return ok; } -static int parsing_init_ping_parser(transport *t) { +static int parsing_init_ping_parser(grpc_chttp2_transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_ping_parser_begin_frame(&t->parsing.simple.ping, t->incoming_frame_size, @@ -1246,7 +1246,7 @@ static int parsing_init_ping_parser(transport *t) { return ok; } -static int parsing_init_rst_stream_parser(transport *t) { +static int parsing_init_rst_stream_parser(grpc_chttp2_transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_rst_stream_parser_begin_frame( &t->parsing.simple.rst_stream, t->incoming_frame_size, @@ -1259,7 +1259,7 @@ static int parsing_init_rst_stream_parser(transport *t) { return ok; } -static int parsing_init_goaway_parser(transport *t) { +static int parsing_init_goaway_parser(grpc_chttp2_transport *t) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_goaway_parser_begin_frame( @@ -1272,11 +1272,11 @@ static int parsing_init_goaway_parser(transport *t) { return ok; } -static int parsing_init_settings_frame_parser(transport *t) { +static int parsing_init_settings_frame_parser(grpc_chttp2_transport *t) { int ok; if (t->incoming_stream_id != 0) { - gpr_log(GPR_ERROR, "settings frame received for stream %d", t->incoming_stream_id); + gpr_log(GPR_ERROR, "settings frame received for grpc_chttp2_stream %d", t->incoming_stream_id); drop_connection(t); return 0; } @@ -1298,7 +1298,7 @@ static int parsing_init_settings_frame_parser(transport *t) { return ok; } -static int init_frame_parser(transport *t) { +static int init_frame_parser(grpc_chttp2_transport *t) { if (t->expect_continuation_stream_id != 0) { if (t->incoming_frame_type != GRPC_CHTTP2_FRAME_CONTINUATION) { gpr_log(GPR_ERROR, "Expected CONTINUATION frame, got frame type %02x", @@ -1307,7 +1307,7 @@ static int init_frame_parser(transport *t) { } if (t->expect_continuation_stream_id != t->incoming_stream_id) { gpr_log(GPR_ERROR, - "Expected CONTINUATION frame for stream %08x, got stream %08x", + "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got grpc_chttp2_stream %08x", t->expect_continuation_stream_id, t->incoming_stream_id); return 0; } @@ -1343,7 +1343,7 @@ static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) { } */ -static void add_metadata_batch(transport *t, stream *s) { +static void add_metadata_batch(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { grpc_metadata_batch b; b.list.head = NULL; @@ -1359,7 +1359,7 @@ static void add_metadata_batch(transport *t, stream *s) { grpc_sopb_add_metadata(&s->parser.incoming_sopb, b); } -static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { +static int parse_frame_slice(grpc_chttp2_transport *t, gpr_slice slice, int is_last) { grpc_chttp2_parse_state st; size_t i; memset(&st, 0, sizeof(st)); @@ -1399,7 +1399,7 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { memcmp(t->pings[i].id, t->parsing.simple.ping.opaque_8bytes, 8)) { t->pings[i].cb(t->pings[i].user_data); memmove(&t->pings[i], &t->pings[i + 1], - (t->ping_count - i - 1) * sizeof(outstanding_ping)); + (t->ping_count - i - 1) * sizeof(grpc_chttp2_outstanding_ping)); t->ping_count--; break; } @@ -1407,21 +1407,21 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { } if (st.initial_window_update) { for (i = 0; i < t->stream_map.count; i++) { - stream *s = (stream *)(t->stream_map.values[i]); + grpc_chttp2_stream *s = (grpc_chttp2_stream *)(t->stream_map.values[i]); s->outgoing_window_update += st.initial_window_update; stream_list_join(t, s, NEW_OUTGOING_WINDOW); } } if (st.window_update) { if (t->incoming_stream_id) { - /* if there was a stream id, this is for some stream */ - stream *s = lookup_stream(t, t->incoming_stream_id); + /* if there was a grpc_chttp2_stream id, this is for some grpc_chttp2_stream */ + grpc_chttp2_stream *s = lookup_stream(t, t->incoming_stream_id); if (s) { s->outgoing_window_update += st.window_update; stream_list_join(t, s, NEW_OUTGOING_WINDOW); } } else { - /* transport level window update */ + /* grpc_chttp2_transport level window update */ t->outgoing_window_update += st.window_update; } } @@ -1442,7 +1442,7 @@ static int parse_frame_slice(transport *t, gpr_slice slice, int is_last) { return 0; } -static int process_read(transport *t, gpr_slice slice) { +static int process_read(grpc_chttp2_transport *t, gpr_slice slice) { gpr_uint8 *beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; @@ -1564,12 +1564,12 @@ static int process_read(transport *t, gpr_slice slice) { if (!init_frame_parser(t)) { return 0; } - /* t->last_incoming_stream_id is used as last-stream-id when + /* t->last_incoming_stream_id is used as last-grpc_chttp2_stream-id when sending GOAWAY frame. https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.8 - says that last-stream-id is peer-initiated stream ID. So, + says that last-grpc_chttp2_stream-id is peer-initiated grpc_chttp2_stream ID. So, since we don't have server pushed streams, client should send - GOAWAY last-stream-id=0 in this case. */ + GOAWAY last-grpc_chttp2_stream-id=0 in this case. */ if (!t->is_client) { t->last_incoming_stream_id = t->incoming_stream_id; } @@ -1626,8 +1626,8 @@ static int process_read(transport *t, gpr_slice slice) { /* tcp read callback */ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { - transport *t = tp; - stream *s; + grpc_chttp2_transport *t = tp; + grpc_chttp2_stream *s; size_t i; int keep_reading = 0; @@ -1705,7 +1705,7 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, return GRPC_STREAM_OPEN; } -static void patch_metadata_ops(stream *s) { +static void patch_metadata_ops(grpc_chttp2_stream *s) { grpc_stream_op *ops = s->incoming_sopb->ops; size_t nops = s->incoming_sopb->nops; size_t i; @@ -1758,8 +1758,8 @@ static void patch_metadata_ops(stream *s) { } } -static void unlock_check_parser(transport *t) { - stream *s; +static void unlock_check_parser(grpc_chttp2_transport *t) { + grpc_chttp2_stream *s; if (t->parsing.executing) { return; @@ -1792,8 +1792,8 @@ static void unlock_check_parser(transport *t) { } typedef struct { - transport *t; - pending_goaway *goaways; + grpc_chttp2_transport *t; + grpc_chttp2_pending_goaway *goaways; size_t num_goaways; grpc_iomgr_closure closure; } notify_goaways_args; @@ -1801,7 +1801,7 @@ typedef struct { static void notify_goaways(void *p, int iomgr_success_ignored) { size_t i; notify_goaways_args *a = p; - transport *t = a->t; + grpc_chttp2_transport *t = a->t; for (i = 0; i < a->num_goaways; i++) { t->channel_callback.cb->goaway( @@ -1821,7 +1821,7 @@ static void notify_goaways(void *p, int iomgr_success_ignored) { unref_transport(t); } -static void unlock_check_channel_callbacks(transport *t) { +static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { if (t->channel_callback.executing) { return; } @@ -1853,7 +1853,7 @@ static void unlock_check_channel_callbacks(transport *t) { } static void notify_closed(void *gt, int iomgr_success_ignored) { - transport *t = gt; + grpc_chttp2_transport *t = gt; t->channel_callback.cb->closed(t->channel_callback.cb_user_data, &t->base); lock(t); @@ -1863,7 +1863,7 @@ static void notify_closed(void *gt, int iomgr_success_ignored) { unref_transport(t); } -static void schedule_cb(transport *t, grpc_iomgr_closure *closure, int success) { +static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, int success) { closure->success = success; closure->next = t->global.pending_closures; t->global.pending_closures = closure; @@ -1873,14 +1873,14 @@ static void schedule_cb(transport *t, grpc_iomgr_closure *closure, int success) * POLLSET STUFF */ -static void add_to_pollset_locked(transport *t, grpc_pollset *pollset) { +static void add_to_pollset_locked(grpc_chttp2_transport *t, grpc_pollset *pollset) { if (t->ep) { grpc_endpoint_add_to_pollset(t->ep, pollset); } } static void add_to_pollset(grpc_transport *gt, grpc_pollset *pollset) { - transport *t = (transport *)gt; + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; lock(t); add_to_pollset_locked(t, pollset); unlock(t); @@ -1891,7 +1891,7 @@ static void add_to_pollset(grpc_transport *gt, grpc_pollset *pollset) { */ static const grpc_transport_vtable vtable = { - sizeof(stream), init_stream, perform_op, + sizeof(grpc_chttp2_stream), init_stream, perform_op, add_to_pollset, destroy_stream, goaway, close_transport, send_ping, destroy_transport}; @@ -1901,7 +1901,7 @@ void grpc_create_chttp2_transport(grpc_transport_setup_callback setup, grpc_endpoint *ep, gpr_slice *slices, size_t nslices, grpc_mdctx *mdctx, int is_client) { - transport *t = gpr_malloc(sizeof(transport)); + grpc_chttp2_transport *t = gpr_malloc(sizeof(grpc_chttp2_transport)); init_transport(t, setup, arg, channel_args, ep, slices, nslices, mdctx, is_client); } From 4152706dee4331627567d712d433e26449fe9b23 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:51:05 -0700 Subject: [PATCH 10/97] Add file to build.json --- BUILD | 2 ++ build.json | 1 + tools/doxygen/Doxyfile.core.internal | 2 +- vsprojects/grpc/grpc.vcxproj | 1 + vsprojects/grpc/grpc.vcxproj.filters | 3 +++ vsprojects/grpc_unsecure/grpc_unsecure.vcxproj | 1 + vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 +++ 7 files changed, 12 insertions(+), 1 deletion(-) diff --git a/BUILD b/BUILD index 1a9cdb68798..bc78728cbef 100644 --- a/BUILD +++ b/BUILD @@ -214,6 +214,7 @@ cc_library( "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", "src/core/transport/chttp2/stream_map.h", @@ -437,6 +438,7 @@ cc_library( "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", "src/core/transport/chttp2/stream_map.h", diff --git a/build.json b/build.json index af982390fbd..c9221016c8e 100644 --- a/build.json +++ b/build.json @@ -176,6 +176,7 @@ "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", "src/core/transport/chttp2/stream_map.h", diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 1aae2f35e96..91bc50bae29 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -760,7 +760,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c +INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj index 10be8f59929..65d814ba26e 100644 --- a/vsprojects/grpc/grpc.vcxproj +++ b/vsprojects/grpc/grpc.vcxproj @@ -242,6 +242,7 @@ + diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters index 4af61e51eb0..5aa5a390ea0 100644 --- a/vsprojects/grpc/grpc.vcxproj.filters +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -638,6 +638,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj index bd8ae4670a9..378da7a5de2 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -224,6 +224,7 @@ + diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters index dde460c83f8..0e48b92b3bb 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -521,6 +521,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 From 640d3bd02594114d38f1dd84360f135124916777 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:51:51 -0700 Subject: [PATCH 11/97] Add copyright --- src/core/transport/chttp2/internal.h | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index caf2092a18a..ba9bdb57527 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -1,3 +1,36 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #ifndef GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H #define GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H From d8df50c44f2ead317f1dbc585287f9c360a1f46b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:53:56 -0700 Subject: [PATCH 12/97] Make some buckets to pour code into --- BUILD | 4 +++ build.json | 2 ++ src/core/transport/chttp2/parsing.c | 34 +++++++++++++++++++ src/core/transport/chttp2/writing.c | 34 +++++++++++++++++++ tools/doxygen/Doxyfile.core.internal | 2 +- vsprojects/grpc/grpc.vcxproj | 4 +++ vsprojects/grpc/grpc.vcxproj.filters | 6 ++++ .../grpc_unsecure/grpc_unsecure.vcxproj | 4 +++ .../grpc_unsecure.vcxproj.filters | 6 ++++ 9 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 src/core/transport/chttp2/parsing.c create mode 100644 src/core/transport/chttp2/writing.c diff --git a/BUILD b/BUILD index bc78728cbef..8a3829fb6de 100644 --- a/BUILD +++ b/BUILD @@ -332,11 +332,13 @@ cc_library( "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2/writing.c", "src/core/transport/chttp2_transport.c", "src/core/transport/metadata.c", "src/core/transport/stream_op.c", @@ -534,11 +536,13 @@ cc_library( "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2/writing.c", "src/core/transport/chttp2_transport.c", "src/core/transport/metadata.c", "src/core/transport/stream_op.c", diff --git a/build.json b/build.json index c9221016c8e..60b965c188f 100644 --- a/build.json +++ b/build.json @@ -272,11 +272,13 @@ "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2/writing.c", "src/core/transport/chttp2_transport.c", "src/core/transport/metadata.c", "src/core/transport/stream_op.c", diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c new file mode 100644 index 00000000000..2a0cf2562fe --- /dev/null +++ b/src/core/transport/chttp2/parsing.c @@ -0,0 +1,34 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/transport/chttp2/internal.h" diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c new file mode 100644 index 00000000000..2a0cf2562fe --- /dev/null +++ b/src/core/transport/chttp2/writing.c @@ -0,0 +1,34 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/transport/chttp2/internal.h" diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 91bc50bae29..6c910d0e990 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -760,7 +760,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c +INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/parsing.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2/writing.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj index 65d814ba26e..dc33ba306fb 100644 --- a/vsprojects/grpc/grpc.vcxproj +++ b/vsprojects/grpc/grpc.vcxproj @@ -468,6 +468,8 @@ + + @@ -478,6 +480,8 @@ + + diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters index 5aa5a390ea0..d946b15255e 100644 --- a/vsprojects/grpc/grpc.vcxproj.filters +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -319,6 +319,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 @@ -334,6 +337,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj index 378da7a5de2..d5ccc2e0c71 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -406,6 +406,8 @@ + + @@ -416,6 +418,8 @@ + + diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters index 0e48b92b3bb..77a5fa8ad4b 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -253,6 +253,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 @@ -268,6 +271,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport From 5b419c72437cd2f84946e0fc7a0e1a595c0d0d8e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:56:21 -0700 Subject: [PATCH 13/97] Make some buckets to pour code into --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index b467f81ef90..ac6678053d4 100644 --- a/Makefile +++ b/Makefile @@ -3029,11 +3029,13 @@ LIBGRPC_SRC = \ src/core/transport/chttp2/hpack_parser.c \ src/core/transport/chttp2/hpack_table.c \ src/core/transport/chttp2/huffsyms.c \ + src/core/transport/chttp2/parsing.c \ src/core/transport/chttp2/status_conversion.c \ src/core/transport/chttp2/stream_encoder.c \ src/core/transport/chttp2/stream_map.c \ src/core/transport/chttp2/timeout_encoding.c \ src/core/transport/chttp2/varint.c \ + src/core/transport/chttp2/writing.c \ src/core/transport/chttp2_transport.c \ src/core/transport/metadata.c \ src/core/transport/stream_op.c \ @@ -3275,11 +3277,13 @@ LIBGRPC_UNSECURE_SRC = \ src/core/transport/chttp2/hpack_parser.c \ src/core/transport/chttp2/hpack_table.c \ src/core/transport/chttp2/huffsyms.c \ + src/core/transport/chttp2/parsing.c \ src/core/transport/chttp2/status_conversion.c \ src/core/transport/chttp2/stream_encoder.c \ src/core/transport/chttp2/stream_map.c \ src/core/transport/chttp2/timeout_encoding.c \ src/core/transport/chttp2/varint.c \ + src/core/transport/chttp2/writing.c \ src/core/transport/chttp2_transport.c \ src/core/transport/metadata.c \ src/core/transport/stream_op.c \ From 05923eee98c2ca77a4ae51633e7f0784258d7c51 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:56:42 -0700 Subject: [PATCH 14/97] Tweaks --- src/core/transport/chttp2/parsing.c | 1 + src/core/transport/chttp2_transport.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 2a0cf2562fe..9a547ad3199 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -32,3 +32,4 @@ */ #include "src/core/transport/chttp2/internal.h" + diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 96df8bdf274..d011e4e70ea 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1649,14 +1649,14 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, case GRPC_ENDPOINT_CB_OK: lock(t); GPR_ASSERT(!t->parsing.executing); - t->parsing.executing = 1; if (t->error_state == ERROR_STATE_NONE) { + t->parsing.executing = 1; gpr_mu_unlock(&t->mu); for (i = 0; i < nslices && process_read(t, slices[i]); i++) ; + t->parsing.executing = 0; gpr_mu_lock(&t->mu); } - t->parsing.executing = 0; while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { maybe_finish_read(t, s, 0); } From 1911c3b2c4cbeb2364705d66b28145655e56f7ad Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 07:56:57 -0700 Subject: [PATCH 15/97] Tweaks --- src/core/transport/chttp2_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index d011e4e70ea..77537875789 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1654,8 +1654,8 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, gpr_mu_unlock(&t->mu); for (i = 0; i < nslices && process_read(t, slices[i]); i++) ; - t->parsing.executing = 0; gpr_mu_lock(&t->mu); + t->parsing.executing = 0; } while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { maybe_finish_read(t, s, 0); From 3208e3922a246375f68969630941267e1a8930a3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 08:17:02 -0700 Subject: [PATCH 16/97] Progress --- src/core/transport/chttp2/internal.h | 14 ++++ src/core/transport/chttp2/writing.c | 90 +++++++++++++++++++++++ src/core/transport/chttp2_transport.c | 100 +------------------------- 3 files changed, 105 insertions(+), 99 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index ba9bdb57527..a21a7a4d759 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -35,6 +35,16 @@ #define GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H #include "src/core/transport/transport_impl.h" +#include "src/core/iomgr/endpoint.h" +#include "src/core/transport/chttp2/frame_data.h" +#include "src/core/transport/chttp2/frame_goaway.h" +#include "src/core/transport/chttp2/frame_ping.h" +#include "src/core/transport/chttp2/frame_rst_stream.h" +#include "src/core/transport/chttp2/frame_settings.h" +#include "src/core/transport/chttp2/frame_window_update.h" +#include "src/core/transport/chttp2/stream_map.h" +#include "src/core/transport/chttp2/hpack_parser.h" +#include "src/core/transport/chttp2/stream_encoder.h" typedef struct grpc_chttp2_transport grpc_chttp2_transport; typedef struct grpc_chttp2_stream grpc_chttp2_stream; @@ -336,4 +346,8 @@ struct grpc_chttp2_stream { grpc_stream_op_buffer callback_sopb; }; +/** Someone is unlocking the transport mutex: check to see if writes + are required, and schedule them if so */ +void grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); + #endif diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 2a0cf2562fe..a1830a8c253 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -32,3 +32,93 @@ */ #include "src/core/transport/chttp2/internal.h" + +#include + +static void grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport *t) { + grpc_chttp2_stream *s; + gpr_uint32 window_delta; + + /* don't do anything if we are already writing */ + if (t->writing.executing) { + return; + } + + /* simple writes are queued to qbuf, and flushed here */ + gpr_slice_buffer_swap(&t->global.qbuf, &t->writing.outbuf); + GPR_ASSERT(t->global.qbuf.count == 0); + + if (t->dirtied_local_settings && !t->sent_local_settings) { + gpr_slice_buffer_add( + &t->writing.outbuf, grpc_chttp2_settings_create( + t->settings[SENT_SETTINGS], t->settings[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; + } + + /* 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 (t->outgoing_window && (s = stream_list_remove_head(t, WRITABLE)) && + s->outgoing_window > 0) { + window_delta = grpc_chttp2_preencode( + s->outgoing_sopb->ops, &s->outgoing_sopb->nops, + GPR_MIN(t->outgoing_window, s->outgoing_window), &s->writing.sopb); + FLOWCTL_TRACE(t, t, outgoing, 0, -(gpr_int64)window_delta); + FLOWCTL_TRACE(t, s, outgoing, s->id, -(gpr_int64)window_delta); + t->outgoing_window -= window_delta; + s->outgoing_window -= window_delta; + + if (s->write_state == WRITE_STATE_QUEUED_CLOSE && + s->outgoing_sopb->nops == 0) { + if (!t->is_client && !s->read_closed) { + s->writing.send_closed = SEND_CLOSED_WITH_RST_STREAM; + } else { + s->writing.send_closed = SEND_CLOSED; + } + } + if (s->writing.sopb.nops > 0 || s->writing.send_closed) { + stream_list_join(t, s, WRITING); + } + + /* we should either exhaust window or have no ops left, but not both */ + if (s->outgoing_sopb->nops == 0) { + s->outgoing_sopb = NULL; + schedule_cb(t, s->global.send_done_closure, 1); + } else if (s->outgoing_window) { + stream_list_add_tail(t, s, WRITABLE); + } + } + + if (!t->parsing.executing) { + /* for each grpc_chttp2_stream that wants to update its window, add that window here */ + while ((s = stream_list_remove_head(t, WINDOW_UPDATE))) { + window_delta = + t->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - + s->incoming_window; + if (!s->read_closed && window_delta) { + gpr_slice_buffer_add( + &t->writing.outbuf, grpc_chttp2_window_update_create(s->id, window_delta)); + FLOWCTL_TRACE(t, s, incoming, s->id, window_delta); + s->incoming_window += window_delta; + } + } + + /* if the grpc_chttp2_transport is ready to send a window update, do so here also */ + if (t->incoming_window < t->connection_window_target * 3 / 4) { + window_delta = t->connection_window_target - t->incoming_window; + gpr_slice_buffer_add(&t->writing.outbuf, + grpc_chttp2_window_update_create(0, window_delta)); + FLOWCTL_TRACE(t, t, incoming, 0, window_delta); + t->incoming_window += window_delta; + } + } + + if (t->writing.outbuf.length > 0 || !stream_list_empty(t, WRITING)) { + t->writing.executing = 1; + ref_transport(t); + gpr_log(GPR_DEBUG, "schedule write"); + schedule_cb(t, &t->writing.action, 1); + } +} diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 77537875789..1cfbc07d971 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -39,17 +39,8 @@ #include "src/core/profiling/timers.h" #include "src/core/support/string.h" -#include "src/core/transport/chttp2/frame_data.h" -#include "src/core/transport/chttp2/frame_goaway.h" -#include "src/core/transport/chttp2/frame_ping.h" -#include "src/core/transport/chttp2/frame_rst_stream.h" -#include "src/core/transport/chttp2/frame_settings.h" -#include "src/core/transport/chttp2/frame_window_update.h" -#include "src/core/transport/chttp2/hpack_parser.h" #include "src/core/transport/chttp2/http2_errors.h" #include "src/core/transport/chttp2/status_conversion.h" -#include "src/core/transport/chttp2/stream_encoder.h" -#include "src/core/transport/chttp2/stream_map.h" #include "src/core/transport/chttp2/timeout_encoding.h" #include "src/core/transport/chttp2/internal.h" #include "src/core/transport/transport_impl.h" @@ -90,7 +81,6 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, static void lock(grpc_chttp2_transport *t); static void unlock(grpc_chttp2_transport *t); -static void unlock_check_writes(grpc_chttp2_transport* t); static void unlock_check_cancellations(grpc_chttp2_transport* t); static void unlock_check_parser(grpc_chttp2_transport* t); static void unlock_check_channel_callbacks(grpc_chttp2_transport* t); @@ -535,7 +525,7 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_chttp2_transport *t) { grpc_iomgr_closure *run_closures; - unlock_check_writes(t); + grpc_chttp2_unlocking_check_writes(t); unlock_check_cancellations(t); unlock_check_parser(t); unlock_check_channel_callbacks(t); @@ -571,94 +561,6 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, } } -static void unlock_check_writes(grpc_chttp2_transport *t) { - grpc_chttp2_stream *s; - gpr_uint32 window_delta; - - /* don't do anything if we are already writing */ - if (t->writing.executing) { - return; - } - - /* simple writes are queued to qbuf, and flushed here */ - gpr_slice_buffer_swap(&t->global.qbuf, &t->writing.outbuf); - GPR_ASSERT(t->global.qbuf.count == 0); - - if (t->dirtied_local_settings && !t->sent_local_settings) { - gpr_slice_buffer_add( - &t->writing.outbuf, grpc_chttp2_settings_create( - t->settings[SENT_SETTINGS], t->settings[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; - } - - /* 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 (t->outgoing_window && (s = stream_list_remove_head(t, WRITABLE)) && - s->outgoing_window > 0) { - window_delta = grpc_chttp2_preencode( - s->outgoing_sopb->ops, &s->outgoing_sopb->nops, - GPR_MIN(t->outgoing_window, s->outgoing_window), &s->writing.sopb); - FLOWCTL_TRACE(t, t, outgoing, 0, -(gpr_int64)window_delta); - FLOWCTL_TRACE(t, s, outgoing, s->id, -(gpr_int64)window_delta); - t->outgoing_window -= window_delta; - s->outgoing_window -= window_delta; - - if (s->write_state == WRITE_STATE_QUEUED_CLOSE && - s->outgoing_sopb->nops == 0) { - if (!t->is_client && !s->read_closed) { - s->writing.send_closed = SEND_CLOSED_WITH_RST_STREAM; - } else { - s->writing.send_closed = SEND_CLOSED; - } - } - if (s->writing.sopb.nops > 0 || s->writing.send_closed) { - stream_list_join(t, s, WRITING); - } - - /* we should either exhaust window or have no ops left, but not both */ - if (s->outgoing_sopb->nops == 0) { - s->outgoing_sopb = NULL; - schedule_cb(t, s->global.send_done_closure, 1); - } else if (s->outgoing_window) { - stream_list_add_tail(t, s, WRITABLE); - } - } - - if (!t->parsing.executing) { - /* for each grpc_chttp2_stream that wants to update its window, add that window here */ - while ((s = stream_list_remove_head(t, WINDOW_UPDATE))) { - window_delta = - t->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - - s->incoming_window; - if (!s->read_closed && window_delta) { - gpr_slice_buffer_add( - &t->writing.outbuf, grpc_chttp2_window_update_create(s->id, window_delta)); - FLOWCTL_TRACE(t, s, incoming, s->id, window_delta); - s->incoming_window += window_delta; - } - } - - /* if the grpc_chttp2_transport is ready to send a window update, do so here also */ - if (t->incoming_window < t->connection_window_target * 3 / 4) { - window_delta = t->connection_window_target - t->incoming_window; - gpr_slice_buffer_add(&t->writing.outbuf, - grpc_chttp2_window_update_create(0, window_delta)); - FLOWCTL_TRACE(t, t, incoming, 0, window_delta); - t->incoming_window += window_delta; - } - } - - if (t->writing.outbuf.length > 0 || !stream_list_empty(t, WRITING)) { - t->writing.executing = 1; - ref_transport(t); - gpr_log(GPR_DEBUG, "schedule write"); - schedule_cb(t, &t->writing.action, 1); - } -} - static void writing_finalize_outbuf(grpc_chttp2_transport *t) { grpc_chttp2_stream *s; From d20efd26e3a8448531d56050942ef66935311ef5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 16:17:09 -0700 Subject: [PATCH 17/97] Progress on splitting things up --- BUILD | 2 - src/core/transport/chttp2/frame.h | 6 + src/core/transport/chttp2/frame_data.c | 10 +- src/core/transport/chttp2/frame_data.h | 2 +- src/core/transport/chttp2/frame_goaway.c | 12 +- src/core/transport/chttp2/frame_goaway.h | 2 +- src/core/transport/chttp2/frame_ping.h | 2 +- src/core/transport/chttp2/frame_rst_stream.h | 2 +- src/core/transport/chttp2/frame_settings.h | 2 +- .../transport/chttp2/frame_window_update.h | 2 +- src/core/transport/chttp2/hpack_parser.h | 2 +- src/core/transport/chttp2/internal.h | 293 +++++-- src/core/transport/chttp2/parsing.c | 607 +++++++++++++ src/core/transport/chttp2/writing.c | 174 ++-- src/core/transport/chttp2_transport.c | 815 ++---------------- tools/doxygen/Doxyfile.core.internal | 2 +- vsprojects/grpc/grpc.vcxproj | 1 - vsprojects/grpc/grpc.vcxproj.filters | 3 - .../grpc_unsecure/grpc_unsecure.vcxproj | 1 - .../grpc_unsecure.vcxproj.filters | 3 - 20 files changed, 1028 insertions(+), 915 deletions(-) diff --git a/BUILD b/BUILD index 8a3829fb6de..00d2ac24b83 100644 --- a/BUILD +++ b/BUILD @@ -203,7 +203,6 @@ cc_library( "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", "src/core/transport/chttp2/frame_data.h", "src/core/transport/chttp2/frame_goaway.h", "src/core/transport/chttp2/frame_ping.h", @@ -429,7 +428,6 @@ cc_library( "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", "src/core/transport/chttp2/frame_data.h", "src/core/transport/chttp2/frame_goaway.h", "src/core/transport/chttp2/frame_ping.h", diff --git a/src/core/transport/chttp2/frame.h b/src/core/transport/chttp2/frame.h index c9e3e130426..9012bfa1e16 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/transport/chttp2/frame.h @@ -45,6 +45,7 @@ typedef enum { GRPC_CHTTP2_CONNECTION_ERROR } grpc_chttp2_parse_error; +#if 0 typedef struct { gpr_uint8 end_of_stream; gpr_uint8 need_flush_reads; @@ -62,6 +63,11 @@ typedef struct { gpr_slice goaway_text; gpr_uint32 rst_stream_reason; } grpc_chttp2_parse_state; +#endif + +/* defined in internal.h */ +typedef struct grpc_chttp2_stream_parsing grpc_chttp2_stream_parsing; +typedef struct grpc_chttp2_transport_parsing grpc_chttp2_transport_parsing; #define GRPC_CHTTP2_FRAME_DATA 0 #define GRPC_CHTTP2_FRAME_HEADER 1 diff --git a/src/core/transport/chttp2/frame_data.c b/src/core/transport/chttp2/frame_data.c index a1ae9ed2e65..129d2110437 100644 --- a/src/core/transport/chttp2/frame_data.c +++ b/src/core/transport/chttp2/frame_data.c @@ -35,6 +35,7 @@ #include +#include "src/core/transport/chttp2/internal.h" #include "src/core/support/string.h" #include #include @@ -69,7 +70,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); @@ -77,8 +78,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( grpc_chttp2_data_parser *p = parser; if (is_last && p->is_last_frame) { - state->end_of_stream = 1; - state->need_flush_reads = 1; + stream_parsing->received_close = 1; } if (cur == end) { @@ -129,27 +129,23 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( p->frame_size |= ((gpr_uint32) * cur); p->state = GRPC_CHTTP2_DATA_FRAME; ++cur; - state->need_flush_reads = 1; grpc_sopb_add_begin_message(&p->incoming_sopb, p->frame_size, 0); /* fallthrough */ case GRPC_CHTTP2_DATA_FRAME: if (cur == end) { return GRPC_CHTTP2_PARSE_OK; } else if ((gpr_uint32)(end - cur) == p->frame_size) { - state->need_flush_reads = 1; grpc_sopb_add_slice(&p->incoming_sopb, gpr_slice_sub(slice, cur - beg, end - beg)); p->state = GRPC_CHTTP2_DATA_FH_0; return GRPC_CHTTP2_PARSE_OK; } else if ((gpr_uint32)(end - cur) > p->frame_size) { - state->need_flush_reads = 1; grpc_sopb_add_slice( &p->incoming_sopb, gpr_slice_sub(slice, cur - beg, cur + p->frame_size - beg)); cur += p->frame_size; goto fh_0; /* loop */ } else { - state->need_flush_reads = 1; grpc_sopb_add_slice(&p->incoming_sopb, gpr_slice_sub(slice, cur - beg, end - beg)); p->frame_size -= (end - cur); diff --git a/src/core/transport/chttp2/frame_data.h b/src/core/transport/chttp2/frame_data.h index 24e557accd1..dbbb87fc019 100644 --- a/src/core/transport/chttp2/frame_data.h +++ b/src/core/transport/chttp2/frame_data.h @@ -72,7 +72,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_begin_frame( /* handle a slice of a data frame - is_last indicates the last slice of a frame */ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); /* create a slice with an empty data frame and is_last set */ gpr_slice grpc_chttp2_data_frame_create_empty_close(gpr_uint32 id); diff --git a/src/core/transport/chttp2/frame_goaway.c b/src/core/transport/chttp2/frame_goaway.c index 95b75d4fded..d7d6c587e64 100644 --- a/src/core/transport/chttp2/frame_goaway.c +++ b/src/core/transport/chttp2/frame_goaway.c @@ -32,6 +32,7 @@ */ #include "src/core/transport/chttp2/frame_goaway.h" +#include "src/core/transport/chttp2/internal.h" #include @@ -62,7 +63,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); @@ -139,10 +140,11 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->debug_pos += end - cur; p->state = GRPC_CHTTP2_GOAWAY_DEBUG; if (is_last) { - state->goaway = 1; - state->goaway_last_stream_index = p->last_stream_id; - state->goaway_error = p->error_code; - state->goaway_text = + transport_parsing->goaway_received = 1; + transport_parsing->goaway_last_stream_index = p->last_stream_id; + gpr_slice_unref(transport_parsing->goaway_text); + transport_parsing->goaway_error = p->error_code; + transport_parsing->goaway_text = gpr_slice_new(p->debug_data, p->debug_length, gpr_free); p->debug_data = NULL; } diff --git a/src/core/transport/chttp2/frame_goaway.h b/src/core/transport/chttp2/frame_goaway.h index 76388915142..8148fa90f23 100644 --- a/src/core/transport/chttp2/frame_goaway.h +++ b/src/core/transport/chttp2/frame_goaway.h @@ -65,7 +65,7 @@ void grpc_chttp2_goaway_parser_destroy(grpc_chttp2_goaway_parser *p); grpc_chttp2_parse_error grpc_chttp2_goaway_parser_begin_frame( grpc_chttp2_goaway_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); void grpc_chttp2_goaway_append(gpr_uint32 last_stream_id, gpr_uint32 error_code, gpr_slice debug_data, diff --git a/src/core/transport/chttp2/frame_ping.h b/src/core/transport/chttp2/frame_ping.h index 11d38b80ea5..71f8351223c 100644 --- a/src/core/transport/chttp2/frame_ping.h +++ b/src/core/transport/chttp2/frame_ping.h @@ -48,6 +48,6 @@ gpr_slice grpc_chttp2_ping_create(gpr_uint8 ack, gpr_uint8 *opaque_8bytes); grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( grpc_chttp2_ping_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); #endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H */ diff --git a/src/core/transport/chttp2/frame_rst_stream.h b/src/core/transport/chttp2/frame_rst_stream.h index 07a3c98d032..b83d1261d05 100644 --- a/src/core/transport/chttp2/frame_rst_stream.h +++ b/src/core/transport/chttp2/frame_rst_stream.h @@ -47,6 +47,6 @@ gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 stream_id, gpr_uint32 code); grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); #endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H */ diff --git a/src/core/transport/chttp2/frame_settings.h b/src/core/transport/chttp2/frame_settings.h index 18765631a68..701f2b94d2e 100644 --- a/src/core/transport/chttp2/frame_settings.h +++ b/src/core/transport/chttp2/frame_settings.h @@ -94,6 +94,6 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_settings_parser *parser, gpr_uint32 length, gpr_uint8 flags, gpr_uint32 *settings); grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); #endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H */ diff --git a/src/core/transport/chttp2/frame_window_update.h b/src/core/transport/chttp2/frame_window_update.h index 85475a8f9ef..7217325beb4 100644 --- a/src/core/transport/chttp2/frame_window_update.h +++ b/src/core/transport/chttp2/frame_window_update.h @@ -50,6 +50,6 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); #endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H */ diff --git a/src/core/transport/chttp2/hpack_parser.h b/src/core/transport/chttp2/hpack_parser.h index bfc06b39803..507d7cfea0d 100644 --- a/src/core/transport/chttp2/hpack_parser.h +++ b/src/core/transport/chttp2/hpack_parser.h @@ -107,7 +107,7 @@ int grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, /* wraps grpc_chttp2_hpack_parser_parse to provide a frame level parser for the transport */ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( - void *hpack_parser, grpc_chttp2_parse_state *state, gpr_slice slice, + void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); #endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H */ diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index a21a7a4d759..5eba01a3e1b 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -36,6 +36,7 @@ #include "src/core/transport/transport_impl.h" #include "src/core/iomgr/endpoint.h" +#include "src/core/transport/chttp2/frame.h" #include "src/core/transport/chttp2/frame_data.h" #include "src/core/transport/chttp2/frame_goaway.h" #include "src/core/transport/chttp2/frame_ping.h" @@ -172,16 +173,110 @@ typedef struct { gpr_slice debug; } grpc_chttp2_pending_goaway; +typedef struct { + /** data to write next write */ + gpr_slice_buffer qbuf; + /** queued callbacks */ + grpc_iomgr_closure *pending_closures; + + /** window available for us to send to peer */ + gpr_uint32 outgoing_window; + /** how much window would we like to have for incoming_window */ + gpr_uint32 connection_window_target; + + + /** are the local settings dirty and need to be sent? */ + gpr_uint8 dirtied_local_settings; + /** have local settings been sent? */ + gpr_uint8 sent_local_settings; + /** bitmask of setting indexes to send out */ + gpr_uint32 force_send_settings; + /** settings values */ + gpr_uint32 settings[NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; + + /** last received stream id */ + gpr_uint32 last_incoming_stream_id; +} grpc_chttp2_transport_global; + +typedef struct { + /** data to write now */ + gpr_slice_buffer outbuf; + /** hpack encoding */ + grpc_chttp2_hpack_compressor hpack_compressor; +} grpc_chttp2_transport_writing; + +struct grpc_chttp2_transport_parsing { + /** is this transport a client? (boolean) */ + gpr_uint8 is_client; + + /** were settings updated? */ + gpr_uint8 settings_updated; + /** was a settings ack received? */ + gpr_uint8 settings_ack_received; + /** was a goaway frame received? */ + gpr_uint8 goaway_received; + + /** data to write later - after parsing */ + gpr_slice_buffer qbuf; + /* metadata object cache */ + grpc_mdstr *str_grpc_timeout; + /** parser for headers */ + grpc_chttp2_hpack_parser hpack_parser; + /** simple one shot parsers */ + union { + grpc_chttp2_window_update_parser window_update; + grpc_chttp2_settings_parser settings; + grpc_chttp2_ping_parser ping; + grpc_chttp2_rst_stream_parser rst_stream; + } simple; + /** parser for goaway frames */ + grpc_chttp2_goaway_parser goaway_parser; + + /** window available for peer to send to us */ + gpr_uint32 incoming_window; + + /** next stream id available at the time of beginning parsing */ + gpr_uint32 next_stream_id; + gpr_uint32 last_incoming_stream_id; + + /* deframing */ + grpc_chttp2_deframe_transport_state deframe_state; + gpr_uint8 incoming_frame_type; + gpr_uint8 incoming_frame_flags; + gpr_uint8 header_eof; + gpr_uint32 expect_continuation_stream_id; + gpr_uint32 incoming_frame_size; + gpr_uint32 incoming_stream_id; + + /* active parser */ + void *parser_data; + grpc_chttp2_stream_parsing *incoming_stream; + grpc_chttp2_parse_error (*parser)(void *parser_user_data, + grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, + gpr_slice slice, int is_last); + + /* received settings */ + gpr_uint32 settings[GRPC_CHTTP2_NUM_SETTINGS]; + + /* goaway data */ + grpc_status_code goaway_error; + gpr_uint32 goaway_last_stream_index; + gpr_slice goaway_text; +}; + + struct grpc_chttp2_transport { grpc_transport base; /* must be first */ grpc_endpoint *ep; grpc_mdctx *metadata_context; gpr_refcount refs; - gpr_uint8 is_client; gpr_mu mu; gpr_cv cv; + /** is a thread currently writing */ + gpr_uint8 writing_active; + /* basic state management - what are we doing at the moment? */ gpr_uint8 reading; /** are we calling back any grpc_transport_op completion events */ @@ -192,28 +287,9 @@ struct grpc_chttp2_transport { /* stream indexing */ gpr_uint32 next_stream_id; - gpr_uint32 last_incoming_stream_id; - - /* settings */ - gpr_uint32 settings[NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; - gpr_uint32 force_send_settings; /* bitmask of setting indexes to send out */ - gpr_uint8 sent_local_settings; /* have local settings been sent? */ - gpr_uint8 dirtied_local_settings; /* are the local settings dirty? */ /* window management */ - gpr_uint32 outgoing_window; gpr_uint32 outgoing_window_update; - gpr_uint32 incoming_window; - gpr_uint32 connection_window_target; - - /* deframing */ - grpc_chttp2_deframe_transport_state deframe_state; - gpr_uint8 incoming_frame_type; - gpr_uint8 incoming_frame_flags; - gpr_uint8 header_eof; - gpr_uint32 expect_continuation_stream_id; - gpr_uint32 incoming_frame_size; - gpr_uint32 incoming_stream_id; /* goaway */ grpc_chttp2_pending_goaway *pending_goaways; @@ -226,13 +302,6 @@ struct grpc_chttp2_transport { /* stream ops that need to be destroyed, but outside of the lock */ grpc_stream_op_buffer nuke_later_sopb; - /* active parser */ - void *parser_data; - grpc_chttp2_stream *incoming_stream; - grpc_chttp2_parse_error (*parser)(void *parser_user_data, - grpc_chttp2_parse_state *state, - gpr_slice slice, int is_last); - grpc_chttp2_stream_list lists[STREAM_LIST_COUNT]; grpc_chttp2_stream_map stream_map; @@ -242,46 +311,12 @@ struct grpc_chttp2_transport { size_t ping_capacity; gpr_int64 ping_counter; - struct { - /* metadata object cache */ - grpc_mdstr *str_grpc_timeout; - } constants; - - struct { - /** data to write next write */ - gpr_slice_buffer qbuf; - /* queued callbacks */ - grpc_iomgr_closure *pending_closures; - } global; - - struct { - /** is a thread currently writing */ - gpr_uint8 executing; - /** closure to execute this action */ - grpc_iomgr_closure action; - /** data to write now */ - gpr_slice_buffer outbuf; - /* hpack encoding */ - grpc_chttp2_hpack_compressor hpack_compressor; - } writing; + grpc_chttp2_transport_global global; + grpc_chttp2_transport_writing writing; + grpc_chttp2_transport_parsing parsing; - struct { - /** is a thread currently parsing */ - gpr_uint8 executing; - /** data to write later - after parsing */ - gpr_slice_buffer qbuf; - /** parser for headers */ - grpc_chttp2_hpack_parser hpack_parser; - /** simple one shot parsers */ - union { - grpc_chttp2_window_update_parser window_update; - grpc_chttp2_settings_parser settings; - grpc_chttp2_ping_parser ping; - grpc_chttp2_rst_stream_parser rst_stream; - } simple; - /** parser for goaway frames */ - grpc_chttp2_goaway_parser goaway_parser; - } parsing; + /** closure to execute writing */ + grpc_iomgr_closure writing_action; struct { /** is a thread currently performing channel callbacks */ @@ -295,37 +330,47 @@ struct grpc_chttp2_transport { } channel_callback; }; -struct grpc_chttp2_stream { - struct { - grpc_iomgr_closure *send_done_closure; - grpc_iomgr_closure *recv_done_closure; - } global; - - struct { - /* sops that have passed flow control to be written */ - grpc_stream_op_buffer sopb; - /* how strongly should we indicate closure with the next write */ - grpc_chttp2_send_closed send_closed; - } writing; - - struct { - int unused; - } parsing; - +typedef struct { + /** HTTP2 stream id for this stream, or zero if one has not been assigned */ gpr_uint32 id; - gpr_uint32 incoming_window; + grpc_iomgr_closure *send_done_closure; + grpc_iomgr_closure *recv_done_closure; + + /** window available for us to send to peer */ gpr_int64 outgoing_window; - gpr_uint32 outgoing_window_update; - /* when the application requests writes be closed, the write_closed is - 'queued'; when the close is flow controlled into the send path, we are - 'sending' it; when the write has been performed it is 'sent' */ + /** stream ops the transport user would like to send */ + grpc_stream_op_buffer *outgoing_sopb; + /** when the application requests writes be closed, the write_closed is + 'queued'; when the close is flow controlled into the send path, we are + 'sending' it; when the write has been performed it is 'sent' */ grpc_chttp2_write_state write_state; + /** is this stream closed (boolean) */ gpr_uint8 read_closed; - gpr_uint8 cancelled; +} grpc_chttp2_stream_global; - grpc_chttp2_stream_link links[STREAM_LIST_COUNT]; - gpr_uint8 included[STREAM_LIST_COUNT]; +typedef struct { + /** HTTP2 stream id for this stream, or zero if one has not been assigned */ + gpr_uint32 id; + /** sops that have passed flow control to be written */ + grpc_stream_op_buffer sopb; + /** how strongly should we indicate closure with the next write */ + grpc_chttp2_send_closed send_closed; +} grpc_chttp2_stream_writing; + +struct grpc_chttp2_stream_parsing { + /** HTTP2 stream id for this stream, or zero if one has not been assigned */ + gpr_uint32 id; + /** has this stream received a close */ + gpr_uint8 received_close; + /** incoming_window has been reduced during parsing */ + gpr_uint8 incoming_window_changed; + /** saw an error on this stream during parsing (it should be cancelled) */ + gpr_uint8 saw_error; + /** window available for peer to send to us */ + gpr_uint32 incoming_window; + /** parsing state for data frames */ + grpc_chttp2_data_parser data_parser; /* incoming metadata */ grpc_linked_mdelem *incoming_metadata; @@ -333,21 +378,79 @@ struct grpc_chttp2_stream { size_t incoming_metadata_capacity; grpc_linked_mdelem *old_incoming_metadata; gpr_timespec incoming_deadline; +}; + +struct grpc_chttp2_stream { + grpc_chttp2_stream_global global; + grpc_chttp2_stream_writing writing; + + gpr_uint32 outgoing_window_update; + gpr_uint8 cancelled; + + grpc_chttp2_stream_link links[STREAM_LIST_COUNT]; + gpr_uint8 included[STREAM_LIST_COUNT]; /* sops from application */ - grpc_stream_op_buffer *outgoing_sopb; grpc_stream_op_buffer *incoming_sopb; grpc_stream_state *publish_state; grpc_stream_state published_state; - grpc_chttp2_data_parser parser; - grpc_stream_state callback_state; grpc_stream_op_buffer callback_sopb; }; +/** Transport writing call flow: + chttp2_transport.c calls grpc_chttp2_unlocking_check_writes to see if writes are required; + if they are, chttp2_transport.c calls grpc_chttp2_perform_writes to do the writes. + Once writes have been completed (meaning another write could potentially be started), + grpc_chttp2_terminate_writing is called. This will call grpc_chttp2_cleanup_writing, at which + point the write phase is complete. */ + /** Someone is unlocking the transport mutex: check to see if writes are required, and schedule them if so */ -void grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); +int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); +void grpc_chttp2_perform_writes(grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint); +void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writing, int success); +void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); + +/** Process one slice of incoming data */ +int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice); +void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); + +/** Get a writable stream + \return non-zero if there was a stream available */ +void grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +int grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing); + +void grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); +int grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport_writing *transport_writing); +int grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing **stream_writing); + +void grpc_chttp2_list_add_written_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); +int grpc_chttp2_list_pop_written_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing); + +int grpc_chttp2_list_pop_writable_window_update_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); + +void grpc_chttp2_list_add_parsing_seen_stream(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing); + +void grpc_chttp2_schedule_closure(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success); +void grpc_chttp2_read_write_state_changed(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); + +grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); +grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); + +#define GRPC_CHTTP2_FLOW_CTL_TRACE(a,b,c,d,e) do {} while (0) + +#define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" +#define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING)-1) + +extern int grpc_http_trace; + +#define IF_TRACING(stmt) \ + if (!(grpc_http_trace)) \ + ; \ + else \ + stmt #endif diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 9a547ad3199..2dd46b31168 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -32,4 +32,611 @@ */ #include "src/core/transport/chttp2/internal.h" +#include "src/core/transport/chttp2/timeout_encoding.h" +#include +#include + +static int init_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_continuation); +static int init_data_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_rst_stream_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_settings_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_window_update_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_ping_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_goaway_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_skip_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_header); + +static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last); + +void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing) { + /* transport_parsing->last_incoming_stream_id is used as last-grpc_chttp2_stream-id when + sending GOAWAY frame. + https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.8 + says that last-grpc_chttp2_stream-id is peer-initiated grpc_chttp2_stream ID. So, + since we don't have server pushed streams, client should send + GOAWAY last-grpc_chttp2_stream-id=0 in this case. */ + if (!transport_parsing->is_client) { + transport_global->last_incoming_stream_id = transport_parsing->incoming_stream_id; + } +} + +int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice) { + gpr_uint8 *beg = GPR_SLICE_START_PTR(slice); + gpr_uint8 *end = GPR_SLICE_END_PTR(slice); + gpr_uint8 *cur = beg; + + if (cur == end) return 1; + + switch (transport_parsing->deframe_state) { + case DTS_CLIENT_PREFIX_0: + case DTS_CLIENT_PREFIX_1: + case DTS_CLIENT_PREFIX_2: + case DTS_CLIENT_PREFIX_3: + case DTS_CLIENT_PREFIX_4: + case DTS_CLIENT_PREFIX_5: + case DTS_CLIENT_PREFIX_6: + case DTS_CLIENT_PREFIX_7: + case DTS_CLIENT_PREFIX_8: + case DTS_CLIENT_PREFIX_9: + case DTS_CLIENT_PREFIX_10: + case DTS_CLIENT_PREFIX_11: + case DTS_CLIENT_PREFIX_12: + case DTS_CLIENT_PREFIX_13: + case DTS_CLIENT_PREFIX_14: + case DTS_CLIENT_PREFIX_15: + case DTS_CLIENT_PREFIX_16: + case DTS_CLIENT_PREFIX_17: + case DTS_CLIENT_PREFIX_18: + case DTS_CLIENT_PREFIX_19: + case DTS_CLIENT_PREFIX_20: + case DTS_CLIENT_PREFIX_21: + case DTS_CLIENT_PREFIX_22: + case DTS_CLIENT_PREFIX_23: + while (cur != end && transport_parsing->deframe_state != DTS_FH_0) { + if (*cur != GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing->deframe_state]) { + gpr_log(GPR_ERROR, + "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " + "at byte %d", + GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing->deframe_state], + (int)(gpr_uint8)GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing->deframe_state], *cur, + (int)*cur, transport_parsing->deframe_state); + return 0; + } + ++cur; + ++transport_parsing->deframe_state; + } + if (cur == end) { + return 1; + } + /* fallthrough */ + dts_fh_0: + case DTS_FH_0: + GPR_ASSERT(cur < end); + transport_parsing->incoming_frame_size = ((gpr_uint32)*cur) << 16; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_1; + return 1; + } + /* fallthrough */ + case DTS_FH_1: + GPR_ASSERT(cur < end); + transport_parsing->incoming_frame_size |= ((gpr_uint32)*cur) << 8; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_2; + return 1; + } + /* fallthrough */ + case DTS_FH_2: + GPR_ASSERT(cur < end); + transport_parsing->incoming_frame_size |= *cur; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_3; + return 1; + } + /* fallthrough */ + case DTS_FH_3: + GPR_ASSERT(cur < end); + transport_parsing->incoming_frame_type = *cur; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_4; + return 1; + } + /* fallthrough */ + case DTS_FH_4: + GPR_ASSERT(cur < end); + transport_parsing->incoming_frame_flags = *cur; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_5; + return 1; + } + /* fallthrough */ + case DTS_FH_5: + GPR_ASSERT(cur < end); + transport_parsing->incoming_stream_id = (((gpr_uint32)*cur) & 0x7f) << 24; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_6; + return 1; + } + /* fallthrough */ + case DTS_FH_6: + GPR_ASSERT(cur < end); + transport_parsing->incoming_stream_id |= ((gpr_uint32)*cur) << 16; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_7; + return 1; + } + /* fallthrough */ + case DTS_FH_7: + GPR_ASSERT(cur < end); + transport_parsing->incoming_stream_id |= ((gpr_uint32)*cur) << 8; + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_8; + return 1; + } + /* fallthrough */ + case DTS_FH_8: + GPR_ASSERT(cur < end); + transport_parsing->incoming_stream_id |= ((gpr_uint32)*cur); + transport_parsing->deframe_state = DTS_FRAME; + if (!init_frame_parser(transport_parsing)) { + return 0; + } + if (transport_parsing->incoming_stream_id) { + transport_parsing->last_incoming_stream_id = transport_parsing->incoming_stream_id; + } + if (transport_parsing->incoming_frame_size == 0) { + if (!parse_frame_slice(transport_parsing, gpr_empty_slice(), 1)) { + return 0; + } + if (++cur == end) { + transport_parsing->deframe_state = DTS_FH_0; + return 1; + } + goto dts_fh_0; /* loop */ + } + if (++cur == end) { + return 1; + } + /* fallthrough */ + case DTS_FRAME: + GPR_ASSERT(cur < end); + if ((gpr_uint32)(end - cur) == transport_parsing->incoming_frame_size) { + if (!parse_frame_slice( + transport_parsing, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 1)) { + return 0; + } + transport_parsing->deframe_state = DTS_FH_0; + return 1; + } else if ((gpr_uint32)(end - cur) > transport_parsing->incoming_frame_size) { + if (!parse_frame_slice( + transport_parsing, gpr_slice_sub_no_ref(slice, cur - beg, + cur + transport_parsing->incoming_frame_size - beg), + 1)) { + return 0; + } + cur += transport_parsing->incoming_frame_size; + goto dts_fh_0; /* loop */ + } else { + if (!parse_frame_slice( + transport_parsing, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 0)) { + return 0; + } + transport_parsing->incoming_frame_size -= (end - cur); + return 1; + } + gpr_log(GPR_ERROR, "should never reach here"); + abort(); + } + + gpr_log(GPR_ERROR, "should never reach here"); + abort(); + + return 0; +} + +static int init_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { + if (transport_parsing->expect_continuation_stream_id != 0) { + if (transport_parsing->incoming_frame_type != GRPC_CHTTP2_FRAME_CONTINUATION) { + gpr_log(GPR_ERROR, "Expected CONTINUATION frame, got frame type %02x", + transport_parsing->incoming_frame_type); + return 0; + } + if (transport_parsing->expect_continuation_stream_id != transport_parsing->incoming_stream_id) { + gpr_log(GPR_ERROR, + "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got grpc_chttp2_stream %08x", + transport_parsing->expect_continuation_stream_id, transport_parsing->incoming_stream_id); + return 0; + } + return init_header_frame_parser(transport_parsing, 1); + } + switch (transport_parsing->incoming_frame_type) { + case GRPC_CHTTP2_FRAME_DATA: + return init_data_frame_parser(transport_parsing); + case GRPC_CHTTP2_FRAME_HEADER: + return init_header_frame_parser(transport_parsing, 0); + case GRPC_CHTTP2_FRAME_CONTINUATION: + gpr_log(GPR_ERROR, "Unexpected CONTINUATION frame"); + return 0; + case GRPC_CHTTP2_FRAME_RST_STREAM: + return init_rst_stream_parser(transport_parsing); + case GRPC_CHTTP2_FRAME_SETTINGS: + return init_settings_frame_parser(transport_parsing); + case GRPC_CHTTP2_FRAME_WINDOW_UPDATE: + return init_window_update_frame_parser(transport_parsing); + case GRPC_CHTTP2_FRAME_PING: + return init_ping_parser(transport_parsing); + case GRPC_CHTTP2_FRAME_GOAWAY: + return init_goaway_parser(transport_parsing); + default: + gpr_log(GPR_ERROR, "Unknown frame type %02x", transport_parsing->incoming_frame_type); + return init_skip_frame_parser(transport_parsing, 0); + } +} + +static grpc_chttp2_parse_error skip_parser(void *parser, + grpc_chttp2_parse_state *st, + gpr_slice slice, int is_last) { + return GRPC_CHTTP2_PARSE_OK; +} + +static void skip_header(void *tp, grpc_mdelem *md) { grpc_mdelem_unref(md); } + +static int init_skip_frame(grpc_chttp2_transport_parsing *transport_parsing, int is_header) { + if (is_header) { + int is_eoh = transport_parsing->expect_continuation_stream_id != 0; + transport_parsing->parser = grpc_chttp2_header_parser_parse; + transport_parsing->parser_data = &transport_parsing->hpack_parser; + transport_parsing->hpack_parser.on_header = skip_header; + transport_parsing->hpack_parser.on_header_user_data = NULL; + transport_parsing->hpack_parser.is_boundary = is_eoh; + transport_parsing->hpack_parser.is_eof = is_eoh ? transport_parsing->header_eof : 0; + } else { + transport_parsing->parser = skip_parser; + } + return 1; +} + +static void become_skip_parser(grpc_chttp2_transport_parsing *transport_parsing) { + init_skip_frame(transport_parsing, transport_parsing->parser == grpc_chttp2_header_parser_parse); +} + +static grpc_chttp2_parse_error update_incoming_window(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { + if (transport_parsing->incoming_frame_size > transport_parsing->incoming_window) { + gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", + transport_parsing->incoming_frame_size, transport_parsing->incoming_window); + return GRPC_CHTTP2_CONNECTION_ERROR; + } + + if (transport_parsing->incoming_frame_size > stream_parsing->incoming_window) { + gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", + transport_parsing->incoming_frame_size, stream_parsing->incoming_window); + return GRPC_CHTTP2_CONNECTION_ERROR; + } + + GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, incoming, 0, -(gpr_int64)transport_parsing->incoming_frame_size); + GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, incoming, s->global.id, -(gpr_int64)transport_parsing->incoming_frame_size); + transport_parsing->incoming_window -= transport_parsing->incoming_frame_size; + stream_parsing->incoming_window -= transport_parsing->incoming_frame_size; + + /* if the grpc_chttp2_stream incoming window is getting low, schedule an update */ + stream_parsing->incoming_window_changed = 1; + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); + + return GRPC_CHTTP2_PARSE_OK; +} + +static int init_data_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { + grpc_chttp2_stream_parsing *stream_parsing = grpc_chttp2_parsing_lookup_stream(transport_parsing, transport_parsing->incoming_stream_id); + grpc_chttp2_parse_error err = GRPC_CHTTP2_PARSE_OK; + if (!stream_parsing || stream_parsing->received_close) return init_skip_frame(transport_parsing, 0); + if (err == GRPC_CHTTP2_PARSE_OK) { + err = update_incoming_window(transport_parsing, stream_parsing); + } + if (err == GRPC_CHTTP2_PARSE_OK) { + err = grpc_chttp2_data_parser_begin_frame(&stream_parsing->data_parser, + transport_parsing->incoming_frame_flags); + } + switch (err) { + case GRPC_CHTTP2_PARSE_OK: + transport_parsing->incoming_stream = stream_parsing; + transport_parsing->parser = grpc_chttp2_data_parser_parse; + transport_parsing->parser_data = &stream_parsing->data_parser; + return 1; + case GRPC_CHTTP2_STREAM_ERROR: + stream_parsing->received_close = 1; + stream_parsing->saw_error = 1; + return init_skip_frame(transport_parsing, 0); + case GRPC_CHTTP2_CONNECTION_ERROR: + return 0; + } + gpr_log(GPR_ERROR, "should never reach here"); + abort(); + return 0; +} + +static void free_timeout(void *p) { gpr_free(p); } + +static void add_incoming_metadata(grpc_chttp2_stream_parsing *stream_parsing, grpc_mdelem *elem) { + if (stream_parsing->incoming_metadata_capacity == stream_parsing->incoming_metadata_count) { + stream_parsing->incoming_metadata_capacity = + GPR_MAX(8, 2 * stream_parsing->incoming_metadata_capacity); + stream_parsing->incoming_metadata = + gpr_realloc(stream_parsing->incoming_metadata, sizeof(*stream_parsing->incoming_metadata) * + stream_parsing->incoming_metadata_capacity); + } + stream_parsing->incoming_metadata[stream_parsing->incoming_metadata_count++].md = elem; +} + +static void on_header(void *tp, grpc_mdelem *md) { + grpc_chttp2_transport_parsing *transport_parsing = tp; + grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream; + + GPR_ASSERT(stream_parsing); + + IF_TRACING(gpr_log( + GPR_INFO, "HTTP:%d:HDR: %s: %s", stream_parsing->id, transport_parsing->is_client ? "CLI" : "SVR", + grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value))); + + if (md->key == transport_parsing->str_grpc_timeout) { + gpr_timespec *cached_timeout = grpc_mdelem_get_user_data(md, free_timeout); + if (!cached_timeout) { + /* not already parsed: parse it now, and store the result away */ + cached_timeout = gpr_malloc(sizeof(gpr_timespec)); + if (!grpc_chttp2_decode_timeout(grpc_mdstr_as_c_string(md->value), + cached_timeout)) { + gpr_log(GPR_ERROR, "Ignoring bad timeout value '%s'", + grpc_mdstr_as_c_string(md->value)); + *cached_timeout = gpr_inf_future; + } + grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); + } + stream_parsing->incoming_deadline = gpr_time_add(gpr_now(), *cached_timeout); + grpc_mdelem_unref(md); + } else { + add_incoming_metadata(stream_parsing, md); + } + + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); +} + +static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_continuation) { + int is_eoh = + (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_HEADERS) != 0; + grpc_chttp2_stream_parsing *stream_parsing; + + if (is_eoh) { + transport_parsing->expect_continuation_stream_id = 0; + } else { + transport_parsing->expect_continuation_stream_id = transport_parsing->incoming_stream_id; + } + + if (!is_continuation) { + transport_parsing->header_eof = + (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_STREAM) != 0; + } + + /* could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream */ + stream_parsing = grpc_chttp2_parsing_lookup_stream(transport_parsing, transport_parsing->incoming_stream_id); + if (!stream_parsing) { + if (is_continuation) { + gpr_log(GPR_ERROR, "grpc_chttp2_stream disbanded before CONTINUATION received"); + return init_skip_frame(transport_parsing, 1); + } + if (transport_parsing->is_client) { + if ((transport_parsing->incoming_stream_id & 1) && + transport_parsing->incoming_stream_id < transport_parsing->next_stream_id) { + /* this is an old (probably cancelled) grpc_chttp2_stream */ + } else { + gpr_log(GPR_ERROR, "ignoring new grpc_chttp2_stream creation on client"); + } + return init_skip_frame(transport_parsing, 1); + } else if (transport_parsing->last_incoming_stream_id > transport_parsing->incoming_stream_id) { + gpr_log(GPR_ERROR, + "ignoring out of order new grpc_chttp2_stream request on server; last grpc_chttp2_stream " + "id=%d, new grpc_chttp2_stream id=%d", + transport_parsing->last_incoming_stream_id, transport_parsing->incoming_stream_id); + return init_skip_frame(transport_parsing, 1); + } else if ((transport_parsing->incoming_stream_id & 1) == 0) { + gpr_log(GPR_ERROR, "ignoring grpc_chttp2_stream with non-client generated index %d", + transport_parsing->incoming_stream_id); + return init_skip_frame(transport_parsing, 1); + } + stream_parsing = transport_parsing->incoming_stream = grpc_chttp2_parsing_accept_stream(transport_parsing, transport_parsing->incoming_stream_id); + if (!stream_parsing) { + gpr_log(GPR_ERROR, "grpc_chttp2_stream not accepted"); + return init_skip_frame(transport_parsing, 1); + } + } else { + transport_parsing->incoming_stream = stream_parsing; + } + if (stream_parsing->received_close) { + gpr_log(GPR_ERROR, "skipping already closed grpc_chttp2_stream header"); + transport_parsing->incoming_stream = NULL; + return init_skip_frame(transport_parsing, 1); + } + transport_parsing->parser = grpc_chttp2_header_parser_parse; + transport_parsing->parser_data = &transport_parsing->hpack_parser; + transport_parsing->hpack_parser.on_header = on_header; + transport_parsing->hpack_parser.on_header_user_data = transport_parsing; + transport_parsing->hpack_parser.is_boundary = is_eoh; + transport_parsing->hpack_parser.is_eof = is_eoh ? transport_parsing->header_eof : 0; + if (!is_continuation && + (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_FLAG_HAS_PRIORITY)) { + grpc_chttp2_hpack_parser_set_has_priority(&transport_parsing->hpack_parser); + } + return 1; +} + +static int init_window_update_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { + int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_window_update_parser_begin_frame( + &transport_parsing->simple.window_update, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); + transport_parsing->parser = grpc_chttp2_window_update_parser_parse; + transport_parsing->parser_data = &transport_parsing->simple.window_update; + return ok; +} + +static int init_ping_parser(grpc_chttp2_transport_parsing *transport_parsing) { + int ok = GRPC_CHTTP2_PARSE_OK == + grpc_chttp2_ping_parser_begin_frame(&transport_parsing->simple.ping, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); + transport_parsing->parser = grpc_chttp2_ping_parser_parse; + transport_parsing->parser_data = &transport_parsing->simple.ping; + return ok; +} + +static int init_rst_stream_parser(grpc_chttp2_transport_parsing *transport_parsing) { + int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_rst_stream_parser_begin_frame( + &transport_parsing->simple.rst_stream, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); + transport_parsing->parser = grpc_chttp2_rst_stream_parser_parse; + transport_parsing->parser_data = &transport_parsing->simple.rst_stream; + return ok; +} + +static int init_goaway_parser(grpc_chttp2_transport_parsing *transport_parsing) { + int ok = + GRPC_CHTTP2_PARSE_OK == + grpc_chttp2_goaway_parser_begin_frame( + &transport_parsing->goaway_parser, transport_parsing->incoming_frame_size, transport_parsing->incoming_frame_flags); + transport_parsing->parser = grpc_chttp2_goaway_parser_parse; + transport_parsing->parser_data = &transport_parsing->goaway_parser; + return ok; +} + +static int init_settings_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { + int ok; + + if (transport_parsing->incoming_stream_id != 0) { + gpr_log(GPR_ERROR, "settings frame received for grpc_chttp2_stream %d", transport_parsing->incoming_stream_id); + return 0; + } + + ok = GRPC_CHTTP2_PARSE_OK == + grpc_chttp2_settings_parser_begin_frame( + &transport_parsing->simple.settings, transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags, transport_parsing->settings); + if (!ok) { + return 0; + } + if (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_FLAG_ACK) { + transport_parsing->settings_ack_received = 1; + } else { + transport_parsing->settings_updated = 1; + } + transport_parsing->parser = grpc_chttp2_settings_parser_parse; + transport_parsing->parser_data = &transport_parsing->simple.settings; + return ok; +} + +/* +static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) { + return window + window_update < MAX_WINDOW; +} +*/ + +static void add_metadata_batch(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { + grpc_metadata_batch b; + + b.list.head = NULL; + /* Store away the last element of the list, so that in patch_metadata_ops + we can reconstitute the list. + We can't do list building here as later incoming metadata may reallocate + the underlying array. */ + b.list.tail = (void *)(gpr_intptr)stream_parsing->incoming_metadata_count; + b.garbage.head = b.garbage.tail = NULL; + b.deadline = stream_parsing->incoming_deadline; + stream_parsing->incoming_deadline = gpr_inf_future; + + grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); +} + +static int parse_frame_slice(grpc_chttp2_transport_parsing *t, gpr_slice slice, int is_last) { + grpc_chttp2_parse_state st; + size_t i; + memset(&st, 0, sizeof(st)); + switch (transport_parsing->parser(transport_parsing->parser_data, &st, slice, is_last)) { + case GRPC_CHTTP2_PARSE_OK: + if (stream_parsing) { + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); + } + if (st.end_of_stream) { + transport_parsing->incoming_stream->read_closed = 1; + maybe_finish_read(t, transport_parsing->incoming_stream, 1); + } + if (st.need_flush_reads) { + maybe_finish_read(t, transport_parsing->incoming_stream, 1); + } + if (st.metadata_boundary) { + add_metadata_batch(t, transport_parsing->incoming_stream); + maybe_finish_read(t, transport_parsing->incoming_stream, 1); + } + if (st.ack_settings) { + gpr_slice_buffer_add(&transport_parsing->qbuf, grpc_chttp2_settings_ack_create()); + } + if (st.send_ping_ack) { + gpr_slice_buffer_add( + &transport_parsing->qbuf, + grpc_chttp2_ping_create(1, transport_parsing->simple.ping.opaque_8bytes)); + } + if (st.goaway) { + add_goaway(t, st.goaway_error, st.goaway_text); + } + if (st.rst_stream) { + cancel_stream_id( + t, transport_parsing->incoming_stream_id, + grpc_chttp2_http2_error_to_grpc_status(st.rst_stream_reason), + st.rst_stream_reason, 0); + } + if (st.process_ping_reply) { + for (i = 0; i < transport_parsing->ping_count; i++) { + if (0 == + memcmp(transport_parsing->pings[i].id, transport_parsing->simple.ping.opaque_8bytes, 8)) { + transport_parsing->pings[i].cb(transport_parsing->pings[i].user_data); + memmove(&transport_parsing->pings[i], &transport_parsing->pings[i + 1], + (transport_parsing->ping_count - i - 1) * sizeof(grpc_chttp2_outstanding_ping)); + transport_parsing->ping_count--; + break; + } + } + } + if (st.initial_window_update) { + for (i = 0; i < transport_parsing->stream_map.count; i++) { + grpc_chttp2_stream *s = (grpc_chttp2_stream *)(transport_parsing->stream_map.values[i]); + s->global.outgoing_window_update += st.initial_window_update; + stream_list_join(t, s, NEW_OUTGOING_WINDOW); + } + } + if (st.window_update) { + if (transport_parsing->incoming_stream_id) { + /* if there was a grpc_chttp2_stream id, this is for some grpc_chttp2_stream */ + grpc_chttp2_stream *s = lookup_stream(t, transport_parsing->incoming_stream_id); + if (s) { + s->global.outgoing_window_update += st.window_update; + stream_list_join(t, s, NEW_OUTGOING_WINDOW); + } + } else { + /* grpc_chttp2_transport level window update */ + transport_parsing->global.outgoing_window_update += st.window_update; + } + } + return 1; + case GRPC_CHTTP2_STREAM_ERROR: + become_skip_parser(transport_parsing); + cancel_stream_id( + t, transport_parsing->incoming_stream_id, + grpc_chttp2_http2_error_to_grpc_status(GRPC_CHTTP2_INTERNAL_ERROR), + GRPC_CHTTP2_INTERNAL_ERROR, 1); + return 1; + case GRPC_CHTTP2_CONNECTION_ERROR: + drop_connection(transport_parsing); + return 0; + } + gpr_log(GPR_ERROR, "should never reach here"); + abort(); + return 0; +} diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index a1830a8c253..0265f173f38 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -32,93 +32,145 @@ */ #include "src/core/transport/chttp2/internal.h" +#include "src/core/transport/chttp2/http2_errors.h" #include -static void grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport *t) { - grpc_chttp2_stream *s; - gpr_uint32 window_delta; +static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing); +static void finish_write_cb(void *tw, grpc_endpoint_cb_status write_status); - /* don't do anything if we are already writing */ - if (t->writing.executing) { - return; - } +int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_constants *transport_constants, grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { + grpc_chttp2_stream_global *stream_global; + grpc_chttp2_stream_writing *stream_writing; + gpr_uint32 window_delta; /* simple writes are queued to qbuf, and flushed here */ - gpr_slice_buffer_swap(&t->global.qbuf, &t->writing.outbuf); - GPR_ASSERT(t->global.qbuf.count == 0); + gpr_slice_buffer_swap(&transport_global->qbuf, &transport_writing->outbuf); + GPR_ASSERT(transport_global->qbuf.count == 0); - if (t->dirtied_local_settings && !t->sent_local_settings) { + if (transport_global->dirtied_local_settings && !transport_global->sent_local_settings) { gpr_slice_buffer_add( - &t->writing.outbuf, grpc_chttp2_settings_create( - t->settings[SENT_SETTINGS], t->settings[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; + &transport_writing->outbuf, grpc_chttp2_settings_create( + transport_global->settings[SENT_SETTINGS], transport_global->settings[LOCAL_SETTINGS], + transport_global->force_send_settings, GRPC_CHTTP2_NUM_SETTINGS)); + transport_global->force_send_settings = 0; + transport_global->dirtied_local_settings = 0; + transport_global->sent_local_settings = 1; } /* 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 (t->outgoing_window && (s = stream_list_remove_head(t, WRITABLE)) && - s->outgoing_window > 0) { + while (transport_global->outgoing_window && + grpc_chttp2_list_pop_writable_stream(transport_global, transport_writing, &stream_global, &stream_writing) && + stream_global->outgoing_window > 0) { + stream_writing->id = stream_global->id; window_delta = grpc_chttp2_preencode( - s->outgoing_sopb->ops, &s->outgoing_sopb->nops, - GPR_MIN(t->outgoing_window, s->outgoing_window), &s->writing.sopb); - FLOWCTL_TRACE(t, t, outgoing, 0, -(gpr_int64)window_delta); - FLOWCTL_TRACE(t, s, outgoing, s->id, -(gpr_int64)window_delta); - t->outgoing_window -= window_delta; - s->outgoing_window -= window_delta; - - if (s->write_state == WRITE_STATE_QUEUED_CLOSE && - s->outgoing_sopb->nops == 0) { - if (!t->is_client && !s->read_closed) { - s->writing.send_closed = SEND_CLOSED_WITH_RST_STREAM; + stream_global->outgoing_sopb->ops, &stream_global->outgoing_sopb->nops, + GPR_MIN(transport_global->outgoing_window, stream_global->outgoing_window), + &stream_writing->sopb); + GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, outgoing, 0, -(gpr_int64)window_delta); + GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, outgoing, s->id, -(gpr_int64)window_delta); + transport_global->outgoing_window -= window_delta; + stream_global->outgoing_window -= window_delta; + + if (stream_global->write_state == WRITE_STATE_QUEUED_CLOSE && + stream_global->outgoing_sopb->nops == 0) { + if (!transport_constants->is_client && !stream_global->read_closed) { + stream_writing->send_closed = SEND_CLOSED_WITH_RST_STREAM; } else { - s->writing.send_closed = SEND_CLOSED; + stream_writing->send_closed = SEND_CLOSED; } } - if (s->writing.sopb.nops > 0 || s->writing.send_closed) { - stream_list_join(t, s, WRITING); + if (stream_writing->sopb.nops > 0 || stream_writing->send_closed != DONT_SEND_CLOSED) { + grpc_chttp2_list_add_writing_stream(transport_writing, stream_writing); } /* we should either exhaust window or have no ops left, but not both */ - if (s->outgoing_sopb->nops == 0) { - s->outgoing_sopb = NULL; - schedule_cb(t, s->global.send_done_closure, 1); - } else if (s->outgoing_window) { - stream_list_add_tail(t, s, WRITABLE); + if (stream_global->outgoing_sopb->nops == 0) { + stream_global->outgoing_sopb = NULL; + grpc_chttp2_schedule_closure(transport_global, stream_global->send_done_closure, 1); + } else if (stream_global->outgoing_window) { + grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } } - if (!t->parsing.executing) { - /* for each grpc_chttp2_stream that wants to update its window, add that window here */ - while ((s = stream_list_remove_head(t, WINDOW_UPDATE))) { - window_delta = - t->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - - s->incoming_window; - if (!s->read_closed && window_delta) { - gpr_slice_buffer_add( - &t->writing.outbuf, grpc_chttp2_window_update_create(s->id, window_delta)); - FLOWCTL_TRACE(t, s, incoming, s->id, window_delta); - s->incoming_window += window_delta; - } + /* for each grpc_chttp2_stream that wants to update its window, add that window here */ + while (grpc_chttp2_list_pop_writable_window_update_stream(transport_global, &stream_global)) { + window_delta = + transport_global->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - + stream_global->incoming_window; + if (!stream_global->read_closed && window_delta > 0) { + gpr_slice_buffer_add( + &transport_writing->outbuf, grpc_chttp2_window_update_create(stream_global->id, window_delta)); + GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, incoming, s->id, window_delta); + stream_global->incoming_window += window_delta; } + } + + /* if the grpc_chttp2_transport is ready to send a window update, do so here also */ + if (transport_global->incoming_window < transport_global->connection_window_target * 3 / 4) { + window_delta = transport_global->connection_window_target - transport_global->incoming_window; + gpr_slice_buffer_add(&transport_writing->outbuf, + grpc_chttp2_window_update_create(0, window_delta)); + GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, incoming, 0, window_delta); + transport_global->incoming_window += window_delta; + } + + return transport_writing->outbuf.length > 0 || grpc_chttp2_list_have_writing_streams(transport_writing); +} + +void grpc_chttp2_perform_writes(grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint) { + finalize_outbuf(transport_writing); - /* if the grpc_chttp2_transport is ready to send a window update, do so here also */ - if (t->incoming_window < t->connection_window_target * 3 / 4) { - window_delta = t->connection_window_target - t->incoming_window; - gpr_slice_buffer_add(&t->writing.outbuf, - grpc_chttp2_window_update_create(0, window_delta)); - FLOWCTL_TRACE(t, t, incoming, 0, window_delta); - t->incoming_window += window_delta; + GPR_ASSERT(transport_writing->outbuf.count > 0); + + switch (grpc_endpoint_write(endpoint, transport_writing->outbuf.slices, transport_writing->outbuf.count, + finish_write_cb, transport_writing)) { + case GRPC_ENDPOINT_WRITE_DONE: + grpc_chttp2_terminate_writing(transport_writing, 1); + break; + case GRPC_ENDPOINT_WRITE_ERROR: + grpc_chttp2_terminate_writing(transport_writing, 0); + break; + case GRPC_ENDPOINT_WRITE_PENDING: + break; + } +} + +static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing) { + grpc_chttp2_stream_writing *stream_writing; + + while (grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) { + grpc_chttp2_encode(stream_writing->sopb.ops, stream_writing->sopb.nops, + stream_writing->send_closed != DONT_SEND_CLOSED, stream_writing->id, + &transport_writing->hpack_compressor, &transport_writing->outbuf); + stream_writing->sopb.nops = 0; + if (stream_writing->send_closed == SEND_CLOSED_WITH_RST_STREAM) { + gpr_slice_buffer_add(&transport_writing->outbuf, grpc_chttp2_rst_stream_create( + stream_writing->id, GRPC_CHTTP2_NO_ERROR)); } + grpc_chttp2_list_add_written_stream(transport_writing, stream_writing); } +} - if (t->writing.outbuf.length > 0 || !stream_list_empty(t, WRITING)) { - t->writing.executing = 1; - ref_transport(t); - gpr_log(GPR_DEBUG, "schedule write"); - schedule_cb(t, &t->writing.action, 1); +static void finish_write_cb(void *tw, grpc_endpoint_cb_status write_status) { + grpc_chttp2_transport_writing *transport_writing = tw; + grpc_chttp2_terminate_writing(transport_writing, write_status == GRPC_ENDPOINT_CB_OK); +} + +void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_constants *transport_constants, grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { + grpc_chttp2_stream_writing *stream_writing; + grpc_chttp2_stream_global *stream_global; + + while (grpc_chttp2_list_pop_written_stream(transport_global, transport_writing, &stream_global, &stream_writing)) { + if (stream_writing->send_closed != DONT_SEND_CLOSED) { + stream_global->write_state = WRITE_STATE_SENT_CLOSE; + if (!transport_constants->is_client) { + stream_global->read_closed = 1; + } + grpc_chttp2_read_write_state_changed(transport_global, stream_global); + } } + transport_writing->outbuf.count = 0; + transport_writing->outbuf.length = 0; } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 1cfbc07d971..13ddeacc028 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -55,24 +55,17 @@ #define MAX_CLIENT_STREAM_ID 0x7fffffffu -#define CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" -#define CLIENT_CONNECT_STRLEN 24 - int grpc_http_trace = 0; int grpc_flowctl_trace = 0; -#define IF_TRACING(stmt) \ - if (!(grpc_http_trace)) \ - ; \ - else \ - stmt - #define FLOWCTL_TRACE(t, obj, dir, id, delta) \ if (!grpc_flowctl_trace) \ ; \ else \ flowctl_trace(t, #dir, obj->dir##_window, id, delta) +#define TRANSPORT_FROM_WRITING(tw) ((grpc_chttp2_transport*)((char*)(tw) - offsetof(grpc_chttp2_transport, writing))) + static const grpc_transport_vtable vtable; static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, @@ -211,10 +204,10 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba t->reading = 1; t->error_state = ERROR_STATE_NONE; t->next_stream_id = is_client ? 1 : 2; - t->is_client = is_client; - t->outgoing_window = DEFAULT_WINDOW; - t->incoming_window = DEFAULT_WINDOW; - t->connection_window_target = DEFAULT_CONNECTION_WINDOW_TARGET; + t->constants.is_client = is_client; + t->global.outgoing_window = DEFAULT_WINDOW; + t->global.incoming_window = DEFAULT_WINDOW; + t->global.connection_window_target = DEFAULT_CONNECTION_WINDOW_TARGET; t->deframe_state = is_client ? DTS_FH_0 : DTS_CLIENT_PREFIX_0; t->ping_counter = gpr_now().tv_nsec; @@ -222,7 +215,7 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba gpr_slice_buffer_init(&t->writing.outbuf); grpc_chttp2_hpack_compressor_init(&t->writing.hpack_compressor, mdctx); - grpc_iomgr_closure_init(&t->writing.action, writing_action, t); + grpc_iomgr_closure_init(&t->writing_action, writing_action, t); gpr_slice_buffer_init(&t->parsing.qbuf); grpc_chttp2_goaway_parser_init(&t->parsing.goaway_parser); @@ -244,17 +237,17 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba /* copy in initial settings to all setting sets */ for (i = 0; i < NUM_SETTING_SETS; i++) { for (j = 0; j < GRPC_CHTTP2_NUM_SETTINGS; j++) { - t->settings[i][j] = grpc_chttp2_settings_parameters[j].default_value; + t->global.settings[i][j] = grpc_chttp2_settings_parameters[j].default_value; } } - t->dirtied_local_settings = 1; + t->global.dirtied_local_settings = 1; /* Hack: it's common for implementations to assume 65536 bytes initial send window -- this should by rights be 0 */ - t->force_send_settings = 1 << GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; - t->sent_local_settings = 0; + t->global.force_send_settings = 1 << GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; + t->global.sent_local_settings = 0; /* configure http2 the way we like it */ - if (t->is_client) { + if (t->constants.is_client) { push_setting(t, GRPC_CHTTP2_SETTINGS_ENABLE_PUSH, 0); push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0); } @@ -264,7 +257,7 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba for (i = 0; i < channel_args->num_args; i++) { if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_MAX_CONCURRENT_STREAMS)) { - if (t->is_client) { + if (t->constants.is_client) { gpr_log(GPR_ERROR, "%s: is ignored on the client", GRPC_ARG_MAX_CONCURRENT_STREAMS); } else if (channel_args->args[i].type != GRPC_ARG_INTEGER) { @@ -283,7 +276,7 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba (channel_args->args[i].value.integer & 1)) { gpr_log(GPR_ERROR, "%s: low bit must be %d on %s", GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER, t->next_stream_id & 1, - t->is_client ? "client" : "server"); + t->constants.is_client ? "client" : "server"); } else { t->next_stream_id = channel_args->args[i].value.integer; } @@ -322,7 +315,7 @@ static void destroy_transport(grpc_transport *gt) { We need to be not writing as cancellation finalization may produce some callbacks that NEED to be made to close out some streams when t->writing becomes 0. */ - while (t->channel_callback.executing || t->writing.executing) { + while (t->channel_callback.executing || t->writing_active) { gpr_cv_wait(&t->cv, &t->mu, gpr_inf_future); } drop_connection(t); @@ -378,18 +371,18 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, lock(t); if (!server_data) { - s->id = 0; - s->outgoing_window = 0; - s->incoming_window = 0; + s->global.id = 0; + s->global.outgoing_window = 0; + s->global.incoming_window = 0; } else { /* already locked */ - s->id = (gpr_uint32)(gpr_uintptr)server_data; - s->outgoing_window = - t->settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - s->incoming_window = - t->settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + s->global.id = (gpr_uint32)(gpr_uintptr)server_data; + s->global.outgoing_window = + t->global.settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + s->global.incoming_window = + t->global.settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; t->incoming_stream = s; - grpc_chttp2_stream_map_add(&t->stream_map, s->id, s); + grpc_chttp2_stream_map_add(&t->stream_map, s->global.id, s); } s->incoming_deadline = gpr_inf_future; @@ -416,7 +409,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_lock(&t->mu); - GPR_ASSERT(s->published_state == GRPC_STREAM_CLOSED || s->id == 0); + GPR_ASSERT(s->published_state == GRPC_STREAM_CLOSED || s->global.id == 0); for (i = 0; i < STREAM_LIST_COUNT; i++) { stream_list_remove(t, s, i); @@ -424,7 +417,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_unlock(&t->mu); - GPR_ASSERT(s->outgoing_sopb == NULL); + GPR_ASSERT(s->global.outgoing_sopb == NULL); GPR_ASSERT(s->incoming_sopb == NULL); grpc_sopb_destroy(&s->writing.sopb); grpc_sopb_destroy(&s->callback_sopb); @@ -503,10 +496,10 @@ static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, gr } static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { - if (s->id == 0) return; + if (s->global.id == 0) return; IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Removing grpc_chttp2_stream %d", - t->is_client ? "CLI" : "SVR", s->id)); - if (grpc_chttp2_stream_map_delete(&t->stream_map, s->id)) { + t->constants.is_client ? "CLI" : "SVR", s->global.id)); + if (grpc_chttp2_stream_map_delete(&t->stream_map, s->global.id)) { maybe_start_some_streams(t); } } @@ -525,7 +518,11 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_chttp2_transport *t) { grpc_iomgr_closure *run_closures; - grpc_chttp2_unlocking_check_writes(t); + if (!t->writing_active && grpc_chttp2_unlocking_check_writes(&t->constants, &t->global, &t->writing)) { + t->writing_active = 1; + ref_transport(t); + schedule_cb(t, &t->writing_action, 1); + } unlock_check_cancellations(t); unlock_check_parser(t); unlock_check_channel_callbacks(t); @@ -555,49 +552,27 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, gpr_log(GPR_INFO, "Requested parameter %s clamped from %d to %d", sp->name, value, use_value); } - if (use_value != t->settings[LOCAL_SETTINGS][id]) { - t->settings[LOCAL_SETTINGS][id] = use_value; - t->dirtied_local_settings = 1; - } -} - -static void writing_finalize_outbuf(grpc_chttp2_transport *t) { - grpc_chttp2_stream *s; - - while ((s = stream_list_remove_head(t, WRITING))) { - grpc_chttp2_encode(s->writing.sopb.ops, s->writing.sopb.nops, - s->writing.send_closed != DONT_SEND_CLOSED, s->id, - &t->writing.hpack_compressor, &t->writing.outbuf); - s->writing.sopb.nops = 0; - if (s->writing.send_closed == SEND_CLOSED_WITH_RST_STREAM) { - gpr_slice_buffer_add(&t->writing.outbuf, grpc_chttp2_rst_stream_create( - s->id, GRPC_CHTTP2_NO_ERROR)); - } - if (s->writing.send_closed != DONT_SEND_CLOSED) { - stream_list_join(t, s, WRITTEN_CLOSED); - } + if (use_value != t->global.settings[LOCAL_SETTINGS][id]) { + t->global.settings[LOCAL_SETTINGS][id] = use_value; + t->global.dirtied_local_settings = 1; } } -static void writing_finish(grpc_chttp2_transport *t, int success) { - grpc_chttp2_stream *s; +void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writing, int success) { + grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); lock(t); + if (!success) { drop_connection(t); } - while ((s = stream_list_remove_head(t, WRITTEN_CLOSED))) { - s->write_state = WRITE_STATE_SENT_CLOSE; - if (!t->is_client) { - s->read_closed = 1; - } - maybe_finish_read(t, s, 0); - } - t->writing.outbuf.count = 0; - t->writing.outbuf.length = 0; + + /* cleanup writing related jazz */ + grpc_chttp2_cleanup_writing(&t->constants, &t->global, &t->writing); + /* leave the writing flag up on shutdown to prevent further writes in unlock() from starting */ - t->writing.executing = 0; + t->writing_active = 0; if (t->destroying) { gpr_cv_signal(&t->cv); } @@ -606,36 +581,16 @@ static void writing_finish(grpc_chttp2_transport *t, int success) { t->ep = NULL; unref_transport(t); /* safe because we'll still have the ref for write */ } + unlock(t); unref_transport(t); } -static void writing_finish_write_cb(void *tp, grpc_endpoint_cb_status error) { - grpc_chttp2_transport *t = tp; - writing_finish(t, error == GRPC_ENDPOINT_CB_OK); -} static void writing_action(void *gt, int iomgr_success_ignored) { grpc_chttp2_transport *t = gt; - - gpr_log(GPR_DEBUG, "writing_action"); - - writing_finalize_outbuf(t); - - GPR_ASSERT(t->writing.outbuf.count > 0); - - switch (grpc_endpoint_write(t->ep, t->writing.outbuf.slices, t->writing.outbuf.count, - writing_finish_write_cb, t)) { - case GRPC_ENDPOINT_WRITE_DONE: - writing_finish(t, 1); - break; - case GRPC_ENDPOINT_WRITE_ERROR: - writing_finish(t, 0); - break; - case GRPC_ENDPOINT_WRITE_PENDING: - break; - } + grpc_chttp2_perform_writes(&t->writing, t->ep); } static void add_goaway(grpc_chttp2_transport *t, gpr_uint32 goaway_error, @@ -655,13 +610,13 @@ static void maybe_start_some_streams(grpc_chttp2_transport *t) { /* start streams where we have free grpc_chttp2_stream ids and free concurrency */ while (!t->parsing.executing && t->next_stream_id <= MAX_CLIENT_STREAM_ID && grpc_chttp2_stream_map_size(&t->stream_map) < - t->settings[PEER_SETTINGS] + t->global.settings[PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS]) { grpc_chttp2_stream *s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY); if (!s) return; IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", - t->is_client ? "CLI" : "SVR", s, t->next_stream_id)); + t->constants.is_client ? "CLI" : "SVR", s, t->next_stream_id)); if (t->next_stream_id == MAX_CLIENT_STREAM_ID) { add_goaway( @@ -669,14 +624,14 @@ static void maybe_start_some_streams(grpc_chttp2_transport *t) { gpr_slice_from_copied_string("Exceeded sequence number limit")); } - GPR_ASSERT(s->id == 0); - s->id = t->next_stream_id; + GPR_ASSERT(s->global.id == 0); + s->global.id = t->next_stream_id; t->next_stream_id += 2; - s->outgoing_window = - t->settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - s->incoming_window = - t->settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - grpc_chttp2_stream_map_add(&t->stream_map, s->id, s); + s->global.outgoing_window = + t->global.settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + s->global.incoming_window = + t->global.settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + grpc_chttp2_stream_map_add(&t->stream_map, s->global.id, s); stream_list_join(t, s, WRITABLE); } /* cancel out streams that will never be started */ @@ -700,20 +655,20 @@ static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, g } if (op->send_ops) { - GPR_ASSERT(s->outgoing_sopb == NULL); + GPR_ASSERT(s->global.outgoing_sopb == NULL); s->global.send_done_closure = op->on_done_send; if (!s->cancelled) { - s->outgoing_sopb = op->send_ops; - if (op->is_last_send && s->write_state == WRITE_STATE_OPEN) { - s->write_state = WRITE_STATE_QUEUED_CLOSE; + s->global.outgoing_sopb = op->send_ops; + if (op->is_last_send && s->global.write_state == WRITE_STATE_OPEN) { + s->global.write_state = WRITE_STATE_QUEUED_CLOSE; } - if (s->id == 0) { + if (s->global.id == 0) { IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: New grpc_chttp2_stream %p waiting for concurrency", - t->is_client ? "CLI" : "SVR", s)); + t->constants.is_client ? "CLI" : "SVR", s)); stream_list_join(t, s, WAITING_FOR_CONCURRENCY); maybe_start_some_streams(t); - } else if (s->outgoing_window > 0) { + } else if (s->global.outgoing_window > 0) { stream_list_join(t, s, WRITABLE); } } else { @@ -787,26 +742,15 @@ static void send_ping(grpc_transport *gt, void (*cb)(void *user_data), static void unlock_check_cancellations(grpc_chttp2_transport *t) { grpc_chttp2_stream *s; - if (t->writing.executing) { + if (t->writing_active) { return; } while ((s = stream_list_remove_head(t, CANCELLED))) { - s->read_closed = 1; - s->write_state = WRITE_STATE_SENT_CLOSE; - maybe_finish_read(t, s, 0); - } -} - -static void add_incoming_metadata(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_mdelem *elem) { - if (s->incoming_metadata_capacity == s->incoming_metadata_count) { - s->incoming_metadata_capacity = - GPR_MAX(8, 2 * s->incoming_metadata_capacity); - s->incoming_metadata = - gpr_realloc(s->incoming_metadata, sizeof(*s->incoming_metadata) * - s->incoming_metadata_capacity); + s->global.read_closed = 1; + s->global.write_state = WRITE_STATE_SENT_CLOSE; + grpc_chttp2_read_write_state_changed(&t->global, &s->global); } - s->incoming_metadata[s->incoming_metadata_count++].md = elem; } static void cancel_stream_inner(grpc_chttp2_transport *t, grpc_chttp2_stream *s, gpr_uint32 id, @@ -819,12 +763,12 @@ static void cancel_stream_inner(grpc_chttp2_transport *t, grpc_chttp2_stream *s, if (s) { /* clear out any unreported input & output: nobody cares anymore */ - had_outgoing = s->outgoing_sopb && s->outgoing_sopb->nops != 0; + had_outgoing = s->global.outgoing_sopb && s->global.outgoing_sopb->nops != 0; if (error_code != GRPC_CHTTP2_NO_ERROR) { schedule_nuke_sopb(t, &s->parser.incoming_sopb); - if (s->outgoing_sopb) { - schedule_nuke_sopb(t, s->outgoing_sopb); - s->outgoing_sopb = NULL; + if (s->global.outgoing_sopb) { + schedule_nuke_sopb(t, s->global.outgoing_sopb); + s->global.outgoing_sopb = NULL; stream_list_remove(t, s, WRITABLE); schedule_cb(t, s->global.send_done_closure, 0); } @@ -888,7 +832,7 @@ static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_status_code local_status, grpc_chttp2_error_code error_code, grpc_mdstr *optional_message, int send_rst) { - cancel_stream_inner(t, s, s->id, local_status, error_code, optional_message, + cancel_stream_inner(t, s, s->global.id, local_status, error_code, optional_message, send_rst, 0); } @@ -923,608 +867,18 @@ static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stre return; } if (s->incoming_sopb != NULL && - s->incoming_window < - t->settings[LOCAL_SETTINGS] + s->global.incoming_window < + t->global.settings[LOCAL_SETTINGS] [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] * 3 / 4) { stream_list_join(t, s, WINDOW_UPDATE); } } -static grpc_chttp2_parse_error update_incoming_window(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { - if (t->incoming_frame_size > t->incoming_window) { - gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", - t->incoming_frame_size, t->incoming_window); - return GRPC_CHTTP2_CONNECTION_ERROR; - } - - if (t->incoming_frame_size > s->incoming_window) { - gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", - t->incoming_frame_size, s->incoming_window); - return GRPC_CHTTP2_CONNECTION_ERROR; - } - - FLOWCTL_TRACE(t, t, incoming, 0, -(gpr_int64)t->incoming_frame_size); - FLOWCTL_TRACE(t, s, incoming, s->id, -(gpr_int64)t->incoming_frame_size); - t->incoming_window -= t->incoming_frame_size; - s->incoming_window -= t->incoming_frame_size; - - /* if the grpc_chttp2_stream incoming window is getting low, schedule an update */ - stream_list_join(t, s, PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE); - - return GRPC_CHTTP2_PARSE_OK; -} - static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id) { return grpc_chttp2_stream_map_find(&t->stream_map, id); } -static grpc_chttp2_parse_error skip_parser(void *parser, - grpc_chttp2_parse_state *st, - gpr_slice slice, int is_last) { - return GRPC_CHTTP2_PARSE_OK; -} - -static void skip_header(void *tp, grpc_mdelem *md) { grpc_mdelem_unref(md); } - -static int parsing_init_skip_frame(grpc_chttp2_transport *t, int is_header) { - if (is_header) { - int is_eoh = t->expect_continuation_stream_id != 0; - t->parser = grpc_chttp2_header_parser_parse; - t->parser_data = &t->parsing.hpack_parser; - t->parsing.hpack_parser.on_header = skip_header; - t->parsing.hpack_parser.on_header_user_data = NULL; - t->parsing.hpack_parser.is_boundary = is_eoh; - t->parsing.hpack_parser.is_eof = is_eoh ? t->header_eof : 0; - } else { - t->parser = skip_parser; - } - return 1; -} - -static void parsing_become_skip_parser(grpc_chttp2_transport *t) { - parsing_init_skip_frame(t, t->parser == grpc_chttp2_header_parser_parse); -} - -static int parsing_init_data_frame_parser(grpc_chttp2_transport *t) { - grpc_chttp2_stream *s = lookup_stream(t, t->incoming_stream_id); - grpc_chttp2_parse_error err = GRPC_CHTTP2_PARSE_OK; - if (!s || s->read_closed) return parsing_init_skip_frame(t, 0); - if (err == GRPC_CHTTP2_PARSE_OK) { - err = update_incoming_window(t, s); - } - if (err == GRPC_CHTTP2_PARSE_OK) { - err = grpc_chttp2_data_parser_begin_frame(&s->parser, - t->incoming_frame_flags); - } - switch (err) { - case GRPC_CHTTP2_PARSE_OK: - t->incoming_stream = s; - t->parser = grpc_chttp2_data_parser_parse; - t->parser_data = &s->parser; - return 1; - case GRPC_CHTTP2_STREAM_ERROR: - cancel_stream(t, s, grpc_chttp2_http2_error_to_grpc_status( - GRPC_CHTTP2_INTERNAL_ERROR), - GRPC_CHTTP2_INTERNAL_ERROR, NULL, 1); - return parsing_init_skip_frame(t, 0); - case GRPC_CHTTP2_CONNECTION_ERROR: - drop_connection(t); - return 0; - } - gpr_log(GPR_ERROR, "should never reach here"); - abort(); - return 0; -} - -static void free_timeout(void *p) { gpr_free(p); } - -static void parsing_on_header(void *tp, grpc_mdelem *md) { - grpc_chttp2_transport *t = tp; - grpc_chttp2_stream *s = t->incoming_stream; - - GPR_ASSERT(s); - - IF_TRACING(gpr_log( - GPR_INFO, "HTTP:%d:%s:HDR: %s: %s", s->id, t->is_client ? "CLI" : "SVR", - grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value))); - - if (md->key == t->constants.str_grpc_timeout) { - gpr_timespec *cached_timeout = grpc_mdelem_get_user_data(md, free_timeout); - if (!cached_timeout) { - /* not already parsed: parse it now, and store the result away */ - cached_timeout = gpr_malloc(sizeof(gpr_timespec)); - if (!grpc_chttp2_decode_timeout(grpc_mdstr_as_c_string(md->value), - cached_timeout)) { - gpr_log(GPR_ERROR, "Ignoring bad timeout value '%s'", - grpc_mdstr_as_c_string(md->value)); - *cached_timeout = gpr_inf_future; - } - grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); - } - s->incoming_deadline = gpr_time_add(gpr_now(), *cached_timeout); - grpc_mdelem_unref(md); - } else { - add_incoming_metadata(t, s, md); - } - maybe_finish_read(t, s, 1); -} - -static int parsing_init_header_frame_parser(grpc_chttp2_transport *t, int is_continuation) { - int is_eoh = - (t->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_HEADERS) != 0; - grpc_chttp2_stream *s; - - if (is_eoh) { - t->expect_continuation_stream_id = 0; - } else { - t->expect_continuation_stream_id = t->incoming_stream_id; - } - - if (!is_continuation) { - t->header_eof = - (t->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_STREAM) != 0; - } - - /* could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream */ - s = lookup_stream(t, t->incoming_stream_id); - if (!s) { - if (is_continuation) { - gpr_log(GPR_ERROR, "grpc_chttp2_stream disbanded before CONTINUATION received"); - return parsing_init_skip_frame(t, 1); - } - if (t->is_client) { - if ((t->incoming_stream_id & 1) && - t->incoming_stream_id < t->next_stream_id) { - /* this is an old (probably cancelled) grpc_chttp2_stream */ - } else { - gpr_log(GPR_ERROR, "ignoring new grpc_chttp2_stream creation on client"); - } - return parsing_init_skip_frame(t, 1); - } else if (t->last_incoming_stream_id > t->incoming_stream_id) { - gpr_log(GPR_ERROR, - "ignoring out of order new grpc_chttp2_stream request on server; last grpc_chttp2_stream " - "id=%d, new grpc_chttp2_stream id=%d", - t->last_incoming_stream_id, t->incoming_stream_id); - return parsing_init_skip_frame(t, 1); - } else if ((t->incoming_stream_id & 1) == 0) { - gpr_log(GPR_ERROR, "ignoring grpc_chttp2_stream with non-client generated index %d", - t->incoming_stream_id); - return parsing_init_skip_frame(t, 1); - } - t->incoming_stream = NULL; - /* if grpc_chttp2_stream is accepted, we set incoming_stream in init_stream */ - t->channel_callback.cb->accept_stream(t->channel_callback.cb_user_data, &t->base, - (void *)(gpr_uintptr)t->incoming_stream_id); - s = t->incoming_stream; - if (!s) { - gpr_log(GPR_ERROR, "grpc_chttp2_stream not accepted"); - return parsing_init_skip_frame(t, 1); - } - } else { - t->incoming_stream = s; - } - if (t->incoming_stream->read_closed) { - gpr_log(GPR_ERROR, "skipping already closed grpc_chttp2_stream header"); - t->incoming_stream = NULL; - return parsing_init_skip_frame(t, 1); - } - t->parser = grpc_chttp2_header_parser_parse; - t->parser_data = &t->parsing.hpack_parser; - t->parsing.hpack_parser.on_header = parsing_on_header; - t->parsing.hpack_parser.on_header_user_data = t; - t->parsing.hpack_parser.is_boundary = is_eoh; - t->parsing.hpack_parser.is_eof = is_eoh ? t->header_eof : 0; - if (!is_continuation && - (t->incoming_frame_flags & GRPC_CHTTP2_FLAG_HAS_PRIORITY)) { - grpc_chttp2_hpack_parser_set_has_priority(&t->parsing.hpack_parser); - } - return 1; -} - -static int parsing_init_window_update_frame_parser(grpc_chttp2_transport *t) { - int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_window_update_parser_begin_frame( - &t->parsing.simple.window_update, - t->incoming_frame_size, - t->incoming_frame_flags); - if (!ok) { - drop_connection(t); - } - t->parser = grpc_chttp2_window_update_parser_parse; - t->parser_data = &t->parsing.simple.window_update; - return ok; -} - -static int parsing_init_ping_parser(grpc_chttp2_transport *t) { - int ok = GRPC_CHTTP2_PARSE_OK == - grpc_chttp2_ping_parser_begin_frame(&t->parsing.simple.ping, - t->incoming_frame_size, - t->incoming_frame_flags); - if (!ok) { - drop_connection(t); - } - t->parser = grpc_chttp2_ping_parser_parse; - t->parser_data = &t->parsing.simple.ping; - return ok; -} - -static int parsing_init_rst_stream_parser(grpc_chttp2_transport *t) { - int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_rst_stream_parser_begin_frame( - &t->parsing.simple.rst_stream, - t->incoming_frame_size, - t->incoming_frame_flags); - if (!ok) { - drop_connection(t); - } - t->parser = grpc_chttp2_rst_stream_parser_parse; - t->parser_data = &t->parsing.simple.rst_stream; - return ok; -} - -static int parsing_init_goaway_parser(grpc_chttp2_transport *t) { - int ok = - GRPC_CHTTP2_PARSE_OK == - grpc_chttp2_goaway_parser_begin_frame( - &t->parsing.goaway_parser, t->incoming_frame_size, t->incoming_frame_flags); - if (!ok) { - drop_connection(t); - } - t->parser = grpc_chttp2_goaway_parser_parse; - t->parser_data = &t->parsing.goaway_parser; - return ok; -} - -static int parsing_init_settings_frame_parser(grpc_chttp2_transport *t) { - int ok; - - if (t->incoming_stream_id != 0) { - gpr_log(GPR_ERROR, "settings frame received for grpc_chttp2_stream %d", t->incoming_stream_id); - drop_connection(t); - return 0; - } - - ok = GRPC_CHTTP2_PARSE_OK == - grpc_chttp2_settings_parser_begin_frame( - &t->parsing.simple.settings, t->incoming_frame_size, - t->incoming_frame_flags, t->settings[PEER_SETTINGS]); - if (!ok) { - drop_connection(t); - return 0; - } - if (t->incoming_frame_flags & GRPC_CHTTP2_FLAG_ACK) { - memcpy(t->settings[ACKED_SETTINGS], t->settings[SENT_SETTINGS], - GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); - } - t->parser = grpc_chttp2_settings_parser_parse; - t->parser_data = &t->parsing.simple.settings; - return ok; -} - -static int init_frame_parser(grpc_chttp2_transport *t) { - if (t->expect_continuation_stream_id != 0) { - if (t->incoming_frame_type != GRPC_CHTTP2_FRAME_CONTINUATION) { - gpr_log(GPR_ERROR, "Expected CONTINUATION frame, got frame type %02x", - t->incoming_frame_type); - return 0; - } - if (t->expect_continuation_stream_id != t->incoming_stream_id) { - gpr_log(GPR_ERROR, - "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got grpc_chttp2_stream %08x", - t->expect_continuation_stream_id, t->incoming_stream_id); - return 0; - } - return parsing_init_header_frame_parser(t, 1); - } - switch (t->incoming_frame_type) { - case GRPC_CHTTP2_FRAME_DATA: - return parsing_init_data_frame_parser(t); - case GRPC_CHTTP2_FRAME_HEADER: - return parsing_init_header_frame_parser(t, 0); - case GRPC_CHTTP2_FRAME_CONTINUATION: - gpr_log(GPR_ERROR, "Unexpected CONTINUATION frame"); - return 0; - case GRPC_CHTTP2_FRAME_RST_STREAM: - return parsing_init_rst_stream_parser(t); - case GRPC_CHTTP2_FRAME_SETTINGS: - return parsing_init_settings_frame_parser(t); - case GRPC_CHTTP2_FRAME_WINDOW_UPDATE: - return parsing_init_window_update_frame_parser(t); - case GRPC_CHTTP2_FRAME_PING: - return parsing_init_ping_parser(t); - case GRPC_CHTTP2_FRAME_GOAWAY: - return parsing_init_goaway_parser(t); - default: - gpr_log(GPR_ERROR, "Unknown frame type %02x", t->incoming_frame_type); - return parsing_init_skip_frame(t, 0); - } -} - -/* -static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) { - return window + window_update < MAX_WINDOW; -} -*/ - -static void add_metadata_batch(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { - grpc_metadata_batch b; - - b.list.head = NULL; - /* Store away the last element of the list, so that in patch_metadata_ops - we can reconstitute the list. - We can't do list building here as later incoming metadata may reallocate - the underlying array. */ - b.list.tail = (void *)(gpr_intptr)s->incoming_metadata_count; - b.garbage.head = b.garbage.tail = NULL; - b.deadline = s->incoming_deadline; - s->incoming_deadline = gpr_inf_future; - - grpc_sopb_add_metadata(&s->parser.incoming_sopb, b); -} - -static int parse_frame_slice(grpc_chttp2_transport *t, gpr_slice slice, int is_last) { - grpc_chttp2_parse_state st; - size_t i; - memset(&st, 0, sizeof(st)); - switch (t->parser(t->parser_data, &st, slice, is_last)) { - case GRPC_CHTTP2_PARSE_OK: - if (st.end_of_stream) { - t->incoming_stream->read_closed = 1; - maybe_finish_read(t, t->incoming_stream, 1); - } - if (st.need_flush_reads) { - maybe_finish_read(t, t->incoming_stream, 1); - } - if (st.metadata_boundary) { - add_metadata_batch(t, t->incoming_stream); - maybe_finish_read(t, t->incoming_stream, 1); - } - if (st.ack_settings) { - gpr_slice_buffer_add(&t->parsing.qbuf, grpc_chttp2_settings_ack_create()); - } - if (st.send_ping_ack) { - gpr_slice_buffer_add( - &t->parsing.qbuf, - grpc_chttp2_ping_create(1, t->parsing.simple.ping.opaque_8bytes)); - } - if (st.goaway) { - add_goaway(t, st.goaway_error, st.goaway_text); - } - if (st.rst_stream) { - cancel_stream_id( - t, t->incoming_stream_id, - grpc_chttp2_http2_error_to_grpc_status(st.rst_stream_reason), - st.rst_stream_reason, 0); - } - if (st.process_ping_reply) { - for (i = 0; i < t->ping_count; i++) { - if (0 == - memcmp(t->pings[i].id, t->parsing.simple.ping.opaque_8bytes, 8)) { - t->pings[i].cb(t->pings[i].user_data); - memmove(&t->pings[i], &t->pings[i + 1], - (t->ping_count - i - 1) * sizeof(grpc_chttp2_outstanding_ping)); - t->ping_count--; - break; - } - } - } - if (st.initial_window_update) { - for (i = 0; i < t->stream_map.count; i++) { - grpc_chttp2_stream *s = (grpc_chttp2_stream *)(t->stream_map.values[i]); - s->outgoing_window_update += st.initial_window_update; - stream_list_join(t, s, NEW_OUTGOING_WINDOW); - } - } - if (st.window_update) { - if (t->incoming_stream_id) { - /* if there was a grpc_chttp2_stream id, this is for some grpc_chttp2_stream */ - grpc_chttp2_stream *s = lookup_stream(t, t->incoming_stream_id); - if (s) { - s->outgoing_window_update += st.window_update; - stream_list_join(t, s, NEW_OUTGOING_WINDOW); - } - } else { - /* grpc_chttp2_transport level window update */ - t->outgoing_window_update += st.window_update; - } - } - return 1; - case GRPC_CHTTP2_STREAM_ERROR: - parsing_become_skip_parser(t); - cancel_stream_id( - t, t->incoming_stream_id, - grpc_chttp2_http2_error_to_grpc_status(GRPC_CHTTP2_INTERNAL_ERROR), - GRPC_CHTTP2_INTERNAL_ERROR, 1); - return 1; - case GRPC_CHTTP2_CONNECTION_ERROR: - drop_connection(t); - return 0; - } - gpr_log(GPR_ERROR, "should never reach here"); - abort(); - return 0; -} - -static int process_read(grpc_chttp2_transport *t, gpr_slice slice) { - gpr_uint8 *beg = GPR_SLICE_START_PTR(slice); - gpr_uint8 *end = GPR_SLICE_END_PTR(slice); - gpr_uint8 *cur = beg; - - if (cur == end) return 1; - - switch (t->deframe_state) { - case DTS_CLIENT_PREFIX_0: - case DTS_CLIENT_PREFIX_1: - case DTS_CLIENT_PREFIX_2: - case DTS_CLIENT_PREFIX_3: - case DTS_CLIENT_PREFIX_4: - case DTS_CLIENT_PREFIX_5: - case DTS_CLIENT_PREFIX_6: - case DTS_CLIENT_PREFIX_7: - case DTS_CLIENT_PREFIX_8: - case DTS_CLIENT_PREFIX_9: - case DTS_CLIENT_PREFIX_10: - case DTS_CLIENT_PREFIX_11: - case DTS_CLIENT_PREFIX_12: - case DTS_CLIENT_PREFIX_13: - case DTS_CLIENT_PREFIX_14: - case DTS_CLIENT_PREFIX_15: - case DTS_CLIENT_PREFIX_16: - case DTS_CLIENT_PREFIX_17: - case DTS_CLIENT_PREFIX_18: - case DTS_CLIENT_PREFIX_19: - case DTS_CLIENT_PREFIX_20: - case DTS_CLIENT_PREFIX_21: - case DTS_CLIENT_PREFIX_22: - case DTS_CLIENT_PREFIX_23: - while (cur != end && t->deframe_state != DTS_FH_0) { - if (*cur != CLIENT_CONNECT_STRING[t->deframe_state]) { - gpr_log(GPR_ERROR, - "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " - "at byte %d", - CLIENT_CONNECT_STRING[t->deframe_state], - (int)(gpr_uint8)CLIENT_CONNECT_STRING[t->deframe_state], *cur, - (int)*cur, t->deframe_state); - drop_connection(t); - return 0; - } - ++cur; - ++t->deframe_state; - } - if (cur == end) { - return 1; - } - /* fallthrough */ - dts_fh_0: - case DTS_FH_0: - GPR_ASSERT(cur < end); - t->incoming_frame_size = ((gpr_uint32)*cur) << 16; - if (++cur == end) { - t->deframe_state = DTS_FH_1; - return 1; - } - /* fallthrough */ - case DTS_FH_1: - GPR_ASSERT(cur < end); - t->incoming_frame_size |= ((gpr_uint32)*cur) << 8; - if (++cur == end) { - t->deframe_state = DTS_FH_2; - return 1; - } - /* fallthrough */ - case DTS_FH_2: - GPR_ASSERT(cur < end); - t->incoming_frame_size |= *cur; - if (++cur == end) { - t->deframe_state = DTS_FH_3; - return 1; - } - /* fallthrough */ - case DTS_FH_3: - GPR_ASSERT(cur < end); - t->incoming_frame_type = *cur; - if (++cur == end) { - t->deframe_state = DTS_FH_4; - return 1; - } - /* fallthrough */ - case DTS_FH_4: - GPR_ASSERT(cur < end); - t->incoming_frame_flags = *cur; - if (++cur == end) { - t->deframe_state = DTS_FH_5; - return 1; - } - /* fallthrough */ - case DTS_FH_5: - GPR_ASSERT(cur < end); - t->incoming_stream_id = (((gpr_uint32)*cur) & 0x7f) << 24; - if (++cur == end) { - t->deframe_state = DTS_FH_6; - return 1; - } - /* fallthrough */ - case DTS_FH_6: - GPR_ASSERT(cur < end); - t->incoming_stream_id |= ((gpr_uint32)*cur) << 16; - if (++cur == end) { - t->deframe_state = DTS_FH_7; - return 1; - } - /* fallthrough */ - case DTS_FH_7: - GPR_ASSERT(cur < end); - t->incoming_stream_id |= ((gpr_uint32)*cur) << 8; - if (++cur == end) { - t->deframe_state = DTS_FH_8; - return 1; - } - /* fallthrough */ - case DTS_FH_8: - GPR_ASSERT(cur < end); - t->incoming_stream_id |= ((gpr_uint32)*cur); - t->deframe_state = DTS_FRAME; - if (!init_frame_parser(t)) { - return 0; - } - /* t->last_incoming_stream_id is used as last-grpc_chttp2_stream-id when - sending GOAWAY frame. - https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.8 - says that last-grpc_chttp2_stream-id is peer-initiated grpc_chttp2_stream ID. So, - since we don't have server pushed streams, client should send - GOAWAY last-grpc_chttp2_stream-id=0 in this case. */ - if (!t->is_client) { - t->last_incoming_stream_id = t->incoming_stream_id; - } - if (t->incoming_frame_size == 0) { - if (!parse_frame_slice(t, gpr_empty_slice(), 1)) { - return 0; - } - if (++cur == end) { - t->deframe_state = DTS_FH_0; - return 1; - } - goto dts_fh_0; /* loop */ - } - if (++cur == end) { - return 1; - } - /* fallthrough */ - case DTS_FRAME: - GPR_ASSERT(cur < end); - if ((gpr_uint32)(end - cur) == t->incoming_frame_size) { - if (!parse_frame_slice( - t, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 1)) { - return 0; - } - t->deframe_state = DTS_FH_0; - return 1; - } else if ((gpr_uint32)(end - cur) > t->incoming_frame_size) { - if (!parse_frame_slice( - t, gpr_slice_sub_no_ref(slice, cur - beg, - cur + t->incoming_frame_size - beg), - 1)) { - return 0; - } - cur += t->incoming_frame_size; - goto dts_fh_0; /* loop */ - } else { - if (!parse_frame_slice( - t, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 0)) { - return 0; - } - t->incoming_frame_size -= (end - cur); - return 1; - } - gpr_log(GPR_ERROR, "should never reach here"); - abort(); - } - - gpr_log(GPR_ERROR, "should never reach here"); - abort(); - - return 0; -} - /* tcp read callback */ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { @@ -1554,9 +908,12 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, if (t->error_state == ERROR_STATE_NONE) { t->parsing.executing = 1; gpr_mu_unlock(&t->mu); - for (i = 0; i < nslices && process_read(t, slices[i]); i++) + for (i = 0; i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); i++) ; gpr_mu_lock(&t->mu); + if (i != nslices) { + drop_connection(t); + } t->parsing.executing = 0; } while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { @@ -1569,19 +926,19 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, maybe_join_window_updates(t, s); } while ((s = stream_list_remove_head(t, NEW_OUTGOING_WINDOW))) { - int was_window_empty = s->outgoing_window <= 0; - FLOWCTL_TRACE(t, s, outgoing, s->id, s->outgoing_window_update); - s->outgoing_window += s->outgoing_window_update; - s->outgoing_window_update = 0; + int was_window_empty = s->global.outgoing_window <= 0; + FLOWCTL_TRACE(t, s, outgoing, s->global.id, s->global.outgoing_window_update); + s->global.outgoing_window += s->global.outgoing_window_update; + s->global.outgoing_window_update = 0; /* if this window update makes outgoing ops writable again, flag that */ - if (was_window_empty && s->outgoing_sopb && - s->outgoing_sopb->nops > 0) { + if (was_window_empty && s->global.outgoing_sopb && + s->global.outgoing_sopb->nops > 0) { stream_list_join(t, s, WRITABLE); } } - t->outgoing_window += t->outgoing_window_update; - t->outgoing_window_update = 0; + t->global.outgoing_window += t->global.outgoing_window_update; + t->global.outgoing_window_update = 0; maybe_start_some_streams(t); unlock(t); keep_reading = 1; diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 6c910d0e990..0b8635de702 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -760,7 +760,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/parsing.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2/writing.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c +INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/parsing.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2/writing.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj index dc33ba306fb..2bf381f5b0f 100644 --- a/vsprojects/grpc/grpc.vcxproj +++ b/vsprojects/grpc/grpc.vcxproj @@ -231,7 +231,6 @@ - diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters index d946b15255e..30efa781616 100644 --- a/vsprojects/grpc/grpc.vcxproj.filters +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -611,9 +611,6 @@ src\core\transport\chttp2 - - src\core\transport\chttp2 - src\core\transport\chttp2 diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj index d5ccc2e0c71..5e91c86167b 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -213,7 +213,6 @@ - diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters index 77a5fa8ad4b..c8a46467502 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -494,9 +494,6 @@ src\core\transport\chttp2 - - src\core\transport\chttp2 - src\core\transport\chttp2 From 3719f07233ed7b5b1371b811311af434c0128e03 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 12 Jun 2015 17:19:51 -0700 Subject: [PATCH 18/97] Get parsing/writing compiling again --- src/core/transport/chttp2/frame_ping.c | 19 ++++- src/core/transport/chttp2/frame_rst_stream.c | 8 +- src/core/transport/chttp2/frame_settings.c | 9 ++- .../transport/chttp2/frame_window_update.c | 12 ++- src/core/transport/chttp2/hpack_parser.c | 12 ++- src/core/transport/chttp2/internal.h | 36 +++++++-- src/core/transport/chttp2/parsing.c | 73 +++++++++---------- src/core/transport/chttp2/writing.c | 8 +- 8 files changed, 113 insertions(+), 64 deletions(-) diff --git a/src/core/transport/chttp2/frame_ping.c b/src/core/transport/chttp2/frame_ping.c index 26004b3b7c6..a85f2bbba30 100644 --- a/src/core/transport/chttp2/frame_ping.c +++ b/src/core/transport/chttp2/frame_ping.c @@ -32,9 +32,11 @@ */ #include "src/core/transport/chttp2/frame_ping.h" +#include "src/core/transport/chttp2/internal.h" #include +#include #include gpr_slice grpc_chttp2_ping_create(gpr_uint8 ack, gpr_uint8 *opaque_8bytes) { @@ -67,12 +69,14 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; grpc_chttp2_ping_parser *p = parser; + grpc_chttp2_outstanding_ping *ping; + while (p->byte != 8 && cur != end) { p->opaque_8bytes[p->byte] = *cur; @@ -83,9 +87,18 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( if (p->byte == 8) { GPR_ASSERT(is_last); if (p->is_ack) { - state->process_ping_reply = 1; + for (ping = transport_parsing->pings.next; ping != &transport_parsing->pings; ping = ping->next) { + if (0 == memcmp(p->opaque_8bytes, ping->id, 8)) { + grpc_iomgr_add_delayed_callback(ping->on_recv, 1); + } + ping->next->prev = ping->prev; + ping->prev->next = ping->next; + gpr_free(ping); + } } else { - state->send_ping_ack = 1; + gpr_slice_buffer_add( + &transport_parsing->qbuf, + grpc_chttp2_ping_create(1, p->opaque_8bytes)); } } diff --git a/src/core/transport/chttp2/frame_rst_stream.c b/src/core/transport/chttp2/frame_rst_stream.c index 3016aac7a20..77da1bcc411 100644 --- a/src/core/transport/chttp2/frame_rst_stream.c +++ b/src/core/transport/chttp2/frame_rst_stream.c @@ -32,6 +32,7 @@ */ #include "src/core/transport/chttp2/frame_rst_stream.h" +#include "src/core/transport/chttp2/internal.h" #include @@ -69,7 +70,7 @@ grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); @@ -84,8 +85,9 @@ grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( if (p->byte == 4) { GPR_ASSERT(is_last); - state->rst_stream = 1; - state->rst_stream_reason = + stream_parsing->received_close = 1; + stream_parsing->saw_rst_stream = 1; + stream_parsing->rst_stream_reason = (((gpr_uint32)p->reason_bytes[0]) << 24) | (((gpr_uint32)p->reason_bytes[1]) << 16) | (((gpr_uint32)p->reason_bytes[2]) << 8) | diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c index 2ffce730d50..ed9bf0fd339 100644 --- a/src/core/transport/chttp2/frame_settings.c +++ b/src/core/transport/chttp2/frame_settings.c @@ -32,6 +32,7 @@ */ #include "src/core/transport/chttp2/frame_settings.h" +#include "src/core/transport/chttp2/internal.h" #include @@ -137,7 +138,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( - void *p, grpc_chttp2_parse_state *state, gpr_slice slice, int is_last) { + void *p, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { grpc_chttp2_settings_parser *parser = p; const gpr_uint8 *cur = GPR_SLICE_START_PTR(slice); const gpr_uint8 *end = GPR_SLICE_END_PTR(slice); @@ -154,7 +155,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( if (is_last) { memcpy(parser->target_settings, parser->incoming_settings, GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); - state->ack_settings = 1; + gpr_slice_buffer_add(&transport_parsing->qbuf, grpc_chttp2_settings_ack_create()); } return GRPC_CHTTP2_PARSE_OK; } @@ -220,11 +221,11 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( } if (parser->id == GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE && parser->incoming_settings[parser->id] != parser->value) { - state->initial_window_update = + transport_parsing->initial_window_update = (gpr_int64)parser->value - parser->incoming_settings[parser->id]; gpr_log(GPR_DEBUG, "adding %d for initial_window change", - (int)state->initial_window_update); + (int)transport_parsing->initial_window_update); } parser->incoming_settings[parser->id] = parser->value; if (grpc_http_trace) { diff --git a/src/core/transport/chttp2/frame_window_update.c b/src/core/transport/chttp2/frame_window_update.c index a8db7d66531..d43a137bd38 100644 --- a/src/core/transport/chttp2/frame_window_update.c +++ b/src/core/transport/chttp2/frame_window_update.c @@ -32,6 +32,7 @@ */ #include "src/core/transport/chttp2/frame_window_update.h" +#include "src/core/transport/chttp2/internal.h" #include @@ -73,7 +74,7 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( - void *parser, grpc_chttp2_parse_state *state, gpr_slice slice, + void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); @@ -92,7 +93,14 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( return GRPC_CHTTP2_CONNECTION_ERROR; } GPR_ASSERT(is_last); - state->window_update = p->amount; + + if (transport_parsing->incoming_stream_id) { + if (stream_parsing) { + stream_parsing->outgoing_window_update += p->amount; + } + } else { + transport_parsing->outgoing_window_update += p->amount; + } } return GRPC_CHTTP2_PARSE_OK; diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index a4895438687..edab308381e 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -32,6 +32,7 @@ */ #include "src/core/transport/chttp2/hpack_parser.h" +#include "src/core/transport/chttp2/internal.h" #include #include @@ -1369,7 +1370,7 @@ int grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, } grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( - void *hpack_parser, grpc_chttp2_parse_state *state, gpr_slice slice, + void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { grpc_chttp2_hpack_parser *parser = hpack_parser; if (!grpc_chttp2_hpack_parser_parse(parser, GPR_SLICE_START_PTR(slice), @@ -1382,9 +1383,12 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( "end of header frame not aligned with a hpack record boundary"); return GRPC_CHTTP2_CONNECTION_ERROR; } - state->metadata_boundary = parser->is_boundary; - state->end_of_stream = parser->is_eof; - state->need_flush_reads = parser->is_eof; + if (parser->is_boundary) { + grpc_chttp2_parsing_add_metadata_batch(transport_parsing, stream_parsing); + } + if (parser->is_eof) { + stream_parsing->received_close = 1; + } parser->on_header = on_header_not_set; parser->on_header_user_data = NULL; parser->is_boundary = 0xde; diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 5eba01a3e1b..f89d327f8cb 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -162,10 +162,11 @@ typedef enum { } grpc_chttp2_setting_set; /* Outstanding ping request data */ -typedef struct { +typedef struct grpc_chttp2_outstanding_ping { gpr_uint8 id[8]; - void (*cb)(void *user_data); - void *user_data; + grpc_iomgr_closure *on_recv; + struct grpc_chttp2_outstanding_ping *next; + struct grpc_chttp2_outstanding_ping *prev; } grpc_chttp2_outstanding_ping; typedef struct { @@ -181,10 +182,13 @@ typedef struct { /** window available for us to send to peer */ gpr_uint32 outgoing_window; + /** window available for peer to send to us - updated after parse */ + gpr_uint32 incoming_window; /** how much window would we like to have for incoming_window */ gpr_uint32 connection_window_target; - + /** is this transport a client? */ + gpr_uint8 is_client; /** are the local settings dirty and need to be sent? */ gpr_uint8 dirtied_local_settings; /** have local settings been sent? */ @@ -196,6 +200,9 @@ typedef struct { /** last received stream id */ gpr_uint32 last_incoming_stream_id; + + /** pings awaiting responses */ + grpc_chttp2_outstanding_ping pings; } grpc_chttp2_transport_global; typedef struct { @@ -216,6 +223,9 @@ struct grpc_chttp2_transport_parsing { /** was a goaway frame received? */ gpr_uint8 goaway_received; + /** initial window change */ + gpr_int64 initial_window_update; + /** data to write later - after parsing */ gpr_slice_buffer qbuf; /* metadata object cache */ @@ -262,6 +272,11 @@ struct grpc_chttp2_transport_parsing { grpc_status_code goaway_error; gpr_uint32 goaway_last_stream_index; gpr_slice goaway_text; + + gpr_uint64 outgoing_window_update; + + /** pings awaiting responses */ + grpc_chttp2_outstanding_ping pings; }; @@ -306,9 +321,6 @@ struct grpc_chttp2_transport { grpc_chttp2_stream_map stream_map; /* pings */ - grpc_chttp2_outstanding_ping *pings; - size_t ping_count; - size_t ping_capacity; gpr_int64 ping_counter; grpc_chttp2_transport_global global; @@ -339,6 +351,8 @@ typedef struct { /** window available for us to send to peer */ gpr_int64 outgoing_window; + /** window available for peer to send to us - updated after parse */ + gpr_uint32 incoming_window; /** stream ops the transport user would like to send */ grpc_stream_op_buffer *outgoing_sopb; /** when the application requests writes be closed, the write_closed is @@ -367,10 +381,16 @@ struct grpc_chttp2_stream_parsing { gpr_uint8 incoming_window_changed; /** saw an error on this stream during parsing (it should be cancelled) */ gpr_uint8 saw_error; + /** saw a rst_stream */ + gpr_uint8 saw_rst_stream; /** window available for peer to send to us */ gpr_uint32 incoming_window; /** parsing state for data frames */ grpc_chttp2_data_parser data_parser; + /** reason give to rst_stream */ + gpr_uint32 rst_stream_reason; + /* amount of window given */ + gpr_uint64 outgoing_window_update; /* incoming metadata */ grpc_linked_mdelem *incoming_metadata; @@ -440,6 +460,8 @@ void grpc_chttp2_read_write_state_changed(grpc_chttp2_transport_global *transpor grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); +void grpc_chttp2_parsing_add_metadata_batch(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing); + #define GRPC_CHTTP2_FLOW_CTL_TRACE(a,b,c,d,e) do {} while (0) #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 2dd46b31168..e2c39bec3c9 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -275,14 +275,14 @@ static int init_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { } static grpc_chttp2_parse_error skip_parser(void *parser, - grpc_chttp2_parse_state *st, + grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { return GRPC_CHTTP2_PARSE_OK; } static void skip_header(void *tp, grpc_mdelem *md) { grpc_mdelem_unref(md); } -static int init_skip_frame(grpc_chttp2_transport_parsing *transport_parsing, int is_header) { +static int init_skip_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_header) { if (is_header) { int is_eoh = transport_parsing->expect_continuation_stream_id != 0; transport_parsing->parser = grpc_chttp2_header_parser_parse; @@ -298,7 +298,7 @@ static int init_skip_frame(grpc_chttp2_transport_parsing *transport_parsing, int } static void become_skip_parser(grpc_chttp2_transport_parsing *transport_parsing) { - init_skip_frame(transport_parsing, transport_parsing->parser == grpc_chttp2_header_parser_parse); + init_skip_frame_parser(transport_parsing, transport_parsing->parser == grpc_chttp2_header_parser_parse); } static grpc_chttp2_parse_error update_incoming_window(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { @@ -329,7 +329,7 @@ static grpc_chttp2_parse_error update_incoming_window(grpc_chttp2_transport_pars static int init_data_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { grpc_chttp2_stream_parsing *stream_parsing = grpc_chttp2_parsing_lookup_stream(transport_parsing, transport_parsing->incoming_stream_id); grpc_chttp2_parse_error err = GRPC_CHTTP2_PARSE_OK; - if (!stream_parsing || stream_parsing->received_close) return init_skip_frame(transport_parsing, 0); + if (!stream_parsing || stream_parsing->received_close) return init_skip_frame_parser(transport_parsing, 0); if (err == GRPC_CHTTP2_PARSE_OK) { err = update_incoming_window(transport_parsing, stream_parsing); } @@ -346,7 +346,7 @@ static int init_data_frame_parser(grpc_chttp2_transport_parsing *transport_parsi case GRPC_CHTTP2_STREAM_ERROR: stream_parsing->received_close = 1; stream_parsing->saw_error = 1; - return init_skip_frame(transport_parsing, 0); + return init_skip_frame_parser(transport_parsing, 0); case GRPC_CHTTP2_CONNECTION_ERROR: return 0; } @@ -421,7 +421,7 @@ static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_par if (!stream_parsing) { if (is_continuation) { gpr_log(GPR_ERROR, "grpc_chttp2_stream disbanded before CONTINUATION received"); - return init_skip_frame(transport_parsing, 1); + return init_skip_frame_parser(transport_parsing, 1); } if (transport_parsing->is_client) { if ((transport_parsing->incoming_stream_id & 1) && @@ -430,22 +430,22 @@ static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_par } else { gpr_log(GPR_ERROR, "ignoring new grpc_chttp2_stream creation on client"); } - return init_skip_frame(transport_parsing, 1); + return init_skip_frame_parser(transport_parsing, 1); } else if (transport_parsing->last_incoming_stream_id > transport_parsing->incoming_stream_id) { gpr_log(GPR_ERROR, "ignoring out of order new grpc_chttp2_stream request on server; last grpc_chttp2_stream " "id=%d, new grpc_chttp2_stream id=%d", transport_parsing->last_incoming_stream_id, transport_parsing->incoming_stream_id); - return init_skip_frame(transport_parsing, 1); + return init_skip_frame_parser(transport_parsing, 1); } else if ((transport_parsing->incoming_stream_id & 1) == 0) { gpr_log(GPR_ERROR, "ignoring grpc_chttp2_stream with non-client generated index %d", transport_parsing->incoming_stream_id); - return init_skip_frame(transport_parsing, 1); + return init_skip_frame_parser(transport_parsing, 1); } stream_parsing = transport_parsing->incoming_stream = grpc_chttp2_parsing_accept_stream(transport_parsing, transport_parsing->incoming_stream_id); if (!stream_parsing) { gpr_log(GPR_ERROR, "grpc_chttp2_stream not accepted"); - return init_skip_frame(transport_parsing, 1); + return init_skip_frame_parser(transport_parsing, 1); } } else { transport_parsing->incoming_stream = stream_parsing; @@ -453,7 +453,7 @@ static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_par if (stream_parsing->received_close) { gpr_log(GPR_ERROR, "skipping already closed grpc_chttp2_stream header"); transport_parsing->incoming_stream = NULL; - return init_skip_frame(transport_parsing, 1); + return init_skip_frame_parser(transport_parsing, 1); } transport_parsing->parser = grpc_chttp2_header_parser_parse; transport_parsing->parser_data = &transport_parsing->hpack_parser; @@ -539,7 +539,7 @@ static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) { } */ -static void add_metadata_batch(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { +void grpc_chttp2_parsing_add_metadata_batch(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { grpc_metadata_batch b; b.list.head = NULL; @@ -555,15 +555,33 @@ static void add_metadata_batch(grpc_chttp2_transport_parsing *transport_parsing, grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); } -static int parse_frame_slice(grpc_chttp2_transport_parsing *t, gpr_slice slice, int is_last) { - grpc_chttp2_parse_state st; - size_t i; - memset(&st, 0, sizeof(st)); - switch (transport_parsing->parser(transport_parsing->parser_data, &st, slice, is_last)) { +static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last) { + grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream; + switch (transport_parsing->parser(transport_parsing->parser_data, transport_parsing, stream_parsing, slice, is_last)) { case GRPC_CHTTP2_PARSE_OK: if (stream_parsing) { grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); } + return 1; + case GRPC_CHTTP2_STREAM_ERROR: + become_skip_parser(transport_parsing); + if (stream_parsing) { + stream_parsing->saw_error = 1; + } + return 1; + case GRPC_CHTTP2_CONNECTION_ERROR: + return 0; + } + gpr_log(GPR_ERROR, "should never reach here"); + abort(); + return 0; +} + + + + + +#if 0 if (st.end_of_stream) { transport_parsing->incoming_stream->read_closed = 1; maybe_finish_read(t, transport_parsing->incoming_stream, 1); @@ -576,12 +594,8 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *t, gpr_slice slice, maybe_finish_read(t, transport_parsing->incoming_stream, 1); } if (st.ack_settings) { - gpr_slice_buffer_add(&transport_parsing->qbuf, grpc_chttp2_settings_ack_create()); } if (st.send_ping_ack) { - gpr_slice_buffer_add( - &transport_parsing->qbuf, - grpc_chttp2_ping_create(1, transport_parsing->simple.ping.opaque_8bytes)); } if (st.goaway) { add_goaway(t, st.goaway_error, st.goaway_text); @@ -624,19 +638,4 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *t, gpr_slice slice, transport_parsing->global.outgoing_window_update += st.window_update; } } - return 1; - case GRPC_CHTTP2_STREAM_ERROR: - become_skip_parser(transport_parsing); - cancel_stream_id( - t, transport_parsing->incoming_stream_id, - grpc_chttp2_http2_error_to_grpc_status(GRPC_CHTTP2_INTERNAL_ERROR), - GRPC_CHTTP2_INTERNAL_ERROR, 1); - return 1; - case GRPC_CHTTP2_CONNECTION_ERROR: - drop_connection(transport_parsing); - return 0; - } - gpr_log(GPR_ERROR, "should never reach here"); - abort(); - return 0; -} +#endif diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 0265f173f38..3f25cbedac3 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -39,7 +39,7 @@ static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing); static void finish_write_cb(void *tw, grpc_endpoint_cb_status write_status); -int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_constants *transport_constants, grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { +int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_writing *stream_writing; gpr_uint32 window_delta; @@ -75,7 +75,7 @@ int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_constants *transpor if (stream_global->write_state == WRITE_STATE_QUEUED_CLOSE && stream_global->outgoing_sopb->nops == 0) { - if (!transport_constants->is_client && !stream_global->read_closed) { + if (!transport_global->is_client && !stream_global->read_closed) { stream_writing->send_closed = SEND_CLOSED_WITH_RST_STREAM; } else { stream_writing->send_closed = SEND_CLOSED; @@ -158,14 +158,14 @@ static void finish_write_cb(void *tw, grpc_endpoint_cb_status write_status) { grpc_chttp2_terminate_writing(transport_writing, write_status == GRPC_ENDPOINT_CB_OK); } -void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_constants *transport_constants, grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { +void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream_writing *stream_writing; grpc_chttp2_stream_global *stream_global; while (grpc_chttp2_list_pop_written_stream(transport_global, transport_writing, &stream_global, &stream_writing)) { if (stream_writing->send_closed != DONT_SEND_CLOSED) { stream_global->write_state = WRITE_STATE_SENT_CLOSE; - if (!transport_constants->is_client) { + if (!transport_global->is_client) { stream_global->read_closed = 1; } grpc_chttp2_read_write_state_changed(transport_global, stream_global); From 606d874d162a9a254035839701bf6926f681c77b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 15 Jun 2015 06:58:50 -0700 Subject: [PATCH 19/97] Progress on splitting reading from transport lock --- include/grpc/support/slice_buffer.h | 2 + src/core/transport/chttp2/internal.h | 132 +++++++--- src/core/transport/chttp2/parsing.c | 137 ++++++++++ src/core/transport/chttp2/stream_map.h | 3 + src/core/transport/chttp2_transport.c | 350 ++++++++----------------- 5 files changed, 351 insertions(+), 273 deletions(-) diff --git a/include/grpc/support/slice_buffer.h b/include/grpc/support/slice_buffer.h index 1545dbfd76a..ec048e8c91f 100644 --- a/include/grpc/support/slice_buffer.h +++ b/include/grpc/support/slice_buffer.h @@ -84,6 +84,8 @@ void gpr_slice_buffer_pop(gpr_slice_buffer *sb); void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb); /* swap the contents of two slice buffers */ void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b); +/* move all of the elements of src into dst */ +void gpr_slice_buffer_move_into(gpr_slice_buffer *src, gpr_slice_buffer *dst); #ifdef __cplusplus } diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index f89d327f8cb..ffadd047621 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -143,9 +143,9 @@ typedef struct { } grpc_chttp2_stream_link; typedef enum { - ERROR_STATE_NONE, - ERROR_STATE_SEEN, - ERROR_STATE_NOTIFIED + GRPC_CHTTP2_ERROR_STATE_NONE, + GRPC_CHTTP2_ERROR_STATE_SEEN, + GRPC_CHTTP2_ERROR_STATE_NOTIFIED } grpc_chttp2_error_state; /* We keep several sets of connection wide parameters */ @@ -198,11 +198,32 @@ typedef struct { /** settings values */ gpr_uint32 settings[NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; + /** has there been a connection level error, and have we notified + anyone about it? */ + grpc_chttp2_error_state error_state; + + /** what is the next stream id to be allocated by this peer? + copied to next_stream_id in parsing when parsing commences */ + gpr_uint32 next_stream_id; + /** last received stream id */ gpr_uint32 last_incoming_stream_id; /** pings awaiting responses */ grpc_chttp2_outstanding_ping pings; + /** next payload for an outgoing ping */ + gpr_uint64 ping_counter; + + /** concurrent stream count: updated when not parsing, + so this is a strict over-estimation on the client */ + gpr_uint32 concurrent_stream_count; + + /** is there a goaway available? */ + gpr_uint8 have_goaway; + /** what is the debug text of the goaway? */ + gpr_slice goaway_text; + /** what is the status code of the goaway? */ + grpc_status_code goaway_error; } grpc_chttp2_transport_global; typedef struct { @@ -279,7 +300,6 @@ struct grpc_chttp2_transport_parsing { grpc_chttp2_outstanding_ping pings; }; - struct grpc_chttp2_transport { grpc_transport base; /* must be first */ grpc_endpoint *ep; @@ -287,18 +307,67 @@ struct grpc_chttp2_transport { gpr_refcount refs; gpr_mu mu; - gpr_cv cv; + + /** is the transport destroying itself? */ + gpr_uint8 destroying; + /** has the upper layer closed the transport? */ + gpr_uint8 closed; /** is a thread currently writing */ gpr_uint8 writing_active; + /** is a thread currently parsing */ + gpr_uint8 parsing_active; + /** is there a read request to the endpoint outstanding? */ + gpr_uint8 endpoint_reading; + + /** various lists of streams */ + grpc_chttp2_stream_list lists[STREAM_LIST_COUNT]; + + /** global state for reading/writing */ + grpc_chttp2_transport_global global; + /** state only accessible by the chain of execution that + set writing_active=1 */ + grpc_chttp2_transport_writing writing; + /** state only accessible by the chain of execution that + set parsing_active=1 */ + grpc_chttp2_transport_parsing parsing; + + /** maps stream id to grpc_chttp2_stream objects; + owned by the parsing thread when parsing */ + grpc_chttp2_stream_map parsing_stream_map; + + /** streams created by the client (possibly during parsing); + merged with parsing_stream_map during unlock when no + parsing is occurring */ + grpc_chttp2_stream_map new_stream_map; + + /** closure to execute writing */ + grpc_iomgr_closure writing_action; + + /** address to place a newly accepted stream - set and unset by + grpc_chttp2_parsing_accept_stream; used by init_stream to + publish the accepted server stream */ + grpc_chttp2_stream **accepting_stream; + + struct { + /** is a thread currently performing channel callbacks */ + gpr_uint8 executing; + /** transport channel-level callback */ + const grpc_transport_callbacks *cb; + /** user data for cb calls */ + void *cb_user_data; + /** closure for notifying transport closure */ + grpc_iomgr_closure notify_closed; + } channel_callback; + +#if 0 /* basic state management - what are we doing at the moment? */ gpr_uint8 reading; /** are we calling back any grpc_transport_op completion events */ gpr_uint8 calling_back_ops; gpr_uint8 destroying; gpr_uint8 closed; - grpc_chttp2_error_state error_state; /* stream indexing */ gpr_uint32 next_stream_id; @@ -306,40 +375,19 @@ struct grpc_chttp2_transport { /* window management */ gpr_uint32 outgoing_window_update; - /* goaway */ - grpc_chttp2_pending_goaway *pending_goaways; - size_t num_pending_goaways; - size_t cap_pending_goaways; - /* state for a stream that's not yet been created */ grpc_stream_op_buffer new_stream_sopb; /* stream ops that need to be destroyed, but outside of the lock */ grpc_stream_op_buffer nuke_later_sopb; - grpc_chttp2_stream_list lists[STREAM_LIST_COUNT]; - grpc_chttp2_stream_map stream_map; - /* pings */ gpr_int64 ping_counter; - grpc_chttp2_transport_global global; - grpc_chttp2_transport_writing writing; - grpc_chttp2_transport_parsing parsing; - /** closure to execute writing */ - grpc_iomgr_closure writing_action; + grpc_chttp2_stream **accepting_stream; - struct { - /** is a thread currently performing channel callbacks */ - gpr_uint8 executing; - /** transport channel-level callback */ - const grpc_transport_callbacks *cb; - /** user data for cb calls */ - void *cb_user_data; - /** closure for notifying transport closure */ - grpc_iomgr_closure notify_closed; - } channel_callback; +#endif }; typedef struct { @@ -361,6 +409,13 @@ typedef struct { grpc_chttp2_write_state write_state; /** is this stream closed (boolean) */ gpr_uint8 read_closed; + + /** stream state already published to the upper layer */ + grpc_stream_state published_state; + /** address to publish next stream state to */ + grpc_stream_state *publish_state; + /** pointer to sop buffer to fill in with new stream ops */ + grpc_stream_op_buffer *incoming_sopb; } grpc_chttp2_stream_global; typedef struct { @@ -377,12 +432,12 @@ struct grpc_chttp2_stream_parsing { gpr_uint32 id; /** has this stream received a close */ gpr_uint8 received_close; - /** incoming_window has been reduced during parsing */ - gpr_uint8 incoming_window_changed; /** saw an error on this stream during parsing (it should be cancelled) */ gpr_uint8 saw_error; /** saw a rst_stream */ gpr_uint8 saw_rst_stream; + /** incoming_window has been reduced by this much during parsing */ + gpr_uint32 incoming_window_delta; /** window available for peer to send to us */ gpr_uint32 incoming_window; /** parsing state for data frames */ @@ -403,20 +458,18 @@ struct grpc_chttp2_stream_parsing { struct grpc_chttp2_stream { grpc_chttp2_stream_global global; grpc_chttp2_stream_writing writing; - - gpr_uint32 outgoing_window_update; - gpr_uint8 cancelled; + grpc_chttp2_stream_parsing parsing; grpc_chttp2_stream_link links[STREAM_LIST_COUNT]; gpr_uint8 included[STREAM_LIST_COUNT]; - /* sops from application */ - grpc_stream_op_buffer *incoming_sopb; - grpc_stream_state *publish_state; - grpc_stream_state published_state; +#if 0 + gpr_uint32 outgoing_window_update; + gpr_uint8 cancelled; grpc_stream_state callback_state; grpc_stream_op_buffer callback_sopb; +#endif }; /** Transport writing call flow: @@ -434,6 +487,7 @@ void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writ void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); /** Process one slice of incoming data */ +void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice); void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); @@ -450,9 +504,11 @@ int grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport_writing *transport void grpc_chttp2_list_add_written_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); int grpc_chttp2_list_pop_written_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing); +void grpc_chttp2_list_add_writable_window_update_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); int grpc_chttp2_list_pop_writable_window_update_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); void grpc_chttp2_list_add_parsing_seen_stream(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing); +int grpc_chttp2_list_pop_parsing_seen_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_parsing **stream_parsing); void grpc_chttp2_schedule_closure(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success); void grpc_chttp2_read_write_state_changed(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index e2c39bec3c9..9f501941259 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -32,6 +32,9 @@ */ #include "src/core/transport/chttp2/internal.h" + +#include + #include "src/core/transport/chttp2/timeout_encoding.h" #include @@ -50,6 +53,9 @@ static int init_skip_frame_parser(grpc_chttp2_transport_parsing *transport_parsi static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last); void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing) { + grpc_chttp2_stream_global *stream_global; + grpc_chttp2_stream_parsing *stream_parsing; + /* transport_parsing->last_incoming_stream_id is used as last-grpc_chttp2_stream-id when sending GOAWAY frame. https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.8 @@ -59,6 +65,84 @@ void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *transport_global, g if (!transport_parsing->is_client) { transport_global->last_incoming_stream_id = transport_parsing->incoming_stream_id; } + + /* TODO(ctiller): re-implement */ + GPR_ASSERT(transport_parsing->initial_window_update == 0); + +#if 0 + while ((s = stream_list_remove_head(t, FINISHED_READ_OP)) != NULL) { + int publish = 0; + GPR_ASSERT(s->incoming_sopb); + *s->publish_state = + compute_state(s->write_state == WRITE_STATE_SENT_CLOSE, s->read_closed); + if (*s->publish_state != s->published_state) { + s->published_state = *s->publish_state; + publish = 1; + if (s->published_state == GRPC_STREAM_CLOSED) { + remove_from_stream_map(t, s); + } + } + if (s->parser.incoming_sopb.nops > 0) { + grpc_sopb_swap(s->incoming_sopb, &s->parser.incoming_sopb); + publish = 1; + } + if (publish) { + if (s->incoming_metadata_count > 0) { + patch_metadata_ops(s); + } + s->incoming_sopb = NULL; + schedule_cb(t, s->global.recv_done_closure, 1); + } + } +#endif + + /* copy parsing qbuf to global qbuf */ + gpr_slice_buffer_move_into(&transport_parsing->qbuf, &transport_global->qbuf); + + /* update global settings */ + if (transport_parsing->settings_updated) { + memcpy(transport_global->settings[PEER_SETTINGS], transport_parsing->settings, sizeof(transport_parsing->settings)); + transport_parsing->settings_updated = 0; + } + + /* update settings based on ack if received */ + if (transport_parsing->settings_ack_received) { + memcpy(transport_global->settings[ACKED_SETTINGS], transport_global->settings[SENT_SETTINGS], + GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); + transport_parsing->settings_ack_received = 0; + } + + /* move goaway to the global state if we received one (it will be + published later */ + if (transport_parsing->goaway_received) { + gpr_slice_unref(transport_global->goaway_text); + transport_global->goaway_text = gpr_slice_ref(transport_parsing->goaway_text); + transport_global->goaway_error = transport_parsing->goaway_error; + transport_global->have_goaway = 1; + transport_parsing->goaway_received = 0; + } + + /* for each stream that saw an update, fixup global state */ + while (grpc_chttp2_list_pop_parsing_seen_stream(transport_global, transport_parsing, &stream_global, &stream_parsing)) { + /* update incoming flow control window */ + if (stream_parsing->incoming_window_delta) { + stream_global->incoming_window -= stream_parsing->incoming_window_delta; + stream_parsing->incoming_window_delta = 0; + grpc_chttp2_list_add_writable_window_update_stream(transport_global, stream_global); + } + + /* update outgoing flow control window */ + if (stream_parsing->outgoing_window_update) { + int was_zero = stream_global->outgoing_window <= 0; + int is_zero; + stream_global->outgoing_window += stream_parsing->outgoing_window_update; + stream_parsing->outgoing_window_update = 0; + is_zero = stream_global->outgoing_window <= 0; + if (was_zero && !is_zero) { + grpc_chttp2_list_add_writable_stream(transport_global, stream_global); + } + } + } } int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice) { @@ -555,6 +639,59 @@ void grpc_chttp2_parsing_add_metadata_batch(grpc_chttp2_transport_parsing *trans grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); } +static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, grpc_chttp2_stream_parsing *stream_parsing) { + grpc_stream_op *ops = stream_global->incoming_sopb->ops; + size_t nops = stream_global->incoming_sopb->nops; + size_t i; + size_t j; + size_t mdidx = 0; + size_t last_mdidx; + int found_metadata = 0; + + /* rework the array of metadata into a linked list, making use + of the breadcrumbs we left in metadata batches during + add_metadata_batch */ + for (i = 0; i < nops; i++) { + grpc_stream_op *op = &ops[i]; + if (op->type != GRPC_OP_METADATA) continue; + found_metadata = 1; + /* we left a breadcrumb indicating where the end of this list is, + and since we add sequentially, we know from the end of the last + segment where this segment begins */ + last_mdidx = (size_t)(gpr_intptr)(op->data.metadata.list.tail); + GPR_ASSERT(last_mdidx > mdidx); + GPR_ASSERT(last_mdidx <= stream_parsing->incoming_metadata_count); + /* turn the array into a doubly linked list */ + op->data.metadata.list.head = &stream_parsing->incoming_metadata[mdidx]; + op->data.metadata.list.tail = &stream_parsing->incoming_metadata[last_mdidx - 1]; + for (j = mdidx + 1; j < last_mdidx; j++) { + stream_parsing->incoming_metadata[j].prev = &stream_parsing->incoming_metadata[j - 1]; + stream_parsing->incoming_metadata[j - 1].next = &stream_parsing->incoming_metadata[j]; + } + stream_parsing->incoming_metadata[mdidx].prev = NULL; + stream_parsing->incoming_metadata[last_mdidx - 1].next = NULL; + /* track where we're up to */ + mdidx = last_mdidx; + } + if (found_metadata) { + stream_parsing->old_incoming_metadata = stream_parsing->incoming_metadata; + if (mdidx != stream_parsing->incoming_metadata_count) { + /* we have a partially read metadata batch still in incoming_metadata */ + size_t new_count = stream_parsing->incoming_metadata_count - mdidx; + size_t copy_bytes = sizeof(*stream_parsing->incoming_metadata) * new_count; + GPR_ASSERT(mdidx < stream_parsing->incoming_metadata_count); + stream_parsing->incoming_metadata = gpr_malloc(copy_bytes); + memcpy(stream_parsing->old_incoming_metadata + mdidx, stream_parsing->incoming_metadata, + copy_bytes); + stream_parsing->incoming_metadata_count = stream_parsing->incoming_metadata_capacity = new_count; + } else { + stream_parsing->incoming_metadata = NULL; + stream_parsing->incoming_metadata_count = 0; + stream_parsing->incoming_metadata_capacity = 0; + } + } +} + static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last) { grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream; switch (transport_parsing->parser(transport_parsing->parser_data, transport_parsing, stream_parsing, slice, is_last)) { diff --git a/src/core/transport/chttp2/stream_map.h b/src/core/transport/chttp2/stream_map.h index d338d2f8921..f59dece7467 100644 --- a/src/core/transport/chttp2/stream_map.h +++ b/src/core/transport/chttp2/stream_map.h @@ -66,6 +66,9 @@ void grpc_chttp2_stream_map_add(grpc_chttp2_stream_map *map, gpr_uint32 key, void *grpc_chttp2_stream_map_delete(grpc_chttp2_stream_map *map, gpr_uint32 key); +/* Move all elements of src into dst */ +void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, grpc_chttp2_stream_map *dst); + /* Return an existing key, or NULL if it does not exist */ void *grpc_chttp2_stream_map_find(grpc_chttp2_stream_map *map, gpr_uint32 key); diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 13ddeacc028..5db9b92727f 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -138,34 +138,31 @@ static void destruct_transport(grpc_chttp2_transport *t) { grpc_chttp2_hpack_parser_destroy(&t->parsing.hpack_parser); grpc_chttp2_goaway_parser_destroy(&t->parsing.goaway_parser); - grpc_mdstr_unref(t->constants.str_grpc_timeout); + grpc_mdstr_unref(t->parsing.str_grpc_timeout); for (i = 0; i < STREAM_LIST_COUNT; i++) { GPR_ASSERT(t->lists[i].head == NULL); GPR_ASSERT(t->lists[i].tail == NULL); } - GPR_ASSERT(grpc_chttp2_stream_map_size(&t->stream_map) == 0); + GPR_ASSERT(grpc_chttp2_stream_map_size(&t->parsing_stream_map) == 0); + GPR_ASSERT(grpc_chttp2_stream_map_size(&t->new_stream_map) == 0); - grpc_chttp2_stream_map_destroy(&t->stream_map); + grpc_chttp2_stream_map_destroy(&t->parsing_stream_map); + grpc_chttp2_stream_map_destroy(&t->new_stream_map); gpr_mu_unlock(&t->mu); gpr_mu_destroy(&t->mu); - gpr_cv_destroy(&t->cv); /* callback remaining pings: they're not allowed to call into the transpot, and maybe they hold resources that need to be freed */ - for (i = 0; i < t->ping_count; i++) { - t->pings[i].cb(t->pings[i].user_data); + while (t->global.pings.next != &t->global.pings) { + grpc_chttp2_outstanding_ping *ping = t->global.pings.next; + grpc_iomgr_add_delayed_callback(ping->on_recv, 0); + ping->next->prev = ping->prev; + ping->prev->next = ping->next; + gpr_free(ping); } - gpr_free(t->pings); - - for (i = 0; i < t->num_pending_goaways; i++) { - gpr_slice_unref(t->pending_goaways[i].debug); - } - gpr_free(t->pending_goaways); - - grpc_sopb_destroy(&t->nuke_later_sopb); grpc_mdctx_unref(t->metadata_context); @@ -187,7 +184,7 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba int j; grpc_transport_setup_result sr; - GPR_ASSERT(strlen(CLIENT_CONNECT_STRING) == CLIENT_CONNECT_STRLEN); + GPR_ASSERT(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) == GRPC_CHTTP2_CLIENT_CONNECT_STRLEN); memset(t, 0, sizeof(*t)); @@ -196,20 +193,20 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba /* one ref is for destroy, the other for when ep becomes NULL */ gpr_ref_init(&t->refs, 2); gpr_mu_init(&t->mu); - gpr_cv_init(&t->cv); grpc_mdctx_ref(mdctx); t->metadata_context = mdctx; - t->constants.str_grpc_timeout = - grpc_mdstr_from_string(t->metadata_context, "grpc-timeout"); - t->reading = 1; - t->error_state = ERROR_STATE_NONE; - t->next_stream_id = is_client ? 1 : 2; - t->constants.is_client = is_client; + t->endpoint_reading = 1; + t->global.error_state = GRPC_CHTTP2_ERROR_STATE_NONE; + t->global.next_stream_id = is_client ? 1 : 2; + t->global.is_client = is_client; t->global.outgoing_window = DEFAULT_WINDOW; t->global.incoming_window = DEFAULT_WINDOW; t->global.connection_window_target = DEFAULT_CONNECTION_WINDOW_TARGET; - t->deframe_state = is_client ? DTS_FH_0 : DTS_CLIENT_PREFIX_0; - t->ping_counter = gpr_now().tv_nsec; + t->global.ping_counter = 1; + t->parsing.is_client = is_client; + t->parsing.str_grpc_timeout = + grpc_mdstr_from_string(t->metadata_context, "grpc-timeout"); + t->parsing.deframe_state = is_client ? DTS_FH_0 : DTS_CLIENT_PREFIX_0; gpr_slice_buffer_init(&t->global.qbuf); @@ -222,17 +219,17 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba grpc_chttp2_hpack_parser_init(&t->parsing.hpack_parser, t->metadata_context); grpc_iomgr_closure_init(&t->channel_callback.notify_closed, notify_closed, t); - grpc_sopb_init(&t->nuke_later_sopb); if (is_client) { gpr_slice_buffer_add(&t->global.qbuf, - gpr_slice_from_copied_string(CLIENT_CONNECT_STRING)); + gpr_slice_from_copied_string(GRPC_CHTTP2_CLIENT_CONNECT_STRING)); } /* 8 is a random stab in the dark as to a good initial size: it's small enough that it shouldn't waste memory for infrequently used connections, yet large enough that the exponential growth should happen nicely when it's needed. TODO(ctiller): tune this */ - grpc_chttp2_stream_map_init(&t->stream_map, 8); + grpc_chttp2_stream_map_init(&t->parsing_stream_map, 8); + grpc_chttp2_stream_map_init(&t->new_stream_map, 8); /* copy in initial settings to all setting sets */ for (i = 0; i < NUM_SETTING_SETS; i++) { @@ -247,7 +244,7 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba t->global.sent_local_settings = 0; /* configure http2 the way we like it */ - if (t->constants.is_client) { + if (is_client) { push_setting(t, GRPC_CHTTP2_SETTINGS_ENABLE_PUSH, 0); push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0); } @@ -257,7 +254,7 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba for (i = 0; i < channel_args->num_args; i++) { if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_MAX_CONCURRENT_STREAMS)) { - if (t->constants.is_client) { + if (is_client) { gpr_log(GPR_ERROR, "%s: is ignored on the client", GRPC_ARG_MAX_CONCURRENT_STREAMS); } else if (channel_args->args[i].type != GRPC_ARG_INTEGER) { @@ -272,13 +269,13 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba if (channel_args->args[i].type != GRPC_ARG_INTEGER) { gpr_log(GPR_ERROR, "%s: must be an integer", GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER); - } else if ((t->next_stream_id & 1) != + } else if ((t->global.next_stream_id & 1) != (channel_args->args[i].value.integer & 1)) { gpr_log(GPR_ERROR, "%s: low bit must be %d on %s", - GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER, t->next_stream_id & 1, - t->constants.is_client ? "client" : "server"); + GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER, t->global.next_stream_id & 1, + is_client ? "client" : "server"); } else { - t->next_stream_id = channel_args->args[i].value.integer; + t->global.next_stream_id = channel_args->args[i].value.integer; } } } @@ -295,7 +292,6 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba t->channel_callback.cb = sr.callbacks; t->channel_callback.cb_user_data = sr.user_data; t->channel_callback.executing = 0; - if (t->destroying) gpr_cv_signal(&t->cv); unlock(t); ref_transport(t); /* matches unref inside recv_data */ @@ -309,28 +305,9 @@ static void destroy_transport(grpc_transport *gt) { lock(t); t->destroying = 1; - /* Wait for pending stuff to finish. - We need to be not calling back to ensure that closed() gets a chance to - trigger if needed during unlock() before we die. - We need to be not writing as cancellation finalization may produce some - callbacks that NEED to be made to close out some streams when t->writing - becomes 0. */ - while (t->channel_callback.executing || t->writing_active) { - gpr_cv_wait(&t->cv, &t->mu, gpr_inf_future); - } drop_connection(t); unlock(t); - /* The drop_connection() above puts the grpc_chttp2_transport into an error state, and - the follow-up unlock should then (as part of the cleanup work it does) - ensure that cb is NULL, and therefore not call back anything further. - This check validates this very subtle behavior. - It's shutdown path, so I don't believe an extra lock pair is going to be - problematic for performance. */ - lock(t); - GPR_ASSERT(t->error_state == ERROR_STATE_NOTIFIED); - unlock(t); - unref_transport(t); } @@ -354,7 +331,7 @@ static void goaway(grpc_transport *gt, grpc_status_code status, gpr_slice debug_data) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; lock(t); - grpc_chttp2_goaway_append(t->last_incoming_stream_id, + grpc_chttp2_goaway_append(t->global.last_incoming_stream_id, grpc_chttp2_grpc_status_to_http2_error(status), debug_data, &t->global.qbuf); unlock(t); @@ -367,41 +344,30 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, memset(s, 0, sizeof(*s)); + s->parsing.incoming_deadline = gpr_inf_future; + grpc_sopb_init(&s->writing.sopb); + grpc_chttp2_data_parser_init(&s->parsing.data_parser); + ref_transport(t); lock(t); - if (!server_data) { - s->global.id = 0; - s->global.outgoing_window = 0; - s->global.incoming_window = 0; - } else { - /* already locked */ + if (server_data) { + GPR_ASSERT(t->parsing_active); s->global.id = (gpr_uint32)(gpr_uintptr)server_data; s->global.outgoing_window = t->global.settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; s->global.incoming_window = t->global.settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - t->incoming_stream = s; - grpc_chttp2_stream_map_add(&t->stream_map, s->global.id, s); + *t->accepting_stream = s; + grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); } - s->incoming_deadline = gpr_inf_future; - grpc_sopb_init(&s->writing.sopb); - grpc_sopb_init(&s->callback_sopb); - grpc_chttp2_data_parser_init(&s->parser); - if (initial_op) perform_op_locked(t, s, initial_op); - unlock(t); return 0; } -static void schedule_nuke_sopb(grpc_chttp2_transport *t, grpc_stream_op_buffer *sopb) { - grpc_sopb_append(&t->nuke_later_sopb, sopb->ops, sopb->nops); - sopb->nops = 0; -} - static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; @@ -409,7 +375,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_lock(&t->mu); - GPR_ASSERT(s->published_state == GRPC_STREAM_CLOSED || s->global.id == 0); + GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || s->global.id == 0); for (i = 0; i < STREAM_LIST_COUNT; i++) { stream_list_remove(t, s, i); @@ -418,15 +384,14 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_unlock(&t->mu); GPR_ASSERT(s->global.outgoing_sopb == NULL); - GPR_ASSERT(s->incoming_sopb == NULL); + GPR_ASSERT(s->global.incoming_sopb == NULL); grpc_sopb_destroy(&s->writing.sopb); - grpc_sopb_destroy(&s->callback_sopb); - grpc_chttp2_data_parser_destroy(&s->parser); - for (i = 0; i < s->incoming_metadata_count; i++) { - grpc_mdelem_unref(s->incoming_metadata[i].md); + grpc_chttp2_data_parser_destroy(&s->parsing.data_parser); + for (i = 0; i < s->parsing.incoming_metadata_count; i++) { + grpc_mdelem_unref(s->parsing.incoming_metadata[i].md); } - gpr_free(s->incoming_metadata); - gpr_free(s->old_incoming_metadata); + gpr_free(s->parsing.incoming_metadata); + gpr_free(s->parsing.old_incoming_metadata); unref_transport(t); } @@ -495,14 +460,16 @@ static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, gr stream_list_add_tail(t, s, id); } +#if 0 static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (s->global.id == 0) return; IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Removing grpc_chttp2_stream %d", - t->constants.is_client ? "CLI" : "SVR", s->global.id)); + t->global.is_client ? "CLI" : "SVR", s->global.id)); if (grpc_chttp2_stream_map_delete(&t->stream_map, s->global.id)) { maybe_start_some_streams(t); } } +#endif /* * LOCK MANAGEMENT @@ -518,7 +485,7 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_chttp2_transport *t) { grpc_iomgr_closure *run_closures; - if (!t->writing_active && grpc_chttp2_unlocking_check_writes(&t->constants, &t->global, &t->writing)) { + if (!t->writing_active && grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { t->writing_active = 1; ref_transport(t); schedule_cb(t, &t->writing_action, 1); @@ -568,15 +535,12 @@ void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writ } /* cleanup writing related jazz */ - grpc_chttp2_cleanup_writing(&t->constants, &t->global, &t->writing); + grpc_chttp2_cleanup_writing(&t->global, &t->writing); /* leave the writing flag up on shutdown to prevent further writes in unlock() from starting */ t->writing_active = 0; - if (t->destroying) { - gpr_cv_signal(&t->cv); - } - if (!t->reading) { + if (!t->endpoint_reading) { grpc_endpoint_destroy(t->ep); t->ep = NULL; unref_transport(t); /* safe because we'll still have the ref for write */ @@ -595,50 +559,42 @@ static void writing_action(void *gt, int iomgr_success_ignored) { static void add_goaway(grpc_chttp2_transport *t, gpr_uint32 goaway_error, gpr_slice goaway_text) { - if (t->num_pending_goaways == t->cap_pending_goaways) { - t->cap_pending_goaways = GPR_MAX(1, t->cap_pending_goaways * 2); - t->pending_goaways = gpr_realloc( - t->pending_goaways, sizeof(grpc_chttp2_pending_goaway) * t->cap_pending_goaways); - } - t->pending_goaways[t->num_pending_goaways].status = - grpc_chttp2_http2_error_to_grpc_status(goaway_error); - t->pending_goaways[t->num_pending_goaways].debug = goaway_text; - t->num_pending_goaways++; + gpr_slice_unref(t->channel_callback.goaway_text); + t->channel_callback.have_goaway = 1; + t->channel_callback.goaway_text = goaway_text; + t->channel_callback.goaway_error = goaway_error; } static void maybe_start_some_streams(grpc_chttp2_transport *t) { + grpc_chttp2_stream *s; /* start streams where we have free grpc_chttp2_stream ids and free concurrency */ - while (!t->parsing.executing && t->next_stream_id <= MAX_CLIENT_STREAM_ID && - grpc_chttp2_stream_map_size(&t->stream_map) < + while (t->global.next_stream_id <= MAX_CLIENT_STREAM_ID && + t->global.concurrent_stream_count < t->global.settings[PEER_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS]) { - grpc_chttp2_stream *s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY); - if (!s) return; - + [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && + (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", - t->constants.is_client ? "CLI" : "SVR", s, t->next_stream_id)); + t->global.is_client ? "CLI" : "SVR", s, t->global.next_stream_id)); - if (t->next_stream_id == MAX_CLIENT_STREAM_ID) { + if (t->global.next_stream_id == MAX_CLIENT_STREAM_ID) { add_goaway( t, GRPC_CHTTP2_NO_ERROR, gpr_slice_from_copied_string("Exceeded sequence number limit")); } GPR_ASSERT(s->global.id == 0); - s->global.id = t->next_stream_id; - t->next_stream_id += 2; + s->global.id = t->global.next_stream_id; + t->global.next_stream_id += 2; s->global.outgoing_window = t->global.settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; s->global.incoming_window = t->global.settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - grpc_chttp2_stream_map_add(&t->stream_map, s->global.id, s); + grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); + t->global.concurrent_stream_count++; stream_list_join(t, s, WRITABLE); } /* cancel out streams that will never be started */ - while (t->next_stream_id > MAX_CLIENT_STREAM_ID) { - grpc_chttp2_stream *s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY); - if (!s) return; - + while (t->global.next_stream_id > MAX_CLIENT_STREAM_ID && (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { cancel_stream( t, s, GRPC_STATUS_UNAVAILABLE, grpc_chttp2_grpc_status_to_http2_error(GRPC_STATUS_UNAVAILABLE), NULL, @@ -646,6 +602,7 @@ static void maybe_start_some_streams(grpc_chttp2_transport *t) { } } +#if 0 static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_transport_op *op) { if (op->cancel_with_status != GRPC_STATUS_OK) { cancel_stream( @@ -665,27 +622,27 @@ static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, g if (s->global.id == 0) { IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: New grpc_chttp2_stream %p waiting for concurrency", - t->constants.is_client ? "CLI" : "SVR", s)); + t->global.is_client ? "CLI" : "SVR", s)); stream_list_join(t, s, WAITING_FOR_CONCURRENCY); maybe_start_some_streams(t); } else if (s->global.outgoing_window > 0) { stream_list_join(t, s, WRITABLE); } } else { - schedule_nuke_sopb(t, op->send_ops); + grpc_sopb_reset(op->send_ops); schedule_cb(t, s->global.send_done_closure, 0); } } if (op->recv_ops) { - GPR_ASSERT(s->incoming_sopb == NULL); - GPR_ASSERT(s->published_state != GRPC_STREAM_CLOSED); + GPR_ASSERT(s->global.incoming_sopb == NULL); + GPR_ASSERT(s->global.published_state != GRPC_STREAM_CLOSED); s->global.recv_done_closure = op->on_done_recv; - s->incoming_sopb = op->recv_ops; - s->incoming_sopb->nops = 0; - s->publish_state = op->recv_state; - gpr_free(s->old_incoming_metadata); - s->old_incoming_metadata = NULL; + s->global.incoming_sopb = op->recv_ops; + s->global.incoming_sopb->nops = 0; + s->global.publish_state = op->recv_state; + gpr_free(s->global.old_incoming_metadata); + s->global.old_incoming_metadata = NULL; maybe_finish_read(t, s, 0); maybe_join_window_updates(t, s); } @@ -698,6 +655,7 @@ static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, g schedule_cb(t, op->on_consumed, 1); } } +#endif static void perform_op(grpc_transport *gt, grpc_stream *gs, grpc_transport_op *op) { @@ -709,28 +667,23 @@ static void perform_op(grpc_transport *gt, grpc_stream *gs, unlock(t); } -static void send_ping(grpc_transport *gt, void (*cb)(void *user_data), - void *user_data) { +static void send_ping(grpc_transport *gt, grpc_iomgr_closure *on_recv) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - grpc_chttp2_outstanding_ping *p; + grpc_chttp2_outstanding_ping *p = gpr_malloc(sizeof(*p)); lock(t); - if (t->ping_capacity == t->ping_count) { - t->ping_capacity = GPR_MAX(1, t->ping_capacity * 3 / 2); - t->pings = - gpr_realloc(t->pings, sizeof(grpc_chttp2_outstanding_ping) * t->ping_capacity); - } - p = &t->pings[t->ping_count++]; - p->id[0] = (t->ping_counter >> 56) & 0xff; - p->id[1] = (t->ping_counter >> 48) & 0xff; - p->id[2] = (t->ping_counter >> 40) & 0xff; - p->id[3] = (t->ping_counter >> 32) & 0xff; - p->id[4] = (t->ping_counter >> 24) & 0xff; - p->id[5] = (t->ping_counter >> 16) & 0xff; - p->id[6] = (t->ping_counter >> 8) & 0xff; - p->id[7] = t->ping_counter & 0xff; - p->cb = cb; - p->user_data = user_data; + p->next = &t->global.pings; + p->prev = p->next->prev; + p->prev->next = p->next->prev = p; + p->id[0] = (t->global.ping_counter >> 56) & 0xff; + p->id[1] = (t->global.ping_counter >> 48) & 0xff; + p->id[2] = (t->global.ping_counter >> 40) & 0xff; + p->id[3] = (t->global.ping_counter >> 32) & 0xff; + p->id[4] = (t->global.ping_counter >> 24) & 0xff; + p->id[5] = (t->global.ping_counter >> 16) & 0xff; + p->id[6] = (t->global.ping_counter >> 8) & 0xff; + p->id[7] = t->global.ping_counter & 0xff; + p->on_recv = on_recv; gpr_slice_buffer_add(&t->global.qbuf, grpc_chttp2_ping_create(0, p->id)); unlock(t); } @@ -753,6 +706,7 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { } } +#if 0 static void cancel_stream_inner(grpc_chttp2_transport *t, grpc_chttp2_stream *s, gpr_uint32 id, grpc_status_code local_status, grpc_chttp2_error_code error_code, @@ -844,15 +798,17 @@ static void cancel_stream_cb(void *user_data, gpr_uint32 id, void *grpc_chttp2_s static void end_all_the_calls(grpc_chttp2_transport *t) { grpc_chttp2_stream_map_for_each(&t->stream_map, cancel_stream_cb, t); } +#endif static void drop_connection(grpc_chttp2_transport *t) { - if (t->error_state == ERROR_STATE_NONE) { - t->error_state = ERROR_STATE_SEEN; + if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { + t->global.error_state = GRPC_CHTTP2_ERROR_STATE_SEEN; } close_transport_locked(t); end_all_the_calls(t); } +#if 0 static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, int is_parser) { if (is_parser) { stream_list_join(t, s, MAYBE_FINISH_READ_AFTER_PARSE); @@ -860,6 +816,7 @@ static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, i stream_list_join(t, s, FINISHED_READ_OP); } } +#endif static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (t->parsing.executing) { @@ -875,15 +832,16 @@ static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stre } } +#if 0 static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id) { return grpc_chttp2_stream_map_find(&t->stream_map, id); } +#endif /* tcp read callback */ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { grpc_chttp2_transport *t = tp; - grpc_chttp2_stream *s; size_t i; int keep_reading = 0; @@ -893,8 +851,8 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, case GRPC_ENDPOINT_CB_ERROR: lock(t); drop_connection(t); - t->reading = 0; - if (!t->writing.executing && t->ep) { + t->endpoint_reading = 0; + if (!t->writing_active && t->ep) { grpc_endpoint_destroy(t->ep); t->ep = NULL; unref_transport(t); /* safe as we still have a ref for read */ @@ -904,9 +862,10 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, break; case GRPC_ENDPOINT_CB_OK: lock(t); - GPR_ASSERT(!t->parsing.executing); - if (t->error_state == ERROR_STATE_NONE) { - t->parsing.executing = 1; + GPR_ASSERT(!t->parsing_active); + if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { + t->parsing_active = 1; + grpc_chttp2_prepare_to_read(&t->global, &t->parsing); gpr_mu_unlock(&t->mu); for (i = 0; i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); i++) ; @@ -914,8 +873,14 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, if (i != nslices) { drop_connection(t); } - t->parsing.executing = 0; + /* merge stream lists */ + grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); + t->global.concurrent_stream_count = grpc_stream_map_size(&t->parsing_stream_map); + /* handle higher level things */ + grpc_chttp2_publish_reads(&t->global, &t->parsing); + t->parsing_active = 0; } +#if 0 while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { maybe_finish_read(t, s, 0); } @@ -940,6 +905,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, t->global.outgoing_window += t->global.outgoing_window_update; t->global.outgoing_window_update = 0; maybe_start_some_streams(t); +#endif unlock(t); keep_reading = 1; break; @@ -964,92 +930,6 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, return GRPC_STREAM_OPEN; } -static void patch_metadata_ops(grpc_chttp2_stream *s) { - grpc_stream_op *ops = s->incoming_sopb->ops; - size_t nops = s->incoming_sopb->nops; - size_t i; - size_t j; - size_t mdidx = 0; - size_t last_mdidx; - int found_metadata = 0; - - /* rework the array of metadata into a linked list, making use - of the breadcrumbs we left in metadata batches during - add_metadata_batch */ - for (i = 0; i < nops; i++) { - grpc_stream_op *op = &ops[i]; - if (op->type != GRPC_OP_METADATA) continue; - found_metadata = 1; - /* we left a breadcrumb indicating where the end of this list is, - and since we add sequentially, we know from the end of the last - segment where this segment begins */ - last_mdidx = (size_t)(gpr_intptr)(op->data.metadata.list.tail); - GPR_ASSERT(last_mdidx > mdidx); - GPR_ASSERT(last_mdidx <= s->incoming_metadata_count); - /* turn the array into a doubly linked list */ - op->data.metadata.list.head = &s->incoming_metadata[mdidx]; - op->data.metadata.list.tail = &s->incoming_metadata[last_mdidx - 1]; - for (j = mdidx + 1; j < last_mdidx; j++) { - s->incoming_metadata[j].prev = &s->incoming_metadata[j - 1]; - s->incoming_metadata[j - 1].next = &s->incoming_metadata[j]; - } - s->incoming_metadata[mdidx].prev = NULL; - s->incoming_metadata[last_mdidx - 1].next = NULL; - /* track where we're up to */ - mdidx = last_mdidx; - } - if (found_metadata) { - s->old_incoming_metadata = s->incoming_metadata; - if (mdidx != s->incoming_metadata_count) { - /* we have a partially read metadata batch still in incoming_metadata */ - size_t new_count = s->incoming_metadata_count - mdidx; - size_t copy_bytes = sizeof(*s->incoming_metadata) * new_count; - GPR_ASSERT(mdidx < s->incoming_metadata_count); - s->incoming_metadata = gpr_malloc(copy_bytes); - memcpy(s->old_incoming_metadata + mdidx, s->incoming_metadata, - copy_bytes); - s->incoming_metadata_count = s->incoming_metadata_capacity = new_count; - } else { - s->incoming_metadata = NULL; - s->incoming_metadata_count = 0; - s->incoming_metadata_capacity = 0; - } - } -} - -static void unlock_check_parser(grpc_chttp2_transport *t) { - grpc_chttp2_stream *s; - - if (t->parsing.executing) { - return; - } - - while ((s = stream_list_remove_head(t, FINISHED_READ_OP)) != NULL) { - int publish = 0; - GPR_ASSERT(s->incoming_sopb); - *s->publish_state = - compute_state(s->write_state == WRITE_STATE_SENT_CLOSE, s->read_closed); - if (*s->publish_state != s->published_state) { - s->published_state = *s->publish_state; - publish = 1; - if (s->published_state == GRPC_STREAM_CLOSED) { - remove_from_stream_map(t, s); - } - } - if (s->parser.incoming_sopb.nops > 0) { - grpc_sopb_swap(s->incoming_sopb, &s->parser.incoming_sopb); - publish = 1; - } - if (publish) { - if (s->incoming_metadata_count > 0) { - patch_metadata_ops(s); - } - s->incoming_sopb = NULL; - schedule_cb(t, s->global.recv_done_closure, 1); - } - } -} - typedef struct { grpc_chttp2_transport *t; grpc_chttp2_pending_goaway *goaways; From 4aa71a17745c61a79cfe57c40f48a8860728bebf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 15 Jun 2015 13:00:55 -0700 Subject: [PATCH 20/97] clang-format, and process on lock splitting --- src/core/transport/chttp2/alpn.h | 2 +- src/core/transport/chttp2/bin_encoder.c | 76 +---- src/core/transport/chttp2/bin_encoder.h | 2 +- src/core/transport/chttp2/frame.h | 2 +- src/core/transport/chttp2/frame_data.c | 12 +- src/core/transport/chttp2/frame_data.h | 5 +- src/core/transport/chttp2/frame_goaway.c | 20 +- src/core/transport/chttp2/frame_goaway.h | 5 +- src/core/transport/chttp2/frame_ping.c | 13 +- src/core/transport/chttp2/frame_ping.h | 5 +- src/core/transport/chttp2/frame_rst_stream.c | 17 +- src/core/transport/chttp2/frame_rst_stream.h | 5 +- src/core/transport/chttp2/frame_settings.c | 6 +- src/core/transport/chttp2/frame_settings.h | 5 +- .../transport/chttp2/frame_window_update.c | 8 +- .../transport/chttp2/frame_window_update.h | 5 +- src/core/transport/chttp2/gen_hpack_tables.c | 33 +- src/core/transport/chttp2/hpack_parser.c | 38 ++- src/core/transport/chttp2/hpack_parser.h | 6 +- src/core/transport/chttp2/hpack_table.c | 125 +++---- src/core/transport/chttp2/hpack_table.h | 2 +- src/core/transport/chttp2/http2_errors.h | 2 +- src/core/transport/chttp2/huffsyms.c | 323 ++++-------------- src/core/transport/chttp2/huffsyms.h | 2 +- src/core/transport/chttp2/internal.h | 146 +++++--- src/core/transport/chttp2/parsing.c | 320 ++++++++++------- src/core/transport/chttp2/status_conversion.h | 2 +- src/core/transport/chttp2/stream_encoder.h | 2 +- src/core/transport/chttp2/stream_map.h | 5 +- src/core/transport/chttp2/timeout_encoding.h | 2 +- src/core/transport/chttp2/varint.h | 25 +- src/core/transport/chttp2/writing.c | 88 +++-- src/core/transport/chttp2_transport.c | 286 +++++++++------- src/core/transport/chttp2_transport.h | 2 +- src/core/transport/transport.c | 5 +- src/core/transport/transport.h | 7 +- src/core/transport/transport_impl.h | 3 +- 37 files changed, 788 insertions(+), 824 deletions(-) diff --git a/src/core/transport/chttp2/alpn.h b/src/core/transport/chttp2/alpn.h index fcbefc060f4..f38b4c3167e 100644 --- a/src/core/transport/chttp2/alpn.h +++ b/src/core/transport/chttp2/alpn.h @@ -46,4 +46,4 @@ size_t grpc_chttp2_num_alpn_versions(void); * grpc_chttp2_num_alpn_versions()) */ const char *grpc_chttp2_get_alpn_version_index(size_t i); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H */ diff --git a/src/core/transport/chttp2/bin_encoder.c b/src/core/transport/chttp2/bin_encoder.c index f5ca6c4e506..dee6dbec8b9 100644 --- a/src/core/transport/chttp2/bin_encoder.c +++ b/src/core/transport/chttp2/bin_encoder.c @@ -46,70 +46,18 @@ typedef struct { gpr_uint8 length; } b64_huff_sym; -static const b64_huff_sym huff_alphabet[64] = {{0x21, 6}, - {0x5d, 7}, - {0x5e, 7}, - {0x5f, 7}, - {0x60, 7}, - {0x61, 7}, - {0x62, 7}, - {0x63, 7}, - {0x64, 7}, - {0x65, 7}, - {0x66, 7}, - {0x67, 7}, - {0x68, 7}, - {0x69, 7}, - {0x6a, 7}, - {0x6b, 7}, - {0x6c, 7}, - {0x6d, 7}, - {0x6e, 7}, - {0x6f, 7}, - {0x70, 7}, - {0x71, 7}, - {0x72, 7}, - {0xfc, 8}, - {0x73, 7}, - {0xfd, 8}, - {0x3, 5}, - {0x23, 6}, - {0x4, 5}, - {0x24, 6}, - {0x5, 5}, - {0x25, 6}, - {0x26, 6}, - {0x27, 6}, - {0x6, 5}, - {0x74, 7}, - {0x75, 7}, - {0x28, 6}, - {0x29, 6}, - {0x2a, 6}, - {0x7, 5}, - {0x2b, 6}, - {0x76, 7}, - {0x2c, 6}, - {0x8, 5}, - {0x9, 5}, - {0x2d, 6}, - {0x77, 7}, - {0x78, 7}, - {0x79, 7}, - {0x7a, 7}, - {0x7b, 7}, - {0x0, 5}, - {0x1, 5}, - {0x2, 5}, - {0x19, 6}, - {0x1a, 6}, - {0x1b, 6}, - {0x1c, 6}, - {0x1d, 6}, - {0x1e, 6}, - {0x1f, 6}, - {0x7fb, 11}, - {0x18, 6}}; +static const b64_huff_sym huff_alphabet[64] = { + {0x21, 6}, {0x5d, 7}, {0x5e, 7}, {0x5f, 7}, {0x60, 7}, {0x61, 7}, + {0x62, 7}, {0x63, 7}, {0x64, 7}, {0x65, 7}, {0x66, 7}, {0x67, 7}, + {0x68, 7}, {0x69, 7}, {0x6a, 7}, {0x6b, 7}, {0x6c, 7}, {0x6d, 7}, + {0x6e, 7}, {0x6f, 7}, {0x70, 7}, {0x71, 7}, {0x72, 7}, {0xfc, 8}, + {0x73, 7}, {0xfd, 8}, {0x3, 5}, {0x23, 6}, {0x4, 5}, {0x24, 6}, + {0x5, 5}, {0x25, 6}, {0x26, 6}, {0x27, 6}, {0x6, 5}, {0x74, 7}, + {0x75, 7}, {0x28, 6}, {0x29, 6}, {0x2a, 6}, {0x7, 5}, {0x2b, 6}, + {0x76, 7}, {0x2c, 6}, {0x8, 5}, {0x9, 5}, {0x2d, 6}, {0x77, 7}, + {0x78, 7}, {0x79, 7}, {0x7a, 7}, {0x7b, 7}, {0x0, 5}, {0x1, 5}, + {0x2, 5}, {0x19, 6}, {0x1a, 6}, {0x1b, 6}, {0x1c, 6}, {0x1d, 6}, + {0x1e, 6}, {0x1f, 6}, {0x7fb, 11}, {0x18, 6}}; static const gpr_uint8 tail_xtra[3] = {0, 2, 3}; diff --git a/src/core/transport/chttp2/bin_encoder.h b/src/core/transport/chttp2/bin_encoder.h index 9c88ac9725a..d3e5a855ddb 100644 --- a/src/core/transport/chttp2/bin_encoder.h +++ b/src/core/transport/chttp2/bin_encoder.h @@ -53,4 +53,4 @@ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input); int grpc_is_binary_header(const char *key, size_t length); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H */ diff --git a/src/core/transport/chttp2/frame.h b/src/core/transport/chttp2/frame.h index 9012bfa1e16..856de02106c 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/transport/chttp2/frame.h @@ -86,4 +86,4 @@ typedef struct grpc_chttp2_transport_parsing grpc_chttp2_transport_parsing; #define GRPC_CHTTP2_DATA_FLAG_PADDED 8 #define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20 -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H */ diff --git a/src/core/transport/chttp2/frame_data.c b/src/core/transport/chttp2/frame_data.c index 129d2110437..c1f6df6aa48 100644 --- a/src/core/transport/chttp2/frame_data.c +++ b/src/core/transport/chttp2/frame_data.c @@ -70,8 +70,8 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, - int is_last) { + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; @@ -105,28 +105,28 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_1: - p->frame_size = ((gpr_uint32) * cur) << 24; + p->frame_size = ((gpr_uint32)*cur) << 24; if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_2; return GRPC_CHTTP2_PARSE_OK; } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_2: - p->frame_size |= ((gpr_uint32) * cur) << 16; + p->frame_size |= ((gpr_uint32)*cur) << 16; if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_3; return GRPC_CHTTP2_PARSE_OK; } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_3: - p->frame_size |= ((gpr_uint32) * cur) << 8; + p->frame_size |= ((gpr_uint32)*cur) << 8; if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_4; return GRPC_CHTTP2_PARSE_OK; } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_4: - p->frame_size |= ((gpr_uint32) * cur); + p->frame_size |= ((gpr_uint32)*cur); p->state = GRPC_CHTTP2_DATA_FRAME; ++cur; grpc_sopb_add_begin_message(&p->incoming_sopb, p->frame_size, 0); diff --git a/src/core/transport/chttp2/frame_data.h b/src/core/transport/chttp2/frame_data.h index dbbb87fc019..8d6cfcb8419 100644 --- a/src/core/transport/chttp2/frame_data.h +++ b/src/core/transport/chttp2/frame_data.h @@ -72,9 +72,10 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_begin_frame( /* handle a slice of a data frame - is_last indicates the last slice of a frame */ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); /* create a slice with an empty data frame and is_last set */ gpr_slice grpc_chttp2_data_frame_create_empty_close(gpr_uint32 id); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H */ diff --git a/src/core/transport/chttp2/frame_goaway.c b/src/core/transport/chttp2/frame_goaway.c index d7d6c587e64..1ccbba840ce 100644 --- a/src/core/transport/chttp2/frame_goaway.c +++ b/src/core/transport/chttp2/frame_goaway.c @@ -63,8 +63,8 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, - int is_last) { + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; @@ -76,7 +76,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_LSI0; return GRPC_CHTTP2_PARSE_OK; } - p->last_stream_id = ((gpr_uint32) * cur) << 24; + p->last_stream_id = ((gpr_uint32)*cur) << 24; ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_LSI1: @@ -84,7 +84,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_LSI1; return GRPC_CHTTP2_PARSE_OK; } - p->last_stream_id |= ((gpr_uint32) * cur) << 16; + p->last_stream_id |= ((gpr_uint32)*cur) << 16; ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_LSI2: @@ -92,7 +92,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_LSI2; return GRPC_CHTTP2_PARSE_OK; } - p->last_stream_id |= ((gpr_uint32) * cur) << 8; + p->last_stream_id |= ((gpr_uint32)*cur) << 8; ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_LSI3: @@ -100,7 +100,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_LSI3; return GRPC_CHTTP2_PARSE_OK; } - p->last_stream_id |= ((gpr_uint32) * cur); + p->last_stream_id |= ((gpr_uint32)*cur); ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_ERR0: @@ -108,7 +108,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_ERR0; return GRPC_CHTTP2_PARSE_OK; } - p->error_code = ((gpr_uint32) * cur) << 24; + p->error_code = ((gpr_uint32)*cur) << 24; ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_ERR1: @@ -116,7 +116,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_ERR1; return GRPC_CHTTP2_PARSE_OK; } - p->error_code |= ((gpr_uint32) * cur) << 16; + p->error_code |= ((gpr_uint32)*cur) << 16; ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_ERR2: @@ -124,7 +124,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_ERR2; return GRPC_CHTTP2_PARSE_OK; } - p->error_code |= ((gpr_uint32) * cur) << 8; + p->error_code |= ((gpr_uint32)*cur) << 8; ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_ERR3: @@ -132,7 +132,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( p->state = GRPC_CHTTP2_GOAWAY_ERR3; return GRPC_CHTTP2_PARSE_OK; } - p->error_code |= ((gpr_uint32) * cur); + p->error_code |= ((gpr_uint32)*cur); ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_DEBUG: diff --git a/src/core/transport/chttp2/frame_goaway.h b/src/core/transport/chttp2/frame_goaway.h index 8148fa90f23..9c5edfc8215 100644 --- a/src/core/transport/chttp2/frame_goaway.h +++ b/src/core/transport/chttp2/frame_goaway.h @@ -65,10 +65,11 @@ void grpc_chttp2_goaway_parser_destroy(grpc_chttp2_goaway_parser *p); grpc_chttp2_parse_error grpc_chttp2_goaway_parser_begin_frame( grpc_chttp2_goaway_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); void grpc_chttp2_goaway_append(gpr_uint32 last_stream_id, gpr_uint32 error_code, gpr_slice debug_data, gpr_slice_buffer *slice_buffer); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H */ diff --git a/src/core/transport/chttp2/frame_ping.c b/src/core/transport/chttp2/frame_ping.c index a85f2bbba30..05451c7a8ad 100644 --- a/src/core/transport/chttp2/frame_ping.c +++ b/src/core/transport/chttp2/frame_ping.c @@ -69,15 +69,14 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, - int is_last) { + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; grpc_chttp2_ping_parser *p = parser; grpc_chttp2_outstanding_ping *ping; - while (p->byte != 8 && cur != end) { p->opaque_8bytes[p->byte] = *cur; cur++; @@ -87,7 +86,8 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( if (p->byte == 8) { GPR_ASSERT(is_last); if (p->is_ack) { - for (ping = transport_parsing->pings.next; ping != &transport_parsing->pings; ping = ping->next) { + for (ping = transport_parsing->pings.next; + ping != &transport_parsing->pings; ping = ping->next) { if (0 == memcmp(p->opaque_8bytes, ping->id, 8)) { grpc_iomgr_add_delayed_callback(ping->on_recv, 1); } @@ -96,9 +96,8 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( gpr_free(ping); } } else { - gpr_slice_buffer_add( - &transport_parsing->qbuf, - grpc_chttp2_ping_create(1, p->opaque_8bytes)); + gpr_slice_buffer_add(&transport_parsing->qbuf, + grpc_chttp2_ping_create(1, p->opaque_8bytes)); } } diff --git a/src/core/transport/chttp2/frame_ping.h b/src/core/transport/chttp2/frame_ping.h index 71f8351223c..99197e8352f 100644 --- a/src/core/transport/chttp2/frame_ping.h +++ b/src/core/transport/chttp2/frame_ping.h @@ -48,6 +48,7 @@ gpr_slice grpc_chttp2_ping_create(gpr_uint8 ack, gpr_uint8 *opaque_8bytes); grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( grpc_chttp2_ping_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H */ diff --git a/src/core/transport/chttp2/frame_rst_stream.c b/src/core/transport/chttp2/frame_rst_stream.c index 77da1bcc411..a878d936c1e 100644 --- a/src/core/transport/chttp2/frame_rst_stream.c +++ b/src/core/transport/chttp2/frame_rst_stream.c @@ -62,7 +62,8 @@ gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 id, gpr_uint32 code) { grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser *parser, gpr_uint32 length, gpr_uint8 flags) { if (length != 4) { - gpr_log(GPR_ERROR, "invalid rst_stream: length=%d, flags=%02x", length, flags); + gpr_log(GPR_ERROR, "invalid rst_stream: length=%d, flags=%02x", length, + flags); return GRPC_CHTTP2_CONNECTION_ERROR; } parser->byte = 0; @@ -70,8 +71,8 @@ grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, - int is_last) { + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; @@ -87,11 +88,11 @@ grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( GPR_ASSERT(is_last); stream_parsing->received_close = 1; stream_parsing->saw_rst_stream = 1; - stream_parsing->rst_stream_reason = - (((gpr_uint32)p->reason_bytes[0]) << 24) | - (((gpr_uint32)p->reason_bytes[1]) << 16) | - (((gpr_uint32)p->reason_bytes[2]) << 8) | - (((gpr_uint32)p->reason_bytes[3])); + stream_parsing->rst_stream_reason = + (((gpr_uint32)p->reason_bytes[0]) << 24) | + (((gpr_uint32)p->reason_bytes[1]) << 16) | + (((gpr_uint32)p->reason_bytes[2]) << 8) | + (((gpr_uint32)p->reason_bytes[3])); } return GRPC_CHTTP2_PARSE_OK; diff --git a/src/core/transport/chttp2/frame_rst_stream.h b/src/core/transport/chttp2/frame_rst_stream.h index b83d1261d05..ed69e588af3 100644 --- a/src/core/transport/chttp2/frame_rst_stream.h +++ b/src/core/transport/chttp2/frame_rst_stream.h @@ -47,6 +47,7 @@ gpr_slice grpc_chttp2_rst_stream_create(gpr_uint32 stream_id, gpr_uint32 code); grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H */ diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c index ed9bf0fd339..119c25b12c1 100644 --- a/src/core/transport/chttp2/frame_settings.c +++ b/src/core/transport/chttp2/frame_settings.c @@ -138,7 +138,8 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( - void *p, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { + void *p, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { grpc_chttp2_settings_parser *parser = p; const gpr_uint8 *cur = GPR_SLICE_START_PTR(slice); const gpr_uint8 *end = GPR_SLICE_END_PTR(slice); @@ -155,7 +156,8 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( if (is_last) { memcpy(parser->target_settings, parser->incoming_settings, GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); - gpr_slice_buffer_add(&transport_parsing->qbuf, grpc_chttp2_settings_ack_create()); + gpr_slice_buffer_add(&transport_parsing->qbuf, + grpc_chttp2_settings_ack_create()); } return GRPC_CHTTP2_PARSE_OK; } diff --git a/src/core/transport/chttp2/frame_settings.h b/src/core/transport/chttp2/frame_settings.h index 701f2b94d2e..0ac68a9fa85 100644 --- a/src/core/transport/chttp2/frame_settings.h +++ b/src/core/transport/chttp2/frame_settings.h @@ -94,6 +94,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_settings_parser *parser, gpr_uint32 length, gpr_uint8 flags, gpr_uint32 *settings); grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H */ diff --git a/src/core/transport/chttp2/frame_window_update.c b/src/core/transport/chttp2/frame_window_update.c index d43a137bd38..6c963aa44dd 100644 --- a/src/core/transport/chttp2/frame_window_update.c +++ b/src/core/transport/chttp2/frame_window_update.c @@ -74,15 +74,15 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( } grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, - int is_last) { + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { gpr_uint8 *const beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *const end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; grpc_chttp2_window_update_parser *p = parser; while (p->byte != 4 && cur != end) { - p->amount |= ((gpr_uint32) * cur) << (8 * (3 - p->byte)); + p->amount |= ((gpr_uint32)*cur) << (8 * (3 - p->byte)); cur++; p->byte++; } @@ -97,7 +97,7 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( if (transport_parsing->incoming_stream_id) { if (stream_parsing) { stream_parsing->outgoing_window_update += p->amount; - } + } } else { transport_parsing->outgoing_window_update += p->amount; } diff --git a/src/core/transport/chttp2/frame_window_update.h b/src/core/transport/chttp2/frame_window_update.h index 7217325beb4..deba801d002 100644 --- a/src/core/transport/chttp2/frame_window_update.h +++ b/src/core/transport/chttp2/frame_window_update.h @@ -50,6 +50,7 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, gpr_uint32 length, gpr_uint8 flags); grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( - void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H */ diff --git a/src/core/transport/chttp2/gen_hpack_tables.c b/src/core/transport/chttp2/gen_hpack_tables.c index bdaa3cf094b..555f1e71c56 100644 --- a/src/core/transport/chttp2/gen_hpack_tables.c +++ b/src/core/transport/chttp2/gen_hpack_tables.c @@ -55,19 +55,15 @@ typedef struct { unsigned char index; } spec; -static const spec fields[] = {{"INDEXED_FIELD", 0X80, 1, 1}, - {"INDEXED_FIELD_X", 0X80, 1, 2}, - {"LITHDR_INCIDX", 0X40, 2, 1}, - {"LITHDR_INCIDX_X", 0X40, 2, 2}, - {"LITHDR_INCIDX_V", 0X40, 2, 0}, - {"LITHDR_NOTIDX", 0X00, 4, 1}, - {"LITHDR_NOTIDX_X", 0X00, 4, 2}, - {"LITHDR_NOTIDX_V", 0X00, 4, 0}, - {"LITHDR_NVRIDX", 0X10, 4, 1}, - {"LITHDR_NVRIDX_X", 0X10, 4, 2}, - {"LITHDR_NVRIDX_V", 0X10, 4, 0}, - {"MAX_TBL_SIZE", 0X20, 3, 1}, - {"MAX_TBL_SIZE_X", 0X20, 3, 2}, }; +static const spec fields[] = { + {"INDEXED_FIELD", 0X80, 1, 1}, {"INDEXED_FIELD_X", 0X80, 1, 2}, + {"LITHDR_INCIDX", 0X40, 2, 1}, {"LITHDR_INCIDX_X", 0X40, 2, 2}, + {"LITHDR_INCIDX_V", 0X40, 2, 0}, {"LITHDR_NOTIDX", 0X00, 4, 1}, + {"LITHDR_NOTIDX_X", 0X00, 4, 2}, {"LITHDR_NOTIDX_V", 0X00, 4, 0}, + {"LITHDR_NVRIDX", 0X10, 4, 1}, {"LITHDR_NVRIDX_X", 0X10, 4, 2}, + {"LITHDR_NVRIDX_V", 0X10, 4, 0}, {"MAX_TBL_SIZE", 0X20, 3, 1}, + {"MAX_TBL_SIZE_X", 0X20, 3, 2}, +}; static const int num_fields = sizeof(fields) / sizeof(*fields); @@ -129,13 +125,9 @@ static void generate_first_byte_lut(void) { #define MAXHUFFSTATES 1024 /* represents a set of symbols as an array of booleans indicating inclusion */ -typedef struct { - char included[GRPC_CHTTP2_NUM_HUFFSYMS]; -} symset; +typedef struct { char included[GRPC_CHTTP2_NUM_HUFFSYMS]; } symset; /* represents a lookup table indexed by a nibble */ -typedef struct { - int values[16]; -} nibblelut; +typedef struct { int values[16]; } nibblelut; /* returns a symset that includes all possible symbols */ static symset symset_all(void) { @@ -268,8 +260,7 @@ static void build_dec_tbl(int state, int nibble, int nibbits, unsigned bitofs, /* recurse down for this bit */ build_dec_tbl(state, (nibble << 1) | bit, nibbits + 1, bitofs + 1, emit, nextsyms); - next: - ; + next:; } } diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index edab308381e..896d6c69d32 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -150,10 +150,12 @@ typedef enum { /* jump table of parse state functions -- order must match first_byte_type above */ static const grpc_chttp2_hpack_parser_state first_byte_action[] = { - parse_indexed_field, parse_indexed_field_x, parse_lithdr_incidx, - parse_lithdr_incidx_x, parse_lithdr_incidx_v, parse_lithdr_notidx, - parse_lithdr_notidx_x, parse_lithdr_notidx_v, parse_lithdr_nvridx, - parse_lithdr_nvridx_x, parse_lithdr_nvridx_v, parse_max_tbl_size, + parse_indexed_field, parse_indexed_field_x, + parse_lithdr_incidx, parse_lithdr_incidx_x, + parse_lithdr_incidx_v, parse_lithdr_notidx, + parse_lithdr_notidx_x, parse_lithdr_notidx_v, + parse_lithdr_nvridx, parse_lithdr_nvridx_x, + parse_lithdr_nvridx_v, parse_max_tbl_size, parse_max_tbl_size_x, parse_error}; /* indexes the first byte to a parse state function - generated by @@ -222,7 +224,8 @@ static const gpr_uint8 first_byte_lut[256] = { INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, - INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD_X, }; + INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD, INDEXED_FIELD_X, +}; /* state table for huffman decoding: given a state, gives an index/16 into next_sub_tbl. Taking that index and adding the value of the nibble being @@ -242,7 +245,8 @@ static const gpr_uint8 next_tbl[256] = { 38, 1, 1, 1, 1, 1, 1, 1, 15, 2, 2, 2, 2, 26, 3, 3, 39, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 7, 3, 3, 3, 40, 2, 41, 1, 1, 1, 42, 43, 1, 1, 44, 1, 1, 1, 1, 15, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 45, 46, 1, 1, 2, 2, 2, 35, 3, 3, 18, 47, 2, }; + 3, 3, 3, 45, 46, 1, 1, 2, 2, 2, 35, 3, 3, 18, 47, 2, +}; /* next state, based upon current state and the current nibble: see above. generated by gen_hpack_tables.c */ static const gpr_int16 next_sub_tbl[48 * 16] = { @@ -297,7 +301,8 @@ static const gpr_int16 next_sub_tbl[48 * 16] = { 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 255, }; + 0, 0, 255, +}; /* emission table: indexed like next_tbl, ultimately gives the byte to be emitted, or -1 for no byte, or 256 for end of stream @@ -320,7 +325,8 @@ static const gpr_uint16 emit_tbl[256] = { 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 0, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, }; + 248, +}; /* generated by gen_hpack_tables.c */ static const gpr_int16 emit_sub_tbl[249 * 16] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -588,7 +594,8 @@ static const gpr_int16 emit_sub_tbl[249 * 16] = { 251, 251, 252, 252, 253, 253, 254, 254, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127, 220, 249, -1, 10, 10, 10, 10, 13, 13, 13, - 13, 22, 22, 22, 22, 256, 256, 256, 256, }; + 13, 22, 22, 22, 22, 256, 256, 256, 256, +}; static const gpr_uint8 inverse_base64[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -608,7 +615,8 @@ static const gpr_uint8 inverse_base64[256] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, }; + 255, +}; /* emission helpers */ static void on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, @@ -946,7 +954,7 @@ static int parse_value1(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, return 1; } - *p->parsing.value += (((gpr_uint32) * cur) & 0x7f) << 7; + *p->parsing.value += (((gpr_uint32)*cur) & 0x7f) << 7; if ((*cur) & 0x80) { return parse_value2(p, cur + 1, end); @@ -964,7 +972,7 @@ static int parse_value2(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, return 1; } - *p->parsing.value += (((gpr_uint32) * cur) & 0x7f) << 14; + *p->parsing.value += (((gpr_uint32)*cur) & 0x7f) << 14; if ((*cur) & 0x80) { return parse_value3(p, cur + 1, end); @@ -982,7 +990,7 @@ static int parse_value3(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, return 1; } - *p->parsing.value += (((gpr_uint32) * cur) & 0x7f) << 21; + *p->parsing.value += (((gpr_uint32)*cur) & 0x7f) << 21; if ((*cur) & 0x80) { return parse_value4(p, cur + 1, end); @@ -1370,8 +1378,8 @@ int grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, } grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( - void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, - int is_last) { + void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { grpc_chttp2_hpack_parser *parser = hpack_parser; if (!grpc_chttp2_hpack_parser_parse(parser, GPR_SLICE_START_PTR(slice), GPR_SLICE_END_PTR(slice))) { diff --git a/src/core/transport/chttp2/hpack_parser.h b/src/core/transport/chttp2/hpack_parser.h index 507d7cfea0d..c1768d9d5d9 100644 --- a/src/core/transport/chttp2/hpack_parser.h +++ b/src/core/transport/chttp2/hpack_parser.h @@ -107,7 +107,7 @@ int grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, /* wraps grpc_chttp2_hpack_parser_parse to provide a frame level parser for the transport */ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( - void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, - int is_last); + void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H */ diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index 2c0159260f5..372e71d68fa 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -43,68 +43,69 @@ static struct { const char *key; const char *value; } static_table[] = { - /* 0: */ {NULL, NULL}, - /* 1: */ {":authority", ""}, - /* 2: */ {":method", "GET"}, - /* 3: */ {":method", "POST"}, - /* 4: */ {":path", "/"}, - /* 5: */ {":path", "/index.html"}, - /* 6: */ {":scheme", "http"}, - /* 7: */ {":scheme", "https"}, - /* 8: */ {":status", "200"}, - /* 9: */ {":status", "204"}, - /* 10: */ {":status", "206"}, - /* 11: */ {":status", "304"}, - /* 12: */ {":status", "400"}, - /* 13: */ {":status", "404"}, - /* 14: */ {":status", "500"}, - /* 15: */ {"accept-charset", ""}, - /* 16: */ {"accept-encoding", "gzip, deflate"}, - /* 17: */ {"accept-language", ""}, - /* 18: */ {"accept-ranges", ""}, - /* 19: */ {"accept", ""}, - /* 20: */ {"access-control-allow-origin", ""}, - /* 21: */ {"age", ""}, - /* 22: */ {"allow", ""}, - /* 23: */ {"authorization", ""}, - /* 24: */ {"cache-control", ""}, - /* 25: */ {"content-disposition", ""}, - /* 26: */ {"content-encoding", ""}, - /* 27: */ {"content-language", ""}, - /* 28: */ {"content-length", ""}, - /* 29: */ {"content-location", ""}, - /* 30: */ {"content-range", ""}, - /* 31: */ {"content-type", ""}, - /* 32: */ {"cookie", ""}, - /* 33: */ {"date", ""}, - /* 34: */ {"etag", ""}, - /* 35: */ {"expect", ""}, - /* 36: */ {"expires", ""}, - /* 37: */ {"from", ""}, - /* 38: */ {"host", ""}, - /* 39: */ {"if-match", ""}, - /* 40: */ {"if-modified-since", ""}, - /* 41: */ {"if-none-match", ""}, - /* 42: */ {"if-range", ""}, - /* 43: */ {"if-unmodified-since", ""}, - /* 44: */ {"last-modified", ""}, - /* 45: */ {"link", ""}, - /* 46: */ {"location", ""}, - /* 47: */ {"max-forwards", ""}, - /* 48: */ {"proxy-authenticate", ""}, - /* 49: */ {"proxy-authorization", ""}, - /* 50: */ {"range", ""}, - /* 51: */ {"referer", ""}, - /* 52: */ {"refresh", ""}, - /* 53: */ {"retry-after", ""}, - /* 54: */ {"server", ""}, - /* 55: */ {"set-cookie", ""}, - /* 56: */ {"strict-transport-security", ""}, - /* 57: */ {"transfer-encoding", ""}, - /* 58: */ {"user-agent", ""}, - /* 59: */ {"vary", ""}, - /* 60: */ {"via", ""}, - /* 61: */ {"www-authenticate", ""}, }; + /* 0: */ {NULL, NULL}, + /* 1: */ {":authority", ""}, + /* 2: */ {":method", "GET"}, + /* 3: */ {":method", "POST"}, + /* 4: */ {":path", "/"}, + /* 5: */ {":path", "/index.html"}, + /* 6: */ {":scheme", "http"}, + /* 7: */ {":scheme", "https"}, + /* 8: */ {":status", "200"}, + /* 9: */ {":status", "204"}, + /* 10: */ {":status", "206"}, + /* 11: */ {":status", "304"}, + /* 12: */ {":status", "400"}, + /* 13: */ {":status", "404"}, + /* 14: */ {":status", "500"}, + /* 15: */ {"accept-charset", ""}, + /* 16: */ {"accept-encoding", "gzip, deflate"}, + /* 17: */ {"accept-language", ""}, + /* 18: */ {"accept-ranges", ""}, + /* 19: */ {"accept", ""}, + /* 20: */ {"access-control-allow-origin", ""}, + /* 21: */ {"age", ""}, + /* 22: */ {"allow", ""}, + /* 23: */ {"authorization", ""}, + /* 24: */ {"cache-control", ""}, + /* 25: */ {"content-disposition", ""}, + /* 26: */ {"content-encoding", ""}, + /* 27: */ {"content-language", ""}, + /* 28: */ {"content-length", ""}, + /* 29: */ {"content-location", ""}, + /* 30: */ {"content-range", ""}, + /* 31: */ {"content-type", ""}, + /* 32: */ {"cookie", ""}, + /* 33: */ {"date", ""}, + /* 34: */ {"etag", ""}, + /* 35: */ {"expect", ""}, + /* 36: */ {"expires", ""}, + /* 37: */ {"from", ""}, + /* 38: */ {"host", ""}, + /* 39: */ {"if-match", ""}, + /* 40: */ {"if-modified-since", ""}, + /* 41: */ {"if-none-match", ""}, + /* 42: */ {"if-range", ""}, + /* 43: */ {"if-unmodified-since", ""}, + /* 44: */ {"last-modified", ""}, + /* 45: */ {"link", ""}, + /* 46: */ {"location", ""}, + /* 47: */ {"max-forwards", ""}, + /* 48: */ {"proxy-authenticate", ""}, + /* 49: */ {"proxy-authorization", ""}, + /* 50: */ {"range", ""}, + /* 51: */ {"referer", ""}, + /* 52: */ {"refresh", ""}, + /* 53: */ {"retry-after", ""}, + /* 54: */ {"server", ""}, + /* 55: */ {"set-cookie", ""}, + /* 56: */ {"strict-transport-security", ""}, + /* 57: */ {"transfer-encoding", ""}, + /* 58: */ {"user-agent", ""}, + /* 59: */ {"vary", ""}, + /* 60: */ {"via", ""}, + /* 61: */ {"www-authenticate", ""}, +}; void grpc_chttp2_hptbl_init(grpc_chttp2_hptbl *tbl, grpc_mdctx *mdctx) { size_t i; diff --git a/src/core/transport/chttp2/hpack_table.h b/src/core/transport/chttp2/hpack_table.h index d3bf41bbc5b..4f882e2e03b 100644 --- a/src/core/transport/chttp2/hpack_table.h +++ b/src/core/transport/chttp2/hpack_table.h @@ -94,4 +94,4 @@ typedef struct { grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( const grpc_chttp2_hptbl *tbl, grpc_mdelem *md); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H */ diff --git a/src/core/transport/chttp2/http2_errors.h b/src/core/transport/chttp2/http2_errors.h index 4ab2ec02207..a4f309e0565 100644 --- a/src/core/transport/chttp2/http2_errors.h +++ b/src/core/transport/chttp2/http2_errors.h @@ -53,4 +53,4 @@ typedef enum { GRPC_CHTTP2__ERROR_DO_NOT_USE = -1 } grpc_chttp2_error_code; -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H */ diff --git a/src/core/transport/chttp2/huffsyms.c b/src/core/transport/chttp2/huffsyms.c index 0a926e7e351..6f5cf6a2a92 100644 --- a/src/core/transport/chttp2/huffsyms.c +++ b/src/core/transport/chttp2/huffsyms.c @@ -37,260 +37,69 @@ command: :%s/.* \([0-9a-f]\+\) \[ *\([0-9]\+\)\]/{0x\1, \2},/g */ const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS] = { - {0x1ff8, 13}, - {0x7fffd8, 23}, - {0xfffffe2, 28}, - {0xfffffe3, 28}, - {0xfffffe4, 28}, - {0xfffffe5, 28}, - {0xfffffe6, 28}, - {0xfffffe7, 28}, - {0xfffffe8, 28}, - {0xffffea, 24}, - {0x3ffffffc, 30}, - {0xfffffe9, 28}, - {0xfffffea, 28}, - {0x3ffffffd, 30}, - {0xfffffeb, 28}, - {0xfffffec, 28}, - {0xfffffed, 28}, - {0xfffffee, 28}, - {0xfffffef, 28}, - {0xffffff0, 28}, - {0xffffff1, 28}, - {0xffffff2, 28}, - {0x3ffffffe, 30}, - {0xffffff3, 28}, - {0xffffff4, 28}, - {0xffffff5, 28}, - {0xffffff6, 28}, - {0xffffff7, 28}, - {0xffffff8, 28}, - {0xffffff9, 28}, - {0xffffffa, 28}, - {0xffffffb, 28}, - {0x14, 6}, - {0x3f8, 10}, - {0x3f9, 10}, - {0xffa, 12}, - {0x1ff9, 13}, - {0x15, 6}, - {0xf8, 8}, - {0x7fa, 11}, - {0x3fa, 10}, - {0x3fb, 10}, - {0xf9, 8}, - {0x7fb, 11}, - {0xfa, 8}, - {0x16, 6}, - {0x17, 6}, - {0x18, 6}, - {0x0, 5}, - {0x1, 5}, - {0x2, 5}, - {0x19, 6}, - {0x1a, 6}, - {0x1b, 6}, - {0x1c, 6}, - {0x1d, 6}, - {0x1e, 6}, - {0x1f, 6}, - {0x5c, 7}, - {0xfb, 8}, - {0x7ffc, 15}, - {0x20, 6}, - {0xffb, 12}, - {0x3fc, 10}, - {0x1ffa, 13}, - {0x21, 6}, - {0x5d, 7}, - {0x5e, 7}, - {0x5f, 7}, - {0x60, 7}, - {0x61, 7}, - {0x62, 7}, - {0x63, 7}, - {0x64, 7}, - {0x65, 7}, - {0x66, 7}, - {0x67, 7}, - {0x68, 7}, - {0x69, 7}, - {0x6a, 7}, - {0x6b, 7}, - {0x6c, 7}, - {0x6d, 7}, - {0x6e, 7}, - {0x6f, 7}, - {0x70, 7}, - {0x71, 7}, - {0x72, 7}, - {0xfc, 8}, - {0x73, 7}, - {0xfd, 8}, - {0x1ffb, 13}, - {0x7fff0, 19}, - {0x1ffc, 13}, - {0x3ffc, 14}, - {0x22, 6}, - {0x7ffd, 15}, - {0x3, 5}, - {0x23, 6}, - {0x4, 5}, - {0x24, 6}, - {0x5, 5}, - {0x25, 6}, - {0x26, 6}, - {0x27, 6}, - {0x6, 5}, - {0x74, 7}, - {0x75, 7}, - {0x28, 6}, - {0x29, 6}, - {0x2a, 6}, - {0x7, 5}, - {0x2b, 6}, - {0x76, 7}, - {0x2c, 6}, - {0x8, 5}, - {0x9, 5}, - {0x2d, 6}, - {0x77, 7}, - {0x78, 7}, - {0x79, 7}, - {0x7a, 7}, - {0x7b, 7}, - {0x7ffe, 15}, - {0x7fc, 11}, - {0x3ffd, 14}, - {0x1ffd, 13}, - {0xffffffc, 28}, - {0xfffe6, 20}, - {0x3fffd2, 22}, - {0xfffe7, 20}, - {0xfffe8, 20}, - {0x3fffd3, 22}, - {0x3fffd4, 22}, - {0x3fffd5, 22}, - {0x7fffd9, 23}, - {0x3fffd6, 22}, - {0x7fffda, 23}, - {0x7fffdb, 23}, - {0x7fffdc, 23}, - {0x7fffdd, 23}, - {0x7fffde, 23}, - {0xffffeb, 24}, - {0x7fffdf, 23}, - {0xffffec, 24}, - {0xffffed, 24}, - {0x3fffd7, 22}, - {0x7fffe0, 23}, - {0xffffee, 24}, - {0x7fffe1, 23}, - {0x7fffe2, 23}, - {0x7fffe3, 23}, - {0x7fffe4, 23}, - {0x1fffdc, 21}, - {0x3fffd8, 22}, - {0x7fffe5, 23}, - {0x3fffd9, 22}, - {0x7fffe6, 23}, - {0x7fffe7, 23}, - {0xffffef, 24}, - {0x3fffda, 22}, - {0x1fffdd, 21}, - {0xfffe9, 20}, - {0x3fffdb, 22}, - {0x3fffdc, 22}, - {0x7fffe8, 23}, - {0x7fffe9, 23}, - {0x1fffde, 21}, - {0x7fffea, 23}, - {0x3fffdd, 22}, - {0x3fffde, 22}, - {0xfffff0, 24}, - {0x1fffdf, 21}, - {0x3fffdf, 22}, - {0x7fffeb, 23}, - {0x7fffec, 23}, - {0x1fffe0, 21}, - {0x1fffe1, 21}, - {0x3fffe0, 22}, - {0x1fffe2, 21}, - {0x7fffed, 23}, - {0x3fffe1, 22}, - {0x7fffee, 23}, - {0x7fffef, 23}, - {0xfffea, 20}, - {0x3fffe2, 22}, - {0x3fffe3, 22}, - {0x3fffe4, 22}, - {0x7ffff0, 23}, - {0x3fffe5, 22}, - {0x3fffe6, 22}, - {0x7ffff1, 23}, - {0x3ffffe0, 26}, - {0x3ffffe1, 26}, - {0xfffeb, 20}, - {0x7fff1, 19}, - {0x3fffe7, 22}, - {0x7ffff2, 23}, - {0x3fffe8, 22}, - {0x1ffffec, 25}, - {0x3ffffe2, 26}, - {0x3ffffe3, 26}, - {0x3ffffe4, 26}, - {0x7ffffde, 27}, - {0x7ffffdf, 27}, - {0x3ffffe5, 26}, - {0xfffff1, 24}, - {0x1ffffed, 25}, - {0x7fff2, 19}, - {0x1fffe3, 21}, - {0x3ffffe6, 26}, - {0x7ffffe0, 27}, - {0x7ffffe1, 27}, - {0x3ffffe7, 26}, - {0x7ffffe2, 27}, - {0xfffff2, 24}, - {0x1fffe4, 21}, - {0x1fffe5, 21}, - {0x3ffffe8, 26}, - {0x3ffffe9, 26}, - {0xffffffd, 28}, - {0x7ffffe3, 27}, - {0x7ffffe4, 27}, - {0x7ffffe5, 27}, - {0xfffec, 20}, - {0xfffff3, 24}, - {0xfffed, 20}, - {0x1fffe6, 21}, - {0x3fffe9, 22}, - {0x1fffe7, 21}, - {0x1fffe8, 21}, - {0x7ffff3, 23}, - {0x3fffea, 22}, - {0x3fffeb, 22}, - {0x1ffffee, 25}, - {0x1ffffef, 25}, - {0xfffff4, 24}, - {0xfffff5, 24}, - {0x3ffffea, 26}, - {0x7ffff4, 23}, - {0x3ffffeb, 26}, - {0x7ffffe6, 27}, - {0x3ffffec, 26}, - {0x3ffffed, 26}, - {0x7ffffe7, 27}, - {0x7ffffe8, 27}, - {0x7ffffe9, 27}, - {0x7ffffea, 27}, - {0x7ffffeb, 27}, - {0xffffffe, 28}, - {0x7ffffec, 27}, - {0x7ffffed, 27}, - {0x7ffffee, 27}, - {0x7ffffef, 27}, - {0x7fffff0, 27}, - {0x3ffffee, 26}, - {0x3fffffff, 30}, }; + {0x1ff8, 13}, {0x7fffd8, 23}, {0xfffffe2, 28}, {0xfffffe3, 28}, + {0xfffffe4, 28}, {0xfffffe5, 28}, {0xfffffe6, 28}, {0xfffffe7, 28}, + {0xfffffe8, 28}, {0xffffea, 24}, {0x3ffffffc, 30}, {0xfffffe9, 28}, + {0xfffffea, 28}, {0x3ffffffd, 30}, {0xfffffeb, 28}, {0xfffffec, 28}, + {0xfffffed, 28}, {0xfffffee, 28}, {0xfffffef, 28}, {0xffffff0, 28}, + {0xffffff1, 28}, {0xffffff2, 28}, {0x3ffffffe, 30}, {0xffffff3, 28}, + {0xffffff4, 28}, {0xffffff5, 28}, {0xffffff6, 28}, {0xffffff7, 28}, + {0xffffff8, 28}, {0xffffff9, 28}, {0xffffffa, 28}, {0xffffffb, 28}, + {0x14, 6}, {0x3f8, 10}, {0x3f9, 10}, {0xffa, 12}, + {0x1ff9, 13}, {0x15, 6}, {0xf8, 8}, {0x7fa, 11}, + {0x3fa, 10}, {0x3fb, 10}, {0xf9, 8}, {0x7fb, 11}, + {0xfa, 8}, {0x16, 6}, {0x17, 6}, {0x18, 6}, + {0x0, 5}, {0x1, 5}, {0x2, 5}, {0x19, 6}, + {0x1a, 6}, {0x1b, 6}, {0x1c, 6}, {0x1d, 6}, + {0x1e, 6}, {0x1f, 6}, {0x5c, 7}, {0xfb, 8}, + {0x7ffc, 15}, {0x20, 6}, {0xffb, 12}, {0x3fc, 10}, + {0x1ffa, 13}, {0x21, 6}, {0x5d, 7}, {0x5e, 7}, + {0x5f, 7}, {0x60, 7}, {0x61, 7}, {0x62, 7}, + {0x63, 7}, {0x64, 7}, {0x65, 7}, {0x66, 7}, + {0x67, 7}, {0x68, 7}, {0x69, 7}, {0x6a, 7}, + {0x6b, 7}, {0x6c, 7}, {0x6d, 7}, {0x6e, 7}, + {0x6f, 7}, {0x70, 7}, {0x71, 7}, {0x72, 7}, + {0xfc, 8}, {0x73, 7}, {0xfd, 8}, {0x1ffb, 13}, + {0x7fff0, 19}, {0x1ffc, 13}, {0x3ffc, 14}, {0x22, 6}, + {0x7ffd, 15}, {0x3, 5}, {0x23, 6}, {0x4, 5}, + {0x24, 6}, {0x5, 5}, {0x25, 6}, {0x26, 6}, + {0x27, 6}, {0x6, 5}, {0x74, 7}, {0x75, 7}, + {0x28, 6}, {0x29, 6}, {0x2a, 6}, {0x7, 5}, + {0x2b, 6}, {0x76, 7}, {0x2c, 6}, {0x8, 5}, + {0x9, 5}, {0x2d, 6}, {0x77, 7}, {0x78, 7}, + {0x79, 7}, {0x7a, 7}, {0x7b, 7}, {0x7ffe, 15}, + {0x7fc, 11}, {0x3ffd, 14}, {0x1ffd, 13}, {0xffffffc, 28}, + {0xfffe6, 20}, {0x3fffd2, 22}, {0xfffe7, 20}, {0xfffe8, 20}, + {0x3fffd3, 22}, {0x3fffd4, 22}, {0x3fffd5, 22}, {0x7fffd9, 23}, + {0x3fffd6, 22}, {0x7fffda, 23}, {0x7fffdb, 23}, {0x7fffdc, 23}, + {0x7fffdd, 23}, {0x7fffde, 23}, {0xffffeb, 24}, {0x7fffdf, 23}, + {0xffffec, 24}, {0xffffed, 24}, {0x3fffd7, 22}, {0x7fffe0, 23}, + {0xffffee, 24}, {0x7fffe1, 23}, {0x7fffe2, 23}, {0x7fffe3, 23}, + {0x7fffe4, 23}, {0x1fffdc, 21}, {0x3fffd8, 22}, {0x7fffe5, 23}, + {0x3fffd9, 22}, {0x7fffe6, 23}, {0x7fffe7, 23}, {0xffffef, 24}, + {0x3fffda, 22}, {0x1fffdd, 21}, {0xfffe9, 20}, {0x3fffdb, 22}, + {0x3fffdc, 22}, {0x7fffe8, 23}, {0x7fffe9, 23}, {0x1fffde, 21}, + {0x7fffea, 23}, {0x3fffdd, 22}, {0x3fffde, 22}, {0xfffff0, 24}, + {0x1fffdf, 21}, {0x3fffdf, 22}, {0x7fffeb, 23}, {0x7fffec, 23}, + {0x1fffe0, 21}, {0x1fffe1, 21}, {0x3fffe0, 22}, {0x1fffe2, 21}, + {0x7fffed, 23}, {0x3fffe1, 22}, {0x7fffee, 23}, {0x7fffef, 23}, + {0xfffea, 20}, {0x3fffe2, 22}, {0x3fffe3, 22}, {0x3fffe4, 22}, + {0x7ffff0, 23}, {0x3fffe5, 22}, {0x3fffe6, 22}, {0x7ffff1, 23}, + {0x3ffffe0, 26}, {0x3ffffe1, 26}, {0xfffeb, 20}, {0x7fff1, 19}, + {0x3fffe7, 22}, {0x7ffff2, 23}, {0x3fffe8, 22}, {0x1ffffec, 25}, + {0x3ffffe2, 26}, {0x3ffffe3, 26}, {0x3ffffe4, 26}, {0x7ffffde, 27}, + {0x7ffffdf, 27}, {0x3ffffe5, 26}, {0xfffff1, 24}, {0x1ffffed, 25}, + {0x7fff2, 19}, {0x1fffe3, 21}, {0x3ffffe6, 26}, {0x7ffffe0, 27}, + {0x7ffffe1, 27}, {0x3ffffe7, 26}, {0x7ffffe2, 27}, {0xfffff2, 24}, + {0x1fffe4, 21}, {0x1fffe5, 21}, {0x3ffffe8, 26}, {0x3ffffe9, 26}, + {0xffffffd, 28}, {0x7ffffe3, 27}, {0x7ffffe4, 27}, {0x7ffffe5, 27}, + {0xfffec, 20}, {0xfffff3, 24}, {0xfffed, 20}, {0x1fffe6, 21}, + {0x3fffe9, 22}, {0x1fffe7, 21}, {0x1fffe8, 21}, {0x7ffff3, 23}, + {0x3fffea, 22}, {0x3fffeb, 22}, {0x1ffffee, 25}, {0x1ffffef, 25}, + {0xfffff4, 24}, {0xfffff5, 24}, {0x3ffffea, 26}, {0x7ffff4, 23}, + {0x3ffffeb, 26}, {0x7ffffe6, 27}, {0x3ffffec, 26}, {0x3ffffed, 26}, + {0x7ffffe7, 27}, {0x7ffffe8, 27}, {0x7ffffe9, 27}, {0x7ffffea, 27}, + {0x7ffffeb, 27}, {0xffffffe, 28}, {0x7ffffec, 27}, {0x7ffffed, 27}, + {0x7ffffee, 27}, {0x7ffffef, 27}, {0x7fffff0, 27}, {0x3ffffee, 26}, + {0x3fffffff, 30}, +}; diff --git a/src/core/transport/chttp2/huffsyms.h b/src/core/transport/chttp2/huffsyms.h index f9c14479669..a3cdba8235a 100644 --- a/src/core/transport/chttp2/huffsyms.h +++ b/src/core/transport/chttp2/huffsyms.h @@ -45,4 +45,4 @@ typedef struct { extern const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS]; -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H */ diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index ffadd047621..5522337dfa4 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -169,11 +169,6 @@ typedef struct grpc_chttp2_outstanding_ping { struct grpc_chttp2_outstanding_ping *prev; } grpc_chttp2_outstanding_ping; -typedef struct { - grpc_status_code status; - gpr_slice debug; -} grpc_chttp2_pending_goaway; - typedef struct { /** data to write next write */ gpr_slice_buffer qbuf; @@ -194,7 +189,7 @@ typedef struct { /** have local settings been sent? */ gpr_uint8 sent_local_settings; /** bitmask of setting indexes to send out */ - gpr_uint32 force_send_settings; + gpr_uint32 force_send_settings; /** settings values */ gpr_uint32 settings[NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; @@ -218,8 +213,8 @@ typedef struct { so this is a strict over-estimation on the client */ gpr_uint32 concurrent_stream_count; - /** is there a goaway available? */ - gpr_uint8 have_goaway; + /** is there a goaway available? (boolean) */ + grpc_chttp2_error_state goaway_state; /** what is the debug text of the goaway? */ gpr_slice goaway_text; /** what is the status code of the goaway? */ @@ -282,9 +277,9 @@ struct grpc_chttp2_transport_parsing { /* active parser */ void *parser_data; grpc_chttp2_stream_parsing *incoming_stream; - grpc_chttp2_parse_error (*parser)(void *parser_user_data, - grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, - gpr_slice slice, int is_last); + grpc_chttp2_parse_error (*parser)( + void *parser_user_data, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); /* received settings */ gpr_uint32 settings[GRPC_CHTTP2_NUM_SETTINGS]; @@ -345,7 +340,7 @@ struct grpc_chttp2_transport { /** closure to execute writing */ grpc_iomgr_closure writing_action; - /** address to place a newly accepted stream - set and unset by + /** address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used by init_stream to publish the accepted server stream */ grpc_chttp2_stream **accepting_stream; @@ -473,55 +468,106 @@ struct grpc_chttp2_stream { }; /** Transport writing call flow: - chttp2_transport.c calls grpc_chttp2_unlocking_check_writes to see if writes are required; - if they are, chttp2_transport.c calls grpc_chttp2_perform_writes to do the writes. - Once writes have been completed (meaning another write could potentially be started), - grpc_chttp2_terminate_writing is called. This will call grpc_chttp2_cleanup_writing, at which + chttp2_transport.c calls grpc_chttp2_unlocking_check_writes to see if writes + are required; + if they are, chttp2_transport.c calls grpc_chttp2_perform_writes to do the + writes. + Once writes have been completed (meaning another write could potentially be + started), + grpc_chttp2_terminate_writing is called. This will call + grpc_chttp2_cleanup_writing, at which point the write phase is complete. */ /** Someone is unlocking the transport mutex: check to see if writes are required, and schedule them if so */ -int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); -void grpc_chttp2_perform_writes(grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint); -void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writing, int success); -void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); +int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global, + grpc_chttp2_transport_writing *writing); +void grpc_chttp2_perform_writes( + grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint); +void grpc_chttp2_terminate_writing( + grpc_chttp2_transport_writing *transport_writing, int success); +void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global, + grpc_chttp2_transport_writing *writing); /** Process one slice of incoming data */ -void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); -int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice); -void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); +void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, + grpc_chttp2_transport_parsing *parsing); +int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice); +void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global, + grpc_chttp2_transport_parsing *parsing); /** Get a writable stream \return non-zero if there was a stream available */ -void grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); -int grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing, - grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing); - -void grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); -int grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport_writing *transport_writing); -int grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing **stream_writing); - -void grpc_chttp2_list_add_written_stream(grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); -int grpc_chttp2_list_pop_written_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing); - -void grpc_chttp2_list_add_writable_window_update_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); -int grpc_chttp2_list_pop_writable_window_update_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); - -void grpc_chttp2_list_add_parsing_seen_stream(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing); -int grpc_chttp2_list_pop_parsing_seen_stream(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_parsing **stream_parsing); - -void grpc_chttp2_schedule_closure(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success); -void grpc_chttp2_read_write_state_changed(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); - -grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); -grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); - -void grpc_chttp2_parsing_add_metadata_batch(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing); - -#define GRPC_CHTTP2_FLOW_CTL_TRACE(a,b,c,d,e) do {} while (0) +void grpc_chttp2_list_add_writable_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); +int grpc_chttp2_list_pop_writable_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_writing **stream_writing); + +void grpc_chttp2_list_add_writing_stream( + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_writing *stream_writing); +int grpc_chttp2_list_have_writing_streams( + grpc_chttp2_transport_writing *transport_writing); +int grpc_chttp2_list_pop_writing_stream( + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_writing **stream_writing); + +void grpc_chttp2_list_add_written_stream( + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_writing *stream_writing); +int grpc_chttp2_list_pop_written_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_writing **stream_writing); + +void grpc_chttp2_list_add_writable_window_update_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); +int grpc_chttp2_list_pop_writable_window_update_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global); + +void grpc_chttp2_list_add_parsing_seen_stream( + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing); +int grpc_chttp2_list_pop_parsing_seen_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_parsing **stream_parsing); + +void grpc_chttp2_schedule_closure( + grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, + int success); +void grpc_chttp2_read_write_state_changed( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); + +grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( + grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); +grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( + grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); + +void grpc_chttp2_parsing_add_metadata_batch( + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing); + +void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, + gpr_slice goaway_text); + +#define GRPC_CHTTP2_FLOW_CTL_TRACE(a, b, c, d, e) \ + do { \ + } while (0) #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" -#define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING)-1) +#define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ + (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1) extern int grpc_http_trace; diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 9f501941259..15124c70017 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -41,29 +41,41 @@ #include static int init_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); -static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_continuation); -static int init_data_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); -static int init_rst_stream_parser(grpc_chttp2_transport_parsing *transport_parsing); -static int init_settings_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); -static int init_window_update_frame_parser(grpc_chttp2_transport_parsing *transport_parsing); +static int init_header_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing, int is_continuation); +static int init_data_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing); +static int init_rst_stream_parser( + grpc_chttp2_transport_parsing *transport_parsing); +static int init_settings_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing); +static int init_window_update_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing); static int init_ping_parser(grpc_chttp2_transport_parsing *transport_parsing); static int init_goaway_parser(grpc_chttp2_transport_parsing *transport_parsing); -static int init_skip_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_header); +static int init_skip_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing, int is_header); -static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last); +static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice, int is_last); -void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing) { +void grpc_chttp2_publish_reads( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_parsing *transport_parsing) { grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_parsing *stream_parsing; - /* transport_parsing->last_incoming_stream_id is used as last-grpc_chttp2_stream-id when + /* transport_parsing->last_incoming_stream_id is used as + last-grpc_chttp2_stream-id when sending GOAWAY frame. https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.8 - says that last-grpc_chttp2_stream-id is peer-initiated grpc_chttp2_stream ID. So, + says that last-grpc_chttp2_stream-id is peer-initiated grpc_chttp2_stream + ID. So, since we don't have server pushed streams, client should send GOAWAY last-grpc_chttp2_stream-id=0 in this case. */ if (!transport_parsing->is_client) { - transport_global->last_incoming_stream_id = transport_parsing->incoming_stream_id; + transport_global->last_incoming_stream_id = + transport_parsing->incoming_stream_id; } /* TODO(ctiller): re-implement */ @@ -101,13 +113,15 @@ void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *transport_global, g /* update global settings */ if (transport_parsing->settings_updated) { - memcpy(transport_global->settings[PEER_SETTINGS], transport_parsing->settings, sizeof(transport_parsing->settings)); + memcpy(transport_global->settings[PEER_SETTINGS], + transport_parsing->settings, sizeof(transport_parsing->settings)); transport_parsing->settings_updated = 0; } /* update settings based on ack if received */ if (transport_parsing->settings_ack_received) { - memcpy(transport_global->settings[ACKED_SETTINGS], transport_global->settings[SENT_SETTINGS], + memcpy(transport_global->settings[ACKED_SETTINGS], + transport_global->settings[SENT_SETTINGS], GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); transport_parsing->settings_ack_received = 0; } @@ -115,20 +129,19 @@ void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *transport_global, g /* move goaway to the global state if we received one (it will be published later */ if (transport_parsing->goaway_received) { - gpr_slice_unref(transport_global->goaway_text); - transport_global->goaway_text = gpr_slice_ref(transport_parsing->goaway_text); - transport_global->goaway_error = transport_parsing->goaway_error; - transport_global->have_goaway = 1; + grpc_chttp2_add_incoming_goaway(transport_global, transport_parsing->goaway_error, transport_parsing->goaway_text); transport_parsing->goaway_received = 0; } /* for each stream that saw an update, fixup global state */ - while (grpc_chttp2_list_pop_parsing_seen_stream(transport_global, transport_parsing, &stream_global, &stream_parsing)) { + while (grpc_chttp2_list_pop_parsing_seen_stream( + transport_global, transport_parsing, &stream_global, &stream_parsing)) { /* update incoming flow control window */ if (stream_parsing->incoming_window_delta) { stream_global->incoming_window -= stream_parsing->incoming_window_delta; stream_parsing->incoming_window_delta = 0; - grpc_chttp2_list_add_writable_window_update_stream(transport_global, stream_global); + grpc_chttp2_list_add_writable_window_update_stream(transport_global, + stream_global); } /* update outgoing flow control window */ @@ -145,7 +158,8 @@ void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *transport_global, g } } -int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice) { +int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice) { gpr_uint8 *beg = GPR_SLICE_START_PTR(slice); gpr_uint8 *end = GPR_SLICE_END_PTR(slice); gpr_uint8 *cur = beg; @@ -178,13 +192,16 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, g case DTS_CLIENT_PREFIX_22: case DTS_CLIENT_PREFIX_23: while (cur != end && transport_parsing->deframe_state != DTS_FH_0) { - if (*cur != GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing->deframe_state]) { + if (*cur != GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing + ->deframe_state]) { gpr_log(GPR_ERROR, "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " "at byte %d", - GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing->deframe_state], - (int)(gpr_uint8)GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing->deframe_state], *cur, - (int)*cur, transport_parsing->deframe_state); + GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing + ->deframe_state], + (int)(gpr_uint8)GRPC_CHTTP2_CLIENT_CONNECT_STRING + [transport_parsing->deframe_state], + *cur, (int)*cur, transport_parsing->deframe_state); return 0; } ++cur; @@ -267,7 +284,8 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, g return 0; } if (transport_parsing->incoming_stream_id) { - transport_parsing->last_incoming_stream_id = transport_parsing->incoming_stream_id; + transport_parsing->last_incoming_stream_id = + transport_parsing->incoming_stream_id; } if (transport_parsing->incoming_frame_size == 0) { if (!parse_frame_slice(transport_parsing, gpr_empty_slice(), 1)) { @@ -287,15 +305,19 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, g GPR_ASSERT(cur < end); if ((gpr_uint32)(end - cur) == transport_parsing->incoming_frame_size) { if (!parse_frame_slice( - transport_parsing, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 1)) { + transport_parsing, + gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 1)) { return 0; } transport_parsing->deframe_state = DTS_FH_0; return 1; - } else if ((gpr_uint32)(end - cur) > transport_parsing->incoming_frame_size) { + } else if ((gpr_uint32)(end - cur) > + transport_parsing->incoming_frame_size) { if (!parse_frame_slice( - transport_parsing, gpr_slice_sub_no_ref(slice, cur - beg, - cur + transport_parsing->incoming_frame_size - beg), + transport_parsing, + gpr_slice_sub_no_ref( + slice, cur - beg, + cur + transport_parsing->incoming_frame_size - beg), 1)) { return 0; } @@ -303,7 +325,8 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, g goto dts_fh_0; /* loop */ } else { if (!parse_frame_slice( - transport_parsing, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 0)) { + transport_parsing, + gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 0)) { return 0; } transport_parsing->incoming_frame_size -= (end - cur); @@ -321,15 +344,19 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, g static int init_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { if (transport_parsing->expect_continuation_stream_id != 0) { - if (transport_parsing->incoming_frame_type != GRPC_CHTTP2_FRAME_CONTINUATION) { + if (transport_parsing->incoming_frame_type != + GRPC_CHTTP2_FRAME_CONTINUATION) { gpr_log(GPR_ERROR, "Expected CONTINUATION frame, got frame type %02x", transport_parsing->incoming_frame_type); return 0; } - if (transport_parsing->expect_continuation_stream_id != transport_parsing->incoming_stream_id) { + if (transport_parsing->expect_continuation_stream_id != + transport_parsing->incoming_stream_id) { gpr_log(GPR_ERROR, - "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got grpc_chttp2_stream %08x", - transport_parsing->expect_continuation_stream_id, transport_parsing->incoming_stream_id); + "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got " + "grpc_chttp2_stream %08x", + transport_parsing->expect_continuation_stream_id, + transport_parsing->incoming_stream_id); return 0; } return init_header_frame_parser(transport_parsing, 1); @@ -353,20 +380,22 @@ static int init_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { case GRPC_CHTTP2_FRAME_GOAWAY: return init_goaway_parser(transport_parsing); default: - gpr_log(GPR_ERROR, "Unknown frame type %02x", transport_parsing->incoming_frame_type); + gpr_log(GPR_ERROR, "Unknown frame type %02x", + transport_parsing->incoming_frame_type); return init_skip_frame_parser(transport_parsing, 0); } } -static grpc_chttp2_parse_error skip_parser(void *parser, - grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, - gpr_slice slice, int is_last) { +static grpc_chttp2_parse_error skip_parser( + void *parser, grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { return GRPC_CHTTP2_PARSE_OK; } static void skip_header(void *tp, grpc_mdelem *md) { grpc_mdelem_unref(md); } -static int init_skip_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_header) { +static int init_skip_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing, int is_header) { if (is_header) { int is_eoh = transport_parsing->expect_continuation_stream_id != 0; transport_parsing->parser = grpc_chttp2_header_parser_parse; @@ -374,52 +403,68 @@ static int init_skip_frame_parser(grpc_chttp2_transport_parsing *transport_parsi transport_parsing->hpack_parser.on_header = skip_header; transport_parsing->hpack_parser.on_header_user_data = NULL; transport_parsing->hpack_parser.is_boundary = is_eoh; - transport_parsing->hpack_parser.is_eof = is_eoh ? transport_parsing->header_eof : 0; + transport_parsing->hpack_parser.is_eof = + is_eoh ? transport_parsing->header_eof : 0; } else { transport_parsing->parser = skip_parser; } return 1; } -static void become_skip_parser(grpc_chttp2_transport_parsing *transport_parsing) { - init_skip_frame_parser(transport_parsing, transport_parsing->parser == grpc_chttp2_header_parser_parse); +static void become_skip_parser( + grpc_chttp2_transport_parsing *transport_parsing) { + init_skip_frame_parser( + transport_parsing, + transport_parsing->parser == grpc_chttp2_header_parser_parse); } -static grpc_chttp2_parse_error update_incoming_window(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { - if (transport_parsing->incoming_frame_size > transport_parsing->incoming_window) { +static grpc_chttp2_parse_error update_incoming_window( + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing) { + if (transport_parsing->incoming_frame_size > + transport_parsing->incoming_window) { gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", - transport_parsing->incoming_frame_size, transport_parsing->incoming_window); + transport_parsing->incoming_frame_size, + transport_parsing->incoming_window); return GRPC_CHTTP2_CONNECTION_ERROR; } - if (transport_parsing->incoming_frame_size > stream_parsing->incoming_window) { + if (transport_parsing->incoming_frame_size > + stream_parsing->incoming_window) { gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", - transport_parsing->incoming_frame_size, stream_parsing->incoming_window); + transport_parsing->incoming_frame_size, + stream_parsing->incoming_window); return GRPC_CHTTP2_CONNECTION_ERROR; } - GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, incoming, 0, -(gpr_int64)transport_parsing->incoming_frame_size); - GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, incoming, s->global.id, -(gpr_int64)transport_parsing->incoming_frame_size); + GRPC_CHTTP2_FLOW_CTL_TRACE( + t, t, incoming, 0, -(gpr_int64)transport_parsing->incoming_frame_size); + GRPC_CHTTP2_FLOW_CTL_TRACE( + t, s, incoming, s->global.id, + -(gpr_int64)transport_parsing->incoming_frame_size); transport_parsing->incoming_window -= transport_parsing->incoming_frame_size; stream_parsing->incoming_window -= transport_parsing->incoming_frame_size; - - /* if the grpc_chttp2_stream incoming window is getting low, schedule an update */ - stream_parsing->incoming_window_changed = 1; + stream_parsing->incoming_window_delta += + transport_parsing->incoming_frame_size; grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); return GRPC_CHTTP2_PARSE_OK; } -static int init_data_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { - grpc_chttp2_stream_parsing *stream_parsing = grpc_chttp2_parsing_lookup_stream(transport_parsing, transport_parsing->incoming_stream_id); +static int init_data_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing) { + grpc_chttp2_stream_parsing *stream_parsing = + grpc_chttp2_parsing_lookup_stream(transport_parsing, + transport_parsing->incoming_stream_id); grpc_chttp2_parse_error err = GRPC_CHTTP2_PARSE_OK; - if (!stream_parsing || stream_parsing->received_close) return init_skip_frame_parser(transport_parsing, 0); + if (!stream_parsing || stream_parsing->received_close) + return init_skip_frame_parser(transport_parsing, 0); if (err == GRPC_CHTTP2_PARSE_OK) { err = update_incoming_window(transport_parsing, stream_parsing); } if (err == GRPC_CHTTP2_PARSE_OK) { - err = grpc_chttp2_data_parser_begin_frame(&stream_parsing->data_parser, - transport_parsing->incoming_frame_flags); + err = grpc_chttp2_data_parser_begin_frame( + &stream_parsing->data_parser, transport_parsing->incoming_frame_flags); } switch (err) { case GRPC_CHTTP2_PARSE_OK: @@ -441,26 +486,32 @@ static int init_data_frame_parser(grpc_chttp2_transport_parsing *transport_parsi static void free_timeout(void *p) { gpr_free(p); } -static void add_incoming_metadata(grpc_chttp2_stream_parsing *stream_parsing, grpc_mdelem *elem) { - if (stream_parsing->incoming_metadata_capacity == stream_parsing->incoming_metadata_count) { +static void add_incoming_metadata(grpc_chttp2_stream_parsing *stream_parsing, + grpc_mdelem *elem) { + if (stream_parsing->incoming_metadata_capacity == + stream_parsing->incoming_metadata_count) { stream_parsing->incoming_metadata_capacity = GPR_MAX(8, 2 * stream_parsing->incoming_metadata_capacity); stream_parsing->incoming_metadata = - gpr_realloc(stream_parsing->incoming_metadata, sizeof(*stream_parsing->incoming_metadata) * - stream_parsing->incoming_metadata_capacity); + gpr_realloc(stream_parsing->incoming_metadata, + sizeof(*stream_parsing->incoming_metadata) * + stream_parsing->incoming_metadata_capacity); } - stream_parsing->incoming_metadata[stream_parsing->incoming_metadata_count++].md = elem; + stream_parsing->incoming_metadata[stream_parsing->incoming_metadata_count++] + .md = elem; } static void on_header(void *tp, grpc_mdelem *md) { grpc_chttp2_transport_parsing *transport_parsing = tp; - grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream; + grpc_chttp2_stream_parsing *stream_parsing = + transport_parsing->incoming_stream; GPR_ASSERT(stream_parsing); - IF_TRACING(gpr_log( - GPR_INFO, "HTTP:%d:HDR: %s: %s", stream_parsing->id, transport_parsing->is_client ? "CLI" : "SVR", - grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value))); + IF_TRACING(gpr_log(GPR_INFO, "HTTP:%d:HDR: %s: %s", stream_parsing->id, + transport_parsing->is_client ? "CLI" : "SVR", + grpc_mdstr_as_c_string(md->key), + grpc_mdstr_as_c_string(md->value))); if (md->key == transport_parsing->str_grpc_timeout) { gpr_timespec *cached_timeout = grpc_mdelem_get_user_data(md, free_timeout); @@ -475,58 +526,71 @@ static void on_header(void *tp, grpc_mdelem *md) { } grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); } - stream_parsing->incoming_deadline = gpr_time_add(gpr_now(), *cached_timeout); + stream_parsing->incoming_deadline = + gpr_time_add(gpr_now(), *cached_timeout); grpc_mdelem_unref(md); } else { add_incoming_metadata(stream_parsing, md); } - + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); } -static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_parsing, int is_continuation) { - int is_eoh = - (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_HEADERS) != 0; +static int init_header_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing, int is_continuation) { + int is_eoh = (transport_parsing->incoming_frame_flags & + GRPC_CHTTP2_DATA_FLAG_END_HEADERS) != 0; grpc_chttp2_stream_parsing *stream_parsing; if (is_eoh) { transport_parsing->expect_continuation_stream_id = 0; } else { - transport_parsing->expect_continuation_stream_id = transport_parsing->incoming_stream_id; + transport_parsing->expect_continuation_stream_id = + transport_parsing->incoming_stream_id; } if (!is_continuation) { - transport_parsing->header_eof = - (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_STREAM) != 0; + transport_parsing->header_eof = (transport_parsing->incoming_frame_flags & + GRPC_CHTTP2_DATA_FLAG_END_STREAM) != 0; } /* could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream */ - stream_parsing = grpc_chttp2_parsing_lookup_stream(transport_parsing, transport_parsing->incoming_stream_id); + stream_parsing = grpc_chttp2_parsing_lookup_stream( + transport_parsing, transport_parsing->incoming_stream_id); if (!stream_parsing) { if (is_continuation) { - gpr_log(GPR_ERROR, "grpc_chttp2_stream disbanded before CONTINUATION received"); + gpr_log(GPR_ERROR, + "grpc_chttp2_stream disbanded before CONTINUATION received"); return init_skip_frame_parser(transport_parsing, 1); } if (transport_parsing->is_client) { if ((transport_parsing->incoming_stream_id & 1) && - transport_parsing->incoming_stream_id < transport_parsing->next_stream_id) { + transport_parsing->incoming_stream_id < + transport_parsing->next_stream_id) { /* this is an old (probably cancelled) grpc_chttp2_stream */ } else { - gpr_log(GPR_ERROR, "ignoring new grpc_chttp2_stream creation on client"); + gpr_log(GPR_ERROR, + "ignoring new grpc_chttp2_stream creation on client"); } return init_skip_frame_parser(transport_parsing, 1); - } else if (transport_parsing->last_incoming_stream_id > transport_parsing->incoming_stream_id) { + } else if (transport_parsing->last_incoming_stream_id > + transport_parsing->incoming_stream_id) { gpr_log(GPR_ERROR, - "ignoring out of order new grpc_chttp2_stream request on server; last grpc_chttp2_stream " + "ignoring out of order new grpc_chttp2_stream request on server; " + "last grpc_chttp2_stream " "id=%d, new grpc_chttp2_stream id=%d", - transport_parsing->last_incoming_stream_id, transport_parsing->incoming_stream_id); + transport_parsing->last_incoming_stream_id, + transport_parsing->incoming_stream_id); return init_skip_frame_parser(transport_parsing, 1); } else if ((transport_parsing->incoming_stream_id & 1) == 0) { - gpr_log(GPR_ERROR, "ignoring grpc_chttp2_stream with non-client generated index %d", + gpr_log(GPR_ERROR, + "ignoring grpc_chttp2_stream with non-client generated index %d", transport_parsing->incoming_stream_id); return init_skip_frame_parser(transport_parsing, 1); } - stream_parsing = transport_parsing->incoming_stream = grpc_chttp2_parsing_accept_stream(transport_parsing, transport_parsing->incoming_stream_id); + stream_parsing = transport_parsing->incoming_stream = + grpc_chttp2_parsing_accept_stream( + transport_parsing, transport_parsing->incoming_stream_id); if (!stream_parsing) { gpr_log(GPR_ERROR, "grpc_chttp2_stream not accepted"); return init_skip_frame_parser(transport_parsing, 1); @@ -544,15 +608,17 @@ static int init_header_frame_parser(grpc_chttp2_transport_parsing *transport_par transport_parsing->hpack_parser.on_header = on_header; transport_parsing->hpack_parser.on_header_user_data = transport_parsing; transport_parsing->hpack_parser.is_boundary = is_eoh; - transport_parsing->hpack_parser.is_eof = is_eoh ? transport_parsing->header_eof : 0; - if (!is_continuation && - (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_FLAG_HAS_PRIORITY)) { + transport_parsing->hpack_parser.is_eof = + is_eoh ? transport_parsing->header_eof : 0; + if (!is_continuation && (transport_parsing->incoming_frame_flags & + GRPC_CHTTP2_FLAG_HAS_PRIORITY)) { grpc_chttp2_hpack_parser_set_has_priority(&transport_parsing->hpack_parser); } return 1; } -static int init_window_update_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { +static int init_window_update_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_window_update_parser_begin_frame( &transport_parsing->simple.window_update, transport_parsing->incoming_frame_size, @@ -563,16 +629,17 @@ static int init_window_update_frame_parser(grpc_chttp2_transport_parsing *transp } static int init_ping_parser(grpc_chttp2_transport_parsing *transport_parsing) { - int ok = GRPC_CHTTP2_PARSE_OK == - grpc_chttp2_ping_parser_begin_frame(&transport_parsing->simple.ping, - transport_parsing->incoming_frame_size, - transport_parsing->incoming_frame_flags); + int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_ping_parser_begin_frame( + &transport_parsing->simple.ping, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); transport_parsing->parser = grpc_chttp2_ping_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.ping; return ok; } -static int init_rst_stream_parser(grpc_chttp2_transport_parsing *transport_parsing) { +static int init_rst_stream_parser( + grpc_chttp2_transport_parsing *transport_parsing) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_rst_stream_parser_begin_frame( &transport_parsing->simple.rst_stream, transport_parsing->incoming_frame_size, @@ -582,28 +649,32 @@ static int init_rst_stream_parser(grpc_chttp2_transport_parsing *transport_parsi return ok; } -static int init_goaway_parser(grpc_chttp2_transport_parsing *transport_parsing) { - int ok = - GRPC_CHTTP2_PARSE_OK == - grpc_chttp2_goaway_parser_begin_frame( - &transport_parsing->goaway_parser, transport_parsing->incoming_frame_size, transport_parsing->incoming_frame_flags); +static int init_goaway_parser( + grpc_chttp2_transport_parsing *transport_parsing) { + int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_goaway_parser_begin_frame( + &transport_parsing->goaway_parser, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); transport_parsing->parser = grpc_chttp2_goaway_parser_parse; transport_parsing->parser_data = &transport_parsing->goaway_parser; return ok; } -static int init_settings_frame_parser(grpc_chttp2_transport_parsing *transport_parsing) { +static int init_settings_frame_parser( + grpc_chttp2_transport_parsing *transport_parsing) { int ok; if (transport_parsing->incoming_stream_id != 0) { - gpr_log(GPR_ERROR, "settings frame received for grpc_chttp2_stream %d", transport_parsing->incoming_stream_id); + gpr_log(GPR_ERROR, "settings frame received for grpc_chttp2_stream %d", + transport_parsing->incoming_stream_id); return 0; } - ok = GRPC_CHTTP2_PARSE_OK == - grpc_chttp2_settings_parser_begin_frame( - &transport_parsing->simple.settings, transport_parsing->incoming_frame_size, - transport_parsing->incoming_frame_flags, transport_parsing->settings); + ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_settings_parser_begin_frame( + &transport_parsing->simple.settings, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags, + transport_parsing->settings); if (!ok) { return 0; } @@ -623,7 +694,9 @@ static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) { } */ -void grpc_chttp2_parsing_add_metadata_batch(grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { +void grpc_chttp2_parsing_add_metadata_batch( + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing) { grpc_metadata_batch b; b.list.head = NULL; @@ -639,7 +712,8 @@ void grpc_chttp2_parsing_add_metadata_batch(grpc_chttp2_transport_parsing *trans grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); } -static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, grpc_chttp2_stream_parsing *stream_parsing) { +static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, + grpc_chttp2_stream_parsing *stream_parsing) { grpc_stream_op *ops = stream_global->incoming_sopb->ops; size_t nops = stream_global->incoming_sopb->nops; size_t i; @@ -663,10 +737,13 @@ static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, grpc_ch GPR_ASSERT(last_mdidx <= stream_parsing->incoming_metadata_count); /* turn the array into a doubly linked list */ op->data.metadata.list.head = &stream_parsing->incoming_metadata[mdidx]; - op->data.metadata.list.tail = &stream_parsing->incoming_metadata[last_mdidx - 1]; + op->data.metadata.list.tail = + &stream_parsing->incoming_metadata[last_mdidx - 1]; for (j = mdidx + 1; j < last_mdidx; j++) { - stream_parsing->incoming_metadata[j].prev = &stream_parsing->incoming_metadata[j - 1]; - stream_parsing->incoming_metadata[j - 1].next = &stream_parsing->incoming_metadata[j]; + stream_parsing->incoming_metadata[j].prev = + &stream_parsing->incoming_metadata[j - 1]; + stream_parsing->incoming_metadata[j - 1].next = + &stream_parsing->incoming_metadata[j]; } stream_parsing->incoming_metadata[mdidx].prev = NULL; stream_parsing->incoming_metadata[last_mdidx - 1].next = NULL; @@ -678,12 +755,14 @@ static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, grpc_ch if (mdidx != stream_parsing->incoming_metadata_count) { /* we have a partially read metadata batch still in incoming_metadata */ size_t new_count = stream_parsing->incoming_metadata_count - mdidx; - size_t copy_bytes = sizeof(*stream_parsing->incoming_metadata) * new_count; + size_t copy_bytes = + sizeof(*stream_parsing->incoming_metadata) * new_count; GPR_ASSERT(mdidx < stream_parsing->incoming_metadata_count); stream_parsing->incoming_metadata = gpr_malloc(copy_bytes); - memcpy(stream_parsing->old_incoming_metadata + mdidx, stream_parsing->incoming_metadata, - copy_bytes); - stream_parsing->incoming_metadata_count = stream_parsing->incoming_metadata_capacity = new_count; + memcpy(stream_parsing->old_incoming_metadata + mdidx, + stream_parsing->incoming_metadata, copy_bytes); + stream_parsing->incoming_metadata_count = + stream_parsing->incoming_metadata_capacity = new_count; } else { stream_parsing->incoming_metadata = NULL; stream_parsing->incoming_metadata_count = 0; @@ -692,12 +771,17 @@ static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, grpc_ch } } -static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last) { - grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream; - switch (transport_parsing->parser(transport_parsing->parser_data, transport_parsing, stream_parsing, slice, is_last)) { +static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice, int is_last) { + grpc_chttp2_stream_parsing *stream_parsing = + transport_parsing->incoming_stream; + switch (transport_parsing->parser(transport_parsing->parser_data, + transport_parsing, stream_parsing, slice, + is_last)) { case GRPC_CHTTP2_PARSE_OK: if (stream_parsing) { - grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, + stream_parsing); } return 1; case GRPC_CHTTP2_STREAM_ERROR: @@ -714,10 +798,6 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, g return 0; } - - - - #if 0 if (st.end_of_stream) { transport_parsing->incoming_stream->read_closed = 1; diff --git a/src/core/transport/chttp2/status_conversion.h b/src/core/transport/chttp2/status_conversion.h index cf06c3576e1..0ec5b560b8e 100644 --- a/src/core/transport/chttp2/status_conversion.h +++ b/src/core/transport/chttp2/status_conversion.h @@ -47,4 +47,4 @@ grpc_status_code grpc_chttp2_http2_error_to_grpc_status( grpc_status_code grpc_chttp2_http2_status_to_grpc_status(int status); int grpc_chttp2_grpc_status_to_http2_status(grpc_status_code status); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H */ diff --git a/src/core/transport/chttp2/stream_encoder.h b/src/core/transport/chttp2/stream_encoder.h index 50c58ad5ca3..db52f2a0f6c 100644 --- a/src/core/transport/chttp2/stream_encoder.h +++ b/src/core/transport/chttp2/stream_encoder.h @@ -90,4 +90,4 @@ void grpc_chttp2_encode(grpc_stream_op *ops, size_t ops_count, int eof, grpc_chttp2_hpack_compressor *compressor, gpr_slice_buffer *output); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_ENCODER_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_ENCODER_H */ diff --git a/src/core/transport/chttp2/stream_map.h b/src/core/transport/chttp2/stream_map.h index f59dece7467..71b05820541 100644 --- a/src/core/transport/chttp2/stream_map.h +++ b/src/core/transport/chttp2/stream_map.h @@ -67,7 +67,8 @@ void *grpc_chttp2_stream_map_delete(grpc_chttp2_stream_map *map, gpr_uint32 key); /* Move all elements of src into dst */ -void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, grpc_chttp2_stream_map *dst); +void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, + grpc_chttp2_stream_map *dst); /* Return an existing key, or NULL if it does not exist */ void *grpc_chttp2_stream_map_find(grpc_chttp2_stream_map *map, gpr_uint32 key); @@ -81,4 +82,4 @@ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map, void *value), void *user_data); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H */ diff --git a/src/core/transport/chttp2/timeout_encoding.h b/src/core/transport/chttp2/timeout_encoding.h index e6664c62628..9d8756e799d 100644 --- a/src/core/transport/chttp2/timeout_encoding.h +++ b/src/core/transport/chttp2/timeout_encoding.h @@ -44,4 +44,4 @@ void grpc_chttp2_encode_timeout(gpr_timespec timeout, char *buffer); int grpc_chttp2_decode_timeout(const char *buffer, gpr_timespec *timeout); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H */ diff --git a/src/core/transport/chttp2/varint.h b/src/core/transport/chttp2/varint.h index ee04ed7fb22..0a6fb55248d 100644 --- a/src/core/transport/chttp2/varint.h +++ b/src/core/transport/chttp2/varint.h @@ -56,19 +56,18 @@ void grpc_chttp2_hpack_write_varint_tail(gpr_uint32 tail_value, ((n) < GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits) \ ? 1 \ : grpc_chttp2_hpack_varint_length( \ - (n) - GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits))) + (n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits))) -#define GRPC_CHTTP2_WRITE_VARINT(n, prefix_bits, prefix_or, target, length) \ - do { \ - gpr_uint8* tgt = target; \ - if ((length) == 1) { \ - (tgt)[0] = (prefix_or) | (n); \ - } else { \ - (tgt)[0] = (prefix_or) | GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \ - grpc_chttp2_hpack_write_varint_tail( \ - (n) - GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits), (tgt) + 1, \ - (length) - 1); \ - } \ +#define GRPC_CHTTP2_WRITE_VARINT(n, prefix_bits, prefix_or, target, length) \ + do { \ + gpr_uint8* tgt = target; \ + if ((length) == 1) { \ + (tgt)[0] = (prefix_or) | (n); \ + } else { \ + (tgt)[0] = (prefix_or) | GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits); \ + grpc_chttp2_hpack_write_varint_tail( \ + (n)-GRPC_CHTTP2_MAX_IN_PREFIX(prefix_bits), (tgt) + 1, (length)-1); \ + } \ } while (0) -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H */ diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 3f25cbedac3..a960e3c6a89 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -39,7 +39,9 @@ static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing); static void finish_write_cb(void *tw, grpc_endpoint_cb_status write_status); -int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { +int grpc_chttp2_unlocking_check_writes( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_writing *stream_writing; gpr_uint32 window_delta; @@ -48,25 +50,32 @@ int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *transport_g gpr_slice_buffer_swap(&transport_global->qbuf, &transport_writing->outbuf); GPR_ASSERT(transport_global->qbuf.count == 0); - if (transport_global->dirtied_local_settings && !transport_global->sent_local_settings) { + if (transport_global->dirtied_local_settings && + !transport_global->sent_local_settings) { gpr_slice_buffer_add( - &transport_writing->outbuf, grpc_chttp2_settings_create( - transport_global->settings[SENT_SETTINGS], transport_global->settings[LOCAL_SETTINGS], - transport_global->force_send_settings, GRPC_CHTTP2_NUM_SETTINGS)); + &transport_writing->outbuf, + grpc_chttp2_settings_create(transport_global->settings[SENT_SETTINGS], + transport_global->settings[LOCAL_SETTINGS], + transport_global->force_send_settings, + GRPC_CHTTP2_NUM_SETTINGS)); transport_global->force_send_settings = 0; transport_global->dirtied_local_settings = 0; transport_global->sent_local_settings = 1; } - /* for each grpc_chttp2_stream that's become writable, frame it's data (according to + /* 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 (transport_global->outgoing_window && - grpc_chttp2_list_pop_writable_stream(transport_global, transport_writing, &stream_global, &stream_writing) && + while (transport_global->outgoing_window && + grpc_chttp2_list_pop_writable_stream(transport_global, + transport_writing, &stream_global, + &stream_writing) && stream_global->outgoing_window > 0) { stream_writing->id = stream_global->id; window_delta = grpc_chttp2_preencode( stream_global->outgoing_sopb->ops, &stream_global->outgoing_sopb->nops, - GPR_MIN(transport_global->outgoing_window, stream_global->outgoing_window), + GPR_MIN(transport_global->outgoing_window, + stream_global->outgoing_window), &stream_writing->sopb); GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, outgoing, 0, -(gpr_int64)window_delta); GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, outgoing, s->id, -(gpr_int64)window_delta); @@ -81,51 +90,63 @@ int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *transport_g stream_writing->send_closed = SEND_CLOSED; } } - if (stream_writing->sopb.nops > 0 || stream_writing->send_closed != DONT_SEND_CLOSED) { + if (stream_writing->sopb.nops > 0 || + stream_writing->send_closed != DONT_SEND_CLOSED) { grpc_chttp2_list_add_writing_stream(transport_writing, stream_writing); } /* we should either exhaust window or have no ops left, but not both */ if (stream_global->outgoing_sopb->nops == 0) { stream_global->outgoing_sopb = NULL; - grpc_chttp2_schedule_closure(transport_global, stream_global->send_done_closure, 1); + grpc_chttp2_schedule_closure(transport_global, + stream_global->send_done_closure, 1); } else if (stream_global->outgoing_window) { grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } } - /* for each grpc_chttp2_stream that wants to update its window, add that window here */ - while (grpc_chttp2_list_pop_writable_window_update_stream(transport_global, &stream_global)) { + /* for each grpc_chttp2_stream that wants to update its window, add that + * window here */ + while (grpc_chttp2_list_pop_writable_window_update_stream(transport_global, + &stream_global)) { window_delta = - transport_global->settings[LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - + transport_global->settings[LOCAL_SETTINGS] + [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - stream_global->incoming_window; if (!stream_global->read_closed && window_delta > 0) { gpr_slice_buffer_add( - &transport_writing->outbuf, grpc_chttp2_window_update_create(stream_global->id, window_delta)); + &transport_writing->outbuf, + grpc_chttp2_window_update_create(stream_global->id, window_delta)); GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, incoming, s->id, window_delta); stream_global->incoming_window += window_delta; } } - /* if the grpc_chttp2_transport is ready to send a window update, do so here also */ - if (transport_global->incoming_window < transport_global->connection_window_target * 3 / 4) { - window_delta = transport_global->connection_window_target - transport_global->incoming_window; + /* if the grpc_chttp2_transport is ready to send a window update, do so here + * also */ + if (transport_global->incoming_window < + transport_global->connection_window_target * 3 / 4) { + window_delta = transport_global->connection_window_target - + transport_global->incoming_window; gpr_slice_buffer_add(&transport_writing->outbuf, grpc_chttp2_window_update_create(0, window_delta)); GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, incoming, 0, window_delta); transport_global->incoming_window += window_delta; } - return transport_writing->outbuf.length > 0 || grpc_chttp2_list_have_writing_streams(transport_writing); + return transport_writing->outbuf.length > 0 || + grpc_chttp2_list_have_writing_streams(transport_writing); } -void grpc_chttp2_perform_writes(grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint) { +void grpc_chttp2_perform_writes( + grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint) { finalize_outbuf(transport_writing); GPR_ASSERT(transport_writing->outbuf.count > 0); - switch (grpc_endpoint_write(endpoint, transport_writing->outbuf.slices, transport_writing->outbuf.count, - finish_write_cb, transport_writing)) { + switch (grpc_endpoint_write(endpoint, transport_writing->outbuf.slices, + transport_writing->outbuf.count, finish_write_cb, + transport_writing)) { case GRPC_ENDPOINT_WRITE_DONE: grpc_chttp2_terminate_writing(transport_writing, 1); break; @@ -140,14 +161,17 @@ void grpc_chttp2_perform_writes(grpc_chttp2_transport_writing *transport_writing static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream_writing *stream_writing; - while (grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) { + while ( + grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) { grpc_chttp2_encode(stream_writing->sopb.ops, stream_writing->sopb.nops, - stream_writing->send_closed != DONT_SEND_CLOSED, stream_writing->id, - &transport_writing->hpack_compressor, &transport_writing->outbuf); + stream_writing->send_closed != DONT_SEND_CLOSED, + stream_writing->id, &transport_writing->hpack_compressor, + &transport_writing->outbuf); stream_writing->sopb.nops = 0; if (stream_writing->send_closed == SEND_CLOSED_WITH_RST_STREAM) { - gpr_slice_buffer_add(&transport_writing->outbuf, grpc_chttp2_rst_stream_create( - stream_writing->id, GRPC_CHTTP2_NO_ERROR)); + gpr_slice_buffer_add(&transport_writing->outbuf, + grpc_chttp2_rst_stream_create(stream_writing->id, + GRPC_CHTTP2_NO_ERROR)); } grpc_chttp2_list_add_written_stream(transport_writing, stream_writing); } @@ -155,14 +179,18 @@ static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing) { static void finish_write_cb(void *tw, grpc_endpoint_cb_status write_status) { grpc_chttp2_transport_writing *transport_writing = tw; - grpc_chttp2_terminate_writing(transport_writing, write_status == GRPC_ENDPOINT_CB_OK); + grpc_chttp2_terminate_writing(transport_writing, + write_status == GRPC_ENDPOINT_CB_OK); } -void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_writing *transport_writing) { +void grpc_chttp2_cleanup_writing( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream_writing *stream_writing; grpc_chttp2_stream_global *stream_global; - while (grpc_chttp2_list_pop_written_stream(transport_global, transport_writing, &stream_global, &stream_writing)) { + while (grpc_chttp2_list_pop_written_stream( + transport_global, transport_writing, &stream_global, &stream_writing)) { if (stream_writing->send_closed != DONT_SEND_CLOSED) { stream_global->write_state = WRITE_STATE_SENT_CLOSE; if (!transport_global->is_client) { diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 5db9b92727f..3718eed4dd6 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -64,30 +64,53 @@ int grpc_flowctl_trace = 0; else \ flowctl_trace(t, #dir, obj->dir##_window, id, delta) -#define TRANSPORT_FROM_WRITING(tw) ((grpc_chttp2_transport*)((char*)(tw) - offsetof(grpc_chttp2_transport, writing))) +#define TRANSPORT_FROM_WRITING(tw) \ + ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ + writing))) static const grpc_transport_vtable vtable; -static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, - gpr_uint32 value); - static void lock(grpc_chttp2_transport *t); static void unlock(grpc_chttp2_transport *t); - static void unlock_check_cancellations(grpc_chttp2_transport* t); - static void unlock_check_parser(grpc_chttp2_transport* t); - static void unlock_check_channel_callbacks(grpc_chttp2_transport* t); - +/* forward declarations of various callbacks that we'll build closures around */ static void writing_action(void *t, int iomgr_success_ignored); static void notify_closed(void *t, int iomgr_success_ignored); +/** Set a transport level setting, and push it to our peer */ +static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, + gpr_uint32 value); + +/** Endpoint callback to process incoming data */ +static void recv_data(void *tp, gpr_slice *slices, size_t nslices, + grpc_endpoint_cb_status error); + +/** Start disconnection chain */ static void drop_connection(grpc_chttp2_transport *t); -static void end_all_the_calls(grpc_chttp2_transport *t); -static grpc_chttp2_stream *stream_list_remove_head(grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id); -static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id); -static void stream_list_add_tail(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id); -static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id); +/* basic stream list management */ +static grpc_chttp2_stream *stream_list_remove_head( + grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id); +static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id); +static void stream_list_add_tail(grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id); +static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id); + +/** schedule a closure to be called outside of the transport lock after the next + unlock() operation */ +static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, + int success); + +#if 0 + +static void unlock_check_cancellations(grpc_chttp2_transport *t); +static void unlock_check_parser(grpc_chttp2_transport *t); +static void unlock_check_channel_callbacks(grpc_chttp2_transport *t); + +static void end_all_the_calls(grpc_chttp2_transport *t); static void cancel_stream_id(grpc_chttp2_transport *t, gpr_uint32 id, grpc_status_code local_status, @@ -96,24 +119,27 @@ static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_status_code local_status, grpc_chttp2_error_code error_code, grpc_mdstr *optional_message, int send_rst); -static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id); -static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s); +static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, + gpr_uint32 id); +static void remove_from_stream_map(grpc_chttp2_transport *t, + grpc_chttp2_stream *s); static void maybe_start_some_streams(grpc_chttp2_transport *t); static void parsing_become_skip_parser(grpc_chttp2_transport *t); -static void recv_data(void *tp, gpr_slice *slices, size_t nslices, - grpc_endpoint_cb_status error); - -static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, int success); -static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, int is_parser); -static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stream *s); -static void add_to_pollset_locked(grpc_chttp2_transport *t, grpc_pollset *pollset); -static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_transport_op *op); +static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + int is_parser); +static void maybe_join_window_updates(grpc_chttp2_transport *t, + grpc_chttp2_stream *s); +static void add_to_pollset_locked(grpc_chttp2_transport *t, + grpc_pollset *pollset); +static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_transport_op *op); static void add_metadata_batch(grpc_chttp2_transport *t, grpc_chttp2_stream *s); +#endif -static void flowctl_trace(grpc_chttp2_transport *t, const char *flow, gpr_int32 window, - gpr_uint32 id, gpr_int32 delta) { +static void flowctl_trace(grpc_chttp2_transport *t, const char *flow, + gpr_int32 window, gpr_uint32 id, gpr_int32 delta) { gpr_log(GPR_DEBUG, "HTTP:FLOW:%p:%d:%s: %d + %d = %d", t, id, flow, window, delta, window + delta); } @@ -176,15 +202,17 @@ static void unref_transport(grpc_chttp2_transport *t) { static void ref_transport(grpc_chttp2_transport *t) { gpr_ref(&t->refs); } -static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callback setup, - void *arg, const grpc_channel_args *channel_args, +static void init_transport(grpc_chttp2_transport *t, + grpc_transport_setup_callback setup, void *arg, + const grpc_channel_args *channel_args, grpc_endpoint *ep, gpr_slice *slices, size_t nslices, grpc_mdctx *mdctx, int is_client) { size_t i; int j; grpc_transport_setup_result sr; - GPR_ASSERT(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) == GRPC_CHTTP2_CLIENT_CONNECT_STRLEN); + GPR_ASSERT(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) == + GRPC_CHTTP2_CLIENT_CONNECT_STRLEN); memset(t, 0, sizeof(*t)); @@ -220,8 +248,9 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba grpc_iomgr_closure_init(&t->channel_callback.notify_closed, notify_closed, t); if (is_client) { - gpr_slice_buffer_add(&t->global.qbuf, - gpr_slice_from_copied_string(GRPC_CHTTP2_CLIENT_CONNECT_STRING)); + gpr_slice_buffer_add( + &t->global.qbuf, + gpr_slice_from_copied_string(GRPC_CHTTP2_CLIENT_CONNECT_STRING)); } /* 8 is a random stab in the dark as to a good initial size: it's small enough that it shouldn't waste memory for infrequently used connections, yet @@ -234,7 +263,8 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba /* copy in initial settings to all setting sets */ for (i = 0; i < NUM_SETTING_SETS; i++) { for (j = 0; j < GRPC_CHTTP2_NUM_SETTINGS; j++) { - t->global.settings[i][j] = grpc_chttp2_settings_parameters[j].default_value; + t->global.settings[i][j] = + grpc_chttp2_settings_parameters[j].default_value; } } t->global.dirtied_local_settings = 1; @@ -272,7 +302,8 @@ static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callba } else if ((t->global.next_stream_id & 1) != (channel_args->args[i].value.integer & 1)) { gpr_log(GPR_ERROR, "%s: low bit must be %d on %s", - GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER, t->global.next_stream_id & 1, + GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER, + t->global.next_stream_id & 1, is_client ? "client" : "server"); } else { t->global.next_stream_id = channel_args->args[i].value.integer; @@ -355,9 +386,11 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, GPR_ASSERT(t->parsing_active); s->global.id = (gpr_uint32)(gpr_uintptr)server_data; s->global.outgoing_window = - t->global.settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + t->global + .settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; s->global.incoming_window = - t->global.settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + t->global + .settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; *t->accepting_stream = s; grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); } @@ -375,7 +408,8 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_lock(&t->mu); - GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || s->global.id == 0); + GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || + s->global.id == 0); for (i = 0; i < STREAM_LIST_COUNT; i++) { stream_list_remove(t, s, i); @@ -400,11 +434,13 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { * LIST MANAGEMENT */ -static int stream_list_empty(grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { +static int stream_list_empty(grpc_chttp2_transport *t, + grpc_chttp2_stream_list_id id) { return t->lists[id].head == NULL; } -static grpc_chttp2_stream *stream_list_remove_head(grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { +static grpc_chttp2_stream *stream_list_remove_head( + grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { grpc_chttp2_stream *s = t->lists[id].head; if (s) { grpc_chttp2_stream *new_head = s->links[id].next; @@ -421,7 +457,8 @@ static grpc_chttp2_stream *stream_list_remove_head(grpc_chttp2_transport *t, grp return s; } -static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { +static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { if (!s->included[id]) return; s->included[id] = 0; if (s->links[id].prev) { @@ -437,7 +474,9 @@ static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, } } -static void stream_list_add_tail(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { +static void stream_list_add_tail(grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { grpc_chttp2_stream *old_tail; GPR_ASSERT(!s->included[id]); old_tail = t->lists[id].tail; @@ -453,7 +492,8 @@ static void stream_list_add_tail(grpc_chttp2_transport *t, grpc_chttp2_stream *s s->included[id] = 1; } -static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { +static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { if (s->included[id]) { return; } @@ -475,7 +515,8 @@ static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream * LOCK MANAGEMENT */ -/* We take a grpc_chttp2_transport-global lock in response to calls coming in from above, +/* We take a grpc_chttp2_transport-global lock in response to calls coming in + from above, and in response to data being received from below. New data to be written is always queued, as are callbacks to process data. During unlock() we check our todo lists and initiate callbacks and flush writes. */ @@ -485,14 +526,15 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_chttp2_transport *t) { grpc_iomgr_closure *run_closures; - if (!t->writing_active && grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { + if (!t->writing_active && + grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { t->writing_active = 1; ref_transport(t); schedule_cb(t, &t->writing_action, 1); } - unlock_check_cancellations(t); - unlock_check_parser(t); - unlock_check_channel_callbacks(t); + /* unlock_check_cancellations(t); */ + /* unlock_check_parser(t); */ + /* unlock_check_channel_callbacks(t); */ run_closures = t->global.pending_closures; t->global.pending_closures = NULL; @@ -525,7 +567,8 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, } } -void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writing, int success) { +void grpc_chttp2_terminate_writing( + grpc_chttp2_transport_writing *transport_writing, int success) { grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); lock(t); @@ -551,34 +594,38 @@ void grpc_chttp2_terminate_writing(grpc_chttp2_transport_writing *transport_writ unref_transport(t); } - static void writing_action(void *gt, int iomgr_success_ignored) { grpc_chttp2_transport *t = gt; grpc_chttp2_perform_writes(&t->writing, t->ep); } -static void add_goaway(grpc_chttp2_transport *t, gpr_uint32 goaway_error, +void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, gpr_slice goaway_text) { - gpr_slice_unref(t->channel_callback.goaway_text); - t->channel_callback.have_goaway = 1; - t->channel_callback.goaway_text = goaway_text; - t->channel_callback.goaway_error = goaway_error; + if (transport_global->goaway_state == GRPC_CHTTP2_ERROR_STATE_NONE) { + transport_global->goaway_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; + transport_global->goaway_text = goaway_text; + transport_global->goaway_error = goaway_error; + } else { + gpr_slice_unref(goaway_text); + } } static void maybe_start_some_streams(grpc_chttp2_transport *t) { grpc_chttp2_stream *s; - /* start streams where we have free grpc_chttp2_stream ids and free concurrency */ + /* start streams where we have free grpc_chttp2_stream ids and free + * concurrency */ while (t->global.next_stream_id <= MAX_CLIENT_STREAM_ID && t->global.concurrent_stream_count < t->global.settings[PEER_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && - (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { - IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", - t->global.is_client ? "CLI" : "SVR", s, t->global.next_stream_id)); + [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && + (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { + IF_TRACING(gpr_log( + GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", + t->global.is_client ? "CLI" : "SVR", s, t->global.next_stream_id)); if (t->global.next_stream_id == MAX_CLIENT_STREAM_ID) { - add_goaway( - t, GRPC_CHTTP2_NO_ERROR, + grpc_chttp2_add_incoming_goaway( + &t->global, GRPC_CHTTP2_NO_ERROR, gpr_slice_from_copied_string("Exceeded sequence number limit")); } @@ -586,15 +633,18 @@ static void maybe_start_some_streams(grpc_chttp2_transport *t) { s->global.id = t->global.next_stream_id; t->global.next_stream_id += 2; s->global.outgoing_window = - t->global.settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + t->global + .settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; s->global.incoming_window = - t->global.settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + t->global + .settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); t->global.concurrent_stream_count++; stream_list_join(t, s, WRITABLE); } /* cancel out streams that will never be started */ - while (t->global.next_stream_id > MAX_CLIENT_STREAM_ID && (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { + while (t->global.next_stream_id > MAX_CLIENT_STREAM_ID && + (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { cancel_stream( t, s, GRPC_STATUS_UNAVAILABLE, grpc_chttp2_grpc_status_to_http2_error(GRPC_STATUS_UNAVAILABLE), NULL, @@ -816,9 +866,9 @@ static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, i stream_list_join(t, s, FINISHED_READ_OP); } } -#endif -static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { +static void maybe_join_window_updates(grpc_chttp2_transport *t, + grpc_chttp2_stream *s) { if (t->parsing.executing) { stream_list_join(t, s, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE); return; @@ -826,13 +876,12 @@ static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stre if (s->incoming_sopb != NULL && s->global.incoming_window < t->global.settings[LOCAL_SETTINGS] - [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] * + [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] * 3 / 4) { stream_list_join(t, s, WINDOW_UPDATE); } } -#if 0 static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id) { return grpc_chttp2_stream_map_find(&t->stream_map, id); } @@ -867,15 +916,19 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, t->parsing_active = 1; grpc_chttp2_prepare_to_read(&t->global, &t->parsing); gpr_mu_unlock(&t->mu); - for (i = 0; i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); i++) + for (i = 0; + i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); + i++) ; gpr_mu_lock(&t->mu); if (i != nslices) { drop_connection(t); } /* merge stream lists */ - grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); - t->global.concurrent_stream_count = grpc_stream_map_size(&t->parsing_stream_map); + grpc_chttp2_stream_map_move_into(&t->new_stream_map, + &t->parsing_stream_map); + t->global.concurrent_stream_count = + grpc_chttp2_stream_map_size(&t->parsing_stream_map); /* handle higher level things */ grpc_chttp2_publish_reads(&t->global, &t->parsing); t->parsing_active = 0; @@ -905,7 +958,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, t->global.outgoing_window += t->global.outgoing_window_update; t->global.outgoing_window_update = 0; maybe_start_some_streams(t); -#endif +#endif unlock(t); keep_reading = 1; break; @@ -932,25 +985,18 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, typedef struct { grpc_chttp2_transport *t; - grpc_chttp2_pending_goaway *goaways; - size_t num_goaways; + gpr_uint32 error; + gpr_slice text; grpc_iomgr_closure closure; } notify_goaways_args; static void notify_goaways(void *p, int iomgr_success_ignored) { - size_t i; notify_goaways_args *a = p; grpc_chttp2_transport *t = a->t; - for (i = 0; i < a->num_goaways; i++) { - t->channel_callback.cb->goaway( - t->channel_callback.cb_user_data, - &t->base, - a->goaways[i].status, - a->goaways[i].debug); - } + t->channel_callback.cb->goaway(t->channel_callback.cb_user_data, &t->base, + a->error, a->text); - gpr_free(a->goaways); gpr_free(a); lock(t); @@ -960,37 +1006,6 @@ static void notify_goaways(void *p, int iomgr_success_ignored) { unref_transport(t); } -static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { - if (t->channel_callback.executing) { - return; - } - if (t->parsing.executing) { - return; - } - if (t->num_pending_goaways) { - notify_goaways_args *a = gpr_malloc(sizeof(*a)); - a->goaways = t->pending_goaways; - a->num_goaways = t->num_pending_goaways; - t->pending_goaways = NULL; - t->num_pending_goaways = 0; - t->cap_pending_goaways = 0; - t->channel_callback.executing = 1; - grpc_iomgr_closure_init(&a->closure, notify_goaways, a); - ref_transport(t); - schedule_cb(t, &a->closure, 1); - return; - } - if (t->writing.executing) { - return; - } - if (t->error_state == ERROR_STATE_SEEN) { - t->error_state = ERROR_STATE_NOTIFIED; - t->channel_callback.executing = 1; - ref_transport(t); - schedule_cb(t, &t->channel_callback.notify_closed, 1); - } -} - static void notify_closed(void *gt, int iomgr_success_ignored) { grpc_chttp2_transport *t = gt; t->channel_callback.cb->closed(t->channel_callback.cb_user_data, &t->base); @@ -1002,7 +1017,36 @@ static void notify_closed(void *gt, int iomgr_success_ignored) { unref_transport(t); } -static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, int success) { +static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { + if (t->channel_callback.executing) { + return; + } + if (t->global.goaway_state != GRPC_CHTTP2_ERROR_STATE_NONE) { + if (t->global.goaway_state == GRPC_CHTTP2_ERROR_STATE_SEEN && + t->global.error_state != GRPC_CHTTP2_ERROR_STATE_NOTIFIED) { + notify_goaways_args *a = gpr_malloc(sizeof(*a)); + a->error = t->global.goaway_error; + a->text = t->global.goaway_text; + t->global.goaway_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; + t->channel_callback.executing = 1; + grpc_iomgr_closure_init(&a->closure, notify_goaways, a); + ref_transport(t); + schedule_cb(t, &a->closure, 1); + return; + } else if (t->global.goaway_state != GRPC_CHTTP2_ERROR_STATE_NOTIFIED) { + return; + } + } + if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_SEEN) { + t->global.error_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; + t->channel_callback.executing = 1; + ref_transport(t); + schedule_cb(t, &t->channel_callback.notify_closed, 1); + } +} + +static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, + int success) { closure->success = success; closure->next = t->global.pending_closures; t->global.pending_closures = closure; @@ -1012,7 +1056,8 @@ static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, i * POLLSET STUFF */ -static void add_to_pollset_locked(grpc_chttp2_transport *t, grpc_pollset *pollset) { +static void add_to_pollset_locked(grpc_chttp2_transport *t, + grpc_pollset *pollset) { if (t->ep) { grpc_endpoint_add_to_pollset(t->ep, pollset); } @@ -1029,10 +1074,15 @@ static void add_to_pollset(grpc_transport *gt, grpc_pollset *pollset) { * INTEGRATION GLUE */ -static const grpc_transport_vtable vtable = { - sizeof(grpc_chttp2_stream), init_stream, perform_op, - add_to_pollset, destroy_stream, goaway, - close_transport, send_ping, destroy_transport}; +static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), + init_stream, + perform_op, + add_to_pollset, + destroy_stream, + goaway, + close_transport, + send_ping, + destroy_transport}; void grpc_create_chttp2_transport(grpc_transport_setup_callback setup, void *arg, diff --git a/src/core/transport/chttp2_transport.h b/src/core/transport/chttp2_transport.h index fad714fabf5..18e19f03afe 100644 --- a/src/core/transport/chttp2_transport.h +++ b/src/core/transport/chttp2_transport.h @@ -47,4 +47,4 @@ void grpc_create_chttp2_transport(grpc_transport_setup_callback setup, size_t nslices, grpc_mdctx *metadata_context, int is_client); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H */ +#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H */ diff --git a/src/core/transport/transport.c b/src/core/transport/transport.c index 167970d992e..2f85a8557da 100644 --- a/src/core/transport/transport.c +++ b/src/core/transport/transport.c @@ -73,9 +73,8 @@ void grpc_transport_destroy_stream(grpc_transport *transport, transport->vtable->destroy_stream(transport, stream); } -void grpc_transport_ping(grpc_transport *transport, void (*cb)(void *user_data), - void *user_data) { - transport->vtable->ping(transport, cb, user_data); +void grpc_transport_ping(grpc_transport *transport, grpc_iomgr_closure *cb) { + transport->vtable->ping(transport, cb); } void grpc_transport_setup_cancel(grpc_transport_setup *setup) { diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 9d43581a0ac..0a5b31a60a8 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -164,11 +164,8 @@ void grpc_transport_perform_op(grpc_transport *transport, grpc_stream *stream, /* Send a ping on a transport - Calls cb with user data when a response is received. - cb *MAY* be called with arbitrary transport level locks held. It is not safe - to call into the transport during cb. */ -void grpc_transport_ping(grpc_transport *transport, void (*cb)(void *user_data), - void *user_data); + Calls cb with user data when a response is received. */ +void grpc_transport_ping(grpc_transport *transport, grpc_iomgr_closure *cb); /* Advise peer of pending connection termination. */ void grpc_transport_goaway(grpc_transport *transport, grpc_status_code status, diff --git a/src/core/transport/transport_impl.h b/src/core/transport/transport_impl.h index 479e15338f8..c51951b7a7c 100644 --- a/src/core/transport/transport_impl.h +++ b/src/core/transport/transport_impl.h @@ -63,8 +63,7 @@ typedef struct grpc_transport_vtable { void (*close)(grpc_transport *self); /* implementation of grpc_transport_ping */ - void (*ping)(grpc_transport *self, void (*cb)(void *user_data), - void *user_data); + void (*ping)(grpc_transport *self, grpc_iomgr_closure *cb); /* implementation of grpc_transport_destroy */ void (*destroy)(grpc_transport *self); From 5dc3b30964efc2dbfb8705e7ed2a380ea7145a5e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 15 Jun 2015 16:06:50 -0700 Subject: [PATCH 21/97] Progress on splitting things up --- BUILD | 6 + Makefile | 2 + build.json | 2 + src/core/transport/chttp2/hpack_parser.c | 3 +- src/core/transport/chttp2/incoming_metadata.c | 144 ++++++++ src/core/transport/chttp2/incoming_metadata.h | 61 ++++ src/core/transport/chttp2/internal.h | 55 ++- src/core/transport/chttp2/parsing.c | 127 ++----- src/core/transport/chttp2/stream_lists.c | 101 ++++++ src/core/transport/chttp2/writing.c | 4 - src/core/transport/chttp2_transport.c | 321 +++++++----------- tools/doxygen/Doxyfile.core.internal | 2 +- vsprojects/grpc/grpc.vcxproj | 4 + vsprojects/grpc/grpc.vcxproj.filters | 9 + .../grpc_unsecure/grpc_unsecure.vcxproj | 4 + .../grpc_unsecure.vcxproj.filters | 9 + 16 files changed, 541 insertions(+), 313 deletions(-) create mode 100644 src/core/transport/chttp2/incoming_metadata.c create mode 100644 src/core/transport/chttp2/incoming_metadata.h create mode 100644 src/core/transport/chttp2/stream_lists.c diff --git a/BUILD b/BUILD index 00d2ac24b83..c6593e1acbc 100644 --- a/BUILD +++ b/BUILD @@ -203,6 +203,7 @@ cc_library( "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", "src/core/transport/chttp2/frame_data.h", "src/core/transport/chttp2/frame_goaway.h", "src/core/transport/chttp2/frame_ping.h", @@ -213,6 +214,7 @@ cc_library( "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.h", "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", @@ -331,6 +333,7 @@ cc_library( "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/incoming_metadata.c", "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", @@ -428,6 +431,7 @@ cc_library( "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", "src/core/transport/chttp2/frame_data.h", "src/core/transport/chttp2/frame_goaway.h", "src/core/transport/chttp2/frame_ping.h", @@ -438,6 +442,7 @@ cc_library( "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.h", "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", @@ -534,6 +539,7 @@ cc_library( "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/incoming_metadata.c", "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", diff --git a/Makefile b/Makefile index ac6678053d4..7cbf86bcb43 100644 --- a/Makefile +++ b/Makefile @@ -3029,6 +3029,7 @@ LIBGRPC_SRC = \ src/core/transport/chttp2/hpack_parser.c \ src/core/transport/chttp2/hpack_table.c \ src/core/transport/chttp2/huffsyms.c \ + src/core/transport/chttp2/incoming_metadata.c \ src/core/transport/chttp2/parsing.c \ src/core/transport/chttp2/status_conversion.c \ src/core/transport/chttp2/stream_encoder.c \ @@ -3277,6 +3278,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/transport/chttp2/hpack_parser.c \ src/core/transport/chttp2/hpack_table.c \ src/core/transport/chttp2/huffsyms.c \ + src/core/transport/chttp2/incoming_metadata.c \ src/core/transport/chttp2/parsing.c \ src/core/transport/chttp2/status_conversion.c \ src/core/transport/chttp2/stream_encoder.c \ diff --git a/build.json b/build.json index 60b965c188f..ad7fa6c7f7e 100644 --- a/build.json +++ b/build.json @@ -176,6 +176,7 @@ "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.h", "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", @@ -272,6 +273,7 @@ "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/incoming_metadata.c", "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index 896d6c69d32..b4aa7af2c18 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -1392,7 +1392,8 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( return GRPC_CHTTP2_CONNECTION_ERROR; } if (parser->is_boundary) { - grpc_chttp2_parsing_add_metadata_batch(transport_parsing, stream_parsing); + grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( + &stream_parsing->incoming_metadata, &stream_parsing->data_parser.incoming_sopb); } if (parser->is_eof) { stream_parsing->received_close = 1; diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c new file mode 100644 index 00000000000..df799047156 --- /dev/null +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -0,0 +1,144 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/transport/chttp2/incoming_metadata.h" + +#include + +#include "src/core/transport/chttp2/internal.h" + +#include +#include + +void grpc_chttp2_incoming_metadata_buffer_init(grpc_chttp2_incoming_metadata_buffer *buffer) { + buffer->deadline = gpr_inf_future; +} + +void grpc_chttp2_incoming_metadata_buffer_add(grpc_chttp2_incoming_metadata_buffer *buffer, + grpc_mdelem *elem) { + if (buffer->capacity == buffer->count) { + buffer->capacity = + GPR_MAX(8, 2 * buffer->capacity); + buffer->elems = + gpr_realloc(buffer->elems, + sizeof(*buffer->elems) * + buffer->capacity); + } + buffer->elems[buffer->count++] + .md = elem; +} + +void grpc_chttp2_incoming_metadata_buffer_set_deadline(grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline) { + buffer->deadline = deadline; +} + +#if 0 +void grpc_chttp2_parsing_add_metadata_batch( + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing) { + grpc_metadata_batch b; + + b.list.head = NULL; + /* Store away the last element of the list, so that in patch_metadata_ops + we can reconstitute the list. + We can't do list building here as later incoming metadata may reallocate + the underlying array. */ + b.list.tail = (void *)(gpr_intptr)stream_parsing->incoming_metadata_count; + b.garbage.head = b.garbage.tail = NULL; + b.deadline = stream_parsing->incoming_deadline; + stream_parsing->incoming_deadline = gpr_inf_future; + + grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); +} +#endif + +#if 0 +static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, + grpc_chttp2_stream_parsing *stream_parsing) { + grpc_stream_op *ops = stream_global->incoming_sopb->ops; + size_t nops = stream_global->incoming_sopb->nops; + size_t i; + size_t j; + size_t mdidx = 0; + size_t last_mdidx; + int found_metadata = 0; + + /* rework the array of metadata into a linked list, making use + of the breadcrumbs we left in metadata batches during + add_metadata_batch */ + for (i = 0; i < nops; i++) { + grpc_stream_op *op = &ops[i]; + if (op->type != GRPC_OP_METADATA) continue; + found_metadata = 1; + /* we left a breadcrumb indicating where the end of this list is, + and since we add sequentially, we know from the end of the last + segment where this segment begins */ + last_mdidx = (size_t)(gpr_intptr)(op->data.metadata.list.tail); + GPR_ASSERT(last_mdidx > mdidx); + GPR_ASSERT(last_mdidx <= stream_parsing->incoming_metadata_count); + /* turn the array into a doubly linked list */ + op->data.metadata.list.head = &stream_parsing->incoming_metadata[mdidx]; + op->data.metadata.list.tail = + &stream_parsing->incoming_metadata[last_mdidx - 1]; + for (j = mdidx + 1; j < last_mdidx; j++) { + stream_parsing->incoming_metadata[j].prev = + &stream_parsing->incoming_metadata[j - 1]; + stream_parsing->incoming_metadata[j - 1].next = + &stream_parsing->incoming_metadata[j]; + } + stream_parsing->incoming_metadata[mdidx].prev = NULL; + stream_parsing->incoming_metadata[last_mdidx - 1].next = NULL; + /* track where we're up to */ + mdidx = last_mdidx; + } + if (found_metadata) { + stream_parsing->old_incoming_metadata = stream_parsing->incoming_metadata; + if (mdidx != stream_parsing->incoming_metadata_count) { + /* we have a partially read metadata batch still in incoming_metadata */ + size_t new_count = stream_parsing->incoming_metadata_count - mdidx; + size_t copy_bytes = + sizeof(*stream_parsing->incoming_metadata) * new_count; + GPR_ASSERT(mdidx < stream_parsing->incoming_metadata_count); + stream_parsing->incoming_metadata = gpr_malloc(copy_bytes); + memcpy(stream_parsing->old_incoming_metadata + mdidx, + stream_parsing->incoming_metadata, copy_bytes); + stream_parsing->incoming_metadata_count = + stream_parsing->incoming_metadata_capacity = new_count; + } else { + stream_parsing->incoming_metadata = NULL; + stream_parsing->incoming_metadata_count = 0; + stream_parsing->incoming_metadata_capacity = 0; + } + } +} +#endif diff --git a/src/core/transport/chttp2/incoming_metadata.h b/src/core/transport/chttp2/incoming_metadata.h new file mode 100644 index 00000000000..d93d7ba4065 --- /dev/null +++ b/src/core/transport/chttp2/incoming_metadata.h @@ -0,0 +1,61 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H +#define GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H + +#include "src/core/transport/transport.h" + +typedef struct { + grpc_linked_mdelem *elems; + size_t count; + size_t capacity; + gpr_timespec deadline; +} grpc_chttp2_incoming_metadata_buffer; + +/** assumes everything initially zeroed */ +void grpc_chttp2_incoming_metadata_buffer_init(grpc_chttp2_incoming_metadata_buffer *buffer); +void grpc_chttp2_incoming_metadata_buffer_destroy(grpc_chttp2_incoming_metadata_buffer *buffer); +void grpc_chttp2_incoming_metadata_buffer_reset(grpc_chttp2_incoming_metadata_buffer *buffer); + +void grpc_chttp2_incoming_metadata_buffer_add(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem *elem); +void grpc_chttp2_incoming_metadata_buffer_set_deadline(grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline); + +/** extend sopb with a metadata batch; this must be post-processed by + grpc_chttp2_incoming_metadata_buffer_postprocess_sopb before being handed + out of the transport */ +void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); + +void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); + +#endif /* GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H */ diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 5522337dfa4..9e8172a1f15 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -43,9 +43,10 @@ #include "src/core/transport/chttp2/frame_rst_stream.h" #include "src/core/transport/chttp2/frame_settings.h" #include "src/core/transport/chttp2/frame_window_update.h" -#include "src/core/transport/chttp2/stream_map.h" #include "src/core/transport/chttp2/hpack_parser.h" +#include "src/core/transport/chttp2/incoming_metadata.h" #include "src/core/transport/chttp2/stream_encoder.h" +#include "src/core/transport/chttp2/stream_map.h" typedef struct grpc_chttp2_transport grpc_chttp2_transport; typedef struct grpc_chttp2_stream grpc_chttp2_stream; @@ -53,6 +54,12 @@ typedef struct grpc_chttp2_stream grpc_chttp2_stream; /* streams are kept in various linked lists depending on what things need to happen to them... this enum labels each list */ typedef enum { + GRPC_CHTTP2_LIST_ALL_STREAMS, + GRPC_CHTTP2_LIST_WRITABLE, + /** streams that are waiting to start because there are too many concurrent + streams on the connection */ + GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY, +#if 0 /* streams that have pending writes */ WRITABLE = 0, /* streams that have been selected to be written */ @@ -74,6 +81,7 @@ typedef enum { PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE, NEW_OUTGOING_WINDOW, +#endif STREAM_LIST_COUNT /* must be last */ } grpc_chttp2_stream_list_id; @@ -404,6 +412,10 @@ typedef struct { grpc_chttp2_write_state write_state; /** is this stream closed (boolean) */ gpr_uint8 read_closed; + /** has this stream been cancelled? (boolean) */ + gpr_uint8 cancelled; + /** is this stream in the stream map? (boolean) */ + gpr_uint8 in_stream_map; /** stream state already published to the upper layer */ grpc_stream_state published_state; @@ -411,6 +423,9 @@ typedef struct { grpc_stream_state *publish_state; /** pointer to sop buffer to fill in with new stream ops */ grpc_stream_op_buffer *incoming_sopb; + + /** incoming metadata */ + grpc_chttp2_incoming_metadata_buffer incoming_metadata; } grpc_chttp2_stream_global; typedef struct { @@ -427,8 +442,6 @@ struct grpc_chttp2_stream_parsing { gpr_uint32 id; /** has this stream received a close */ gpr_uint8 received_close; - /** saw an error on this stream during parsing (it should be cancelled) */ - gpr_uint8 saw_error; /** saw a rst_stream */ gpr_uint8 saw_rst_stream; /** incoming_window has been reduced by this much during parsing */ @@ -442,12 +455,16 @@ struct grpc_chttp2_stream_parsing { /* amount of window given */ gpr_uint64 outgoing_window_update; - /* incoming metadata */ + /** incoming metadata */ + grpc_chttp2_incoming_metadata_buffer incoming_metadata; + +/* grpc_linked_mdelem *incoming_metadata; size_t incoming_metadata_count; size_t incoming_metadata_capacity; grpc_linked_mdelem *old_incoming_metadata; gpr_timespec incoming_deadline; +*/ }; struct grpc_chttp2_stream { @@ -542,28 +559,44 @@ int grpc_chttp2_list_pop_parsing_seen_stream( grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_parsing **stream_parsing); +void grpc_chttp2_list_add_waiting_for_concurrency( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); +int grpc_chttp2_list_pop_waiting_for_concurrency( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global); + +void grpc_chttp2_list_add_cancelled_waiting_for_parsing( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); +int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global); + void grpc_chttp2_schedule_closure( grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success); void grpc_chttp2_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +void grpc_chttp2_incoming_window_state_changed( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); -void grpc_chttp2_parsing_add_metadata_batch( - grpc_chttp2_transport_parsing *transport_parsing, - grpc_chttp2_stream_parsing *stream_parsing); - void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, gpr_slice goaway_text); -#define GRPC_CHTTP2_FLOW_CTL_TRACE(a, b, c, d, e) \ - do { \ - } while (0) +void grpc_chttp2_remove_from_stream_map(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); + +void grpc_chttp2_for_all_streams(grpc_chttp2_transport_global *transport_global, void *user_data, void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)); + +void grpc_chttp2_flowctl_trace(grpc_chttp2_transport *t, const char *flow, + gpr_int32 window, gpr_uint32 id, gpr_int32 delta); #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 15124c70017..666dd1a603e 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -35,6 +35,7 @@ #include +#include "src/core/transport/chttp2/http2_errors.h" #include "src/core/transport/chttp2/timeout_encoding.h" #include @@ -155,6 +156,16 @@ void grpc_chttp2_publish_reads( grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } } + + /* updating closed status */ + if (stream_parsing->received_close) { + stream_global->read_closed = 1; + grpc_chttp2_read_write_state_changed(transport_global, stream_global); + } + if (stream_parsing->saw_rst_stream) { + stream_global->cancelled = 1; + grpc_chttp2_read_write_state_changed(transport_global, stream_global); + } } } @@ -437,11 +448,6 @@ static grpc_chttp2_parse_error update_incoming_window( return GRPC_CHTTP2_CONNECTION_ERROR; } - GRPC_CHTTP2_FLOW_CTL_TRACE( - t, t, incoming, 0, -(gpr_int64)transport_parsing->incoming_frame_size); - GRPC_CHTTP2_FLOW_CTL_TRACE( - t, s, incoming, s->global.id, - -(gpr_int64)transport_parsing->incoming_frame_size); transport_parsing->incoming_window -= transport_parsing->incoming_frame_size; stream_parsing->incoming_window -= transport_parsing->incoming_frame_size; stream_parsing->incoming_window_delta += @@ -474,7 +480,12 @@ static int init_data_frame_parser( return 1; case GRPC_CHTTP2_STREAM_ERROR: stream_parsing->received_close = 1; - stream_parsing->saw_error = 1; + stream_parsing->saw_rst_stream = 1; + stream_parsing->rst_stream_reason = GRPC_CHTTP2_PROTOCOL_ERROR; + gpr_slice_buffer_add(&transport_parsing->qbuf, + grpc_chttp2_rst_stream_create( + transport_parsing->incoming_stream_id, + GRPC_CHTTP2_PROTOCOL_ERROR)); return init_skip_frame_parser(transport_parsing, 0); case GRPC_CHTTP2_CONNECTION_ERROR: return 0; @@ -486,21 +497,6 @@ static int init_data_frame_parser( static void free_timeout(void *p) { gpr_free(p); } -static void add_incoming_metadata(grpc_chttp2_stream_parsing *stream_parsing, - grpc_mdelem *elem) { - if (stream_parsing->incoming_metadata_capacity == - stream_parsing->incoming_metadata_count) { - stream_parsing->incoming_metadata_capacity = - GPR_MAX(8, 2 * stream_parsing->incoming_metadata_capacity); - stream_parsing->incoming_metadata = - gpr_realloc(stream_parsing->incoming_metadata, - sizeof(*stream_parsing->incoming_metadata) * - stream_parsing->incoming_metadata_capacity); - } - stream_parsing->incoming_metadata[stream_parsing->incoming_metadata_count++] - .md = elem; -} - static void on_header(void *tp, grpc_mdelem *md) { grpc_chttp2_transport_parsing *transport_parsing = tp; grpc_chttp2_stream_parsing *stream_parsing = @@ -526,11 +522,10 @@ static void on_header(void *tp, grpc_mdelem *md) { } grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); } - stream_parsing->incoming_deadline = - gpr_time_add(gpr_now(), *cached_timeout); + grpc_chttp2_incoming_metadata_buffer_set_deadline(&stream_parsing->incoming_metadata, gpr_time_add(gpr_now(), *cached_timeout)); grpc_mdelem_unref(md); } else { - add_incoming_metadata(stream_parsing, md); + grpc_chttp2_incoming_metadata_buffer_add(&stream_parsing->incoming_metadata, md); } grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); @@ -694,83 +689,6 @@ static int is_window_update_legal(gpr_int64 window_update, gpr_int64 window) { } */ -void grpc_chttp2_parsing_add_metadata_batch( - grpc_chttp2_transport_parsing *transport_parsing, - grpc_chttp2_stream_parsing *stream_parsing) { - grpc_metadata_batch b; - - b.list.head = NULL; - /* Store away the last element of the list, so that in patch_metadata_ops - we can reconstitute the list. - We can't do list building here as later incoming metadata may reallocate - the underlying array. */ - b.list.tail = (void *)(gpr_intptr)stream_parsing->incoming_metadata_count; - b.garbage.head = b.garbage.tail = NULL; - b.deadline = stream_parsing->incoming_deadline; - stream_parsing->incoming_deadline = gpr_inf_future; - - grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); -} - -static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, - grpc_chttp2_stream_parsing *stream_parsing) { - grpc_stream_op *ops = stream_global->incoming_sopb->ops; - size_t nops = stream_global->incoming_sopb->nops; - size_t i; - size_t j; - size_t mdidx = 0; - size_t last_mdidx; - int found_metadata = 0; - - /* rework the array of metadata into a linked list, making use - of the breadcrumbs we left in metadata batches during - add_metadata_batch */ - for (i = 0; i < nops; i++) { - grpc_stream_op *op = &ops[i]; - if (op->type != GRPC_OP_METADATA) continue; - found_metadata = 1; - /* we left a breadcrumb indicating where the end of this list is, - and since we add sequentially, we know from the end of the last - segment where this segment begins */ - last_mdidx = (size_t)(gpr_intptr)(op->data.metadata.list.tail); - GPR_ASSERT(last_mdidx > mdidx); - GPR_ASSERT(last_mdidx <= stream_parsing->incoming_metadata_count); - /* turn the array into a doubly linked list */ - op->data.metadata.list.head = &stream_parsing->incoming_metadata[mdidx]; - op->data.metadata.list.tail = - &stream_parsing->incoming_metadata[last_mdidx - 1]; - for (j = mdidx + 1; j < last_mdidx; j++) { - stream_parsing->incoming_metadata[j].prev = - &stream_parsing->incoming_metadata[j - 1]; - stream_parsing->incoming_metadata[j - 1].next = - &stream_parsing->incoming_metadata[j]; - } - stream_parsing->incoming_metadata[mdidx].prev = NULL; - stream_parsing->incoming_metadata[last_mdidx - 1].next = NULL; - /* track where we're up to */ - mdidx = last_mdidx; - } - if (found_metadata) { - stream_parsing->old_incoming_metadata = stream_parsing->incoming_metadata; - if (mdidx != stream_parsing->incoming_metadata_count) { - /* we have a partially read metadata batch still in incoming_metadata */ - size_t new_count = stream_parsing->incoming_metadata_count - mdidx; - size_t copy_bytes = - sizeof(*stream_parsing->incoming_metadata) * new_count; - GPR_ASSERT(mdidx < stream_parsing->incoming_metadata_count); - stream_parsing->incoming_metadata = gpr_malloc(copy_bytes); - memcpy(stream_parsing->old_incoming_metadata + mdidx, - stream_parsing->incoming_metadata, copy_bytes); - stream_parsing->incoming_metadata_count = - stream_parsing->incoming_metadata_capacity = new_count; - } else { - stream_parsing->incoming_metadata = NULL; - stream_parsing->incoming_metadata_count = 0; - stream_parsing->incoming_metadata_capacity = 0; - } - } -} - static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last) { grpc_chttp2_stream_parsing *stream_parsing = @@ -787,7 +705,12 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, case GRPC_CHTTP2_STREAM_ERROR: become_skip_parser(transport_parsing); if (stream_parsing) { - stream_parsing->saw_error = 1; + stream_parsing->saw_rst_stream = 1; + stream_parsing->rst_stream_reason = GRPC_CHTTP2_PROTOCOL_ERROR; + gpr_slice_buffer_add(&transport_parsing->qbuf, + grpc_chttp2_rst_stream_create( + transport_parsing->incoming_stream_id, + GRPC_CHTTP2_PROTOCOL_ERROR)); } return 1; case GRPC_CHTTP2_CONNECTION_ERROR: diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c new file mode 100644 index 00000000000..180a4de240f --- /dev/null +++ b/src/core/transport/chttp2/stream_lists.c @@ -0,0 +1,101 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* core list management */ + +static int stream_list_empty(grpc_chttp2_transport *t, + grpc_chttp2_stream_list_id id) { + return t->lists[id].head == NULL; +} + +static grpc_chttp2_stream *stream_list_remove_head( + grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { + grpc_chttp2_stream *s = t->lists[id].head; + if (s) { + grpc_chttp2_stream *new_head = s->links[id].next; + GPR_ASSERT(s->included[id]); + if (new_head) { + t->lists[id].head = new_head; + new_head->links[id].prev = NULL; + } else { + t->lists[id].head = NULL; + t->lists[id].tail = NULL; + } + s->included[id] = 0; + } + return s; +} + +static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { + if (!s->included[id]) return; + s->included[id] = 0; + if (s->links[id].prev) { + s->links[id].prev->links[id].next = s->links[id].next; + } else { + GPR_ASSERT(t->lists[id].head == s); + t->lists[id].head = s->links[id].next; + } + if (s->links[id].next) { + s->links[id].next->links[id].prev = s->links[id].prev; + } else { + t->lists[id].tail = s->links[id].prev; + } +} + +static void stream_list_add_tail(grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { + grpc_chttp2_stream *old_tail; + GPR_ASSERT(!s->included[id]); + old_tail = t->lists[id].tail; + s->links[id].next = NULL; + s->links[id].prev = old_tail; + if (old_tail) { + old_tail->links[id].next = s; + } else { + s->links[id].prev = NULL; + t->lists[id].head = s; + } + t->lists[id].tail = s; + s->included[id] = 1; +} + +static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { + if (s->included[id]) { + return; + } + stream_list_add_tail(t, s, id); +} + diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index a960e3c6a89..9e3d9b2c160 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -77,8 +77,6 @@ int grpc_chttp2_unlocking_check_writes( GPR_MIN(transport_global->outgoing_window, stream_global->outgoing_window), &stream_writing->sopb); - GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, outgoing, 0, -(gpr_int64)window_delta); - GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, outgoing, s->id, -(gpr_int64)window_delta); transport_global->outgoing_window -= window_delta; stream_global->outgoing_window -= window_delta; @@ -117,7 +115,6 @@ int grpc_chttp2_unlocking_check_writes( gpr_slice_buffer_add( &transport_writing->outbuf, grpc_chttp2_window_update_create(stream_global->id, window_delta)); - GRPC_CHTTP2_FLOW_CTL_TRACE(t, s, incoming, s->id, window_delta); stream_global->incoming_window += window_delta; } } @@ -130,7 +127,6 @@ int grpc_chttp2_unlocking_check_writes( transport_global->incoming_window; gpr_slice_buffer_add(&transport_writing->outbuf, grpc_chttp2_window_update_create(0, window_delta)); - GRPC_CHTTP2_FLOW_CTL_TRACE(t, t, incoming, 0, window_delta); transport_global->incoming_window += window_delta; } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 3718eed4dd6..214b097d64a 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -58,21 +58,26 @@ int grpc_http_trace = 0; int grpc_flowctl_trace = 0; -#define FLOWCTL_TRACE(t, obj, dir, id, delta) \ - if (!grpc_flowctl_trace) \ - ; \ - else \ - flowctl_trace(t, #dir, obj->dir##_window, id, delta) - #define TRANSPORT_FROM_WRITING(tw) \ ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ writing))) +#define TRANSPORT_FROM_GLOBAL(tg) \ + ((grpc_chttp2_transport *)((char *)(tg)-offsetof(grpc_chttp2_transport, \ + global))) + +#define STREAM_FROM_GLOBAL(sg) \ + ((grpc_chttp2_stream *)((char *)(sg)-offsetof(grpc_chttp2_stream, \ + global))) + static const grpc_transport_vtable vtable; static void lock(grpc_chttp2_transport *t); static void unlock(grpc_chttp2_transport *t); +static void unlock_check_cancellations(grpc_chttp2_transport *t); +static void unlock_check_channel_callbacks(grpc_chttp2_transport *t); + /* forward declarations of various callbacks that we'll build closures around */ static void writing_action(void *t, int iomgr_success_ignored); static void notify_closed(void *t, int iomgr_success_ignored); @@ -88,27 +93,27 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, /** Start disconnection chain */ static void drop_connection(grpc_chttp2_transport *t); -/* basic stream list management */ -static grpc_chttp2_stream *stream_list_remove_head( - grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id); -static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id); -static void stream_list_add_tail(grpc_chttp2_transport *t, - grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id); -static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id); - -/** schedule a closure to be called outside of the transport lock after the next +/** Schedule a closure to be called outside of the transport lock after the next unlock() operation */ -static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, +static void schedule_cb(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success); +/** Perform a transport_op */ +static void perform_op_locked(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_transport_op *op); + +/** Cancel a stream: coming from the transport API */ +static void cancel_from_api( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, + grpc_status_code status); + +/** Add endpoint from this transport to pollset */ +static void add_to_pollset_locked(grpc_chttp2_transport *t, + grpc_pollset *pollset); + #if 0 -static void unlock_check_cancellations(grpc_chttp2_transport *t); static void unlock_check_parser(grpc_chttp2_transport *t); -static void unlock_check_channel_callbacks(grpc_chttp2_transport *t); static void end_all_the_calls(grpc_chttp2_transport *t); @@ -131,10 +136,6 @@ static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, int is_parser); static void maybe_join_window_updates(grpc_chttp2_transport *t, grpc_chttp2_stream *s); -static void add_to_pollset_locked(grpc_chttp2_transport *t, - grpc_pollset *pollset); -static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_transport_op *op); static void add_metadata_batch(grpc_chttp2_transport *t, grpc_chttp2_stream *s); #endif @@ -375,7 +376,8 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, memset(s, 0, sizeof(*s)); - s->parsing.incoming_deadline = gpr_inf_future; + grpc_chttp2_incoming_metadata_buffer_init(&s->parsing.incoming_metadata); + grpc_chttp2_incoming_metadata_buffer_init(&s->global.incoming_metadata); grpc_sopb_init(&s->writing.sopb); grpc_chttp2_data_parser_init(&s->parsing.data_parser); @@ -395,7 +397,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); } - if (initial_op) perform_op_locked(t, s, initial_op); + if (initial_op) perform_op_locked(&t->global, &s->global, initial_op); unlock(t); return 0; @@ -404,102 +406,24 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; - size_t i; gpr_mu_lock(&t->mu); GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || s->global.id == 0); - for (i = 0; i < STREAM_LIST_COUNT; i++) { - stream_list_remove(t, s, i); - } - gpr_mu_unlock(&t->mu); GPR_ASSERT(s->global.outgoing_sopb == NULL); GPR_ASSERT(s->global.incoming_sopb == NULL); grpc_sopb_destroy(&s->writing.sopb); grpc_chttp2_data_parser_destroy(&s->parsing.data_parser); - for (i = 0; i < s->parsing.incoming_metadata_count; i++) { - grpc_mdelem_unref(s->parsing.incoming_metadata[i].md); - } - gpr_free(s->parsing.incoming_metadata); - gpr_free(s->parsing.old_incoming_metadata); + grpc_chttp2_incoming_metadata_buffer_destroy(&s->parsing.incoming_metadata); + grpc_chttp2_incoming_metadata_buffer_destroy(&s->global.incoming_metadata); unref_transport(t); } -/* - * LIST MANAGEMENT - */ - -static int stream_list_empty(grpc_chttp2_transport *t, - grpc_chttp2_stream_list_id id) { - return t->lists[id].head == NULL; -} - -static grpc_chttp2_stream *stream_list_remove_head( - grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { - grpc_chttp2_stream *s = t->lists[id].head; - if (s) { - grpc_chttp2_stream *new_head = s->links[id].next; - GPR_ASSERT(s->included[id]); - if (new_head) { - t->lists[id].head = new_head; - new_head->links[id].prev = NULL; - } else { - t->lists[id].head = NULL; - t->lists[id].tail = NULL; - } - s->included[id] = 0; - } - return s; -} - -static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id) { - if (!s->included[id]) return; - s->included[id] = 0; - if (s->links[id].prev) { - s->links[id].prev->links[id].next = s->links[id].next; - } else { - GPR_ASSERT(t->lists[id].head == s); - t->lists[id].head = s->links[id].next; - } - if (s->links[id].next) { - s->links[id].next->links[id].prev = s->links[id].prev; - } else { - t->lists[id].tail = s->links[id].prev; - } -} - -static void stream_list_add_tail(grpc_chttp2_transport *t, - grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id) { - grpc_chttp2_stream *old_tail; - GPR_ASSERT(!s->included[id]); - old_tail = t->lists[id].tail; - s->links[id].next = NULL; - s->links[id].prev = old_tail; - if (old_tail) { - old_tail->links[id].next = s; - } else { - s->links[id].prev = NULL; - t->lists[id].head = s; - } - t->lists[id].tail = s; - s->included[id] = 1; -} - -static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id) { - if (s->included[id]) { - return; - } - stream_list_add_tail(t, s, id); -} - #if 0 static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (s->global.id == 0) return; @@ -530,11 +454,11 @@ static void unlock(grpc_chttp2_transport *t) { grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { t->writing_active = 1; ref_transport(t); - schedule_cb(t, &t->writing_action, 1); + schedule_cb(&t->global, &t->writing_action, 1); } - /* unlock_check_cancellations(t); */ + unlock_check_cancellations(t); /* unlock_check_parser(t); */ - /* unlock_check_channel_callbacks(t); */ + unlock_check_channel_callbacks(t); run_closures = t->global.pending_closures; t->global.pending_closures = NULL; @@ -610,102 +534,96 @@ void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_glo } } -static void maybe_start_some_streams(grpc_chttp2_transport *t) { - grpc_chttp2_stream *s; +static void maybe_start_some_streams(grpc_chttp2_transport_global *transport_global) { + grpc_chttp2_stream_global *stream_global; /* start streams where we have free grpc_chttp2_stream ids and free * concurrency */ - while (t->global.next_stream_id <= MAX_CLIENT_STREAM_ID && - t->global.concurrent_stream_count < - t->global.settings[PEER_SETTINGS] + while (transport_global->next_stream_id <= MAX_CLIENT_STREAM_ID && + transport_global->concurrent_stream_count < + transport_global->settings[PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && - (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { + grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { IF_TRACING(gpr_log( GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", - t->global.is_client ? "CLI" : "SVR", s, t->global.next_stream_id)); + transport_global->is_client ? "CLI" : "SVR", stream_global, transport_global->next_stream_id)); - if (t->global.next_stream_id == MAX_CLIENT_STREAM_ID) { + if (transport_global->next_stream_id == MAX_CLIENT_STREAM_ID) { grpc_chttp2_add_incoming_goaway( - &t->global, GRPC_CHTTP2_NO_ERROR, + transport_global, GRPC_CHTTP2_NO_ERROR, gpr_slice_from_copied_string("Exceeded sequence number limit")); } - GPR_ASSERT(s->global.id == 0); - s->global.id = t->global.next_stream_id; - t->global.next_stream_id += 2; - s->global.outgoing_window = - t->global - .settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - s->global.incoming_window = - t->global - .settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); - t->global.concurrent_stream_count++; - stream_list_join(t, s, WRITABLE); + GPR_ASSERT(stream_global->id == 0); + stream_global->id = transport_global->next_stream_id; + transport_global->next_stream_id += 2; + stream_global->outgoing_window = + transport_global + ->settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + stream_global->incoming_window = + transport_global-> + settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + grpc_chttp2_stream_map_add(&TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map, stream_global->id, STREAM_FROM_GLOBAL(stream_global)); + transport_global->concurrent_stream_count++; + grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } /* cancel out streams that will never be started */ - while (t->global.next_stream_id > MAX_CLIENT_STREAM_ID && - (s = stream_list_remove_head(t, WAITING_FOR_CONCURRENCY))) { - cancel_stream( - t, s, GRPC_STATUS_UNAVAILABLE, - grpc_chttp2_grpc_status_to_http2_error(GRPC_STATUS_UNAVAILABLE), NULL, - 0); + while (transport_global->next_stream_id > MAX_CLIENT_STREAM_ID && + grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { + cancel_from_api(transport_global, stream_global, GRPC_STATUS_UNAVAILABLE); } } -#if 0 -static void perform_op_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_transport_op *op) { +static void perform_op_locked(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_transport_op *op) { if (op->cancel_with_status != GRPC_STATUS_OK) { - cancel_stream( - t, s, op->cancel_with_status, - grpc_chttp2_grpc_status_to_http2_error(op->cancel_with_status), - op->cancel_message, 1); + cancel_from_api(transport_global, stream_global, op->cancel_with_status); } if (op->send_ops) { - GPR_ASSERT(s->global.outgoing_sopb == NULL); - s->global.send_done_closure = op->on_done_send; - if (!s->cancelled) { - s->global.outgoing_sopb = op->send_ops; - if (op->is_last_send && s->global.write_state == WRITE_STATE_OPEN) { - s->global.write_state = WRITE_STATE_QUEUED_CLOSE; + GPR_ASSERT(stream_global->outgoing_sopb == NULL); + stream_global->send_done_closure = op->on_done_send; + if (!stream_global->cancelled) { + stream_global->outgoing_sopb = op->send_ops; + if (op->is_last_send && stream_global->write_state == WRITE_STATE_OPEN) { + stream_global->write_state = WRITE_STATE_QUEUED_CLOSE; } - if (s->global.id == 0) { + if (stream_global->id == 0) { IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: New grpc_chttp2_stream %p waiting for concurrency", - t->global.is_client ? "CLI" : "SVR", s)); - stream_list_join(t, s, WAITING_FOR_CONCURRENCY); - maybe_start_some_streams(t); - } else if (s->global.outgoing_window > 0) { - stream_list_join(t, s, WRITABLE); + transport_global->is_client ? "CLI" : "SVR", stream_global)); + grpc_chttp2_list_add_waiting_for_concurrency( + transport_global, stream_global + ); + maybe_start_some_streams(transport_global); + } else if (stream_global->outgoing_window > 0) { + grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } } else { grpc_sopb_reset(op->send_ops); - schedule_cb(t, s->global.send_done_closure, 0); + schedule_cb(transport_global, stream_global->send_done_closure, 0); } } if (op->recv_ops) { - GPR_ASSERT(s->global.incoming_sopb == NULL); - GPR_ASSERT(s->global.published_state != GRPC_STREAM_CLOSED); - s->global.recv_done_closure = op->on_done_recv; - s->global.incoming_sopb = op->recv_ops; - s->global.incoming_sopb->nops = 0; - s->global.publish_state = op->recv_state; - gpr_free(s->global.old_incoming_metadata); - s->global.old_incoming_metadata = NULL; - maybe_finish_read(t, s, 0); - maybe_join_window_updates(t, s); + GPR_ASSERT(stream_global->incoming_sopb == NULL); + GPR_ASSERT(stream_global->published_state != GRPC_STREAM_CLOSED); + stream_global->recv_done_closure = op->on_done_recv; + stream_global->incoming_sopb = op->recv_ops; + stream_global->incoming_sopb->nops = 0; + stream_global->publish_state = op->recv_state; + gpr_free(stream_global->old_incoming_metadata); + stream_global->old_incoming_metadata = NULL; + grpc_chttp2_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_incoming_window_state_changed(transport_global, stream_global); } if (op->bind_pollset) { - add_to_pollset_locked(t, op->bind_pollset); + add_to_pollset_locked(TRANSPORT_FROM_GLOBAL(transport_global), op->bind_pollset); } if (op->on_consumed) { - schedule_cb(t, op->on_consumed, 1); + schedule_cb(transport_global, op->on_consumed, 1); } } -#endif static void perform_op(grpc_transport *gt, grpc_stream *gs, grpc_transport_op *op) { @@ -713,7 +631,7 @@ static void perform_op(grpc_transport *gt, grpc_stream *gs, grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; lock(t); - perform_op_locked(t, s, op); + perform_op_locked(&t->global, &s->global, op); unlock(t); } @@ -743,6 +661,22 @@ static void send_ping(grpc_transport *gt, grpc_iomgr_closure *on_recv) { */ static void unlock_check_cancellations(grpc_chttp2_transport *t) { + grpc_chttp2_transport_global *transport_global = &t->global; + grpc_chttp2_stream_global *stream_global; + + /* if a stream is in the stream map, and gets cancelled, we need to ensure + we are not parsing before continuing the cancellation to keep things in + a sane state */ + if (!t->parsing_active) { + while (grpc_chttp2_list_pop_cancelled_waiting_for_parsing(transport_global, &stream_global)) { + GPR_ASSERT(stream_global->in_stream_map); + grpc_chttp2_stream_map_delete(&t->parsing_stream_map, stream_global->id); + stream_global->in_stream_map = 0; + grpc_chttp2_read_write_state_changed(transport_global, stream_global); + } + } + +#if 0 grpc_chttp2_stream *s; if (t->writing_active) { @@ -754,6 +688,7 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { s->global.write_state = WRITE_STATE_SENT_CLOSE; grpc_chttp2_read_write_state_changed(&t->global, &s->global); } +#endif } #if 0 @@ -839,16 +774,15 @@ static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, cancel_stream_inner(t, s, s->global.id, local_status, error_code, optional_message, send_rst, 0); } +#endif -static void cancel_stream_cb(void *user_data, gpr_uint32 id, void *grpc_chttp2_stream) { - cancel_stream(user_data, grpc_chttp2_stream, GRPC_STATUS_UNAVAILABLE, - GRPC_CHTTP2_INTERNAL_ERROR, NULL, 0); +static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global) { + cancel_from_api(transport_global, stream_global, GRPC_STATUS_UNAVAILABLE); } static void end_all_the_calls(grpc_chttp2_transport *t) { - grpc_chttp2_stream_map_for_each(&t->stream_map, cancel_stream_cb, t); + grpc_chttp2_for_all_streams(&t->global, NULL, cancel_stream_cb); } -#endif static void drop_connection(grpc_chttp2_transport *t) { if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { @@ -892,7 +826,6 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { grpc_chttp2_transport *t = tp; size_t i; - int keep_reading = 0; switch (error) { case GRPC_ENDPOINT_CB_SHUTDOWN: @@ -908,18 +841,21 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, } unlock(t); unref_transport(t); + for (i = 0; i < nslices; i++) gpr_slice_unref(slices[i]); break; case GRPC_ENDPOINT_CB_OK: lock(t); + i = 0; GPR_ASSERT(!t->parsing_active); if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { t->parsing_active = 1; grpc_chttp2_prepare_to_read(&t->global, &t->parsing); gpr_mu_unlock(&t->mu); - for (i = 0; + for (; i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); - i++) - ; + i++) { + gpr_slice_unref(slices[i]); + } gpr_mu_lock(&t->mu); if (i != nslices) { drop_connection(t); @@ -927,13 +863,13 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, /* merge stream lists */ grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); - t->global.concurrent_stream_count = - grpc_chttp2_stream_map_size(&t->parsing_stream_map); /* handle higher level things */ grpc_chttp2_publish_reads(&t->global, &t->parsing); + t->global.concurrent_stream_count = + grpc_chttp2_stream_map_size(&t->parsing_stream_map); t->parsing_active = 0; } -#if 0 +#if 0 while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { maybe_finish_read(t, s, 0); } @@ -959,16 +895,13 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, t->global.outgoing_window_update = 0; maybe_start_some_streams(t); #endif + if (i == nslices) { + grpc_endpoint_notify_on_read(t->ep, recv_data, t); + } unlock(t); - keep_reading = 1; + for (; i < nslices; i++) gpr_slice_unref(slices[i]); break; } - - for (i = 0; i < nslices; i++) gpr_slice_unref(slices[i]); - - if (keep_reading) { - grpc_endpoint_notify_on_read(t->ep, recv_data, t); - } } /* @@ -1031,7 +964,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { t->channel_callback.executing = 1; grpc_iomgr_closure_init(&a->closure, notify_goaways, a); ref_transport(t); - schedule_cb(t, &a->closure, 1); + schedule_cb(&t->global, &a->closure, 1); return; } else if (t->global.goaway_state != GRPC_CHTTP2_ERROR_STATE_NOTIFIED) { return; @@ -1041,15 +974,15 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { t->global.error_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; t->channel_callback.executing = 1; ref_transport(t); - schedule_cb(t, &t->channel_callback.notify_closed, 1); + schedule_cb(&t->global, &t->channel_callback.notify_closed, 1); } } -static void schedule_cb(grpc_chttp2_transport *t, grpc_iomgr_closure *closure, +static void schedule_cb(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success) { closure->success = success; - closure->next = t->global.pending_closures; - t->global.pending_closures = closure; + closure->next = transport_global->pending_closures; + transport_global->pending_closures = closure; } /* diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 0b8635de702..0b8c44894cd 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -760,7 +760,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/parsing.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2/writing.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c +INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/incoming_metadata.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/incoming_metadata.c src/core/transport/chttp2/parsing.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2/writing.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj index 2bf381f5b0f..757d14bedcc 100644 --- a/vsprojects/grpc/grpc.vcxproj +++ b/vsprojects/grpc/grpc.vcxproj @@ -231,6 +231,7 @@ + @@ -241,6 +242,7 @@ + @@ -467,6 +469,8 @@ + + diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters index 30efa781616..8a33cad51e3 100644 --- a/vsprojects/grpc/grpc.vcxproj.filters +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -319,6 +319,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 @@ -611,6 +614,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 @@ -641,6 +647,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj index 5e91c86167b..4075c63327d 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -213,6 +213,7 @@ + @@ -223,6 +224,7 @@ + @@ -405,6 +407,8 @@ + + diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters index c8a46467502..475b52d2de9 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -253,6 +253,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 @@ -494,6 +497,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 @@ -524,6 +530,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 From b787c50dec489c86a3b3d1aa472af05ff6604641 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 15 Jun 2015 16:14:52 -0700 Subject: [PATCH 22/97] Compiles with the breakup --- src/core/transport/chttp2/incoming_metadata.h | 9 ++++++- src/core/transport/chttp2/internal.h | 1 + src/core/transport/chttp2_transport.c | 26 ++++++++++++------- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/core/transport/chttp2/incoming_metadata.h b/src/core/transport/chttp2/incoming_metadata.h index d93d7ba4065..d2b08943d41 100644 --- a/src/core/transport/chttp2/incoming_metadata.h +++ b/src/core/transport/chttp2/incoming_metadata.h @@ -43,6 +43,10 @@ typedef struct { gpr_timespec deadline; } grpc_chttp2_incoming_metadata_buffer; +typedef struct { + grpc_linked_mdelem *elems; +} grpc_chttp2_incoming_metadata_live_op_buffer; + /** assumes everything initially zeroed */ void grpc_chttp2_incoming_metadata_buffer_init(grpc_chttp2_incoming_metadata_buffer *buffer); void grpc_chttp2_incoming_metadata_buffer_destroy(grpc_chttp2_incoming_metadata_buffer *buffer); @@ -56,6 +60,9 @@ void grpc_chttp2_incoming_metadata_buffer_set_deadline(grpc_chttp2_incoming_meta out of the transport */ void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); -void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); +void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( + grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer); + +void grpc_chttp2_incoming_metadata_live_op_buffer_end(grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer); #endif /* GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H */ diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 9e8172a1f15..1eed3b9c8d1 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -426,6 +426,7 @@ typedef struct { /** incoming metadata */ grpc_chttp2_incoming_metadata_buffer incoming_metadata; + grpc_chttp2_incoming_metadata_live_op_buffer outstanding_metadata; } grpc_chttp2_stream_global; typedef struct { diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 214b097d64a..6119a4723e8 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -139,12 +139,6 @@ static void maybe_join_window_updates(grpc_chttp2_transport *t, static void add_metadata_batch(grpc_chttp2_transport *t, grpc_chttp2_stream *s); #endif -static void flowctl_trace(grpc_chttp2_transport *t, const char *flow, - gpr_int32 window, gpr_uint32 id, gpr_int32 delta) { - gpr_log(GPR_DEBUG, "HTTP:FLOW:%p:%d:%s: %d + %d = %d", t, id, flow, window, - delta, window + delta); -} - /* * CONSTRUCTION/DESTRUCTION/REFCOUNTING */ @@ -609,9 +603,7 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, gr stream_global->recv_done_closure = op->on_done_recv; stream_global->incoming_sopb = op->recv_ops; stream_global->incoming_sopb->nops = 0; - stream_global->publish_state = op->recv_state; - gpr_free(stream_global->old_incoming_metadata); - stream_global->old_incoming_metadata = NULL; + grpc_chttp2_incoming_metadata_live_op_buffer_end(&stream_global->outstanding_metadata); grpc_chttp2_read_write_state_changed(transport_global, stream_global); grpc_chttp2_incoming_window_state_changed(transport_global, stream_global); } @@ -691,6 +683,20 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { #endif } +static void cancel_from_api( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, + grpc_status_code status) { + stream_global->cancelled = 1; + if (stream_global->in_stream_map) { + gpr_slice_buffer_add(&transport_global->qbuf, + grpc_chttp2_rst_stream_create(stream_global->id, + grpc_chttp2_grpc_status_to_http2_status(status))); + } else { + grpc_chttp2_read_write_state_changed(transport_global, stream_global); + } +} + #if 0 static void cancel_stream_inner(grpc_chttp2_transport *t, grpc_chttp2_stream *s, gpr_uint32 id, grpc_status_code local_status, @@ -908,6 +914,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, * CALLBACK LOOP */ +#if 0 static grpc_stream_state compute_state(gpr_uint8 write_closed, gpr_uint8 read_closed) { if (write_closed && read_closed) return GRPC_STREAM_CLOSED; @@ -915,6 +922,7 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, if (read_closed) return GRPC_STREAM_RECV_CLOSED; return GRPC_STREAM_OPEN; } +#endif typedef struct { grpc_chttp2_transport *t; From 6459db484afadcd34a9f5f7cebe79450f2b4a32c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 15 Jun 2015 17:11:45 -0700 Subject: [PATCH 23/97] New chttp2 list implementation --- BUILD | 2 + Makefile | 2 + build.json | 1 + src/core/transport/chttp2/internal.h | 24 ++- src/core/transport/chttp2/parsing.c | 4 +- src/core/transport/chttp2/stream_lists.c | 177 +++++++++++++++++- src/core/transport/chttp2/writing.c | 2 +- src/core/transport/chttp2_transport.c | 12 +- tools/doxygen/Doxyfile.core.internal | 2 +- vsprojects/grpc/grpc.vcxproj | 2 + vsprojects/grpc/grpc.vcxproj.filters | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj | 2 + .../grpc_unsecure.vcxproj.filters | 3 + 13 files changed, 214 insertions(+), 22 deletions(-) diff --git a/BUILD b/BUILD index c6593e1acbc..84fbf41aab5 100644 --- a/BUILD +++ b/BUILD @@ -337,6 +337,7 @@ cc_library( "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_lists.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/varint.c", @@ -543,6 +544,7 @@ cc_library( "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_lists.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/varint.c", diff --git a/Makefile b/Makefile index 7cbf86bcb43..29786759404 100644 --- a/Makefile +++ b/Makefile @@ -3033,6 +3033,7 @@ LIBGRPC_SRC = \ src/core/transport/chttp2/parsing.c \ src/core/transport/chttp2/status_conversion.c \ src/core/transport/chttp2/stream_encoder.c \ + src/core/transport/chttp2/stream_lists.c \ src/core/transport/chttp2/stream_map.c \ src/core/transport/chttp2/timeout_encoding.c \ src/core/transport/chttp2/varint.c \ @@ -3282,6 +3283,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/transport/chttp2/parsing.c \ src/core/transport/chttp2/status_conversion.c \ src/core/transport/chttp2/stream_encoder.c \ + src/core/transport/chttp2/stream_lists.c \ src/core/transport/chttp2/stream_map.c \ src/core/transport/chttp2/timeout_encoding.c \ src/core/transport/chttp2/varint.c \ diff --git a/build.json b/build.json index ad7fa6c7f7e..af4c947b9fc 100644 --- a/build.json +++ b/build.json @@ -277,6 +277,7 @@ "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_lists.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/varint.c", diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 1eed3b9c8d1..d94bb7965e2 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -55,7 +55,14 @@ typedef struct grpc_chttp2_stream grpc_chttp2_stream; happen to them... this enum labels each list */ typedef enum { GRPC_CHTTP2_LIST_ALL_STREAMS, + GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED, + GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED, GRPC_CHTTP2_LIST_WRITABLE, + GRPC_CHTTP2_LIST_WRITING, + GRPC_CHTTP2_LIST_WRITTEN, + GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE, + GRPC_CHTTP2_LIST_PARSING_SEEN, + GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING, /** streams that are waiting to start because there are too many concurrent streams on the connection */ GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY, @@ -574,16 +581,18 @@ int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); -void grpc_chttp2_schedule_closure( - grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, - int success); -void grpc_chttp2_read_write_state_changed( +void grpc_chttp2_list_add_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); -void grpc_chttp2_incoming_window_state_changed( + +void grpc_chttp2_list_add_incoming_window_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +void grpc_chttp2_schedule_closure( + grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, + int success); + grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( @@ -594,11 +603,10 @@ void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_glo void grpc_chttp2_remove_from_stream_map(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); +void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); void grpc_chttp2_for_all_streams(grpc_chttp2_transport_global *transport_global, void *user_data, void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)); -void grpc_chttp2_flowctl_trace(grpc_chttp2_transport *t, const char *flow, - gpr_int32 window, gpr_uint32 id, gpr_int32 delta); - #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1) diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 666dd1a603e..d6505f396d7 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -160,11 +160,11 @@ void grpc_chttp2_publish_reads( /* updating closed status */ if (stream_parsing->received_close) { stream_global->read_closed = 1; - grpc_chttp2_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } if (stream_parsing->saw_rst_stream) { stream_global->cancelled = 1; - grpc_chttp2_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } } } diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 180a4de240f..316539efe8e 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -31,6 +31,34 @@ * */ +#include "src/core/transport/chttp2/internal.h" + +#include + +#define TRANSPORT_FROM_GLOBAL(tg) \ + ((grpc_chttp2_transport *)((char *)(tg)-offsetof(grpc_chttp2_transport, \ + global))) + +#define STREAM_FROM_GLOBAL(sg) \ + ((grpc_chttp2_stream *)((char *)(sg)-offsetof(grpc_chttp2_stream, \ + global))) + +#define TRANSPORT_FROM_WRITING(tw) \ + ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ + writing))) + +#define STREAM_FROM_WRITING(sw) \ + ((grpc_chttp2_stream *)((char *)(sw)-offsetof(grpc_chttp2_stream, \ + writing))) + +#define TRANSPORT_FROM_PARSING(tp) \ + ((grpc_chttp2_transport *)((char *)(tp)-offsetof(grpc_chttp2_transport, \ + parsing))) + +#define STREAM_FROM_PARSING(sp) \ + ((grpc_chttp2_stream *)((char *)(sp)-offsetof(grpc_chttp2_stream, \ + parsing))) + /* core list management */ static int stream_list_empty(grpc_chttp2_transport *t, @@ -38,8 +66,8 @@ static int stream_list_empty(grpc_chttp2_transport *t, return t->lists[id].head == NULL; } -static grpc_chttp2_stream *stream_list_remove_head( - grpc_chttp2_transport *t, grpc_chttp2_stream_list_id id) { +static int stream_list_pop( + grpc_chttp2_transport *t, grpc_chttp2_stream **stream, grpc_chttp2_stream_list_id id) { grpc_chttp2_stream *s = t->lists[id].head; if (s) { grpc_chttp2_stream *new_head = s->links[id].next; @@ -53,12 +81,13 @@ static grpc_chttp2_stream *stream_list_remove_head( } s->included[id] = 0; } - return s; + *stream = s; + return s != 0; } static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { - if (!s->included[id]) return; + GPR_ASSERT(s->included[id]); s->included[id] = 0; if (s->links[id].prev) { s->links[id].prev->links[id].next = s->links[id].next; @@ -91,7 +120,7 @@ static void stream_list_add_tail(grpc_chttp2_transport *t, s->included[id] = 1; } -static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, +static void stream_list_add(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { if (s->included[id]) { return; @@ -99,3 +128,141 @@ static void stream_list_join(grpc_chttp2_transport *t, grpc_chttp2_stream *s, stream_list_add_tail(t, s, id); } +/* wrappers for specializations */ + +void grpc_chttp2_list_add_writable_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WRITABLE); +} + +int grpc_chttp2_list_pop_writable_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_writing **stream_writing) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_WRITABLE); + *stream_global = &stream->global; + *stream_writing = &stream->writing; + return r; +} + +void grpc_chttp2_list_add_writing_stream( + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_writing *stream_writing) { + stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), STREAM_FROM_WRITING(stream_writing), GRPC_CHTTP2_LIST_WRITING); +} + +int grpc_chttp2_list_have_writing_streams( + grpc_chttp2_transport_writing *transport_writing) { + return stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), GRPC_CHTTP2_LIST_WRITING); +} + +int grpc_chttp2_list_pop_writing_stream( + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_writing **stream_writing) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream, GRPC_CHTTP2_LIST_WRITING); + *stream_writing = &stream->writing; + return r; +} + +void grpc_chttp2_list_add_written_stream( + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_writing *stream_writing) { + stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), STREAM_FROM_WRITING(stream_writing), GRPC_CHTTP2_LIST_WRITTEN); +} + +int grpc_chttp2_list_pop_written_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_writing *transport_writing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_writing **stream_writing) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream, GRPC_CHTTP2_LIST_WRITTEN); + *stream_writing = &stream->writing; + return r; +} + +void grpc_chttp2_list_add_writable_window_update_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE); +} + +int grpc_chttp2_list_pop_writable_window_update_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE); + *stream_global = &stream->global; + return r; +} + +void grpc_chttp2_list_add_parsing_seen_stream( + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing) { + stream_list_add(TRANSPORT_FROM_PARSING(transport_parsing), STREAM_FROM_PARSING(stream_parsing), GRPC_CHTTP2_LIST_PARSING_SEEN); +} + +int grpc_chttp2_list_pop_parsing_seen_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_parsing **stream_parsing) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_PARSING(transport_parsing), &stream, GRPC_CHTTP2_LIST_PARSING_SEEN); + *stream_global = &stream->global; + *stream_parsing = &stream->parsing; + return r; +} + +void grpc_chttp2_list_add_waiting_for_concurrency( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); +} + +int grpc_chttp2_list_pop_waiting_for_concurrency( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); + *stream_global = &stream->global; + return r; +} + +void grpc_chttp2_list_add_cancelled_waiting_for_parsing( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); +} + +int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); + *stream_global = &stream->global; + return r; +} + +void grpc_chttp2_list_add_read_write_state_changed( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED); +} + +void grpc_chttp2_list_add_incoming_window_state_changed( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); +} + +void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { + stream_list_add_tail(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); +} +void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { + stream_list_remove(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); +} diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 9e3d9b2c160..572ee0de563 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -192,7 +192,7 @@ void grpc_chttp2_cleanup_writing( if (!transport_global->is_client) { stream_global->read_closed = 1; } - grpc_chttp2_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } } transport_writing->outbuf.count = 0; diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 6119a4723e8..9577300e413 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -378,6 +378,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, ref_transport(t); lock(t); + grpc_chttp2_register_stream(t, s); if (server_data) { GPR_ASSERT(t->parsing_active); s->global.id = (gpr_uint32)(gpr_uintptr)server_data; @@ -405,6 +406,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || s->global.id == 0); + grpc_chttp2_unregister_stream(t, s); gpr_mu_unlock(&t->mu); @@ -604,8 +606,8 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, gr stream_global->incoming_sopb = op->recv_ops; stream_global->incoming_sopb->nops = 0; grpc_chttp2_incoming_metadata_live_op_buffer_end(&stream_global->outstanding_metadata); - grpc_chttp2_read_write_state_changed(transport_global, stream_global); - grpc_chttp2_incoming_window_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_incoming_window_state_changed(transport_global, stream_global); } if (op->bind_pollset) { @@ -664,7 +666,7 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { GPR_ASSERT(stream_global->in_stream_map); grpc_chttp2_stream_map_delete(&t->parsing_stream_map, stream_global->id); stream_global->in_stream_map = 0; - grpc_chttp2_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } } @@ -678,7 +680,7 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { while ((s = stream_list_remove_head(t, CANCELLED))) { s->global.read_closed = 1; s->global.write_state = WRITE_STATE_SENT_CLOSE; - grpc_chttp2_read_write_state_changed(&t->global, &s->global); + grpc_chttp2_list_add_read_write_state_changed(&t->global, &s->global); } #endif } @@ -693,7 +695,7 @@ static void cancel_from_api( grpc_chttp2_rst_stream_create(stream_global->id, grpc_chttp2_grpc_status_to_http2_status(status))); } else { - grpc_chttp2_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } } diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 0b8c44894cd..0c14820efab 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -760,7 +760,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/incoming_metadata.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/incoming_metadata.c src/core/transport/chttp2/parsing.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2/writing.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c +INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/incoming_metadata.h src/core/transport/chttp2/internal.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/incoming_metadata.c src/core/transport/chttp2/parsing.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_lists.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2/writing.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj index 757d14bedcc..115b9cc89fb 100644 --- a/vsprojects/grpc/grpc.vcxproj +++ b/vsprojects/grpc/grpc.vcxproj @@ -477,6 +477,8 @@ + + diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters index 8a33cad51e3..b5cbbd0561b 100644 --- a/vsprojects/grpc/grpc.vcxproj.filters +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -331,6 +331,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj index 4075c63327d..5c530b9fa39 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -415,6 +415,8 @@ + + diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters index 475b52d2de9..65d096aed0a 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -265,6 +265,9 @@ src\core\transport\chttp2 + + src\core\transport\chttp2 + src\core\transport\chttp2 From cfb5db927cb36c5958392dda6009532db661dc0a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 15 Jun 2015 17:14:41 -0700 Subject: [PATCH 24/97] Implement lookup stream --- src/core/transport/chttp2_transport.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 9577300e413..404a6339c5e 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -62,6 +62,10 @@ int grpc_flowctl_trace = 0; ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ writing))) +#define TRANSPORT_FROM_PARSING(tw) \ + ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ + parsing))) + #define TRANSPORT_FROM_GLOBAL(tg) \ ((grpc_chttp2_transport *)((char *)(tg)-offsetof(grpc_chttp2_transport, \ global))) @@ -420,6 +424,13 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { unref_transport(t); } +grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( + grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { + grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); + grpc_chttp2_stream *s = grpc_chttp2_stream_map_find(&t->parsing_stream_map, id); + return &s->parsing; +} + #if 0 static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (s->global.id == 0) return; From ca9fb36b7386638532269adf6d5e9b8121325f01 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 07:43:08 -0700 Subject: [PATCH 25/97] Implement gpr_slice_buffer_move_into --- src/core/support/slice_buffer.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/core/support/slice_buffer.c b/src/core/support/slice_buffer.c index 91b5d8c98b2..f54aca8cfe0 100644 --- a/src/core/support/slice_buffer.c +++ b/src/core/support/slice_buffer.c @@ -190,3 +190,19 @@ void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b) { GPR_SWAP(gpr_slice *, a->slices, b->slices); } } + +void gpr_slice_buffer_move_into(gpr_slice_buffer *src, gpr_slice_buffer *dst) { + /* anything to move? */ + if (src->count == 0) { + return; + } + /* anything in dst? */ + if (dst->count == 0) { + gpr_slice_buffer_swap(src, dst); + return; + } + /* both buffers have data - copy, and reset src */ + gpr_slice_buffer_addn(dst, src->slices, src->count); + src->count = 0; + src->length = 0; +} From 9f1307f1af91e734491a24aa5c93b56a2a2b89a8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 07:43:29 -0700 Subject: [PATCH 26/97] Implement grpc_stream_map_move_into --- src/core/transport/chttp2/stream_map.c | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/core/transport/chttp2/stream_map.c b/src/core/transport/chttp2/stream_map.c index 580e32c582e..2d80007bcb9 100644 --- a/src/core/transport/chttp2/stream_map.c +++ b/src/core/transport/chttp2/stream_map.c @@ -32,8 +32,12 @@ */ #include "src/core/transport/chttp2/stream_map.h" + +#include + #include #include +#include void grpc_chttp2_stream_map_init(grpc_chttp2_stream_map *map, size_t initial_capacity) { @@ -92,6 +96,32 @@ void grpc_chttp2_stream_map_add(grpc_chttp2_stream_map *map, gpr_uint32 key, map->count = count + 1; } +void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, grpc_chttp2_stream_map *dst) { + /* if src is empty we dont need to do anything */ + if (src->count == src->free) { + return; + } + /* if dst is empty we simply need to swap */ + if (dst->count == dst->free) { + GPR_SWAP(grpc_chttp2_stream_map, *src, *dst); + return; + } + /* if dst doesn't have capacity, resize */ + if (dst->count + src->count > dst->capacity) { + dst->capacity = GPR_MAX(dst->capacity * 3 / 2, dst->count + src->count); + dst->keys = gpr_realloc(dst->keys, dst->capacity * sizeof(gpr_uint32)); + dst->values = gpr_realloc(dst->values, dst->capacity * sizeof(gpr_uint32)); + } + /* the first element of src must be greater than the last of dst */ + GPR_ASSERT(src->keys[0] > dst->keys[dst->count - 1]); + memcpy(dst->keys + dst->count, src->keys, src->count * sizeof(gpr_uint32)); + memcpy(dst->values + dst->count, src->values, src->count * sizeof(gpr_uint32)); + dst->count += src->count; + dst->free += src->free; + src->count = 0; + src->free = 0; +} + static void **find(grpc_chttp2_stream_map *map, gpr_uint32 key) { size_t min_idx = 0; size_t max_idx = map->count; From 1937b06b785f577ad4b0fa1734eed286d2d67e6f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 08:47:38 -0700 Subject: [PATCH 27/97] Implement some missing pieces for chttp2s lock breakup --- src/core/transport/chttp2/incoming_metadata.c | 4 ++ src/core/transport/chttp2/internal.h | 3 +- src/core/transport/chttp2/parsing.c | 4 ++ src/core/transport/chttp2/stream_lists.c | 8 +++ src/core/transport/chttp2_transport.c | 58 ++++++------------- 5 files changed, 36 insertions(+), 41 deletions(-) diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c index df799047156..b120b3326f0 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -44,6 +44,10 @@ void grpc_chttp2_incoming_metadata_buffer_init(grpc_chttp2_incoming_metadata_buf buffer->deadline = gpr_inf_future; } +void grpc_chttp2_incoming_metadata_buffer_destroy(grpc_chttp2_incoming_metadata_buffer *buffer) { + gpr_free(buffer->elems); +} + void grpc_chttp2_incoming_metadata_buffer_add(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem *elem) { if (buffer->capacity == buffer->count) { diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index d94bb7965e2..d34fc7e6ff9 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -514,9 +514,9 @@ void grpc_chttp2_terminate_writing( void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); -/** Process one slice of incoming data */ void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); +/** Process one slice of incoming data */ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice); void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global, @@ -589,6 +589,7 @@ void grpc_chttp2_list_add_incoming_window_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +/** schedule a closure to run without the transport lock taken */ void grpc_chttp2_schedule_closure( grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success); diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index d6505f396d7..bf66bb42cf3 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -60,6 +60,10 @@ static int init_skip_frame_parser( static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last); +void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, + grpc_chttp2_transport_parsing *parsing) { +} + void grpc_chttp2_publish_reads( grpc_chttp2_transport_global *transport_global, grpc_chttp2_transport_parsing *transport_parsing) { diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 316539efe8e..544174fd67f 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -263,6 +263,14 @@ void grpc_chttp2_list_add_incoming_window_state_changed( void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { stream_list_add_tail(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); } + void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { stream_list_remove(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); } + +void grpc_chttp2_for_all_streams(grpc_chttp2_transport_global *transport_global, void *user_data, void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)) { + grpc_chttp2_stream *s; + for (s = TRANSPORT_FROM_GLOBAL(transport_global)->lists[GRPC_CHTTP2_LIST_ALL_STREAMS].head; s; s = s->links[GRPC_CHTTP2_LIST_ALL_STREAMS].next) { + cb(transport_global, user_data, &s->global); + } +} diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 404a6339c5e..db9a8ef8ee8 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -97,11 +97,6 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, /** Start disconnection chain */ static void drop_connection(grpc_chttp2_transport *t); -/** Schedule a closure to be called outside of the transport lock after the next - unlock() operation */ -static void schedule_cb(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, - int success); - /** Perform a transport_op */ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_transport_op *op); @@ -115,34 +110,6 @@ static void cancel_from_api( static void add_to_pollset_locked(grpc_chttp2_transport *t, grpc_pollset *pollset); -#if 0 - -static void unlock_check_parser(grpc_chttp2_transport *t); - -static void end_all_the_calls(grpc_chttp2_transport *t); - -static void cancel_stream_id(grpc_chttp2_transport *t, gpr_uint32 id, - grpc_status_code local_status, - grpc_chttp2_error_code error_code, int send_rst); -static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_status_code local_status, - grpc_chttp2_error_code error_code, - grpc_mdstr *optional_message, int send_rst); -static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, - gpr_uint32 id); -static void remove_from_stream_map(grpc_chttp2_transport *t, - grpc_chttp2_stream *s); -static void maybe_start_some_streams(grpc_chttp2_transport *t); - -static void parsing_become_skip_parser(grpc_chttp2_transport *t); - -static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - int is_parser); -static void maybe_join_window_updates(grpc_chttp2_transport *t, - grpc_chttp2_stream *s); -static void add_metadata_batch(grpc_chttp2_transport *t, grpc_chttp2_stream *s); -#endif - /* * CONSTRUCTION/DESTRUCTION/REFCOUNTING */ @@ -431,6 +398,17 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( return &s->parsing; } +grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( + grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { + grpc_chttp2_stream *accepting; + grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); + GPR_ASSERT(t->accepting_stream == NULL); + t->accepting_stream = &accepting; + t->channel_callback.cb->accept_stream(t->channel_callback.cb_user_data, &t->base, (void *)(gpr_uintptr)id); + t->accepting_stream = NULL; + return &accepting->parsing; +} + #if 0 static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { if (s->global.id == 0) return; @@ -461,7 +439,7 @@ static void unlock(grpc_chttp2_transport *t) { grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { t->writing_active = 1; ref_transport(t); - schedule_cb(&t->global, &t->writing_action, 1); + grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); } unlock_check_cancellations(t); /* unlock_check_parser(t); */ @@ -606,7 +584,7 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, gr } } else { grpc_sopb_reset(op->send_ops); - schedule_cb(transport_global, stream_global->send_done_closure, 0); + grpc_chttp2_schedule_closure(transport_global, stream_global->send_done_closure, 0); } } @@ -626,7 +604,7 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, gr } if (op->on_consumed) { - schedule_cb(transport_global, op->on_consumed, 1); + grpc_chttp2_schedule_closure(transport_global, op->on_consumed, 1); } } @@ -728,7 +706,7 @@ static void cancel_stream_inner(grpc_chttp2_transport *t, grpc_chttp2_stream *s, schedule_nuke_sopb(t, s->global.outgoing_sopb); s->global.outgoing_sopb = NULL; stream_list_remove(t, s, WRITABLE); - schedule_cb(t, s->global.send_done_closure, 0); + grpc_chttp2_schedule_closure(t, s->global.send_done_closure, 0); } } if (s->cancelled) { @@ -985,7 +963,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { t->channel_callback.executing = 1; grpc_iomgr_closure_init(&a->closure, notify_goaways, a); ref_transport(t); - schedule_cb(&t->global, &a->closure, 1); + grpc_chttp2_schedule_closure(&t->global, &a->closure, 1); return; } else if (t->global.goaway_state != GRPC_CHTTP2_ERROR_STATE_NOTIFIED) { return; @@ -995,11 +973,11 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { t->global.error_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; t->channel_callback.executing = 1; ref_transport(t); - schedule_cb(&t->global, &t->channel_callback.notify_closed, 1); + grpc_chttp2_schedule_closure(&t->global, &t->channel_callback.notify_closed, 1); } } -static void schedule_cb(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, +void grpc_chttp2_schedule_closure(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, int success) { closure->success = success; closure->next = transport_global->pending_closures; From 9850510e52713ccaf0e49bfad1b8e68efe65a383 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 11:33:15 -0700 Subject: [PATCH 28/97] qps_test links with the breakup --- src/core/transport/chttp2/hpack_parser.c | 3 +- src/core/transport/chttp2/incoming_metadata.c | 120 ++++++++++------- src/core/transport/chttp2/incoming_metadata.h | 24 ++-- src/core/transport/chttp2/internal.h | 36 +++-- src/core/transport/chttp2/parsing.c | 36 ++--- src/core/transport/chttp2/stream_lists.c | 99 +++++++++----- src/core/transport/chttp2/stream_map.c | 6 +- src/core/transport/chttp2/writing.c | 3 +- src/core/transport/chttp2_transport.c | 124 +++++++++++------- 9 files changed, 275 insertions(+), 176 deletions(-) diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index b4aa7af2c18..4b11d46cfed 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -1393,7 +1393,8 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( } if (parser->is_boundary) { grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( - &stream_parsing->incoming_metadata, &stream_parsing->data_parser.incoming_sopb); + &stream_parsing->incoming_metadata, + &stream_parsing->data_parser.incoming_sopb); } if (parser->is_eof) { stream_parsing->received_close = 1; diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c index b120b3326f0..5f32947df69 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -40,36 +40,38 @@ #include #include -void grpc_chttp2_incoming_metadata_buffer_init(grpc_chttp2_incoming_metadata_buffer *buffer) { +void grpc_chttp2_incoming_metadata_buffer_init( + grpc_chttp2_incoming_metadata_buffer *buffer) { buffer->deadline = gpr_inf_future; } -void grpc_chttp2_incoming_metadata_buffer_destroy(grpc_chttp2_incoming_metadata_buffer *buffer) { +void grpc_chttp2_incoming_metadata_buffer_destroy( + grpc_chttp2_incoming_metadata_buffer *buffer) { gpr_free(buffer->elems); } -void grpc_chttp2_incoming_metadata_buffer_add(grpc_chttp2_incoming_metadata_buffer *buffer, - grpc_mdelem *elem) { +void grpc_chttp2_incoming_metadata_buffer_add( + grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem *elem) { if (buffer->capacity == buffer->count) { - buffer->capacity = - GPR_MAX(8, 2 * buffer->capacity); + buffer->capacity = GPR_MAX(8, 2 * buffer->capacity); buffer->elems = - gpr_realloc(buffer->elems, - sizeof(*buffer->elems) * - buffer->capacity); + gpr_realloc(buffer->elems, sizeof(*buffer->elems) * buffer->capacity); } - buffer->elems[buffer->count++] - .md = elem; + buffer->elems[buffer->count++].md = elem; } -void grpc_chttp2_incoming_metadata_buffer_set_deadline(grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline) { +void grpc_chttp2_incoming_metadata_buffer_set_deadline( + grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline) { buffer->deadline = deadline; } -#if 0 -void grpc_chttp2_parsing_add_metadata_batch( - grpc_chttp2_transport_parsing *transport_parsing, - grpc_chttp2_stream_parsing *stream_parsing) { +void grpc_chttp2_incoming_metadata_live_op_buffer_end( + grpc_chttp2_incoming_metadata_live_op_buffer *buffer) { + gpr_free(buffer->elems); + buffer->elems = NULL; +} + +void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb) { grpc_metadata_batch b; b.list.head = NULL; @@ -77,20 +79,19 @@ void grpc_chttp2_parsing_add_metadata_batch( we can reconstitute the list. We can't do list building here as later incoming metadata may reallocate the underlying array. */ - b.list.tail = (void *)(gpr_intptr)stream_parsing->incoming_metadata_count; + b.list.tail = (void*)(gpr_intptr)buffer->count; b.garbage.head = b.garbage.tail = NULL; - b.deadline = stream_parsing->incoming_deadline; - stream_parsing->incoming_deadline = gpr_inf_future; + b.deadline = buffer->deadline; + buffer->deadline = gpr_inf_future; - grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); + grpc_sopb_add_metadata(sopb, b); } -#endif -#if 0 -static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, - grpc_chttp2_stream_parsing *stream_parsing) { - grpc_stream_op *ops = stream_global->incoming_sopb->ops; - size_t nops = stream_global->incoming_sopb->nops; +void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( + grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, + grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer) { + grpc_stream_op *ops = sopb->ops; + size_t nops = sopb->nops; size_t i; size_t j; size_t mdidx = 0; @@ -109,40 +110,59 @@ static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, segment where this segment begins */ last_mdidx = (size_t)(gpr_intptr)(op->data.metadata.list.tail); GPR_ASSERT(last_mdidx > mdidx); - GPR_ASSERT(last_mdidx <= stream_parsing->incoming_metadata_count); + GPR_ASSERT(last_mdidx <= buffer->count); /* turn the array into a doubly linked list */ - op->data.metadata.list.head = &stream_parsing->incoming_metadata[mdidx]; - op->data.metadata.list.tail = - &stream_parsing->incoming_metadata[last_mdidx - 1]; + op->data.metadata.list.head = &buffer->elems[mdidx]; + op->data.metadata.list.tail = &buffer->elems[last_mdidx - 1]; for (j = mdidx + 1; j < last_mdidx; j++) { - stream_parsing->incoming_metadata[j].prev = - &stream_parsing->incoming_metadata[j - 1]; - stream_parsing->incoming_metadata[j - 1].next = - &stream_parsing->incoming_metadata[j]; + buffer->elems[j].prev = &buffer->elems[j - 1]; + buffer->elems[j - 1].next = &buffer->elems[j]; } - stream_parsing->incoming_metadata[mdidx].prev = NULL; - stream_parsing->incoming_metadata[last_mdidx - 1].next = NULL; + buffer->elems[mdidx].prev = NULL; + buffer->elems[last_mdidx - 1].next = NULL; /* track where we're up to */ mdidx = last_mdidx; } if (found_metadata) { - stream_parsing->old_incoming_metadata = stream_parsing->incoming_metadata; - if (mdidx != stream_parsing->incoming_metadata_count) { + live_op_buffer->elems = buffer->elems; + if (mdidx != buffer->count) { /* we have a partially read metadata batch still in incoming_metadata */ - size_t new_count = stream_parsing->incoming_metadata_count - mdidx; - size_t copy_bytes = - sizeof(*stream_parsing->incoming_metadata) * new_count; - GPR_ASSERT(mdidx < stream_parsing->incoming_metadata_count); - stream_parsing->incoming_metadata = gpr_malloc(copy_bytes); - memcpy(stream_parsing->old_incoming_metadata + mdidx, - stream_parsing->incoming_metadata, copy_bytes); - stream_parsing->incoming_metadata_count = - stream_parsing->incoming_metadata_capacity = new_count; + size_t new_count = buffer->count - mdidx; + size_t copy_bytes = sizeof(*buffer->elems) * new_count; + GPR_ASSERT(mdidx < buffer->count); + buffer->elems = gpr_malloc(copy_bytes); + memcpy(live_op_buffer->elems + mdidx, buffer->elems, copy_bytes); + buffer->count = buffer->capacity = new_count; } else { - stream_parsing->incoming_metadata = NULL; - stream_parsing->incoming_metadata_count = 0; - stream_parsing->incoming_metadata_capacity = 0; + buffer->elems = NULL; + buffer->count = 0; + buffer->capacity = 0; } } } + +#if 0 +void grpc_chttp2_parsing_add_metadata_batch( + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing) { + grpc_metadata_batch b; + + b.list.head = NULL; + /* Store away the last element of the list, so that in patch_metadata_ops + we can reconstitute the list. + We can't do list building here as later incoming metadata may reallocate + the underlying array. */ + b.list.tail = (void *)(gpr_intptr)stream_parsing->incoming_metadata_count; + b.garbage.head = b.garbage.tail = NULL; + b.deadline = stream_parsing->incoming_deadline; + stream_parsing->incoming_deadline = gpr_inf_future; + + grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); +} +#endif + +#if 0 +static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, + grpc_chttp2_stream_parsing *stream_parsing) { +} #endif diff --git a/src/core/transport/chttp2/incoming_metadata.h b/src/core/transport/chttp2/incoming_metadata.h index d2b08943d41..5a7890a534f 100644 --- a/src/core/transport/chttp2/incoming_metadata.h +++ b/src/core/transport/chttp2/incoming_metadata.h @@ -48,21 +48,29 @@ typedef struct { } grpc_chttp2_incoming_metadata_live_op_buffer; /** assumes everything initially zeroed */ -void grpc_chttp2_incoming_metadata_buffer_init(grpc_chttp2_incoming_metadata_buffer *buffer); -void grpc_chttp2_incoming_metadata_buffer_destroy(grpc_chttp2_incoming_metadata_buffer *buffer); -void grpc_chttp2_incoming_metadata_buffer_reset(grpc_chttp2_incoming_metadata_buffer *buffer); +void grpc_chttp2_incoming_metadata_buffer_init( + grpc_chttp2_incoming_metadata_buffer *buffer); +void grpc_chttp2_incoming_metadata_buffer_destroy( + grpc_chttp2_incoming_metadata_buffer *buffer); +void grpc_chttp2_incoming_metadata_buffer_reset( + grpc_chttp2_incoming_metadata_buffer *buffer); -void grpc_chttp2_incoming_metadata_buffer_add(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem *elem); -void grpc_chttp2_incoming_metadata_buffer_set_deadline(grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline); +void grpc_chttp2_incoming_metadata_buffer_add( + grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem *elem); +void grpc_chttp2_incoming_metadata_buffer_set_deadline( + grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline); /** extend sopb with a metadata batch; this must be post-processed by grpc_chttp2_incoming_metadata_buffer_postprocess_sopb before being handed out of the transport */ -void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); +void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( + grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( - grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer); + grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, + grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer); -void grpc_chttp2_incoming_metadata_live_op_buffer_end(grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer); +void grpc_chttp2_incoming_metadata_live_op_buffer_end( + grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer); #endif /* GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H */ diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index d34fc7e6ff9..06f114c2fba 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -88,7 +88,7 @@ typedef enum { PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE, NEW_OUTGOING_WINDOW, -#endif +#endif STREAM_LIST_COUNT /* must be last */ } grpc_chttp2_stream_list_id; @@ -466,13 +466,13 @@ struct grpc_chttp2_stream_parsing { /** incoming metadata */ grpc_chttp2_incoming_metadata_buffer incoming_metadata; -/* - grpc_linked_mdelem *incoming_metadata; - size_t incoming_metadata_count; - size_t incoming_metadata_capacity; - grpc_linked_mdelem *old_incoming_metadata; - gpr_timespec incoming_deadline; -*/ + /* + grpc_linked_mdelem *incoming_metadata; + size_t incoming_metadata_count; + size_t incoming_metadata_capacity; + grpc_linked_mdelem *old_incoming_metadata; + gpr_timespec incoming_deadline; + */ }; struct grpc_chttp2_stream { @@ -599,14 +599,22 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); -void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, - gpr_slice goaway_text); +void grpc_chttp2_add_incoming_goaway( + grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, + gpr_slice goaway_text); -void grpc_chttp2_remove_from_stream_map(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +void grpc_chttp2_remove_from_stream_map( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); -void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); -void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); -void grpc_chttp2_for_all_streams(grpc_chttp2_transport_global *transport_global, void *user_data, void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)); +void grpc_chttp2_register_stream(grpc_chttp2_transport *t, + grpc_chttp2_stream *s); +void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, + grpc_chttp2_stream *s); +void grpc_chttp2_for_all_streams( + grpc_chttp2_transport_global *transport_global, void *user_data, + void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, + grpc_chttp2_stream_global *stream_global)); #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index bf66bb42cf3..e45ebb7176e 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -61,8 +61,7 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last); void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, - grpc_chttp2_transport_parsing *parsing) { -} + grpc_chttp2_transport_parsing *parsing) {} void grpc_chttp2_publish_reads( grpc_chttp2_transport_global *transport_global, @@ -134,7 +133,9 @@ void grpc_chttp2_publish_reads( /* move goaway to the global state if we received one (it will be published later */ if (transport_parsing->goaway_received) { - grpc_chttp2_add_incoming_goaway(transport_global, transport_parsing->goaway_error, transport_parsing->goaway_text); + grpc_chttp2_add_incoming_goaway(transport_global, + transport_parsing->goaway_error, + transport_parsing->goaway_text); transport_parsing->goaway_received = 0; } @@ -164,11 +165,13 @@ void grpc_chttp2_publish_reads( /* updating closed status */ if (stream_parsing->received_close) { stream_global->read_closed = 1; - grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); } if (stream_parsing->saw_rst_stream) { stream_global->cancelled = 1; - grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); } } } @@ -486,10 +489,10 @@ static int init_data_frame_parser( stream_parsing->received_close = 1; stream_parsing->saw_rst_stream = 1; stream_parsing->rst_stream_reason = GRPC_CHTTP2_PROTOCOL_ERROR; - gpr_slice_buffer_add(&transport_parsing->qbuf, - grpc_chttp2_rst_stream_create( - transport_parsing->incoming_stream_id, - GRPC_CHTTP2_PROTOCOL_ERROR)); + gpr_slice_buffer_add( + &transport_parsing->qbuf, + grpc_chttp2_rst_stream_create(transport_parsing->incoming_stream_id, + GRPC_CHTTP2_PROTOCOL_ERROR)); return init_skip_frame_parser(transport_parsing, 0); case GRPC_CHTTP2_CONNECTION_ERROR: return 0; @@ -526,10 +529,13 @@ static void on_header(void *tp, grpc_mdelem *md) { } grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); } - grpc_chttp2_incoming_metadata_buffer_set_deadline(&stream_parsing->incoming_metadata, gpr_time_add(gpr_now(), *cached_timeout)); + grpc_chttp2_incoming_metadata_buffer_set_deadline( + &stream_parsing->incoming_metadata, + gpr_time_add(gpr_now(), *cached_timeout)); grpc_mdelem_unref(md); } else { - grpc_chttp2_incoming_metadata_buffer_add(&stream_parsing->incoming_metadata, md); + grpc_chttp2_incoming_metadata_buffer_add(&stream_parsing->incoming_metadata, + md); } grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); @@ -711,10 +717,10 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, if (stream_parsing) { stream_parsing->saw_rst_stream = 1; stream_parsing->rst_stream_reason = GRPC_CHTTP2_PROTOCOL_ERROR; - gpr_slice_buffer_add(&transport_parsing->qbuf, - grpc_chttp2_rst_stream_create( - transport_parsing->incoming_stream_id, - GRPC_CHTTP2_PROTOCOL_ERROR)); + gpr_slice_buffer_add( + &transport_parsing->qbuf, + grpc_chttp2_rst_stream_create(transport_parsing->incoming_stream_id, + GRPC_CHTTP2_PROTOCOL_ERROR)); } return 1; case GRPC_CHTTP2_CONNECTION_ERROR: diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 544174fd67f..85f6bd3616b 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -35,29 +35,26 @@ #include -#define TRANSPORT_FROM_GLOBAL(tg) \ +#define TRANSPORT_FROM_GLOBAL(tg) \ ((grpc_chttp2_transport *)((char *)(tg)-offsetof(grpc_chttp2_transport, \ global))) #define STREAM_FROM_GLOBAL(sg) \ - ((grpc_chttp2_stream *)((char *)(sg)-offsetof(grpc_chttp2_stream, \ - global))) + ((grpc_chttp2_stream *)((char *)(sg)-offsetof(grpc_chttp2_stream, global))) -#define TRANSPORT_FROM_WRITING(tw) \ +#define TRANSPORT_FROM_WRITING(tw) \ ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ writing))) #define STREAM_FROM_WRITING(sw) \ - ((grpc_chttp2_stream *)((char *)(sw)-offsetof(grpc_chttp2_stream, \ - writing))) + ((grpc_chttp2_stream *)((char *)(sw)-offsetof(grpc_chttp2_stream, writing))) -#define TRANSPORT_FROM_PARSING(tp) \ +#define TRANSPORT_FROM_PARSING(tp) \ ((grpc_chttp2_transport *)((char *)(tp)-offsetof(grpc_chttp2_transport, \ parsing))) #define STREAM_FROM_PARSING(sp) \ - ((grpc_chttp2_stream *)((char *)(sp)-offsetof(grpc_chttp2_stream, \ - parsing))) + ((grpc_chttp2_stream *)((char *)(sp)-offsetof(grpc_chttp2_stream, parsing))) /* core list management */ @@ -66,8 +63,9 @@ static int stream_list_empty(grpc_chttp2_transport *t, return t->lists[id].head == NULL; } -static int stream_list_pop( - grpc_chttp2_transport *t, grpc_chttp2_stream **stream, grpc_chttp2_stream_list_id id) { +static int stream_list_pop(grpc_chttp2_transport *t, + grpc_chttp2_stream **stream, + grpc_chttp2_stream_list_id id) { grpc_chttp2_stream *s = t->lists[id].head; if (s) { grpc_chttp2_stream *new_head = s->links[id].next; @@ -121,7 +119,7 @@ static void stream_list_add_tail(grpc_chttp2_transport *t, } static void stream_list_add(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id) { + grpc_chttp2_stream_list_id id) { if (s->included[id]) { return; } @@ -133,7 +131,8 @@ static void stream_list_add(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void grpc_chttp2_list_add_writable_stream( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WRITABLE); + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WRITABLE); } int grpc_chttp2_list_pop_writable_stream( @@ -142,7 +141,8 @@ int grpc_chttp2_list_pop_writable_stream( grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_WRITABLE); + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, + GRPC_CHTTP2_LIST_WRITABLE); *stream_global = &stream->global; *stream_writing = &stream->writing; return r; @@ -151,19 +151,23 @@ int grpc_chttp2_list_pop_writable_stream( void grpc_chttp2_list_add_writing_stream( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing) { - stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), STREAM_FROM_WRITING(stream_writing), GRPC_CHTTP2_LIST_WRITING); + stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), + STREAM_FROM_WRITING(stream_writing), + GRPC_CHTTP2_LIST_WRITING); } int grpc_chttp2_list_have_writing_streams( grpc_chttp2_transport_writing *transport_writing) { - return stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), GRPC_CHTTP2_LIST_WRITING); + return stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), + GRPC_CHTTP2_LIST_WRITING); } int grpc_chttp2_list_pop_writing_stream( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing **stream_writing) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream, GRPC_CHTTP2_LIST_WRITING); + int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream, + GRPC_CHTTP2_LIST_WRITING); *stream_writing = &stream->writing; return r; } @@ -171,7 +175,9 @@ int grpc_chttp2_list_pop_writing_stream( void grpc_chttp2_list_add_written_stream( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing) { - stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), STREAM_FROM_WRITING(stream_writing), GRPC_CHTTP2_LIST_WRITTEN); + stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), + STREAM_FROM_WRITING(stream_writing), + GRPC_CHTTP2_LIST_WRITTEN); } int grpc_chttp2_list_pop_written_stream( @@ -180,7 +186,8 @@ int grpc_chttp2_list_pop_written_stream( grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream, GRPC_CHTTP2_LIST_WRITTEN); + int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream, + GRPC_CHTTP2_LIST_WRITTEN); *stream_writing = &stream->writing; return r; } @@ -188,14 +195,17 @@ int grpc_chttp2_list_pop_written_stream( void grpc_chttp2_list_add_writable_window_update_stream( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE); + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE); } int grpc_chttp2_list_pop_writable_window_update_stream( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE); + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, + GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE); *stream_global = &stream->global; return r; } @@ -203,7 +213,9 @@ int grpc_chttp2_list_pop_writable_window_update_stream( void grpc_chttp2_list_add_parsing_seen_stream( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { - stream_list_add(TRANSPORT_FROM_PARSING(transport_parsing), STREAM_FROM_PARSING(stream_parsing), GRPC_CHTTP2_LIST_PARSING_SEEN); + stream_list_add(TRANSPORT_FROM_PARSING(transport_parsing), + STREAM_FROM_PARSING(stream_parsing), + GRPC_CHTTP2_LIST_PARSING_SEEN); } int grpc_chttp2_list_pop_parsing_seen_stream( @@ -212,7 +224,8 @@ int grpc_chttp2_list_pop_parsing_seen_stream( grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_parsing **stream_parsing) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_PARSING(transport_parsing), &stream, GRPC_CHTTP2_LIST_PARSING_SEEN); + int r = stream_list_pop(TRANSPORT_FROM_PARSING(transport_parsing), &stream, + GRPC_CHTTP2_LIST_PARSING_SEEN); *stream_global = &stream->global; *stream_parsing = &stream->parsing; return r; @@ -221,14 +234,17 @@ int grpc_chttp2_list_pop_parsing_seen_stream( void grpc_chttp2_list_add_waiting_for_concurrency( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); } int grpc_chttp2_list_pop_waiting_for_concurrency( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, + GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY); *stream_global = &stream->global; return r; } @@ -236,14 +252,17 @@ int grpc_chttp2_list_pop_waiting_for_concurrency( void grpc_chttp2_list_add_cancelled_waiting_for_parsing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); } int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, + GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); *stream_global = &stream->global; return r; } @@ -251,26 +270,38 @@ int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( void grpc_chttp2_list_add_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED); + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED); } void grpc_chttp2_list_add_incoming_window_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); } -void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { +void grpc_chttp2_register_stream(grpc_chttp2_transport *t, + grpc_chttp2_stream *s) { stream_list_add_tail(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); } -void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { - stream_list_remove(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); +void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, + grpc_chttp2_stream *s) { + stream_list_remove(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); } -void grpc_chttp2_for_all_streams(grpc_chttp2_transport_global *transport_global, void *user_data, void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)) { +void grpc_chttp2_for_all_streams( + grpc_chttp2_transport_global *transport_global, void *user_data, + void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, + grpc_chttp2_stream_global *stream_global)) { grpc_chttp2_stream *s; - for (s = TRANSPORT_FROM_GLOBAL(transport_global)->lists[GRPC_CHTTP2_LIST_ALL_STREAMS].head; s; s = s->links[GRPC_CHTTP2_LIST_ALL_STREAMS].next) { + for (s = TRANSPORT_FROM_GLOBAL(transport_global) + ->lists[GRPC_CHTTP2_LIST_ALL_STREAMS] + .head; + s; s = s->links[GRPC_CHTTP2_LIST_ALL_STREAMS].next) { cb(transport_global, user_data, &s->global); } } diff --git a/src/core/transport/chttp2/stream_map.c b/src/core/transport/chttp2/stream_map.c index 2d80007bcb9..baec29e18d3 100644 --- a/src/core/transport/chttp2/stream_map.c +++ b/src/core/transport/chttp2/stream_map.c @@ -96,7 +96,8 @@ void grpc_chttp2_stream_map_add(grpc_chttp2_stream_map *map, gpr_uint32 key, map->count = count + 1; } -void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, grpc_chttp2_stream_map *dst) { +void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, + grpc_chttp2_stream_map *dst) { /* if src is empty we dont need to do anything */ if (src->count == src->free) { return; @@ -115,7 +116,8 @@ void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, grpc_chttp2_s /* the first element of src must be greater than the last of dst */ GPR_ASSERT(src->keys[0] > dst->keys[dst->count - 1]); memcpy(dst->keys + dst->count, src->keys, src->count * sizeof(gpr_uint32)); - memcpy(dst->values + dst->count, src->values, src->count * sizeof(gpr_uint32)); + memcpy(dst->values + dst->count, src->values, + src->count * sizeof(gpr_uint32)); dst->count += src->count; dst->free += src->free; src->count = 0; diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 572ee0de563..6cc19aec837 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -192,7 +192,8 @@ void grpc_chttp2_cleanup_writing( if (!transport_global->is_client) { stream_global->read_closed = 1; } - grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); } } transport_writing->outbuf.count = 0; diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index db9a8ef8ee8..6198b786feb 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -66,13 +66,12 @@ int grpc_flowctl_trace = 0; ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ parsing))) -#define TRANSPORT_FROM_GLOBAL(tg) \ +#define TRANSPORT_FROM_GLOBAL(tg) \ ((grpc_chttp2_transport *)((char *)(tg)-offsetof(grpc_chttp2_transport, \ global))) #define STREAM_FROM_GLOBAL(sg) \ - ((grpc_chttp2_stream *)((char *)(sg)-offsetof(grpc_chttp2_stream, \ - global))) + ((grpc_chttp2_stream *)((char *)(sg)-offsetof(grpc_chttp2_stream, global))) static const grpc_transport_vtable vtable; @@ -98,13 +97,14 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, static void drop_connection(grpc_chttp2_transport *t); /** Perform a transport_op */ -static void perform_op_locked(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_transport_op *op); +static void perform_op_locked(grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, + grpc_transport_op *op); /** Cancel a stream: coming from the transport API */ -static void cancel_from_api( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global, - grpc_status_code status); +static void cancel_from_api(grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, + grpc_status_code status); /** Add endpoint from this transport to pollset */ static void add_to_pollset_locked(grpc_chttp2_transport *t, @@ -394,7 +394,8 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); - grpc_chttp2_stream *s = grpc_chttp2_stream_map_find(&t->parsing_stream_map, id); + grpc_chttp2_stream *s = + grpc_chttp2_stream_map_find(&t->parsing_stream_map, id); return &s->parsing; } @@ -404,7 +405,8 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); GPR_ASSERT(t->accepting_stream == NULL); t->accepting_stream = &accepting; - t->channel_callback.cb->accept_stream(t->channel_callback.cb_user_data, &t->base, (void *)(gpr_uintptr)id); + t->channel_callback.cb->accept_stream(t->channel_callback.cb_user_data, + &t->base, (void *)(gpr_uintptr)id); t->accepting_stream = NULL; return &accepting->parsing; } @@ -508,8 +510,9 @@ static void writing_action(void *gt, int iomgr_success_ignored) { grpc_chttp2_perform_writes(&t->writing, t->ep); } -void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, - gpr_slice goaway_text) { +void grpc_chttp2_add_incoming_goaway( + grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, + gpr_slice goaway_text) { if (transport_global->goaway_state == GRPC_CHTTP2_ERROR_STATE_NONE) { transport_global->goaway_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; transport_global->goaway_text = goaway_text; @@ -519,18 +522,21 @@ void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport_global *transport_glo } } -static void maybe_start_some_streams(grpc_chttp2_transport_global *transport_global) { +static void maybe_start_some_streams( + grpc_chttp2_transport_global *transport_global) { grpc_chttp2_stream_global *stream_global; /* start streams where we have free grpc_chttp2_stream ids and free * concurrency */ while (transport_global->next_stream_id <= MAX_CLIENT_STREAM_ID && transport_global->concurrent_stream_count < - transport_global->settings[PEER_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && - grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { - IF_TRACING(gpr_log( - GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", - transport_global->is_client ? "CLI" : "SVR", stream_global, transport_global->next_stream_id)); + transport_global->settings + [PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && + grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, + &stream_global)) { + IF_TRACING(gpr_log(GPR_DEBUG, + "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", + transport_global->is_client ? "CLI" : "SVR", + stream_global, transport_global->next_stream_id)); if (transport_global->next_stream_id == MAX_CLIENT_STREAM_ID) { grpc_chttp2_add_incoming_goaway( @@ -545,20 +551,25 @@ static void maybe_start_some_streams(grpc_chttp2_transport_global *transport_glo transport_global ->settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; stream_global->incoming_window = - transport_global-> - settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - grpc_chttp2_stream_map_add(&TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map, stream_global->id, STREAM_FROM_GLOBAL(stream_global)); + transport_global + ->settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + grpc_chttp2_stream_map_add( + &TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map, + stream_global->id, STREAM_FROM_GLOBAL(stream_global)); transport_global->concurrent_stream_count++; grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } /* cancel out streams that will never be started */ while (transport_global->next_stream_id > MAX_CLIENT_STREAM_ID && - grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { + grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, + &stream_global)) { cancel_from_api(transport_global, stream_global, GRPC_STATUS_UNAVAILABLE); } } -static void perform_op_locked(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_transport_op *op) { +static void perform_op_locked(grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, + grpc_transport_op *op) { if (op->cancel_with_status != GRPC_STATUS_OK) { cancel_from_api(transport_global, stream_global, op->cancel_with_status); } @@ -572,19 +583,20 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, gr stream_global->write_state = WRITE_STATE_QUEUED_CLOSE; } if (stream_global->id == 0) { - IF_TRACING(gpr_log(GPR_DEBUG, - "HTTP:%s: New grpc_chttp2_stream %p waiting for concurrency", - transport_global->is_client ? "CLI" : "SVR", stream_global)); - grpc_chttp2_list_add_waiting_for_concurrency( - transport_global, stream_global - ); + IF_TRACING(gpr_log( + GPR_DEBUG, + "HTTP:%s: New grpc_chttp2_stream %p waiting for concurrency", + transport_global->is_client ? "CLI" : "SVR", stream_global)); + grpc_chttp2_list_add_waiting_for_concurrency(transport_global, + stream_global); maybe_start_some_streams(transport_global); } else if (stream_global->outgoing_window > 0) { grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } } else { grpc_sopb_reset(op->send_ops); - grpc_chttp2_schedule_closure(transport_global, stream_global->send_done_closure, 0); + grpc_chttp2_schedule_closure(transport_global, + stream_global->send_done_closure, 0); } } @@ -594,13 +606,17 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, gr stream_global->recv_done_closure = op->on_done_recv; stream_global->incoming_sopb = op->recv_ops; stream_global->incoming_sopb->nops = 0; - grpc_chttp2_incoming_metadata_live_op_buffer_end(&stream_global->outstanding_metadata); - grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); - grpc_chttp2_list_add_incoming_window_state_changed(transport_global, stream_global); + grpc_chttp2_incoming_metadata_live_op_buffer_end( + &stream_global->outstanding_metadata); + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); + grpc_chttp2_list_add_incoming_window_state_changed(transport_global, + stream_global); } if (op->bind_pollset) { - add_to_pollset_locked(TRANSPORT_FROM_GLOBAL(transport_global), op->bind_pollset); + add_to_pollset_locked(TRANSPORT_FROM_GLOBAL(transport_global), + op->bind_pollset); } if (op->on_consumed) { @@ -651,11 +667,13 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { we are not parsing before continuing the cancellation to keep things in a sane state */ if (!t->parsing_active) { - while (grpc_chttp2_list_pop_cancelled_waiting_for_parsing(transport_global, &stream_global)) { + while (grpc_chttp2_list_pop_cancelled_waiting_for_parsing(transport_global, + &stream_global)) { GPR_ASSERT(stream_global->in_stream_map); grpc_chttp2_stream_map_delete(&t->parsing_stream_map, stream_global->id); stream_global->in_stream_map = 0; - grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); } } @@ -674,17 +692,18 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { #endif } -static void cancel_from_api( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global, - grpc_status_code status) { +static void cancel_from_api(grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, + grpc_status_code status) { stream_global->cancelled = 1; if (stream_global->in_stream_map) { gpr_slice_buffer_add(&transport_global->qbuf, - grpc_chttp2_rst_stream_create(stream_global->id, - grpc_chttp2_grpc_status_to_http2_status(status))); + grpc_chttp2_rst_stream_create( + stream_global->id, + grpc_chttp2_grpc_status_to_http2_status(status))); } else { - grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); } } @@ -773,7 +792,9 @@ static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, } #endif -static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global) { +static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, + void *user_data, + grpc_chttp2_stream_global *stream_global) { cancel_from_api(transport_global, stream_global, GRPC_STATUS_UNAVAILABLE); } @@ -848,8 +869,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, t->parsing_active = 1; grpc_chttp2_prepare_to_read(&t->global, &t->parsing); gpr_mu_unlock(&t->mu); - for (; - i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); + for (; i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); i++) { gpr_slice_unref(slices[i]); } @@ -954,7 +974,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { return; } if (t->global.goaway_state != GRPC_CHTTP2_ERROR_STATE_NONE) { - if (t->global.goaway_state == GRPC_CHTTP2_ERROR_STATE_SEEN && + if (t->global.goaway_state == GRPC_CHTTP2_ERROR_STATE_SEEN && t->global.error_state != GRPC_CHTTP2_ERROR_STATE_NOTIFIED) { notify_goaways_args *a = gpr_malloc(sizeof(*a)); a->error = t->global.goaway_error; @@ -973,12 +993,14 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { t->global.error_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; t->channel_callback.executing = 1; ref_transport(t); - grpc_chttp2_schedule_closure(&t->global, &t->channel_callback.notify_closed, 1); + grpc_chttp2_schedule_closure(&t->global, &t->channel_callback.notify_closed, + 1); } } -void grpc_chttp2_schedule_closure(grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, - int success) { +void grpc_chttp2_schedule_closure( + grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, + int success) { closure->success = success; closure->next = transport_global->pending_closures; transport_global->pending_closures = closure; From cdf52bc17296335ad5024f258337576aeb856afc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 13:00:27 -0700 Subject: [PATCH 29/97] Fixing stuff --- src/core/transport/chttp2/stream_lists.c | 4 ++-- src/core/transport/chttp2/writing.c | 4 +++- src/core/transport/chttp2_transport.c | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 85f6bd3616b..987dc1c11ee 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -158,8 +158,8 @@ void grpc_chttp2_list_add_writing_stream( int grpc_chttp2_list_have_writing_streams( grpc_chttp2_transport_writing *transport_writing) { - return stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), - GRPC_CHTTP2_LIST_WRITING); + return !stream_list_empty(TRANSPORT_FROM_WRITING(transport_writing), + GRPC_CHTTP2_LIST_WRITING); } int grpc_chttp2_list_pop_writing_stream( diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 6cc19aec837..4b2ee948c7e 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -130,12 +130,14 @@ int grpc_chttp2_unlocking_check_writes( transport_global->incoming_window += window_delta; } - return transport_writing->outbuf.length > 0 || + return transport_writing->outbuf.count > 0 || grpc_chttp2_list_have_writing_streams(transport_writing); } void grpc_chttp2_perform_writes( grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint) { + GPR_ASSERT(transport_writing->outbuf.count > 0 || grpc_chttp2_list_have_writing_streams(transport_writing)); + finalize_outbuf(transport_writing); GPR_ASSERT(transport_writing->outbuf.count > 0); diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 6198b786feb..7fdff42f027 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -227,10 +227,11 @@ static void init_transport(grpc_chttp2_transport *t, grpc_chttp2_stream_map_init(&t->new_stream_map, 8); /* copy in initial settings to all setting sets */ - for (i = 0; i < NUM_SETTING_SETS; i++) { - for (j = 0; j < GRPC_CHTTP2_NUM_SETTINGS; j++) { - t->global.settings[i][j] = - grpc_chttp2_settings_parameters[j].default_value; + for (i = 0; i < GRPC_CHTTP2_NUM_SETTINGS; i++) { + t->parsing.settings[i] = grpc_chttp2_settings_parameters[i].default_value; + for (j = 0; j < NUM_SETTING_SETS; j++) { + t->global.settings[j][i] = + grpc_chttp2_settings_parameters[i].default_value; } } t->global.dirtied_local_settings = 1; From cf1e319627dc4463629b14fbf8c40ba63e5c90db Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 14:28:22 -0700 Subject: [PATCH 30/97] Fixing stuff --- src/core/transport/chttp2/internal.h | 10 ++++++++++ src/core/transport/chttp2/parsing.c | 14 ++++++++++++-- src/core/transport/chttp2/stream_lists.c | 21 +++++++++++++++++++++ src/core/transport/chttp2/writing.c | 1 + src/core/transport/chttp2_transport.c | 4 +++- 5 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 06f114c2fba..74385e8ad93 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -63,6 +63,7 @@ typedef enum { GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE, GRPC_CHTTP2_LIST_PARSING_SEEN, GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING, + GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED, /** streams that are waiting to start because there are too many concurrent streams on the connection */ GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY, @@ -533,6 +534,15 @@ int grpc_chttp2_list_pop_writable_stream( grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_writing **stream_writing); +void grpc_chttp2_list_add_incoming_window_updated( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); +int grpc_chttp2_list_pop_incoming_window_updated( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_parsing **stream_parsing); + void grpc_chttp2_list_add_writing_stream( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index e45ebb7176e..4c681ec9d39 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -60,8 +60,18 @@ static int init_skip_frame_parser( static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last); -void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, - grpc_chttp2_transport_parsing *parsing) {} +void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_parsing *transport_parsing) { + grpc_chttp2_stream_global *stream_global; + grpc_chttp2_stream_parsing *stream_parsing; + + /* update the parsing view of incoming window */ + transport_parsing->incoming_window = transport_global->incoming_window; + while (grpc_chttp2_list_pop_incoming_window_updated( + transport_global, transport_parsing, &stream_global, &stream_parsing)) { + stream_parsing->incoming_window = transport_parsing->incoming_window; + } +} void grpc_chttp2_publish_reads( grpc_chttp2_transport_global *transport_global, diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 987dc1c11ee..dfead28e76f 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -267,6 +267,27 @@ int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( return r; } +void grpc_chttp2_list_add_incoming_window_updated( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); +} + +int grpc_chttp2_list_pop_incoming_window_updated( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_global **stream_global, + grpc_chttp2_stream_parsing **stream_parsing) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, + GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); + *stream_global = &stream->global; + *stream_parsing = &stream->parsing; + return r; +} + void grpc_chttp2_list_add_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 4b2ee948c7e..291c088d75e 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -116,6 +116,7 @@ int grpc_chttp2_unlocking_check_writes( &transport_writing->outbuf, grpc_chttp2_window_update_create(stream_global->id, window_delta)); stream_global->incoming_window += window_delta; + grpc_chttp2_list_add_incoming_window_updated(transport_global, stream_global); } } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 7fdff42f027..14e408a53fb 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -361,6 +361,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, t->global .settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; *t->accepting_stream = s; + grpc_chttp2_list_add_incoming_window_updated(&t->global, &s->global); grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); } @@ -397,7 +398,7 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); grpc_chttp2_stream *s = grpc_chttp2_stream_map_find(&t->parsing_stream_map, id); - return &s->parsing; + return s ? &s->parsing : NULL; } grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( @@ -558,6 +559,7 @@ static void maybe_start_some_streams( &TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map, stream_global->id, STREAM_FROM_GLOBAL(stream_global)); transport_global->concurrent_stream_count++; + grpc_chttp2_list_add_incoming_window_updated(transport_global, stream_global); grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } /* cancel out streams that will never be started */ From 6905b7ce0c455ea3be677fdc657804b97e9f6815 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 15:33:33 -0700 Subject: [PATCH 31/97] Implement more missing pieces --- src/core/transport/chttp2/internal.h | 3 ++- src/core/transport/chttp2/parsing.c | 2 ++ src/core/transport/chttp2_transport.c | 8 ++++---- src/core/transport/stream_op.c | 13 +++++++++++++ src/core/transport/stream_op.h | 2 ++ 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 74385e8ad93..b60811d71ec 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -430,7 +430,8 @@ typedef struct { /** address to publish next stream state to */ grpc_stream_state *publish_state; /** pointer to sop buffer to fill in with new stream ops */ - grpc_stream_op_buffer *incoming_sopb; + grpc_stream_op_buffer *publish_sopb; + grpc_stream_op_buffer incoming_sopb; /** incoming metadata */ grpc_chttp2_incoming_metadata_buffer incoming_metadata; diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 4c681ec9d39..91b509dc9a1 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -183,6 +183,8 @@ void grpc_chttp2_publish_reads( grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } + + /* publish incoming stream ops */ } } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 14e408a53fb..6bb9c720353 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -384,7 +384,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_unlock(&t->mu); GPR_ASSERT(s->global.outgoing_sopb == NULL); - GPR_ASSERT(s->global.incoming_sopb == NULL); + GPR_ASSERT(s->global.publish_sopb == NULL); grpc_sopb_destroy(&s->writing.sopb); grpc_chttp2_data_parser_destroy(&s->parsing.data_parser); grpc_chttp2_incoming_metadata_buffer_destroy(&s->parsing.incoming_metadata); @@ -604,11 +604,11 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, } if (op->recv_ops) { - GPR_ASSERT(stream_global->incoming_sopb == NULL); + GPR_ASSERT(stream_global->publish_sopb == NULL); GPR_ASSERT(stream_global->published_state != GRPC_STREAM_CLOSED); stream_global->recv_done_closure = op->on_done_recv; - stream_global->incoming_sopb = op->recv_ops; - stream_global->incoming_sopb->nops = 0; + stream_global->publish_sopb = op->recv_ops; + stream_global->publish_sopb->nops = 0; grpc_chttp2_incoming_metadata_live_op_buffer_end( &stream_global->outstanding_metadata); grpc_chttp2_list_add_read_write_state_changed(transport_global, diff --git a/src/core/transport/stream_op.c b/src/core/transport/stream_op.c index 8996ecac357..8b5549cd4c4 100644 --- a/src/core/transport/stream_op.c +++ b/src/core/transport/stream_op.c @@ -163,6 +163,19 @@ void grpc_sopb_append(grpc_stream_op_buffer *sopb, grpc_stream_op *ops, sopb->nops = new_nops; } +void grpc_sopb_move_to(grpc_stream_op_buffer *src, grpc_stream_op_buffer *dst) { + size_t i; + if (src->nops == 0) { + return; + } + if (dst->nops == 0) { + grpc_sopb_swap(src, dst); + return; + } + grpc_sopb_append(dst, src->ops, src->nops); + src->ops = 0; +} + static void assert_valid_list(grpc_mdelem_list *list) { #ifndef NDEBUG grpc_linked_mdelem *l; diff --git a/src/core/transport/stream_op.h b/src/core/transport/stream_op.h index 5215cc87b1d..644be567f3f 100644 --- a/src/core/transport/stream_op.h +++ b/src/core/transport/stream_op.h @@ -159,6 +159,8 @@ void grpc_sopb_add_slice(grpc_stream_op_buffer *sopb, gpr_slice slice); void grpc_sopb_append(grpc_stream_op_buffer *sopb, grpc_stream_op *ops, size_t nops); +void grpc_sopb_move_to(grpc_stream_op_buffer *src, grpc_stream_op_buffer *dst); + char *grpc_sopb_string(grpc_stream_op_buffer *sopb); #endif /* GRPC_INTERNAL_CORE_TRANSPORT_STREAM_OP_H */ From f73fcd1cb9f757e78c7b76205188a0f36b923cf0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 16:25:26 -0700 Subject: [PATCH 32/97] Fixing stuff --- src/core/transport/chttp2/internal.h | 3 +++ src/core/transport/chttp2/parsing.c | 5 ++++ src/core/transport/chttp2_transport.c | 34 +++++++++++++++++++-------- src/core/transport/stream_op.c | 3 +-- 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index b60811d71ec..88eb790d127 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -595,6 +595,9 @@ int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( void grpc_chttp2_list_add_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +int grpc_chttp2_list_pop_read_write_state_changed( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global); void grpc_chttp2_list_add_incoming_window_state_changed( grpc_chttp2_transport_global *transport_global, diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 91b509dc9a1..87055718060 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -185,6 +185,11 @@ void grpc_chttp2_publish_reads( } /* publish incoming stream ops */ + if (stream_parsing->data_parser.incoming_sopb.nops > 0) { + grpc_sopb_move_to(&stream_parsing->data_parser.incoming_sopb, &stream_global->incoming_sopb); + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); + } } } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 6bb9c720353..181a6b8c582 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -80,6 +80,7 @@ static void unlock(grpc_chttp2_transport *t); static void unlock_check_cancellations(grpc_chttp2_transport *t); static void unlock_check_channel_callbacks(grpc_chttp2_transport *t); +static void unlock_check_reads(grpc_chttp2_transport *t); /* forward declarations of various callbacks that we'll build closures around */ static void writing_action(void *t, int iomgr_success_ignored); @@ -345,6 +346,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, grpc_chttp2_incoming_metadata_buffer_init(&s->parsing.incoming_metadata); grpc_chttp2_incoming_metadata_buffer_init(&s->global.incoming_metadata); grpc_sopb_init(&s->writing.sopb); + grpc_sopb_init(&s->global.incoming_sopb); grpc_chttp2_data_parser_init(&s->parsing.data_parser); ref_transport(t); @@ -446,6 +448,7 @@ static void unlock(grpc_chttp2_transport *t) { grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); } unlock_check_cancellations(t); + unlock_check_reads(t); /* unlock_check_parser(t); */ unlock_check_channel_callbacks(t); @@ -695,6 +698,27 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { #endif } +static grpc_stream_state compute_state(gpr_uint8 write_closed, + gpr_uint8 read_closed) { + if (write_closed && read_closed) return GRPC_STREAM_CLOSED; + if (write_closed) return GRPC_STREAM_SEND_CLOSED; + if (read_closed) return GRPC_STREAM_RECV_CLOSED; + return GRPC_STREAM_OPEN; +} + +static void unlock_check_reads(grpc_chttp2_transport *t) { + grpc_chttp2_stream_global *stream_global; + + while (grpc_chttp2_pop_read_write_state_changed(&t->global, &stream_global)) { + if (!stream_global->publish_sopb) { + continue; + } + grpc_sopb_swap(stream_global->publish_sopb, &stream_global->incoming_sopb); + /* TODO(ctiller): we need to not publish closed until !writing, or define a new STREAM_DELETABLE state */ + stream_global->published_state = *stream_global->publish_state = compute_state(stream_global->write_closed, stream_global->read_closed && !stream_global->in_stream_map); + } +} + static void cancel_from_api(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_status_code status) { @@ -928,16 +952,6 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, * CALLBACK LOOP */ -#if 0 -static grpc_stream_state compute_state(gpr_uint8 write_closed, - gpr_uint8 read_closed) { - if (write_closed && read_closed) return GRPC_STREAM_CLOSED; - if (write_closed) return GRPC_STREAM_SEND_CLOSED; - if (read_closed) return GRPC_STREAM_RECV_CLOSED; - return GRPC_STREAM_OPEN; -} -#endif - typedef struct { grpc_chttp2_transport *t; gpr_uint32 error; diff --git a/src/core/transport/stream_op.c b/src/core/transport/stream_op.c index 8b5549cd4c4..cad17035d12 100644 --- a/src/core/transport/stream_op.c +++ b/src/core/transport/stream_op.c @@ -164,7 +164,6 @@ void grpc_sopb_append(grpc_stream_op_buffer *sopb, grpc_stream_op *ops, } void grpc_sopb_move_to(grpc_stream_op_buffer *src, grpc_stream_op_buffer *dst) { - size_t i; if (src->nops == 0) { return; } @@ -173,7 +172,7 @@ void grpc_sopb_move_to(grpc_stream_op_buffer *src, grpc_stream_op_buffer *dst) { return; } grpc_sopb_append(dst, src->ops, src->nops); - src->ops = 0; + src->nops = 0; } static void assert_valid_list(grpc_mdelem_list *list) { From 31123db74e37d75eeb12b35a2f07e5655914158b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 17:06:31 -0700 Subject: [PATCH 33/97] Implement more missing pieces --- src/core/transport/chttp2/incoming_metadata.c | 36 +++++++++++++++++++ src/core/transport/chttp2/incoming_metadata.h | 5 +++ src/core/transport/chttp2/parsing.c | 1 + src/core/transport/chttp2/stream_lists.c | 10 ++++++ src/core/transport/chttp2/writing.c | 1 + src/core/transport/chttp2_transport.c | 19 ++++++++-- 6 files changed, 69 insertions(+), 3 deletions(-) diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c index 5f32947df69..87b0a23795e 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -87,6 +87,42 @@ void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_ grpc_sopb_add_metadata(sopb, b); } +void grpc_chttp2_incoming_metadata_buffer_swap(grpc_chttp2_incoming_metadata_buffer *a, grpc_chttp2_incoming_metadata_buffer *b) { + GPR_SWAP(grpc_chttp2_incoming_metadata_buffer, *a, *b); +} + +void grpc_incoming_metadata_buffer_move_to_referencing_sopb( + grpc_chttp2_incoming_metadata_buffer *src, + grpc_chttp2_incoming_metadata_buffer *dst, + grpc_stream_op_buffer *sopb) { + size_t delta; + size_t i; + if (gpr_time_cmp(dst->deadline, gpr_inf_future) == 0) { + dst->deadline = src->deadline; + } else if (gpr_time_cmp(src->deadline, gpr_inf_future) != 0) { + dst->deadline = gpr_time_min(src->deadline, dst->deadline); + } + + if (src->count == 0) { + return; + } + if (dst->count == 0) { + grpc_chttp2_incoming_metadata_buffer_swap(src, dst); + return; + } + delta = dst->count; + if (dst->capacity < src->count + dst->count) { + dst->capacity = GPR_MAX(dst->capacity * 2, src->count + dst->count); + dst->elems = gpr_realloc(dst->elems, dst->capacity * sizeof(*dst->elems)); + } + memcpy(dst->elems + dst->count, src->elems, src->count * sizeof(*src->elems)); + dst->count += src->count; + for (i = 0; i < sopb->nops; i++) { + if (sopb->ops[i].type != GRPC_OP_METADATA) continue; + sopb->ops[i].data.metadata.list.tail = (void*)(delta + (gpr_intptr)sopb->ops[i].data.metadata.list.tail); + } +} + void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer) { diff --git a/src/core/transport/chttp2/incoming_metadata.h b/src/core/transport/chttp2/incoming_metadata.h index 5a7890a534f..bc7e3816bcb 100644 --- a/src/core/transport/chttp2/incoming_metadata.h +++ b/src/core/transport/chttp2/incoming_metadata.h @@ -66,6 +66,11 @@ void grpc_chttp2_incoming_metadata_buffer_set_deadline( void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); +void grpc_incoming_metadata_buffer_move_to_referencing_sopb( + grpc_chttp2_incoming_metadata_buffer *src, + grpc_chttp2_incoming_metadata_buffer *dst, + grpc_stream_op_buffer *sopb); + void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, grpc_chttp2_incoming_metadata_live_op_buffer *live_op_buffer); diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 87055718060..1acf0a4b915 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -186,6 +186,7 @@ void grpc_chttp2_publish_reads( /* publish incoming stream ops */ if (stream_parsing->data_parser.incoming_sopb.nops > 0) { + grpc_incoming_metadata_buffer_move_to_referencing_sopb(&stream_parsing->incoming_metadata, &stream_global->incoming_metadata, &stream_parsing->data_parser.incoming_sopb); grpc_sopb_move_to(&stream_parsing->data_parser.incoming_sopb, &stream_global->incoming_sopb); grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index dfead28e76f..24d8737ceb8 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -188,6 +188,7 @@ int grpc_chttp2_list_pop_written_stream( grpc_chttp2_stream *stream; int r = stream_list_pop(TRANSPORT_FROM_WRITING(transport_writing), &stream, GRPC_CHTTP2_LIST_WRITTEN); + *stream_global = &stream->global; *stream_writing = &stream->writing; return r; } @@ -296,6 +297,15 @@ void grpc_chttp2_list_add_read_write_state_changed( GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED); } +int grpc_chttp2_list_pop_read_write_state_changed( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global **stream_global) { + grpc_chttp2_stream *stream; + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED); + *stream_global = &stream->global; + return r; +} + void grpc_chttp2_list_add_incoming_window_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 291c088d75e..e83ec632b53 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -190,6 +190,7 @@ void grpc_chttp2_cleanup_writing( while (grpc_chttp2_list_pop_written_stream( transport_global, transport_writing, &stream_global, &stream_writing)) { + gpr_log(GPR_DEBUG, "sc:%d ws:%d", (int)stream_writing->send_closed, stream_global->write_state); if (stream_writing->send_closed != DONT_SEND_CLOSED) { stream_global->write_state = WRITE_STATE_SENT_CLOSE; if (!transport_global->is_client) { diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 181a6b8c582..c4838cceb8c 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -365,6 +365,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, *t->accepting_stream = s; grpc_chttp2_list_add_incoming_window_updated(&t->global, &s->global); grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); + s->global.in_stream_map = 1; } if (initial_op) perform_op_locked(&t->global, &s->global, initial_op); @@ -561,6 +562,7 @@ static void maybe_start_some_streams( grpc_chttp2_stream_map_add( &TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map, stream_global->id, STREAM_FROM_GLOBAL(stream_global)); + stream_global->in_stream_map = 1; transport_global->concurrent_stream_count++; grpc_chttp2_list_add_incoming_window_updated(transport_global, stream_global); grpc_chttp2_list_add_writable_stream(transport_global, stream_global); @@ -612,6 +614,7 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, stream_global->recv_done_closure = op->on_done_recv; stream_global->publish_sopb = op->recv_ops; stream_global->publish_sopb->nops = 0; + stream_global->publish_state = op->recv_state; grpc_chttp2_incoming_metadata_live_op_buffer_end( &stream_global->outstanding_metadata); grpc_chttp2_list_add_read_write_state_changed(transport_global, @@ -708,14 +711,24 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, static void unlock_check_reads(grpc_chttp2_transport *t) { grpc_chttp2_stream_global *stream_global; + grpc_stream_state state; - while (grpc_chttp2_pop_read_write_state_changed(&t->global, &stream_global)) { + while (grpc_chttp2_list_pop_read_write_state_changed(&t->global, &stream_global)) { if (!stream_global->publish_sopb) { continue; } + state = compute_state(stream_global->write_state == WRITE_STATE_SENT_CLOSE, stream_global->read_closed && !stream_global->in_stream_map); + gpr_log(GPR_DEBUG, "ws:%d rc:%d ism:%d => st:%d", stream_global->write_state, stream_global->read_closed, stream_global->in_stream_map, state); + if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { + continue; + } + grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op(&stream_global->incoming_metadata, &stream_global->incoming_sopb, &stream_global->outstanding_metadata); grpc_sopb_swap(stream_global->publish_sopb, &stream_global->incoming_sopb); - /* TODO(ctiller): we need to not publish closed until !writing, or define a new STREAM_DELETABLE state */ - stream_global->published_state = *stream_global->publish_state = compute_state(stream_global->write_closed, stream_global->read_closed && !stream_global->in_stream_map); + stream_global->published_state = *stream_global->publish_state = state; + grpc_chttp2_schedule_closure(&t->global, stream_global->recv_done_closure, 1); + stream_global->recv_done_closure = NULL; + stream_global->publish_sopb = NULL; + stream_global->publish_state = NULL; } } From 83fb070f15b2cdb96a2ad7c611a09ee33df001a3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 21:13:07 -0700 Subject: [PATCH 34/97] Read path improvements --- src/core/transport/chttp2/internal.h | 8 ++- src/core/transport/chttp2/parsing.c | 4 ++ src/core/transport/chttp2/stream_lists.c | 8 +-- src/core/transport/chttp2_transport.c | 72 ++++++++++++------------ 4 files changed, 48 insertions(+), 44 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 88eb790d127..7bd91334b4f 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -62,7 +62,7 @@ typedef enum { GRPC_CHTTP2_LIST_WRITTEN, GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE, GRPC_CHTTP2_LIST_PARSING_SEEN, - GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING, + GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING, GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED, /** streams that are waiting to start because there are too many concurrent streams on the connection */ @@ -585,10 +585,10 @@ int grpc_chttp2_list_pop_waiting_for_concurrency( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); -void grpc_chttp2_list_add_cancelled_waiting_for_parsing( +void grpc_chttp2_list_add_closed_waiting_for_parsing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); -int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( +int grpc_chttp2_list_pop_closed_waiting_for_parsing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); @@ -610,6 +610,8 @@ void grpc_chttp2_schedule_closure( grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); +void grpc_chttp2_parsing_remove_stream( + grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 1acf0a4b915..bd04acf60ff 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -175,6 +175,10 @@ void grpc_chttp2_publish_reads( /* updating closed status */ if (stream_parsing->received_close) { stream_global->read_closed = 1; + if (stream_global->write_state != WRITE_STATE_OPEN) { + stream_global->in_stream_map = 0; + grpc_chttp2_parsing_remove_stream(transport_parsing, stream_parsing->id); + } grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 24d8737ceb8..b70ac8c9f74 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -250,20 +250,20 @@ int grpc_chttp2_list_pop_waiting_for_concurrency( return r; } -void grpc_chttp2_list_add_cancelled_waiting_for_parsing( +void grpc_chttp2_list_add_closed_waiting_for_parsing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), - GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); + GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING); } -int grpc_chttp2_list_pop_cancelled_waiting_for_parsing( +int grpc_chttp2_list_pop_closed_waiting_for_parsing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global) { grpc_chttp2_stream *stream; int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, - GRPC_CHTTP2_LIST_CANCELLED_WAITING_FOR_PARSING); + GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING); *stream_global = &stream->global; return r; } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index c4838cceb8c..39df9fc3408 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -78,9 +78,8 @@ static const grpc_transport_vtable vtable; static void lock(grpc_chttp2_transport *t); static void unlock(grpc_chttp2_transport *t); -static void unlock_check_cancellations(grpc_chttp2_transport *t); static void unlock_check_channel_callbacks(grpc_chttp2_transport *t); -static void unlock_check_reads(grpc_chttp2_transport *t); +static void unlock_check_read_write_state(grpc_chttp2_transport *t); /* forward declarations of various callbacks that we'll build closures around */ static void writing_action(void *t, int iomgr_success_ignored); @@ -198,6 +197,7 @@ static void init_transport(grpc_chttp2_transport *t, t->global.incoming_window = DEFAULT_WINDOW; t->global.connection_window_target = DEFAULT_CONNECTION_WINDOW_TARGET; t->global.ping_counter = 1; + t->global.pings.next = t->global.pings.prev = &t->global.pings; t->parsing.is_client = is_client; t->parsing.str_grpc_timeout = grpc_mdstr_from_string(t->metadata_context, "grpc-timeout"); @@ -382,6 +382,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || s->global.id == 0); + GPR_ASSERT(!s->global.in_stream_map); grpc_chttp2_unregister_stream(t, s); gpr_mu_unlock(&t->mu); @@ -404,6 +405,12 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( return s ? &s->parsing : NULL; } +void grpc_chttp2_parsing_remove_stream( + grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { + grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); + grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); +} + grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { grpc_chttp2_stream *accepting; @@ -448,8 +455,7 @@ static void unlock(grpc_chttp2_transport *t) { ref_transport(t); grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); } - unlock_check_cancellations(t); - unlock_check_reads(t); + unlock_check_read_write_state(t); /* unlock_check_parser(t); */ unlock_check_channel_callbacks(t); @@ -668,17 +674,28 @@ static void send_ping(grpc_transport *gt, grpc_iomgr_closure *on_recv) { * INPUT PROCESSING */ -static void unlock_check_cancellations(grpc_chttp2_transport *t) { +static grpc_stream_state compute_state(gpr_uint8 write_closed, + gpr_uint8 read_closed) { + if (write_closed && read_closed) return GRPC_STREAM_CLOSED; + if (write_closed) return GRPC_STREAM_SEND_CLOSED; + if (read_closed) return GRPC_STREAM_RECV_CLOSED; + return GRPC_STREAM_OPEN; +} + +static void unlock_check_read_write_state(grpc_chttp2_transport *t) { grpc_chttp2_transport_global *transport_global = &t->global; grpc_chttp2_stream_global *stream_global; + grpc_stream_state state; /* if a stream is in the stream map, and gets cancelled, we need to ensure we are not parsing before continuing the cancellation to keep things in a sane state */ if (!t->parsing_active) { - while (grpc_chttp2_list_pop_cancelled_waiting_for_parsing(transport_global, - &stream_global)) { + while (grpc_chttp2_list_pop_closed_waiting_for_parsing(transport_global, + &stream_global)) { GPR_ASSERT(stream_global->in_stream_map); + GPR_ASSERT(stream_global->write_state != WRITE_STATE_OPEN); + GPR_ASSERT(stream_global->read_closed); grpc_chttp2_stream_map_delete(&t->parsing_stream_map, stream_global->id); stream_global->in_stream_map = 0; grpc_chttp2_list_add_read_write_state_changed(transport_global, @@ -686,46 +703,27 @@ static void unlock_check_cancellations(grpc_chttp2_transport *t) { } } -#if 0 - grpc_chttp2_stream *s; - - if (t->writing_active) { - return; - } - - while ((s = stream_list_remove_head(t, CANCELLED))) { - s->global.read_closed = 1; - s->global.write_state = WRITE_STATE_SENT_CLOSE; - grpc_chttp2_list_add_read_write_state_changed(&t->global, &s->global); - } -#endif -} - -static grpc_stream_state compute_state(gpr_uint8 write_closed, - gpr_uint8 read_closed) { - if (write_closed && read_closed) return GRPC_STREAM_CLOSED; - if (write_closed) return GRPC_STREAM_SEND_CLOSED; - if (read_closed) return GRPC_STREAM_RECV_CLOSED; - return GRPC_STREAM_OPEN; -} - -static void unlock_check_reads(grpc_chttp2_transport *t) { - grpc_chttp2_stream_global *stream_global; - grpc_stream_state state; - - while (grpc_chttp2_list_pop_read_write_state_changed(&t->global, &stream_global)) { + while (grpc_chttp2_list_pop_read_write_state_changed(transport_global, &stream_global)) { if (!stream_global->publish_sopb) { continue; } + if (stream_global->write_state != WRITE_STATE_OPEN && stream_global->read_closed && stream_global->in_stream_map) { + if (t->parsing_active) { + grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, stream_global); + } else { + grpc_chttp2_stream_map_delete(&t->parsing_stream_map, stream_global->id); + stream_global->in_stream_map = 0; + } + } state = compute_state(stream_global->write_state == WRITE_STATE_SENT_CLOSE, stream_global->read_closed && !stream_global->in_stream_map); - gpr_log(GPR_DEBUG, "ws:%d rc:%d ism:%d => st:%d", stream_global->write_state, stream_global->read_closed, stream_global->in_stream_map, state); + gpr_log(GPR_DEBUG, "cl:%d id:%d ws:%d rc:%d ism:%d => st:%d", t->global.is_client, stream_global->id, stream_global->write_state, stream_global->read_closed, stream_global->in_stream_map, state); if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { continue; } grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op(&stream_global->incoming_metadata, &stream_global->incoming_sopb, &stream_global->outstanding_metadata); grpc_sopb_swap(stream_global->publish_sopb, &stream_global->incoming_sopb); stream_global->published_state = *stream_global->publish_state = state; - grpc_chttp2_schedule_closure(&t->global, stream_global->recv_done_closure, 1); + grpc_chttp2_schedule_closure(transport_global, stream_global->recv_done_closure, 1); stream_global->recv_done_closure = NULL; stream_global->publish_sopb = NULL; stream_global->publish_state = NULL; From 759eb32207185ce19d61ce7043d67bd278b30006 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 16 Jun 2015 22:41:18 -0700 Subject: [PATCH 35/97] First request/response with separated chttp2 lock passes --- src/core/transport/chttp2/internal.h | 37 +----------- src/core/transport/chttp2/parsing.c | 4 -- src/core/transport/chttp2/stream_lists.c | 25 +++++--- src/core/transport/chttp2/writing.c | 4 +- src/core/transport/chttp2_transport.c | 77 +++++++++++++++--------- 5 files changed, 70 insertions(+), 77 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 7bd91334b4f..078d1501bb5 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -56,7 +56,6 @@ typedef struct grpc_chttp2_stream grpc_chttp2_stream; typedef enum { GRPC_CHTTP2_LIST_ALL_STREAMS, GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED, - GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED, GRPC_CHTTP2_LIST_WRITABLE, GRPC_CHTTP2_LIST_WRITING, GRPC_CHTTP2_LIST_WRITTEN, @@ -67,29 +66,6 @@ typedef enum { /** streams that are waiting to start because there are too many concurrent streams on the connection */ GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY, -#if 0 - /* streams that have pending writes */ - WRITABLE = 0, - /* streams that have been selected to be written */ - WRITING, - /* streams that have just been written, and included a close */ - WRITTEN_CLOSED, - /* streams that have been cancelled and have some pending state updates - to perform */ - CANCELLED, - /* streams that want to send window updates */ - WINDOW_UPDATE, - /* streams that are waiting to start because there are too many concurrent - streams on the connection */ - WAITING_FOR_CONCURRENCY, - /* streams that have finished reading: we wait until unlock to coalesce - all changes into one callback */ - FINISHED_READ_OP, - MAYBE_FINISH_READ_AFTER_PARSE, - PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE, - OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE, - NEW_OUTGOING_WINDOW, -#endif STREAM_LIST_COUNT /* must be last */ } grpc_chttp2_stream_list_id; @@ -543,6 +519,9 @@ int grpc_chttp2_list_pop_incoming_window_updated( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_global **stream_global, grpc_chttp2_stream_parsing **stream_parsing); +void grpc_chttp2_list_remove_incoming_window_updated( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); void grpc_chttp2_list_add_writing_stream( grpc_chttp2_transport_writing *transport_writing, @@ -599,10 +578,6 @@ int grpc_chttp2_list_pop_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); -void grpc_chttp2_list_add_incoming_window_state_changed( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global); - /** schedule a closure to run without the transport lock taken */ void grpc_chttp2_schedule_closure( grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, @@ -610,8 +585,6 @@ void grpc_chttp2_schedule_closure( grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); -void grpc_chttp2_parsing_remove_stream( - grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id); @@ -619,10 +592,6 @@ void grpc_chttp2_add_incoming_goaway( grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, gpr_slice goaway_text); -void grpc_chttp2_remove_from_stream_map( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global); - void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); void grpc_chttp2_unregister_stream(grpc_chttp2_transport *t, diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index bd04acf60ff..1acf0a4b915 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -175,10 +175,6 @@ void grpc_chttp2_publish_reads( /* updating closed status */ if (stream_parsing->received_close) { stream_global->read_closed = 1; - if (stream_global->write_state != WRITE_STATE_OPEN) { - stream_global->in_stream_map = 0; - grpc_chttp2_parsing_remove_stream(transport_parsing, stream_parsing->id); - } grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index b70ac8c9f74..72431ff6a65 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -100,6 +100,13 @@ static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, } } +static void stream_list_maybe_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { + if (s->included[id]) { + stream_list_remove(t, s, id); + } +} + static void stream_list_add_tail(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_stream_list_id id) { @@ -273,7 +280,7 @@ void grpc_chttp2_list_add_incoming_window_updated( grpc_chttp2_stream_global *stream_global) { stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), - GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); + GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED); } int grpc_chttp2_list_pop_incoming_window_updated( @@ -283,12 +290,18 @@ int grpc_chttp2_list_pop_incoming_window_updated( grpc_chttp2_stream_parsing **stream_parsing) { grpc_chttp2_stream *stream; int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, - GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); + GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED); *stream_global = &stream->global; *stream_parsing = &stream->parsing; return r; } +void grpc_chttp2_list_remove_incoming_window_updated( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_maybe_remove(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED); +} + void grpc_chttp2_list_add_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { @@ -306,14 +319,6 @@ int grpc_chttp2_list_pop_read_write_state_changed( return r; } -void grpc_chttp2_list_add_incoming_window_state_changed( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), - STREAM_FROM_GLOBAL(stream_global), - GRPC_CHTTP2_LIST_INCOMING_WINDOW_STATE_CHANGED); -} - void grpc_chttp2_register_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { stream_list_add_tail(t, s, GRPC_CHTTP2_LIST_ALL_STREAMS); diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index e83ec632b53..e7a00db062c 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -98,7 +98,7 @@ int grpc_chttp2_unlocking_check_writes( stream_global->outgoing_sopb = NULL; grpc_chttp2_schedule_closure(transport_global, stream_global->send_done_closure, 1); - } else if (stream_global->outgoing_window) { + } else if (stream_global->outgoing_window > 0) { grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } } @@ -112,6 +112,7 @@ int grpc_chttp2_unlocking_check_writes( [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - stream_global->incoming_window; if (!stream_global->read_closed && window_delta > 0) { + GPR_ASSERT(stream_global->in_stream_map); gpr_slice_buffer_add( &transport_writing->outbuf, grpc_chttp2_window_update_create(stream_global->id, window_delta)); @@ -190,7 +191,6 @@ void grpc_chttp2_cleanup_writing( while (grpc_chttp2_list_pop_written_stream( transport_global, transport_writing, &stream_global, &stream_writing)) { - gpr_log(GPR_DEBUG, "sc:%d ws:%d", (int)stream_writing->send_closed, stream_global->write_state); if (stream_writing->send_closed != DONT_SEND_CLOSED) { stream_global->write_state = WRITE_STATE_SENT_CLOSE; if (!transport_global->is_client) { diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 39df9fc3408..140c9ae8f67 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -49,6 +49,8 @@ #include #include +/* #define REFCOUNTING_DEBUG */ + #define DEFAULT_WINDOW 65535 #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) #define MAX_WINDOW 0x7fffffffu @@ -161,12 +163,29 @@ static void destruct_transport(grpc_chttp2_transport *t) { gpr_free(t); } +#ifdef REFCOUNTING_DEBUG +#define REF_TRANSPORT(t, r) ref_transport(t, r, __FILE__, __LINE__) +#define UNREF_TRANSPORT(t, r) unref_transport(t, r, __FILE__, __LINE__) +static void unref_transport(grpc_chttp2_transport *t, const char *reason, const char *file, int line) { + gpr_log(GPR_DEBUG, "chttp2:unref:%p %d->%d %s [%s:%d]", t, t->refs.count, t->refs.count-1, reason, file, line); + if (!gpr_unref(&t->refs)) return; + destruct_transport(t); +} + +static void ref_transport(grpc_chttp2_transport *t, const char *reason, const char *file, int line) { + gpr_log(GPR_DEBUG, "chttp2: ref:%p %d->%d %s [%s:%d]", t, t->refs.count, t->refs.count+1, reason, file, line); + gpr_ref(&t->refs); +} +#else +#define REF_TRANSPORT(t, r) ref_transport(t) +#define UNREF_TRANSPORT(t, r) unref_transport(t) static void unref_transport(grpc_chttp2_transport *t) { if (!gpr_unref(&t->refs)) return; destruct_transport(t); } static void ref_transport(grpc_chttp2_transport *t) { gpr_ref(&t->refs); } +#endif static void init_transport(grpc_chttp2_transport *t, grpc_transport_setup_callback setup, void *arg, @@ -282,7 +301,7 @@ static void init_transport(grpc_chttp2_transport *t, gpr_mu_lock(&t->mu); t->channel_callback.executing = 1; - ref_transport(t); /* matches unref at end of this function */ + REF_TRANSPORT(t, "init"); /* matches unref at end of this function */ gpr_mu_unlock(&t->mu); sr = setup(arg, &t->base, t->metadata_context); @@ -293,10 +312,10 @@ static void init_transport(grpc_chttp2_transport *t, t->channel_callback.executing = 0; unlock(t); - ref_transport(t); /* matches unref inside recv_data */ + REF_TRANSPORT(t, "recv_data"); /* matches unref inside recv_data */ recv_data(t, slices, nslices, GRPC_ENDPOINT_CB_OK); - unref_transport(t); + UNREF_TRANSPORT(t, "init"); } static void destroy_transport(grpc_transport *gt) { @@ -307,7 +326,7 @@ static void destroy_transport(grpc_transport *gt) { drop_connection(t); unlock(t); - unref_transport(t); + UNREF_TRANSPORT(t, "destroy"); } static void close_transport_locked(grpc_chttp2_transport *t) { @@ -349,7 +368,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, grpc_sopb_init(&s->global.incoming_sopb); grpc_chttp2_data_parser_init(&s->parsing.data_parser); - ref_transport(t); + REF_TRANSPORT(t, "stream"); lock(t); grpc_chttp2_register_stream(t, s); @@ -384,6 +403,9 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { s->global.id == 0); GPR_ASSERT(!s->global.in_stream_map); grpc_chttp2_unregister_stream(t, s); + if (!t->parsing_active && s->global.id) { + GPR_ASSERT(grpc_chttp2_stream_map_find(&t->parsing_stream_map, s->global.id) == NULL); + } gpr_mu_unlock(&t->mu); @@ -394,7 +416,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_incoming_metadata_buffer_destroy(&s->parsing.incoming_metadata); grpc_chttp2_incoming_metadata_buffer_destroy(&s->global.incoming_metadata); - unref_transport(t); + UNREF_TRANSPORT(t, "stream"); } grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( @@ -405,12 +427,6 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( return s ? &s->parsing : NULL; } -void grpc_chttp2_parsing_remove_stream( - grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { - grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); - grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); -} - grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( grpc_chttp2_transport_parsing *transport_parsing, gpr_uint32 id) { grpc_chttp2_stream *accepting; @@ -452,7 +468,7 @@ static void unlock(grpc_chttp2_transport *t) { if (!t->writing_active && grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { t->writing_active = 1; - ref_transport(t); + REF_TRANSPORT(t, "writing"); grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); } unlock_check_read_write_state(t); @@ -509,12 +525,12 @@ void grpc_chttp2_terminate_writing( if (!t->endpoint_reading) { grpc_endpoint_destroy(t->ep); t->ep = NULL; - unref_transport(t); /* safe because we'll still have the ref for write */ + UNREF_TRANSPORT(t, "disconnect"); /* safe because we'll still have the ref for write */ } unlock(t); - unref_transport(t); + UNREF_TRANSPORT(t, "writing"); } static void writing_action(void *gt, int iomgr_success_ignored) { @@ -625,7 +641,7 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, &stream_global->outstanding_metadata); grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); - grpc_chttp2_list_add_incoming_window_state_changed(transport_global, + grpc_chttp2_list_add_writable_window_update_stream(transport_global, stream_global); } @@ -682,6 +698,13 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, return GRPC_STREAM_OPEN; } +static void remove_stream(grpc_chttp2_transport *t, gpr_uint32 id) { + grpc_chttp2_stream *s = grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); + GPR_ASSERT(s); + s->global.in_stream_map = 0; + grpc_chttp2_list_remove_incoming_window_updated(&t->global, &s->global); +} + static void unlock_check_read_write_state(grpc_chttp2_transport *t) { grpc_chttp2_transport_global *transport_global = &t->global; grpc_chttp2_stream_global *stream_global; @@ -696,8 +719,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { GPR_ASSERT(stream_global->in_stream_map); GPR_ASSERT(stream_global->write_state != WRITE_STATE_OPEN); GPR_ASSERT(stream_global->read_closed); - grpc_chttp2_stream_map_delete(&t->parsing_stream_map, stream_global->id); - stream_global->in_stream_map = 0; + remove_stream(t, stream_global->id); grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } @@ -711,12 +733,10 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { if (t->parsing_active) { grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, stream_global); } else { - grpc_chttp2_stream_map_delete(&t->parsing_stream_map, stream_global->id); - stream_global->in_stream_map = 0; + remove_stream(t, stream_global->id); } } state = compute_state(stream_global->write_state == WRITE_STATE_SENT_CLOSE, stream_global->read_closed && !stream_global->in_stream_map); - gpr_log(GPR_DEBUG, "cl:%d id:%d ws:%d rc:%d ism:%d => st:%d", t->global.is_client, stream_global->id, stream_global->write_state, stream_global->read_closed, stream_global->in_stream_map, state); if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { continue; } @@ -893,10 +913,10 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, if (!t->writing_active && t->ep) { grpc_endpoint_destroy(t->ep); t->ep = NULL; - unref_transport(t); /* safe as we still have a ref for read */ + UNREF_TRANSPORT(t, "disconnect"); /* safe as we still have a ref for read */ } unlock(t); - unref_transport(t); + UNREF_TRANSPORT(t, "recv_data"); for (i = 0; i < nslices; i++) gpr_slice_unref(slices[i]); break; case GRPC_ENDPOINT_CB_OK: @@ -905,6 +925,9 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, GPR_ASSERT(!t->parsing_active); if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { t->parsing_active = 1; + /* merge stream lists */ + grpc_chttp2_stream_map_move_into(&t->new_stream_map, + &t->parsing_stream_map); grpc_chttp2_prepare_to_read(&t->global, &t->parsing); gpr_mu_unlock(&t->mu); for (; i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); @@ -983,7 +1006,7 @@ static void notify_goaways(void *p, int iomgr_success_ignored) { t->channel_callback.executing = 0; unlock(t); - unref_transport(t); + UNREF_TRANSPORT(t, "notify_goaways"); } static void notify_closed(void *gt, int iomgr_success_ignored) { @@ -994,7 +1017,7 @@ static void notify_closed(void *gt, int iomgr_success_ignored) { t->channel_callback.executing = 0; unlock(t); - unref_transport(t); + UNREF_TRANSPORT(t, "notify_closed"); } static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { @@ -1010,7 +1033,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { t->global.goaway_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; t->channel_callback.executing = 1; grpc_iomgr_closure_init(&a->closure, notify_goaways, a); - ref_transport(t); + REF_TRANSPORT(t, "notify_goaways"); grpc_chttp2_schedule_closure(&t->global, &a->closure, 1); return; } else if (t->global.goaway_state != GRPC_CHTTP2_ERROR_STATE_NOTIFIED) { @@ -1020,7 +1043,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_SEEN) { t->global.error_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; t->channel_callback.executing = 1; - ref_transport(t); + REF_TRANSPORT(t, "notify_closed"); grpc_chttp2_schedule_closure(&t->global, &t->channel_callback.notify_closed, 1); } From f932fd506dfb62a2c31c11a03249ba813a6f7acc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 07:38:20 -0700 Subject: [PATCH 36/97] Handle endpoint disconnection better --- src/core/transport/chttp2/parsing.c | 5 +++++ src/core/transport/chttp2/writing.c | 5 +++++ src/core/transport/chttp2_transport.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 1acf0a4b915..cea10b592e8 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -667,6 +667,11 @@ static int init_rst_stream_parser( &transport_parsing->simple.rst_stream, transport_parsing->incoming_frame_size, transport_parsing->incoming_frame_flags); + transport_parsing->incoming_stream = grpc_chttp2_parsing_lookup_stream(transport_parsing, + transport_parsing->incoming_stream_id); + if (!transport_parsing->incoming_stream) { + return init_skip_frame_parser(transport_parsing, 0); + } transport_parsing->parser = grpc_chttp2_rst_stream_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.rst_stream; return ok; diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index e7a00db062c..9c51fe4d0ba 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -144,6 +144,11 @@ void grpc_chttp2_perform_writes( GPR_ASSERT(transport_writing->outbuf.count > 0); + if (!endpoint) { + grpc_chttp2_terminate_writing(transport_writing, 0); + return; + } + switch (grpc_endpoint_write(endpoint, transport_writing->outbuf.slices, transport_writing->outbuf.count, finish_write_cb, transport_writing)) { diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 140c9ae8f67..582b7ae42a8 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -522,7 +522,7 @@ void grpc_chttp2_terminate_writing( /* leave the writing flag up on shutdown to prevent further writes in unlock() from starting */ t->writing_active = 0; - if (!t->endpoint_reading) { + if (t->ep && !t->endpoint_reading) { grpc_endpoint_destroy(t->ep); t->ep = NULL; UNREF_TRANSPORT(t, "disconnect"); /* safe because we'll still have the ref for write */ From aa642de0b7261642892f81bd1cae04987de9c299 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 07:48:43 -0700 Subject: [PATCH 37/97] Remove bogus assert --- src/core/transport/chttp2/writing.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 9c51fe4d0ba..97b2d4471cc 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -112,7 +112,6 @@ int grpc_chttp2_unlocking_check_writes( [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - stream_global->incoming_window; if (!stream_global->read_closed && window_delta > 0) { - GPR_ASSERT(stream_global->in_stream_map); gpr_slice_buffer_add( &transport_writing->outbuf, grpc_chttp2_window_update_create(stream_global->id, window_delta)); From 66abdaad3274b33e99042b5e493e749991201f81 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 08:00:39 -0700 Subject: [PATCH 38/97] Properly deal with streams closing during parsing --- src/core/transport/chttp2/internal.h | 2 ++ src/core/transport/chttp2/parsing.c | 7 +++++-- src/core/transport/chttp2_transport.c | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 078d1501bb5..644523e8104 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -601,6 +601,8 @@ void grpc_chttp2_for_all_streams( void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)); +void grpc_chttp2_parsing_become_skip_parser(grpc_chttp2_transport_parsing *transport_parsing); + #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1) diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index cea10b592e8..93e8dcc1c8e 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -327,6 +327,7 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, if (!parse_frame_slice(transport_parsing, gpr_empty_slice(), 1)) { return 0; } + transport_parsing->incoming_stream = NULL; if (++cur == end) { transport_parsing->deframe_state = DTS_FH_0; return 1; @@ -346,6 +347,7 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, return 0; } transport_parsing->deframe_state = DTS_FH_0; + transport_parsing->incoming_stream = NULL; return 1; } else if ((gpr_uint32)(end - cur) > transport_parsing->incoming_frame_size) { @@ -358,6 +360,7 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, return 0; } cur += transport_parsing->incoming_frame_size; + transport_parsing->incoming_stream = NULL; goto dts_fh_0; /* loop */ } else { if (!parse_frame_slice( @@ -447,7 +450,7 @@ static int init_skip_frame_parser( return 1; } -static void become_skip_parser( +void grpc_chttp2_parsing_become_skip_parser( grpc_chttp2_transport_parsing *transport_parsing) { init_skip_frame_parser( transport_parsing, @@ -736,7 +739,7 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, } return 1; case GRPC_CHTTP2_STREAM_ERROR: - become_skip_parser(transport_parsing); + grpc_chttp2_parsing_become_skip_parser(transport_parsing); if (stream_parsing) { stream_parsing->saw_rst_stream = 1; stream_parsing->rst_stream_reason = GRPC_CHTTP2_PROTOCOL_ERROR; diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 582b7ae42a8..3cd6c1f67b6 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -702,6 +702,10 @@ static void remove_stream(grpc_chttp2_transport *t, gpr_uint32 id) { grpc_chttp2_stream *s = grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); GPR_ASSERT(s); s->global.in_stream_map = 0; + if (t->parsing.incoming_stream == &s->parsing) { + t->parsing.incoming_stream = NULL; + grpc_chttp2_parsing_become_skip_parser(&t->parsing); + } grpc_chttp2_list_remove_incoming_window_updated(&t->global, &s->global); } From d53d21428c156e6e02f553acdce9801a8e83f0de Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 15:57:54 -0700 Subject: [PATCH 39/97] Make tcp trace more readable --- test/core/end2end/tests/invoke_large_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index ae85af980ac..744a9ada57d 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -97,7 +97,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static gpr_slice large_slice(void) { gpr_slice slice = gpr_slice_malloc(1000000); - memset(GPR_SLICE_START_PTR(slice), 0xab, GPR_SLICE_LENGTH(slice)); + memset(GPR_SLICE_START_PTR(slice), 'x', GPR_SLICE_LENGTH(slice)); return slice; } From 285b882157f4d42b776fb959b42bca39a6158768 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 15:58:13 -0700 Subject: [PATCH 40/97] Flow control bugfixes --- src/core/transport/chttp2/frame_data.c | 7 +- .../transport/chttp2/frame_window_update.c | 7 + src/core/transport/chttp2/hpack_parser.c | 2 + src/core/transport/chttp2/incoming_metadata.c | 17 ++- src/core/transport/chttp2/incoming_metadata.h | 5 +- src/core/transport/chttp2/internal.h | 28 +++- src/core/transport/chttp2/parsing.c | 117 +++++++++++----- src/core/transport/chttp2/stream_lists.c | 12 +- src/core/transport/chttp2/writing.c | 22 ++- src/core/transport/chttp2_transport.c | 126 +++++++++++------- 10 files changed, 244 insertions(+), 99 deletions(-) diff --git a/src/core/transport/chttp2/frame_data.c b/src/core/transport/chttp2/frame_data.c index c1f6df6aa48..0ad62a9999b 100644 --- a/src/core/transport/chttp2/frame_data.c +++ b/src/core/transport/chttp2/frame_data.c @@ -133,8 +133,13 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( /* fallthrough */ case GRPC_CHTTP2_DATA_FRAME: if (cur == end) { + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, + stream_parsing); return GRPC_CHTTP2_PARSE_OK; - } else if ((gpr_uint32)(end - cur) == p->frame_size) { + } + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, + stream_parsing); + if ((gpr_uint32)(end - cur) == p->frame_size) { grpc_sopb_add_slice(&p->incoming_sopb, gpr_slice_sub(slice, cur - beg, end - beg)); p->state = GRPC_CHTTP2_DATA_FH_0; diff --git a/src/core/transport/chttp2/frame_window_update.c b/src/core/transport/chttp2/frame_window_update.c index 6c963aa44dd..b817df77459 100644 --- a/src/core/transport/chttp2/frame_window_update.c +++ b/src/core/transport/chttp2/frame_window_update.c @@ -96,9 +96,16 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( if (transport_parsing->incoming_stream_id) { if (stream_parsing) { + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("update", transport_parsing, + stream_parsing, outgoing_window_update, + p->amount); stream_parsing->outgoing_window_update += p->amount; + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, + stream_parsing); } } else { + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT("update", transport_parsing, + outgoing_window_update, p->amount); transport_parsing->outgoing_window_update += p->amount; } } diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index 4b11d46cfed..b8ab664db50 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -1395,6 +1395,8 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( &stream_parsing->incoming_metadata, &stream_parsing->data_parser.incoming_sopb); + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, + stream_parsing); } if (parser->is_eof) { stream_parsing->received_close = 1; diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c index 87b0a23795e..ea5215b1bd9 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -71,7 +71,8 @@ void grpc_chttp2_incoming_metadata_live_op_buffer_end( buffer->elems = NULL; } -void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb) { +void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( + grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb) { grpc_metadata_batch b; b.list.head = NULL; @@ -79,7 +80,7 @@ void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_ we can reconstitute the list. We can't do list building here as later incoming metadata may reallocate the underlying array. */ - b.list.tail = (void*)(gpr_intptr)buffer->count; + b.list.tail = (void *)(gpr_intptr)buffer->count; b.garbage.head = b.garbage.tail = NULL; b.deadline = buffer->deadline; buffer->deadline = gpr_inf_future; @@ -87,14 +88,15 @@ void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into(grpc_chttp2_ grpc_sopb_add_metadata(sopb, b); } -void grpc_chttp2_incoming_metadata_buffer_swap(grpc_chttp2_incoming_metadata_buffer *a, grpc_chttp2_incoming_metadata_buffer *b) { +void grpc_chttp2_incoming_metadata_buffer_swap( + grpc_chttp2_incoming_metadata_buffer *a, + grpc_chttp2_incoming_metadata_buffer *b) { GPR_SWAP(grpc_chttp2_incoming_metadata_buffer, *a, *b); } void grpc_incoming_metadata_buffer_move_to_referencing_sopb( - grpc_chttp2_incoming_metadata_buffer *src, - grpc_chttp2_incoming_metadata_buffer *dst, - grpc_stream_op_buffer *sopb) { + grpc_chttp2_incoming_metadata_buffer *src, + grpc_chttp2_incoming_metadata_buffer *dst, grpc_stream_op_buffer *sopb) { size_t delta; size_t i; if (gpr_time_cmp(dst->deadline, gpr_inf_future) == 0) { @@ -119,7 +121,8 @@ void grpc_incoming_metadata_buffer_move_to_referencing_sopb( dst->count += src->count; for (i = 0; i < sopb->nops; i++) { if (sopb->ops[i].type != GRPC_OP_METADATA) continue; - sopb->ops[i].data.metadata.list.tail = (void*)(delta + (gpr_intptr)sopb->ops[i].data.metadata.list.tail); + sopb->ops[i].data.metadata.list.tail = + (void *)(delta + (gpr_intptr)sopb->ops[i].data.metadata.list.tail); } } diff --git a/src/core/transport/chttp2/incoming_metadata.h b/src/core/transport/chttp2/incoming_metadata.h index bc7e3816bcb..2f1de411bae 100644 --- a/src/core/transport/chttp2/incoming_metadata.h +++ b/src/core/transport/chttp2/incoming_metadata.h @@ -67,9 +67,8 @@ void grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb); void grpc_incoming_metadata_buffer_move_to_referencing_sopb( - grpc_chttp2_incoming_metadata_buffer *src, - grpc_chttp2_incoming_metadata_buffer *dst, - grpc_stream_op_buffer *sopb); + grpc_chttp2_incoming_metadata_buffer *src, + grpc_chttp2_incoming_metadata_buffer *dst, grpc_stream_op_buffer *sopb); void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( grpc_chttp2_incoming_metadata_buffer *buffer, grpc_stream_op_buffer *sopb, diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 644523e8104..96390fe7ce5 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -218,6 +218,8 @@ typedef struct { gpr_slice_buffer outbuf; /** hpack encoding */ grpc_chttp2_hpack_compressor hpack_compressor; + /** is this a client? */ + gpr_uint8 is_client; } grpc_chttp2_transport_writing; struct grpc_chttp2_transport_parsing { @@ -252,6 +254,7 @@ struct grpc_chttp2_transport_parsing { /** window available for peer to send to us */ gpr_uint32 incoming_window; + gpr_uint32 incoming_window_delta; /** next stream id available at the time of beginning parsing */ gpr_uint32 next_stream_id; @@ -601,13 +604,15 @@ void grpc_chttp2_for_all_streams( void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)); -void grpc_chttp2_parsing_become_skip_parser(grpc_chttp2_transport_parsing *transport_parsing); +void grpc_chttp2_parsing_become_skip_parser( + grpc_chttp2_transport_parsing *transport_parsing); #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1) extern int grpc_http_trace; +extern int grpc_flowctl_trace; #define IF_TRACING(stmt) \ if (!(grpc_http_trace)) \ @@ -615,4 +620,25 @@ extern int grpc_http_trace; else \ stmt +#define GRPC_CHTTP2_FLOWCTL_TRACE_STREAM(reason, transport, context, var, \ + delta) \ + if (!(grpc_flowctl_trace)) { \ + } else { \ + grpc_chttp2_flowctl_trace(__FILE__, __LINE__, reason, #context, #var, \ + transport->is_client, context->id, context->var, \ + delta); \ + } + +#define GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT(reason, context, var, delta) \ + if (!(grpc_flowctl_trace)) { \ + } else { \ + grpc_chttp2_flowctl_trace(__FILE__, __LINE__, reason, #context, #var, \ + context->is_client, 0, context->var, delta); \ + } + +void grpc_chttp2_flowctl_trace(const char *file, int line, const char *reason, + const char *context, const char *var, + int is_client, gpr_uint32 stream_id, + gpr_int64 current_value, gpr_int64 delta); + #endif diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 93e8dcc1c8e..f33b54f167c 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -60,16 +60,30 @@ static int init_skip_frame_parser( static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice, int is_last); -void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *transport_global, - grpc_chttp2_transport_parsing *transport_parsing) { +void grpc_chttp2_prepare_to_read( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_transport_parsing *transport_parsing) { grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_parsing *stream_parsing; /* update the parsing view of incoming window */ - transport_parsing->incoming_window = transport_global->incoming_window; + if (transport_parsing->incoming_window != transport_global->incoming_window) { + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( + "parse", transport_parsing, incoming_window, + (gpr_int64)transport_global->incoming_window - + (gpr_int64)transport_parsing->incoming_window); + transport_parsing->incoming_window = transport_global->incoming_window; + } while (grpc_chttp2_list_pop_incoming_window_updated( transport_global, transport_parsing, &stream_global, &stream_parsing)) { - stream_parsing->incoming_window = transport_parsing->incoming_window; + stream_parsing->id = stream_global->id; + if (stream_parsing->incoming_window != stream_global->incoming_window) { + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM( + "parse", transport_parsing, stream_parsing, incoming_window, + (gpr_int64)stream_global->incoming_window - + (gpr_int64)stream_parsing->incoming_window); + stream_parsing->incoming_window = stream_global->incoming_window; + } } } @@ -95,33 +109,6 @@ void grpc_chttp2_publish_reads( /* TODO(ctiller): re-implement */ GPR_ASSERT(transport_parsing->initial_window_update == 0); -#if 0 - while ((s = stream_list_remove_head(t, FINISHED_READ_OP)) != NULL) { - int publish = 0; - GPR_ASSERT(s->incoming_sopb); - *s->publish_state = - compute_state(s->write_state == WRITE_STATE_SENT_CLOSE, s->read_closed); - if (*s->publish_state != s->published_state) { - s->published_state = *s->publish_state; - publish = 1; - if (s->published_state == GRPC_STREAM_CLOSED) { - remove_from_stream_map(t, s); - } - } - if (s->parser.incoming_sopb.nops > 0) { - grpc_sopb_swap(s->incoming_sopb, &s->parser.incoming_sopb); - publish = 1; - } - if (publish) { - if (s->incoming_metadata_count > 0) { - patch_metadata_ops(s); - } - s->incoming_sopb = NULL; - schedule_cb(t, s->global.recv_done_closure, 1); - } - } -#endif - /* copy parsing qbuf to global qbuf */ gpr_slice_buffer_move_into(&transport_parsing->qbuf, &transport_global->qbuf); @@ -149,11 +136,42 @@ void grpc_chttp2_publish_reads( transport_parsing->goaway_received = 0; } + /* propagate flow control tokens to global state */ + if (transport_parsing->outgoing_window_update) { + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( + "parsed", transport_global, outgoing_window, + transport_parsing->outgoing_window_update); + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( + "parsed", transport_parsing, outgoing_window_update, + -(gpr_int64)transport_parsing->outgoing_window_update); + transport_global->outgoing_window += + transport_parsing->outgoing_window_update; + transport_parsing->outgoing_window_update = 0; + } + + if (transport_parsing->incoming_window_delta) { + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( + "parsed", transport_global, incoming_window, + -(gpr_int64)transport_parsing->incoming_window_delta); + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( + "parsed", transport_parsing, incoming_window_delta, + -(gpr_int64)transport_parsing->incoming_window_delta); + transport_global->incoming_window -= + transport_parsing->incoming_window_delta; + transport_parsing->incoming_window_delta = 0; + } + /* for each stream that saw an update, fixup global state */ while (grpc_chttp2_list_pop_parsing_seen_stream( transport_global, transport_parsing, &stream_global, &stream_parsing)) { /* update incoming flow control window */ if (stream_parsing->incoming_window_delta) { + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM( + "parsed", transport_parsing, stream_global, incoming_window, + -(gpr_int64)stream_parsing->incoming_window_delta); + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM( + "parsed", transport_parsing, stream_parsing, incoming_window_delta, + -(gpr_int64)stream_parsing->incoming_window_delta); stream_global->incoming_window -= stream_parsing->incoming_window_delta; stream_parsing->incoming_window_delta = 0; grpc_chttp2_list_add_writable_window_update_stream(transport_global, @@ -164,9 +182,16 @@ void grpc_chttp2_publish_reads( if (stream_parsing->outgoing_window_update) { int was_zero = stream_global->outgoing_window <= 0; int is_zero; + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("parsed", transport_parsing, + stream_global, outgoing_window, + stream_parsing->outgoing_window_update); + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM( + "parsed", transport_parsing, stream_parsing, outgoing_window_update, + -(gpr_int64)stream_parsing->outgoing_window_update); stream_global->outgoing_window += stream_parsing->outgoing_window_update; stream_parsing->outgoing_window_update = 0; is_zero = stream_global->outgoing_window <= 0; + gpr_log(GPR_DEBUG, "was=%d is=%d", was_zero, is_zero); if (was_zero && !is_zero) { grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } @@ -186,8 +211,11 @@ void grpc_chttp2_publish_reads( /* publish incoming stream ops */ if (stream_parsing->data_parser.incoming_sopb.nops > 0) { - grpc_incoming_metadata_buffer_move_to_referencing_sopb(&stream_parsing->incoming_metadata, &stream_global->incoming_metadata, &stream_parsing->data_parser.incoming_sopb); - grpc_sopb_move_to(&stream_parsing->data_parser.incoming_sopb, &stream_global->incoming_sopb); + grpc_incoming_metadata_buffer_move_to_referencing_sopb( + &stream_parsing->incoming_metadata, &stream_global->incoming_metadata, + &stream_parsing->data_parser.incoming_sopb); + grpc_sopb_move_to(&stream_parsing->data_parser.incoming_sopb, + &stream_global->incoming_sopb); grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } @@ -476,7 +504,22 @@ static grpc_chttp2_parse_error update_incoming_window( return GRPC_CHTTP2_CONNECTION_ERROR; } + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( + "data", transport_parsing, incoming_window, + -(gpr_int64)transport_parsing->incoming_frame_size); + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT("data", transport_parsing, + incoming_window_delta, + transport_parsing->incoming_frame_size); + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM( + "data", transport_parsing, stream_parsing, incoming_window, + -(gpr_int64)transport_parsing->incoming_frame_size); + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("data", transport_parsing, stream_parsing, + incoming_window_delta, + transport_parsing->incoming_frame_size); + transport_parsing->incoming_window -= transport_parsing->incoming_frame_size; + transport_parsing->incoming_window_delta += + transport_parsing->incoming_frame_size; stream_parsing->incoming_window -= transport_parsing->incoming_frame_size; stream_parsing->incoming_window_delta += transport_parsing->incoming_frame_size; @@ -649,6 +692,10 @@ static int init_window_update_frame_parser( &transport_parsing->simple.window_update, transport_parsing->incoming_frame_size, transport_parsing->incoming_frame_flags); + if (transport_parsing->incoming_stream_id) { + transport_parsing->incoming_stream = grpc_chttp2_parsing_lookup_stream( + transport_parsing, transport_parsing->incoming_stream_id); + } transport_parsing->parser = grpc_chttp2_window_update_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.window_update; return ok; @@ -670,8 +717,8 @@ static int init_rst_stream_parser( &transport_parsing->simple.rst_stream, transport_parsing->incoming_frame_size, transport_parsing->incoming_frame_flags); - transport_parsing->incoming_stream = grpc_chttp2_parsing_lookup_stream(transport_parsing, - transport_parsing->incoming_stream_id); + transport_parsing->incoming_stream = grpc_chttp2_parsing_lookup_stream( + transport_parsing, transport_parsing->incoming_stream_id); if (!transport_parsing->incoming_stream) { return init_skip_frame_parser(transport_parsing, 0); } diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 72431ff6a65..bac9060cb80 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -100,8 +100,9 @@ static void stream_list_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, } } -static void stream_list_maybe_remove(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_chttp2_stream_list_id id) { +static void stream_list_maybe_remove(grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + grpc_chttp2_stream_list_id id) { if (s->included[id]) { stream_list_remove(t, s, id); } @@ -299,7 +300,9 @@ int grpc_chttp2_list_pop_incoming_window_updated( void grpc_chttp2_list_remove_incoming_window_updated( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { - stream_list_maybe_remove(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED); + stream_list_maybe_remove(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_INCOMING_WINDOW_UPDATED); } void grpc_chttp2_list_add_read_write_state_changed( @@ -314,7 +317,8 @@ int grpc_chttp2_list_pop_read_write_state_changed( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global) { grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED); + int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, + GRPC_CHTTP2_LIST_READ_WRITE_STATE_CHANGED); *stream_global = &stream->global; return r; } diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 97b2d4471cc..980af295526 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -77,9 +77,18 @@ int grpc_chttp2_unlocking_check_writes( GPR_MIN(transport_global->outgoing_window, stream_global->outgoing_window), &stream_writing->sopb); + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( + "write", transport_global, outgoing_window, -(gpr_int64)window_delta); + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("write", transport_global, stream_global, + outgoing_window, -(gpr_int64)window_delta); transport_global->outgoing_window -= window_delta; stream_global->outgoing_window -= window_delta; + gpr_log(GPR_DEBUG, "%s ws:%d nops:%d rc:%d", + transport_global->is_client ? "CLI" : "SVR", + stream_global->write_state, stream_global->outgoing_sopb->nops, + stream_global->read_closed); + if (stream_global->write_state == WRITE_STATE_QUEUED_CLOSE && stream_global->outgoing_sopb->nops == 0) { if (!transport_global->is_client && !stream_global->read_closed) { @@ -115,8 +124,11 @@ int grpc_chttp2_unlocking_check_writes( gpr_slice_buffer_add( &transport_writing->outbuf, grpc_chttp2_window_update_create(stream_global->id, window_delta)); + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("write", transport_global, stream_global, + incoming_window, window_delta); stream_global->incoming_window += window_delta; - grpc_chttp2_list_add_incoming_window_updated(transport_global, stream_global); + grpc_chttp2_list_add_incoming_window_updated(transport_global, + stream_global); } } @@ -128,6 +140,8 @@ int grpc_chttp2_unlocking_check_writes( transport_global->incoming_window; gpr_slice_buffer_add(&transport_writing->outbuf, grpc_chttp2_window_update_create(0, window_delta)); + GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT("write", transport_global, + incoming_window, window_delta); transport_global->incoming_window += window_delta; } @@ -137,7 +151,8 @@ int grpc_chttp2_unlocking_check_writes( void grpc_chttp2_perform_writes( grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint) { - GPR_ASSERT(transport_writing->outbuf.count > 0 || grpc_chttp2_list_have_writing_streams(transport_writing)); + GPR_ASSERT(transport_writing->outbuf.count > 0 || + grpc_chttp2_list_have_writing_streams(transport_writing)); finalize_outbuf(transport_writing); @@ -167,6 +182,9 @@ static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing) { while ( grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) { + gpr_log(GPR_DEBUG, "%s write %d: sc=%d", + transport_writing->is_client ? "CLI" : "SVR", stream_writing->id, + stream_writing->send_closed); grpc_chttp2_encode(stream_writing->sopb.ops, stream_writing->sopb.nops, stream_writing->send_closed != DONT_SEND_CLOSED, stream_writing->id, &transport_writing->hpack_compressor, diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 3cd6c1f67b6..4d0e0c94c94 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -47,6 +47,7 @@ #include #include #include +#include #include /* #define REFCOUNTING_DEBUG */ @@ -166,15 +167,19 @@ static void destruct_transport(grpc_chttp2_transport *t) { #ifdef REFCOUNTING_DEBUG #define REF_TRANSPORT(t, r) ref_transport(t, r, __FILE__, __LINE__) #define UNREF_TRANSPORT(t, r) unref_transport(t, r, __FILE__, __LINE__) -static void unref_transport(grpc_chttp2_transport *t, const char *reason, const char *file, int line) { - gpr_log(GPR_DEBUG, "chttp2:unref:%p %d->%d %s [%s:%d]", t, t->refs.count, t->refs.count-1, reason, file, line); +static void unref_transport(grpc_chttp2_transport *t, const char *reason, + const char *file, int line) { + gpr_log(GPR_DEBUG, "chttp2:unref:%p %d->%d %s [%s:%d]", t, t->refs.count, + t->refs.count - 1, reason, file, line); if (!gpr_unref(&t->refs)) return; destruct_transport(t); } -static void ref_transport(grpc_chttp2_transport *t, const char *reason, const char *file, int line) { - gpr_log(GPR_DEBUG, "chttp2: ref:%p %d->%d %s [%s:%d]", t, t->refs.count, t->refs.count+1, reason, file, line); - gpr_ref(&t->refs); +static void ref_transport(grpc_chttp2_transport *t, const char *reason, + const char *file, int line) { + gpr_log(GPR_DEBUG, "chttp2: ref:%p %d->%d %s [%s:%d]", t, t->refs.count, + t->refs.count + 1, reason, file, line); + gpr_ref(&t->refs); } #else #define REF_TRANSPORT(t, r) ref_transport(t) @@ -221,6 +226,7 @@ static void init_transport(grpc_chttp2_transport *t, t->parsing.str_grpc_timeout = grpc_mdstr_from_string(t->metadata_context, "grpc-timeout"); t->parsing.deframe_state = is_client ? DTS_FH_0 : DTS_CLIENT_PREFIX_0; + t->writing.is_client = is_client; gpr_slice_buffer_init(&t->global.qbuf); @@ -378,12 +384,11 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, s->global.outgoing_window = t->global .settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; - s->global.incoming_window = + s->parsing.incoming_window = s->global.incoming_window = t->global .settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; *t->accepting_stream = s; - grpc_chttp2_list_add_incoming_window_updated(&t->global, &s->global); - grpc_chttp2_stream_map_add(&t->new_stream_map, s->global.id, s); + grpc_chttp2_stream_map_add(&t->parsing_stream_map, s->global.id, s); s->global.in_stream_map = 1; } @@ -404,7 +409,8 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { GPR_ASSERT(!s->global.in_stream_map); grpc_chttp2_unregister_stream(t, s); if (!t->parsing_active && s->global.id) { - GPR_ASSERT(grpc_chttp2_stream_map_find(&t->parsing_stream_map, s->global.id) == NULL); + GPR_ASSERT(grpc_chttp2_stream_map_find(&t->parsing_stream_map, + s->global.id) == NULL); } gpr_mu_unlock(&t->mu); @@ -525,7 +531,8 @@ void grpc_chttp2_terminate_writing( if (t->ep && !t->endpoint_reading) { grpc_endpoint_destroy(t->ep); t->ep = NULL; - UNREF_TRANSPORT(t, "disconnect"); /* safe because we'll still have the ref for write */ + UNREF_TRANSPORT( + t, "disconnect"); /* safe because we'll still have the ref for write */ } unlock(t); @@ -586,7 +593,8 @@ static void maybe_start_some_streams( stream_global->id, STREAM_FROM_GLOBAL(stream_global)); stream_global->in_stream_map = 1; transport_global->concurrent_stream_count++; - grpc_chttp2_list_add_incoming_window_updated(transport_global, stream_global); + grpc_chttp2_list_add_incoming_window_updated(transport_global, + stream_global); grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } /* cancel out streams that will never be started */ @@ -699,7 +707,8 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, } static void remove_stream(grpc_chttp2_transport *t, gpr_uint32 id) { - grpc_chttp2_stream *s = grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); + grpc_chttp2_stream *s = + grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); GPR_ASSERT(s); s->global.in_stream_map = 0; if (t->parsing.incoming_stream == &s->parsing) { @@ -729,25 +738,44 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { } } - while (grpc_chttp2_list_pop_read_write_state_changed(transport_global, &stream_global)) { + while (grpc_chttp2_list_pop_read_write_state_changed(transport_global, + &stream_global)) { if (!stream_global->publish_sopb) { + gpr_log(GPR_DEBUG, "%s %d: skip rw update: no publish target", + transport_global->is_client ? "CLI" : "SVR", stream_global->id); continue; } - if (stream_global->write_state != WRITE_STATE_OPEN && stream_global->read_closed && stream_global->in_stream_map) { + if (stream_global->write_state == WRITE_STATE_SENT_CLOSE && + stream_global->read_closed && stream_global->in_stream_map) { if (t->parsing_active) { - grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, stream_global); + gpr_log(GPR_DEBUG, "%s %d: queue wait for close", + transport_global->is_client ? "CLI" : "SVR", stream_global->id); + grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, + stream_global); } else { + gpr_log(GPR_DEBUG, "%s %d: late removal from map", + transport_global->is_client ? "CLI" : "SVR", stream_global->id); remove_stream(t, stream_global->id); } } - state = compute_state(stream_global->write_state == WRITE_STATE_SENT_CLOSE, stream_global->read_closed && !stream_global->in_stream_map); - if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { + state = compute_state( + stream_global->write_state == WRITE_STATE_SENT_CLOSE, + stream_global->read_closed && !stream_global->in_stream_map); + gpr_log(GPR_DEBUG, "%s %d: state=%d->%d; nops=%d", + transport_global->is_client ? "CLI" : "SVR", stream_global->id, + stream_global->published_state, state, + stream_global->incoming_sopb.nops); + if (stream_global->incoming_sopb.nops == 0 && + state == stream_global->published_state) { continue; } - grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op(&stream_global->incoming_metadata, &stream_global->incoming_sopb, &stream_global->outstanding_metadata); + grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( + &stream_global->incoming_metadata, &stream_global->incoming_sopb, + &stream_global->outstanding_metadata); grpc_sopb_swap(stream_global->publish_sopb, &stream_global->incoming_sopb); stream_global->published_state = *stream_global->publish_state = state; - grpc_chttp2_schedule_closure(transport_global, stream_global->recv_done_closure, 1); + grpc_chttp2_schedule_closure(transport_global, + stream_global->recv_done_closure, 1); stream_global->recv_done_closure = NULL; stream_global->publish_sopb = NULL; stream_global->publish_state = NULL; @@ -917,7 +945,8 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, if (!t->writing_active && t->ep) { grpc_endpoint_destroy(t->ep); t->ep = NULL; - UNREF_TRANSPORT(t, "disconnect"); /* safe as we still have a ref for read */ + UNREF_TRANSPORT( + t, "disconnect"); /* safe as we still have a ref for read */ } unlock(t); UNREF_TRANSPORT(t, "recv_data"); @@ -951,32 +980,6 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_chttp2_stream_map_size(&t->parsing_stream_map); t->parsing_active = 0; } -#if 0 - while ((s = stream_list_remove_head(t, MAYBE_FINISH_READ_AFTER_PARSE))) { - maybe_finish_read(t, s, 0); - } - while ((s = stream_list_remove_head(t, PARSER_CHECK_WINDOW_UPDATES_AFTER_PARSE))) { - maybe_join_window_updates(t, s); - } - while ((s = stream_list_remove_head(t, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE))) { - maybe_join_window_updates(t, s); - } - while ((s = stream_list_remove_head(t, NEW_OUTGOING_WINDOW))) { - int was_window_empty = s->global.outgoing_window <= 0; - FLOWCTL_TRACE(t, s, outgoing, s->global.id, s->global.outgoing_window_update); - s->global.outgoing_window += s->global.outgoing_window_update; - s->global.outgoing_window_update = 0; - /* if this window update makes outgoing ops writable again, - flag that */ - if (was_window_empty && s->global.outgoing_sopb && - s->global.outgoing_sopb->nops > 0) { - stream_list_join(t, s, WRITABLE); - } - } - t->global.outgoing_window += t->global.outgoing_window_update; - t->global.outgoing_window_update = 0; - maybe_start_some_streams(t); -#endif if (i == nslices) { grpc_endpoint_notify_on_read(t->ep, recv_data, t); } @@ -1079,6 +1082,37 @@ static void add_to_pollset(grpc_transport *gt, grpc_pollset *pollset) { unlock(t); } +/* + * TRACING + */ + +void grpc_chttp2_flowctl_trace(const char *file, int line, const char *reason, + const char *context, const char *var, + int is_client, gpr_uint32 stream_id, + gpr_int64 current_value, gpr_int64 delta) { + char *identifier; + char *context_scope; + char *context_thread; + char *underscore_pos = strchr(context, '_'); + GPR_ASSERT(underscore_pos); + context_thread = gpr_strdup(underscore_pos + 1); + context_scope = gpr_strdup(context); + context_scope[underscore_pos - context] = 0; + if (stream_id) { + gpr_asprintf(&identifier, "%s[%d]", context_scope, stream_id); + } else { + identifier = gpr_strdup(context_scope); + } + gpr_log(GPR_DEBUG, + "FLOWCTL: %s %-10s %8s %-23s %8lld %c %8lld = %8lld %-10s [%s:%d]", + is_client ? "client" : "server", identifier, context_thread, var, + current_value, delta < 0 ? '-' : '+', delta < 0 ? -delta : delta, + current_value + delta, reason, file, line); + gpr_free(identifier); + gpr_free(context_thread); + gpr_free(context_scope); +} + /* * INTEGRATION GLUE */ From 428f9796f60a7fa85a5ac390e37bd79fc72614c8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 16:30:08 -0700 Subject: [PATCH 41/97] Only start writing if theres no errors --- src/core/transport/chttp2_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 4d0e0c94c94..f002b56381d 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -471,7 +471,7 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_chttp2_transport *t) { grpc_iomgr_closure *run_closures; - if (!t->writing_active && + if (!t->writing_active && t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE && grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { t->writing_active = 1; REF_TRANSPORT(t, "writing"); From c9a7f5cf168fc675fcf4359458677f32942da6d3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 17:16:26 -0700 Subject: [PATCH 42/97] Dead code cleanup --- src/core/transport/chttp2/frame.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/core/transport/chttp2/frame.h b/src/core/transport/chttp2/frame.h index 856de02106c..879ee036fac 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/transport/chttp2/frame.h @@ -45,26 +45,6 @@ typedef enum { GRPC_CHTTP2_CONNECTION_ERROR } grpc_chttp2_parse_error; -#if 0 -typedef struct { - gpr_uint8 end_of_stream; - gpr_uint8 need_flush_reads; - gpr_uint8 metadata_boundary; - gpr_uint8 ack_settings; - gpr_uint8 send_ping_ack; - gpr_uint8 process_ping_reply; - gpr_uint8 goaway; - gpr_uint8 rst_stream; - - gpr_int64 initial_window_update; - gpr_uint32 window_update; - gpr_uint32 goaway_last_stream_index; - gpr_uint32 goaway_error; - gpr_slice goaway_text; - gpr_uint32 rst_stream_reason; -} grpc_chttp2_parse_state; -#endif - /* defined in internal.h */ typedef struct grpc_chttp2_stream_parsing grpc_chttp2_stream_parsing; typedef struct grpc_chttp2_transport_parsing grpc_chttp2_transport_parsing; From cec9eb9ed727dc7321380d63a9e48c8fc94f2fbe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 Jun 2015 17:16:48 -0700 Subject: [PATCH 43/97] Cancellation related fixes --- src/core/transport/chttp2/internal.h | 3 ++ src/core/transport/chttp2/parsing.c | 66 +++------------------------ src/core/transport/chttp2_transport.c | 32 +++++++++---- 3 files changed, 33 insertions(+), 68 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 96390fe7ce5..2b4dc5e6b8e 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -401,6 +401,9 @@ typedef struct { gpr_uint8 read_closed; /** has this stream been cancelled? (boolean) */ gpr_uint8 cancelled; + grpc_status_code cancelled_status; + /** have we told the upper layer that this stream is cancelled? */ + gpr_uint8 published_cancelled; /** is this stream in the stream map? (boolean) */ gpr_uint8 in_stream_map; diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index f33b54f167c..7276f8cafa4 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -36,6 +36,7 @@ #include #include "src/core/transport/chttp2/http2_errors.h" +#include "src/core/transport/chttp2/status_conversion.h" #include "src/core/transport/chttp2/timeout_encoding.h" #include @@ -66,6 +67,8 @@ void grpc_chttp2_prepare_to_read( grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_parsing *stream_parsing; + transport_parsing->next_stream_id = transport_global->next_stream_id; + /* update the parsing view of incoming window */ if (transport_parsing->incoming_window != transport_global->incoming_window) { GRPC_CHTTP2_FLOWCTL_TRACE_TRANSPORT( @@ -205,6 +208,10 @@ void grpc_chttp2_publish_reads( } if (stream_parsing->saw_rst_stream) { stream_global->cancelled = 1; + stream_global->cancelled_status = grpc_chttp2_http2_error_to_grpc_status(stream_parsing->rst_stream_reason); + if (stream_parsing->rst_stream_reason == GRPC_CHTTP2_NO_ERROR) { + stream_global->published_cancelled = 1; + } grpc_chttp2_list_add_read_write_state_changed(transport_global, stream_global); } @@ -803,62 +810,3 @@ static int parse_frame_slice(grpc_chttp2_transport_parsing *transport_parsing, abort(); return 0; } - -#if 0 - if (st.end_of_stream) { - transport_parsing->incoming_stream->read_closed = 1; - maybe_finish_read(t, transport_parsing->incoming_stream, 1); - } - if (st.need_flush_reads) { - maybe_finish_read(t, transport_parsing->incoming_stream, 1); - } - if (st.metadata_boundary) { - add_metadata_batch(t, transport_parsing->incoming_stream); - maybe_finish_read(t, transport_parsing->incoming_stream, 1); - } - if (st.ack_settings) { - } - if (st.send_ping_ack) { - } - if (st.goaway) { - add_goaway(t, st.goaway_error, st.goaway_text); - } - if (st.rst_stream) { - cancel_stream_id( - t, transport_parsing->incoming_stream_id, - grpc_chttp2_http2_error_to_grpc_status(st.rst_stream_reason), - st.rst_stream_reason, 0); - } - if (st.process_ping_reply) { - for (i = 0; i < transport_parsing->ping_count; i++) { - if (0 == - memcmp(transport_parsing->pings[i].id, transport_parsing->simple.ping.opaque_8bytes, 8)) { - transport_parsing->pings[i].cb(transport_parsing->pings[i].user_data); - memmove(&transport_parsing->pings[i], &transport_parsing->pings[i + 1], - (transport_parsing->ping_count - i - 1) * sizeof(grpc_chttp2_outstanding_ping)); - transport_parsing->ping_count--; - break; - } - } - } - if (st.initial_window_update) { - for (i = 0; i < transport_parsing->stream_map.count; i++) { - grpc_chttp2_stream *s = (grpc_chttp2_stream *)(transport_parsing->stream_map.values[i]); - s->global.outgoing_window_update += st.initial_window_update; - stream_list_join(t, s, NEW_OUTGOING_WINDOW); - } - } - if (st.window_update) { - if (transport_parsing->incoming_stream_id) { - /* if there was a grpc_chttp2_stream id, this is for some grpc_chttp2_stream */ - grpc_chttp2_stream *s = lookup_stream(t, transport_parsing->incoming_stream_id); - if (s) { - s->global.outgoing_window_update += st.window_update; - stream_list_join(t, s, NEW_OUTGOING_WINDOW); - } - } else { - /* grpc_chttp2_transport level window update */ - transport_parsing->global.outgoing_window_update += st.window_update; - } - } -#endif diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index f002b56381d..902c15ad3e5 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -740,10 +740,19 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { while (grpc_chttp2_list_pop_read_write_state_changed(transport_global, &stream_global)) { - if (!stream_global->publish_sopb) { - gpr_log(GPR_DEBUG, "%s %d: skip rw update: no publish target", - transport_global->is_client ? "CLI" : "SVR", stream_global->id); - continue; + if (stream_global->cancelled) { + stream_global->write_state = WRITE_STATE_SENT_CLOSE; + stream_global->read_closed = 1; + if (!stream_global->published_cancelled) { + char buffer[GPR_LTOA_MIN_BUFSIZE]; + gpr_ltoa(stream_global->cancelled_status, buffer); + grpc_chttp2_incoming_metadata_buffer_add(&stream_global->incoming_metadata, + grpc_mdelem_from_strings(t->metadata_context, "grpc-status", buffer)); + grpc_chttp2_incoming_metadata_buffer_place_metadata_batch_into( + &stream_global->incoming_metadata, + &stream_global->incoming_sopb); + stream_global->published_cancelled = 1; + } } if (stream_global->write_state == WRITE_STATE_SENT_CLOSE && stream_global->read_closed && stream_global->in_stream_map) { @@ -758,6 +767,11 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { remove_stream(t, stream_global->id); } } + if (!stream_global->publish_sopb) { + gpr_log(GPR_DEBUG, "%s %d: skip rw update: no publish target", + transport_global->is_client ? "CLI" : "SVR", stream_global->id); + continue; + } state = compute_state( stream_global->write_state == WRITE_STATE_SENT_CLOSE, stream_global->read_closed && !stream_global->in_stream_map); @@ -786,15 +800,15 @@ static void cancel_from_api(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_status_code status) { stream_global->cancelled = 1; - if (stream_global->in_stream_map) { + stream_global->cancelled_status = status; + if (stream_global->id != 0) { gpr_slice_buffer_add(&transport_global->qbuf, grpc_chttp2_rst_stream_create( stream_global->id, - grpc_chttp2_grpc_status_to_http2_status(status))); - } else { - grpc_chttp2_list_add_read_write_state_changed(transport_global, - stream_global); + grpc_chttp2_grpc_status_to_http2_error(status))); } + grpc_chttp2_list_add_read_write_state_changed(transport_global, + stream_global); } #if 0 From c3fdaf9fd41918f09f7bab3413988cdd8f04eb4f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 10:16:52 -0700 Subject: [PATCH 44/97] Fix some list handling --- src/core/transport/chttp2/writing.c | 6 +----- src/core/transport/chttp2_transport.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 980af295526..5fbec8fdadc 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -157,11 +157,7 @@ void grpc_chttp2_perform_writes( finalize_outbuf(transport_writing); GPR_ASSERT(transport_writing->outbuf.count > 0); - - if (!endpoint) { - grpc_chttp2_terminate_writing(transport_writing, 0); - return; - } + GPR_ASSERT(endpoint); switch (grpc_endpoint_write(endpoint, transport_writing->outbuf.slices, transport_writing->outbuf.count, finish_write_cb, diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 902c15ad3e5..215aac10a3d 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -401,6 +401,7 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; + int i; gpr_mu_lock(&t->mu); @@ -413,8 +414,15 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { s->global.id) == NULL); } + grpc_chttp2_list_remove_incoming_window_updated(&t->global, &s->global); + gpr_mu_unlock(&t->mu); + for (i = 0; i < STREAM_LIST_COUNT; i++) { + GPR_ASSERT(s->links[i].next == NULL); + GPR_ASSERT(s->links[i].prev == NULL); + } + GPR_ASSERT(s->global.outgoing_sopb == NULL); GPR_ASSERT(s->global.publish_sopb == NULL); grpc_sopb_destroy(&s->writing.sopb); @@ -709,13 +717,15 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, static void remove_stream(grpc_chttp2_transport *t, gpr_uint32 id) { grpc_chttp2_stream *s = grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); + if (!s) { + s = grpc_chttp2_stream_map_delete(&t->new_stream_map, id); + } GPR_ASSERT(s); s->global.in_stream_map = 0; if (t->parsing.incoming_stream == &s->parsing) { t->parsing.incoming_stream = NULL; grpc_chttp2_parsing_become_skip_parser(&t->parsing); } - grpc_chttp2_list_remove_incoming_window_updated(&t->global, &s->global); } static void unlock_check_read_write_state(grpc_chttp2_transport *t) { From 564872d51d10587ea16a6c0ba75d1f60c214cf5a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 11:21:22 -0700 Subject: [PATCH 45/97] Fix goaways, stream counting --- src/core/transport/chttp2_transport.c | 34 ++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 215aac10a3d..21ffd2abf04 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -113,6 +113,10 @@ static void cancel_from_api(grpc_chttp2_transport_global *transport_global, static void add_to_pollset_locked(grpc_chttp2_transport *t, grpc_pollset *pollset); +/** Start new streams that have been created if we can */ +static void maybe_start_some_streams( + grpc_chttp2_transport_global *transport_global); + /* * CONSTRUCTION/DESTRUCTION/REFCOUNTING */ @@ -489,6 +493,16 @@ static void unlock(grpc_chttp2_transport *t) { /* unlock_check_parser(t); */ unlock_check_channel_callbacks(t); + if (!t->parsing_active) { + size_t new_stream_count = + grpc_chttp2_stream_map_size(&t->parsing_stream_map) + + grpc_chttp2_stream_map_size(&t->new_stream_map); + if (new_stream_count != t->global.concurrent_stream_count) { + t->global.concurrent_stream_count = new_stream_count; + maybe_start_some_streams(&t->global); + } + } + run_closures = t->global.pending_closures; t->global.pending_closures = NULL; @@ -556,8 +570,11 @@ static void writing_action(void *gt, int iomgr_success_ignored) { void grpc_chttp2_add_incoming_goaway( grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, gpr_slice goaway_text) { + char *msg = gpr_hexdump((char*)GPR_SLICE_START_PTR(goaway_text), GPR_SLICE_LENGTH(goaway_text), GPR_HEXDUMP_PLAINTEXT); + gpr_log(GPR_DEBUG, "add goaway: st=%d err=%d text=%s", transport_global->goaway_state, goaway_error, msg); + gpr_free(msg); if (transport_global->goaway_state == GRPC_CHTTP2_ERROR_STATE_NONE) { - transport_global->goaway_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; + transport_global->goaway_state = GRPC_CHTTP2_ERROR_STATE_SEEN; transport_global->goaway_text = goaway_text; transport_global->goaway_error = goaway_error; } else { @@ -568,6 +585,7 @@ void grpc_chttp2_add_incoming_goaway( static void maybe_start_some_streams( grpc_chttp2_transport_global *transport_global) { grpc_chttp2_stream_global *stream_global; + gpr_log(GPR_DEBUG, "nextid=%d count=%d", transport_global->next_stream_id, transport_global->concurrent_stream_count); /* start streams where we have free grpc_chttp2_stream ids and free * concurrency */ while (transport_global->next_stream_id <= MAX_CLIENT_STREAM_ID && @@ -581,15 +599,16 @@ static void maybe_start_some_streams( transport_global->is_client ? "CLI" : "SVR", stream_global, transport_global->next_stream_id)); - if (transport_global->next_stream_id == MAX_CLIENT_STREAM_ID) { + GPR_ASSERT(stream_global->id == 0); + stream_global->id = transport_global->next_stream_id; + transport_global->next_stream_id += 2; + + if (transport_global->next_stream_id >= MAX_CLIENT_STREAM_ID) { grpc_chttp2_add_incoming_goaway( transport_global, GRPC_CHTTP2_NO_ERROR, gpr_slice_from_copied_string("Exceeded sequence number limit")); } - GPR_ASSERT(stream_global->id == 0); - stream_global->id = transport_global->next_stream_id; - transport_global->next_stream_id += 2; stream_global->outgoing_window = transport_global ->settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; @@ -606,7 +625,7 @@ static void maybe_start_some_streams( grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } /* cancel out streams that will never be started */ - while (transport_global->next_stream_id > MAX_CLIENT_STREAM_ID && + while (transport_global->next_stream_id >= MAX_CLIENT_STREAM_ID && grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { cancel_from_api(transport_global, stream_global, GRPC_STATUS_UNAVAILABLE); @@ -1000,8 +1019,6 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, &t->parsing_stream_map); /* handle higher level things */ grpc_chttp2_publish_reads(&t->global, &t->parsing); - t->global.concurrent_stream_count = - grpc_chttp2_stream_map_size(&t->parsing_stream_map); t->parsing_active = 0; } if (i == nslices) { @@ -1059,6 +1076,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { if (t->global.goaway_state == GRPC_CHTTP2_ERROR_STATE_SEEN && t->global.error_state != GRPC_CHTTP2_ERROR_STATE_NOTIFIED) { notify_goaways_args *a = gpr_malloc(sizeof(*a)); + a->t = t; a->error = t->global.goaway_error; a->text = t->global.goaway_text; t->global.goaway_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; From 8823b1499385bebe4543af47c80b641bf68d8051 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 11:41:24 -0700 Subject: [PATCH 46/97] More stream counting fixes --- src/core/transport/chttp2_transport.c | 31 +++++++++++++-------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 21ffd2abf04..2d3d720f2a3 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -423,8 +423,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { gpr_mu_unlock(&t->mu); for (i = 0; i < STREAM_LIST_COUNT; i++) { - GPR_ASSERT(s->links[i].next == NULL); - GPR_ASSERT(s->links[i].prev == NULL); + GPR_ASSERT(!s->included[i]); } GPR_ASSERT(s->global.outgoing_sopb == NULL); @@ -483,26 +482,16 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_chttp2_transport *t) { grpc_iomgr_closure *run_closures; + unlock_check_read_write_state(t); if (!t->writing_active && t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE && grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { t->writing_active = 1; REF_TRANSPORT(t, "writing"); grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); } - unlock_check_read_write_state(t); /* unlock_check_parser(t); */ unlock_check_channel_callbacks(t); - if (!t->parsing_active) { - size_t new_stream_count = - grpc_chttp2_stream_map_size(&t->parsing_stream_map) + - grpc_chttp2_stream_map_size(&t->new_stream_map); - if (new_stream_count != t->global.concurrent_stream_count) { - t->global.concurrent_stream_count = new_stream_count; - maybe_start_some_streams(&t->global); - } - } - run_closures = t->global.pending_closures; t->global.pending_closures = NULL; @@ -734,6 +723,7 @@ static grpc_stream_state compute_state(gpr_uint8 write_closed, } static void remove_stream(grpc_chttp2_transport *t, gpr_uint32 id) { + size_t new_stream_count; grpc_chttp2_stream *s = grpc_chttp2_stream_map_delete(&t->parsing_stream_map, id); if (!s) { @@ -745,6 +735,14 @@ static void remove_stream(grpc_chttp2_transport *t, gpr_uint32 id) { t->parsing.incoming_stream = NULL; grpc_chttp2_parsing_become_skip_parser(&t->parsing); } + + new_stream_count = + grpc_chttp2_stream_map_size(&t->parsing_stream_map) + + grpc_chttp2_stream_map_size(&t->new_stream_map); + if (new_stream_count != t->global.concurrent_stream_count) { + t->global.concurrent_stream_count = new_stream_count; + maybe_start_some_streams(&t->global); + } } static void unlock_check_read_write_state(grpc_chttp2_transport *t) { @@ -752,10 +750,10 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { grpc_chttp2_stream_global *stream_global; grpc_stream_state state; - /* if a stream is in the stream map, and gets cancelled, we need to ensure - we are not parsing before continuing the cancellation to keep things in - a sane state */ if (!t->parsing_active) { + /* if a stream is in the stream map, and gets cancelled, we need to ensure + we are not parsing before continuing the cancellation to keep things in + a sane state */ while (grpc_chttp2_list_pop_closed_waiting_for_parsing(transport_global, &stream_global)) { GPR_ASSERT(stream_global->in_stream_map); @@ -1017,6 +1015,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, /* merge stream lists */ grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); + t->global.concurrent_stream_count = grpc_chttp2_stream_map_size(&t->parsing_stream_map); /* handle higher level things */ grpc_chttp2_publish_reads(&t->global, &t->parsing); t->parsing_active = 0; From 159a774fdd05d22deaca47043fa913455d0da94c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 11:51:31 -0700 Subject: [PATCH 47/97] Fix type in swap buffer --- src/core/transport/stream_op.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/transport/stream_op.c b/src/core/transport/stream_op.c index cad17035d12..efb33ddf68e 100644 --- a/src/core/transport/stream_op.c +++ b/src/core/transport/stream_op.c @@ -65,7 +65,7 @@ void grpc_sopb_swap(grpc_stream_op_buffer *a, grpc_stream_op_buffer *b) { if (a->ops == a->inlined_ops) { if (b->ops == b->inlined_ops) { /* swap contents of inlined buffer */ - gpr_slice temp[GRPC_SOPB_INLINE_ELEMENTS]; + grpc_stream_op temp[GRPC_SOPB_INLINE_ELEMENTS]; memcpy(temp, a->ops, b->nops * sizeof(grpc_stream_op)); memcpy(a->ops, b->ops, a->nops * sizeof(grpc_stream_op)); memcpy(b->ops, temp, b->nops * sizeof(grpc_stream_op)); From 8b2f1d7a21d8feef9f16e40eca72dbba881617fd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 13:38:38 -0700 Subject: [PATCH 48/97] Bug fixes, spam cleanup --- src/core/transport/chttp2/frame_settings.c | 4 +++- src/core/transport/chttp2/internal.h | 2 ++ src/core/transport/chttp2/parsing.c | 3 --- src/core/transport/chttp2/stream_map.c | 2 +- src/core/transport/chttp2/writing.c | 8 -------- src/core/transport/chttp2_transport.c | 23 +++++++++------------- 6 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/transport/chttp2/frame_settings.c index 119c25b12c1..d42bc000aea 100644 --- a/src/core/transport/chttp2/frame_settings.c +++ b/src/core/transport/chttp2/frame_settings.c @@ -154,6 +154,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( if (cur == end) { parser->state = GRPC_CHTTP2_SPS_ID0; if (is_last) { + transport_parsing->settings_updated = 1; memcpy(parser->target_settings, parser->incoming_settings, GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); gpr_slice_buffer_add(&transport_parsing->qbuf, @@ -231,7 +232,8 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( } parser->incoming_settings[parser->id] = parser->value; if (grpc_http_trace) { - gpr_log(GPR_DEBUG, "CHTTP2: got setting %d = %d", parser->id, + gpr_log(GPR_DEBUG, "CHTTP2:%s: got setting %d = %d", + transport_parsing->is_client ? "CLI" : "SVR", parser->id, parser->value); } } else { diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 2b4dc5e6b8e..7f50e711d6c 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -334,6 +334,8 @@ struct grpc_chttp2_transport { /** closure to execute writing */ grpc_iomgr_closure writing_action; + /** closure to start reading from the endpoint */ + grpc_iomgr_closure reading_action; /** address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used by init_stream to diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 7276f8cafa4..f675c038d09 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -194,7 +194,6 @@ void grpc_chttp2_publish_reads( stream_global->outgoing_window += stream_parsing->outgoing_window_update; stream_parsing->outgoing_window_update = 0; is_zero = stream_global->outgoing_window <= 0; - gpr_log(GPR_DEBUG, "was=%d is=%d", was_zero, is_zero); if (was_zero && !is_zero) { grpc_chttp2_list_add_writable_stream(transport_global, stream_global); } @@ -765,8 +764,6 @@ static int init_settings_frame_parser( } if (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_FLAG_ACK) { transport_parsing->settings_ack_received = 1; - } else { - transport_parsing->settings_updated = 1; } transport_parsing->parser = grpc_chttp2_settings_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.settings; diff --git a/src/core/transport/chttp2/stream_map.c b/src/core/transport/chttp2/stream_map.c index baec29e18d3..e137d6d6b8f 100644 --- a/src/core/transport/chttp2/stream_map.c +++ b/src/core/transport/chttp2/stream_map.c @@ -111,7 +111,7 @@ void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, if (dst->count + src->count > dst->capacity) { dst->capacity = GPR_MAX(dst->capacity * 3 / 2, dst->count + src->count); dst->keys = gpr_realloc(dst->keys, dst->capacity * sizeof(gpr_uint32)); - dst->values = gpr_realloc(dst->values, dst->capacity * sizeof(gpr_uint32)); + dst->values = gpr_realloc(dst->values, dst->capacity * sizeof(void *)); } /* the first element of src must be greater than the last of dst */ GPR_ASSERT(src->keys[0] > dst->keys[dst->count - 1]); diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 5fbec8fdadc..a8e87c3fe3a 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -84,11 +84,6 @@ int grpc_chttp2_unlocking_check_writes( transport_global->outgoing_window -= window_delta; stream_global->outgoing_window -= window_delta; - gpr_log(GPR_DEBUG, "%s ws:%d nops:%d rc:%d", - transport_global->is_client ? "CLI" : "SVR", - stream_global->write_state, stream_global->outgoing_sopb->nops, - stream_global->read_closed); - if (stream_global->write_state == WRITE_STATE_QUEUED_CLOSE && stream_global->outgoing_sopb->nops == 0) { if (!transport_global->is_client && !stream_global->read_closed) { @@ -178,9 +173,6 @@ static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing) { while ( grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) { - gpr_log(GPR_DEBUG, "%s write %d: sc=%d", - transport_writing->is_client ? "CLI" : "SVR", stream_writing->id, - stream_writing->send_closed); grpc_chttp2_encode(stream_writing->sopb.ops, stream_writing->sopb.nops, stream_writing->send_closed != DONT_SEND_CLOSED, stream_writing->id, &transport_writing->hpack_compressor, diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 2d3d720f2a3..47cb8f6cec7 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -86,6 +86,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t); /* forward declarations of various callbacks that we'll build closures around */ static void writing_action(void *t, int iomgr_success_ignored); +static void reading_action(void *t, int iomgr_success_ignored); static void notify_closed(void *t, int iomgr_success_ignored); /** Set a transport level setting, and push it to our peer */ @@ -237,6 +238,7 @@ static void init_transport(grpc_chttp2_transport *t, gpr_slice_buffer_init(&t->writing.outbuf); grpc_chttp2_hpack_compressor_init(&t->writing.hpack_compressor, mdctx); grpc_iomgr_closure_init(&t->writing_action, writing_action, t); + grpc_iomgr_closure_init(&t->reading_action, reading_action, t); gpr_slice_buffer_init(&t->parsing.qbuf); grpc_chttp2_goaway_parser_init(&t->parsing.goaway_parser); @@ -560,7 +562,6 @@ void grpc_chttp2_add_incoming_goaway( grpc_chttp2_transport_global *transport_global, gpr_uint32 goaway_error, gpr_slice goaway_text) { char *msg = gpr_hexdump((char*)GPR_SLICE_START_PTR(goaway_text), GPR_SLICE_LENGTH(goaway_text), GPR_HEXDUMP_PLAINTEXT); - gpr_log(GPR_DEBUG, "add goaway: st=%d err=%d text=%s", transport_global->goaway_state, goaway_error, msg); gpr_free(msg); if (transport_global->goaway_state == GRPC_CHTTP2_ERROR_STATE_NONE) { transport_global->goaway_state = GRPC_CHTTP2_ERROR_STATE_SEEN; @@ -574,7 +575,6 @@ void grpc_chttp2_add_incoming_goaway( static void maybe_start_some_streams( grpc_chttp2_transport_global *transport_global) { grpc_chttp2_stream_global *stream_global; - gpr_log(GPR_DEBUG, "nextid=%d count=%d", transport_global->next_stream_id, transport_global->concurrent_stream_count); /* start streams where we have free grpc_chttp2_stream ids and free * concurrency */ while (transport_global->next_stream_id <= MAX_CLIENT_STREAM_ID && @@ -784,28 +784,18 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { if (stream_global->write_state == WRITE_STATE_SENT_CLOSE && stream_global->read_closed && stream_global->in_stream_map) { if (t->parsing_active) { - gpr_log(GPR_DEBUG, "%s %d: queue wait for close", - transport_global->is_client ? "CLI" : "SVR", stream_global->id); grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, stream_global); } else { - gpr_log(GPR_DEBUG, "%s %d: late removal from map", - transport_global->is_client ? "CLI" : "SVR", stream_global->id); remove_stream(t, stream_global->id); } } if (!stream_global->publish_sopb) { - gpr_log(GPR_DEBUG, "%s %d: skip rw update: no publish target", - transport_global->is_client ? "CLI" : "SVR", stream_global->id); continue; } state = compute_state( stream_global->write_state == WRITE_STATE_SENT_CLOSE, stream_global->read_closed && !stream_global->in_stream_map); - gpr_log(GPR_DEBUG, "%s %d: state=%d->%d; nops=%d", - transport_global->is_client ? "CLI" : "SVR", stream_global->id, - stream_global->published_state, state, - stream_global->incoming_sopb.nops); if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { continue; @@ -1021,7 +1011,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, t->parsing_active = 0; } if (i == nslices) { - grpc_endpoint_notify_on_read(t->ep, recv_data, t); + grpc_chttp2_schedule_closure(&t->global, &t->reading_action, 1); } unlock(t); for (; i < nslices; i++) gpr_slice_unref(slices[i]); @@ -1029,6 +1019,11 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, } } +static void reading_action(void *pt, int iomgr_success_ignored) { + grpc_chttp2_transport *t = pt; + grpc_endpoint_notify_on_read(t->ep, recv_data, t); +} + /* * CALLBACK LOOP */ @@ -1144,7 +1139,7 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *reason, } else { identifier = gpr_strdup(context_scope); } - gpr_log(GPR_DEBUG, + gpr_log(GPR_INFO, "FLOWCTL: %s %-10s %8s %-23s %8lld %c %8lld = %8lld %-10s [%s:%d]", is_client ? "client" : "server", identifier, context_thread, var, current_value, delta < 0 ? '-' : '+', delta < 0 ? -delta : delta, From b951df13d61d1c1378a942dd55b68e7d1565dfb2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 15:46:58 -0700 Subject: [PATCH 49/97] Bug fixes --- src/core/transport/chttp2/internal.h | 3 +++ src/core/transport/chttp2/parsing.c | 7 +++++-- src/core/transport/chttp2/stream_lists.c | 6 ++++++ src/core/transport/chttp2/stream_map.c | 18 +++++++++++++++--- src/core/transport/chttp2_transport.c | 5 ++++- 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 7f50e711d6c..3d1cd56e618 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -555,6 +555,9 @@ void grpc_chttp2_list_add_writable_window_update_stream( int grpc_chttp2_list_pop_writable_window_update_stream( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); +void grpc_chttp2_list_remove_writable_window_update_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); void grpc_chttp2_list_add_parsing_seen_stream( grpc_chttp2_transport_parsing *transport_parsing, diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index f675c038d09..07b98d0d573 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -615,6 +615,7 @@ static int init_header_frame_parser( grpc_chttp2_transport_parsing *transport_parsing, int is_continuation) { int is_eoh = (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_DATA_FLAG_END_HEADERS) != 0; + int via_accept = 0; grpc_chttp2_stream_parsing *stream_parsing; if (is_eoh) { @@ -632,7 +633,7 @@ static int init_header_frame_parser( /* could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream */ stream_parsing = grpc_chttp2_parsing_lookup_stream( transport_parsing, transport_parsing->incoming_stream_id); - if (!stream_parsing) { + if (stream_parsing == NULL) { if (is_continuation) { gpr_log(GPR_ERROR, "grpc_chttp2_stream disbanded before CONTINUATION received"); @@ -666,13 +667,15 @@ static int init_header_frame_parser( stream_parsing = transport_parsing->incoming_stream = grpc_chttp2_parsing_accept_stream( transport_parsing, transport_parsing->incoming_stream_id); - if (!stream_parsing) { + if (stream_parsing == NULL) { gpr_log(GPR_ERROR, "grpc_chttp2_stream not accepted"); return init_skip_frame_parser(transport_parsing, 1); } + via_accept = 1; } else { transport_parsing->incoming_stream = stream_parsing; } + GPR_ASSERT(stream_parsing != NULL && (via_accept == 0 || via_accept == 1)); if (stream_parsing->received_close) { gpr_log(GPR_ERROR, "skipping already closed grpc_chttp2_stream header"); transport_parsing->incoming_stream = NULL; diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index bac9060cb80..706612e4f04 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -219,6 +219,12 @@ int grpc_chttp2_list_pop_writable_window_update_stream( return r; } +void grpc_chttp2_list_remove_writable_window_update_stream( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + stream_list_maybe_remove(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global), GRPC_CHTTP2_LIST_WRITABLE_WINDOW_UPDATE); +} + void grpc_chttp2_list_add_parsing_seen_stream( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { diff --git a/src/core/transport/chttp2/stream_map.c b/src/core/transport/chttp2/stream_map.c index e137d6d6b8f..0ec2f272911 100644 --- a/src/core/transport/chttp2/stream_map.c +++ b/src/core/transport/chttp2/stream_map.c @@ -107,17 +107,24 @@ void grpc_chttp2_stream_map_move_into(grpc_chttp2_stream_map *src, GPR_SWAP(grpc_chttp2_stream_map, *src, *dst); return; } + /* the first element of src must be greater than the last of dst... + * however the maps may need compacting for this property to hold */ + if (src->keys[0] <= dst->keys[dst->count - 1]) { + src->count = compact(src->keys, src->values, src->count); + src->free = 0; + dst->count = compact(dst->keys, dst->values, dst->count); + dst->free = 0; + } + GPR_ASSERT(src->keys[0] > dst->keys[dst->count - 1]); /* if dst doesn't have capacity, resize */ if (dst->count + src->count > dst->capacity) { dst->capacity = GPR_MAX(dst->capacity * 3 / 2, dst->count + src->count); dst->keys = gpr_realloc(dst->keys, dst->capacity * sizeof(gpr_uint32)); dst->values = gpr_realloc(dst->values, dst->capacity * sizeof(void *)); } - /* the first element of src must be greater than the last of dst */ - GPR_ASSERT(src->keys[0] > dst->keys[dst->count - 1]); memcpy(dst->keys + dst->count, src->keys, src->count * sizeof(gpr_uint32)); memcpy(dst->values + dst->count, src->values, - src->count * sizeof(gpr_uint32)); + src->count * sizeof(void*)); dst->count += src->count; dst->free += src->free; src->count = 0; @@ -159,6 +166,11 @@ void *grpc_chttp2_stream_map_delete(grpc_chttp2_stream_map *map, out = *pvalue; *pvalue = NULL; map->free += (out != NULL); + /* recognize complete emptyness and ensure we can skip + * defragmentation later */ + if (map->free == map->count) { + map->free = map->count = 0; + } } return out; } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 47cb8f6cec7..d490efc8d20 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -421,6 +421,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { } grpc_chttp2_list_remove_incoming_window_updated(&t->global, &s->global); + grpc_chttp2_list_remove_writable_window_update_stream(&t->global, &s->global); gpr_mu_unlock(&t->mu); @@ -781,6 +782,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { stream_global->published_cancelled = 1; } } + gpr_log(GPR_DEBUG, "%s: id:%d ws:%d rc:%d ism:%d pa:%d ps:%p", transport_global->is_client?"CLI":"SVR", stream_global->id, stream_global->write_state, stream_global->read_closed, stream_global->in_stream_map, t->parsing_active, stream_global->publish_sopb); if (stream_global->write_state == WRITE_STATE_SENT_CLOSE && stream_global->read_closed && stream_global->in_stream_map) { if (t->parsing_active) { @@ -795,7 +797,8 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { } state = compute_state( stream_global->write_state == WRITE_STATE_SENT_CLOSE, - stream_global->read_closed && !stream_global->in_stream_map); + stream_global->read_closed); + gpr_log(GPR_DEBUG, "s=%d s'=%d nops=%d; rc:%d ism:%d", stream_global->published_state, state, stream_global->incoming_sopb.nops, stream_global->read_closed, stream_global->in_stream_map); if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { continue; From eaa660e75aee91f6ca30191f124d15e8efcdefdb Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 16:36:12 -0700 Subject: [PATCH 50/97] Hack around stream closure --- src/core/transport/chttp2_transport.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index d490efc8d20..0032ef1d4da 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -782,7 +782,6 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { stream_global->published_cancelled = 1; } } - gpr_log(GPR_DEBUG, "%s: id:%d ws:%d rc:%d ism:%d pa:%d ps:%p", transport_global->is_client?"CLI":"SVR", stream_global->id, stream_global->write_state, stream_global->read_closed, stream_global->in_stream_map, t->parsing_active, stream_global->publish_sopb); if (stream_global->write_state == WRITE_STATE_SENT_CLOSE && stream_global->read_closed && stream_global->in_stream_map) { if (t->parsing_active) { @@ -795,10 +794,15 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { if (!stream_global->publish_sopb) { continue; } + /* FIXME(ctiller): we include in_stream_map in our computation of + whether the stream is write-closed. This is completely bogus, + but has the effect of delaying stream-closed until the stream + is indeed evicted from the stream map, making it safe to delete. + To fix this will require having an edge after stream-closed + indicating that the stream is closed AND safe to delete. */ state = compute_state( - stream_global->write_state == WRITE_STATE_SENT_CLOSE, + stream_global->write_state == WRITE_STATE_SENT_CLOSE && !stream_global->in_stream_map, stream_global->read_closed); - gpr_log(GPR_DEBUG, "s=%d s'=%d nops=%d; rc:%d ism:%d", stream_global->published_state, state, stream_global->incoming_sopb.nops, stream_global->read_closed, stream_global->in_stream_map); if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { continue; From 0342571a3a26fdc439dbd6a50e58da555cfbdb16 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 Jun 2015 16:42:19 -0700 Subject: [PATCH 51/97] Fix a double delete bug --- src/core/transport/chttp2/parsing.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 07b98d0d573..42f47af65ce 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -136,6 +136,7 @@ void grpc_chttp2_publish_reads( grpc_chttp2_add_incoming_goaway(transport_global, transport_parsing->goaway_error, transport_parsing->goaway_text); + transport_parsing->goaway_text = gpr_empty_slice(); transport_parsing->goaway_received = 0; } From 905a65b2d08a3a4876a9a2e9870dd53a792da963 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 19 Jun 2015 15:28:07 -0700 Subject: [PATCH 52/97] Expanded testing protocol --- test/proto/messages.proto | 28 ++++++++++++++++++++++++++++ test/proto/test.proto | 8 ++++++++ 2 files changed, 36 insertions(+) diff --git a/test/proto/messages.proto b/test/proto/messages.proto index 65a81404652..35a73b43496 100644 --- a/test/proto/messages.proto +++ b/test/proto/messages.proto @@ -46,6 +46,14 @@ enum PayloadType { RANDOM = 2; } +// Compression algorithms +enum CompressionType { + // No compression + NONE = 0; + GZIP = 1; + DEFLATE = 2; +} + // A block of data, to simply increase gRPC message size. message Payload { // The type of data in body. @@ -54,6 +62,14 @@ message Payload { optional bytes body = 2; } +// A protobuf representation for grpc status. This is used by test +// clients to specify a status that the server should attempt to return. +message Status +{ + optional int code = 1; + optional string message = 2; +} + // Unary request. message SimpleRequest { // Desired payload type in the response from the server. @@ -72,6 +88,12 @@ message SimpleRequest { // Whether SimpleResponse should include OAuth scope. optional bool fill_oauth_scope = 5; + + // Compression algorithm to be used by the server for the response (stream) + optional CompressionType response_compression = 6; + + // Whether server should return a given status + optional Status response_status = 7; } // Unary response, as configured by the request. @@ -123,6 +145,12 @@ message StreamingOutputCallRequest { // Optional input payload sent along with the request. optional Payload payload = 3; + + // Compression algorithm to be used by the server for the response (stream) + optional CompressionType response_compression = 6; + + // Whether server should return a given status + optional Status response_status = 7; } // Server-streaming response, as configured by the request and parameters. diff --git a/test/proto/test.proto b/test/proto/test.proto index b9483d84378..b493dcd049f 100644 --- a/test/proto/test.proto +++ b/test/proto/test.proto @@ -71,3 +71,11 @@ service TestService { rpc HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse); } + + +// A simple service NOT implemented at servers so clients can test for +// that case. +service UnImplementedService { + // A call that no server should implement + rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty); +} From 747cdbf9c031e4cfb5d792ddac51c9ad15749674 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 19 Jun 2015 15:53:37 -0700 Subject: [PATCH 53/97] Fixed bug : int -> int32 --- test/proto/messages.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/proto/messages.proto b/test/proto/messages.proto index 35a73b43496..63ce737f7d3 100644 --- a/test/proto/messages.proto +++ b/test/proto/messages.proto @@ -64,9 +64,8 @@ message Payload { // A protobuf representation for grpc status. This is used by test // clients to specify a status that the server should attempt to return. -message Status -{ - optional int code = 1; +message Status { + optional int32 code = 1; optional string message = 2; } From 624babfcd8f0aa26f74b2669c5c0d34ee8b7881a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 22 Jun 2015 08:48:04 -0700 Subject: [PATCH 54/97] Dead code removal --- src/core/transport/chttp2_transport.c | 125 -------------------------- 1 file changed, 125 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 0032ef1d4da..e96f6e0cdc9 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -459,17 +459,6 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( return &accepting->parsing; } -#if 0 -static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { - if (s->global.id == 0) return; - IF_TRACING(gpr_log(GPR_DEBUG, "HTTP:%s: Removing grpc_chttp2_stream %d", - t->global.is_client ? "CLI" : "SVR", s->global.id)); - if (grpc_chttp2_stream_map_delete(&t->stream_map, s->global.id)) { - maybe_start_some_streams(t); - } -} -#endif - /* * LOCK MANAGEMENT */ @@ -835,91 +824,6 @@ static void cancel_from_api(grpc_chttp2_transport_global *transport_global, stream_global); } -#if 0 -static void cancel_stream_inner(grpc_chttp2_transport *t, grpc_chttp2_stream *s, gpr_uint32 id, - grpc_status_code local_status, - grpc_chttp2_error_code error_code, - grpc_mdstr *optional_message, int send_rst, - int is_parser) { - int had_outgoing; - char buffer[GPR_LTOA_MIN_BUFSIZE]; - - if (s) { - /* clear out any unreported input & output: nobody cares anymore */ - had_outgoing = s->global.outgoing_sopb && s->global.outgoing_sopb->nops != 0; - if (error_code != GRPC_CHTTP2_NO_ERROR) { - schedule_nuke_sopb(t, &s->parser.incoming_sopb); - if (s->global.outgoing_sopb) { - schedule_nuke_sopb(t, s->global.outgoing_sopb); - s->global.outgoing_sopb = NULL; - stream_list_remove(t, s, WRITABLE); - grpc_chttp2_schedule_closure(t, s->global.send_done_closure, 0); - } - } - if (s->cancelled) { - send_rst = 0; - } else if (!s->read_closed || s->write_state != WRITE_STATE_SENT_CLOSE || - had_outgoing) { - s->cancelled = 1; - stream_list_join(t, s, CANCELLED); - - if (error_code != GRPC_CHTTP2_NO_ERROR) { - /* synthesize a status if we don't believe we'll get one */ - gpr_ltoa(local_status, buffer); - add_incoming_metadata( - t, s, grpc_mdelem_from_strings(t->metadata_context, "grpc-status", - buffer)); - if (!optional_message) { - switch (local_status) { - case GRPC_STATUS_CANCELLED: - add_incoming_metadata( - t, s, grpc_mdelem_from_strings(t->metadata_context, - "grpc-message", "Cancelled")); - break; - default: - break; - } - } else { - add_incoming_metadata( - t, s, - grpc_mdelem_from_metadata_strings( - t->metadata_context, - grpc_mdstr_from_string(t->metadata_context, "grpc-message"), - grpc_mdstr_ref(optional_message))); - } - add_metadata_batch(t, s); - } - } - maybe_finish_read(t, s, is_parser); - } - if (!id) send_rst = 0; - if (send_rst) { - gpr_slice_buffer_add(&t->global.qbuf, - grpc_chttp2_rst_stream_create(id, error_code)); - } - if (optional_message) { - grpc_mdstr_unref(optional_message); - } -} - -static void cancel_stream_id(grpc_chttp2_transport *t, gpr_uint32 id, - grpc_status_code local_status, - grpc_chttp2_error_code error_code, int send_rst) { - lock(t); - cancel_stream_inner(t, lookup_stream(t, id), id, local_status, error_code, - NULL, send_rst, 1); - unlock(t); -} - -static void cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_status_code local_status, - grpc_chttp2_error_code error_code, - grpc_mdstr *optional_message, int send_rst) { - cancel_stream_inner(t, s, s->global.id, local_status, error_code, optional_message, - send_rst, 0); -} -#endif - static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global) { @@ -938,35 +842,6 @@ static void drop_connection(grpc_chttp2_transport *t) { end_all_the_calls(t); } -#if 0 -static void maybe_finish_read(grpc_chttp2_transport *t, grpc_chttp2_stream *s, int is_parser) { - if (is_parser) { - stream_list_join(t, s, MAYBE_FINISH_READ_AFTER_PARSE); - } else if (s->incoming_sopb) { - stream_list_join(t, s, FINISHED_READ_OP); - } -} - -static void maybe_join_window_updates(grpc_chttp2_transport *t, - grpc_chttp2_stream *s) { - if (t->parsing.executing) { - stream_list_join(t, s, OTHER_CHECK_WINDOW_UPDATES_AFTER_PARSE); - return; - } - if (s->incoming_sopb != NULL && - s->global.incoming_window < - t->global.settings[LOCAL_SETTINGS] - [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] * - 3 / 4) { - stream_list_join(t, s, WINDOW_UPDATE); - } -} - -static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id) { - return grpc_chttp2_stream_map_find(&t->stream_map, id); -} -#endif - /* tcp read callback */ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { From 80ca516640c068f85e8523c50c74d8e790c7bd9c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 22 Jun 2015 14:31:44 -0700 Subject: [PATCH 55/97] Return dummy data for empty histograms --- src/core/support/histogram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/support/histogram.c b/src/core/support/histogram.c index 673affde713..d16ea6c3f7e 100644 --- a/src/core/support/histogram.c +++ b/src/core/support/histogram.c @@ -164,7 +164,9 @@ static double threshold_for_count_below(gpr_histogram *h, double count_below) { size_t lower_idx; size_t upper_idx; - GPR_ASSERT(h->count >= 1); + if (h->count == 0) { + return 0.0; + } if (count_below <= 0) { return h->min_seen; From 0960875b064428e9ed8588666d6b11e79cc025e5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 22 Jun 2015 14:32:31 -0700 Subject: [PATCH 56/97] Remove spammy line (this is obfuscating testing logs) --- test/cpp/qps/client_async.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 1b7a8d26b2c..d120a8aaec8 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -234,12 +234,6 @@ class AsyncClient : public Client { GPR_ASSERT(false); break; } - if ((closed_loop_ || !rpc_deadlines_[thread_idx].empty()) && - grpc_time_source::now() > deadline) { - // we have missed some 1-second deadline, which is worth noting - gpr_log(GPR_INFO, "Missed an RPC deadline"); - // Don't give up, as there might be some truly heavy tails - } if (got_event) { ClientRpcContext* ctx = ClientRpcContext::detag(got_tag); if (ctx->RunNextState(ok, histogram) == false) { From eb6b216004d5c8b34fc8db9591b0e4696abd7d02 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 23 Jun 2015 09:52:50 -0700 Subject: [PATCH 57/97] Rename Status -> EchoStatus to avoid conflict --- test/proto/messages.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/proto/messages.proto b/test/proto/messages.proto index 63ce737f7d3..500e79cc81a 100644 --- a/test/proto/messages.proto +++ b/test/proto/messages.proto @@ -64,7 +64,7 @@ message Payload { // A protobuf representation for grpc status. This is used by test // clients to specify a status that the server should attempt to return. -message Status { +message EchoStatus { optional int32 code = 1; optional string message = 2; } @@ -92,7 +92,7 @@ message SimpleRequest { optional CompressionType response_compression = 6; // Whether server should return a given status - optional Status response_status = 7; + optional EchoStatus response_status = 7; } // Unary response, as configured by the request. @@ -149,7 +149,7 @@ message StreamingOutputCallRequest { optional CompressionType response_compression = 6; // Whether server should return a given status - optional Status response_status = 7; + optional EchoStatus response_status = 7; } // Server-streaming response, as configured by the request and parameters. From 31489e3abaab3bd0d4238d35e2d68477316eb6d9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 23 Jun 2015 14:27:34 -0700 Subject: [PATCH 58/97] Move some code out of src/ into tools/ It shouldn't count towards coverage --- .travis.yml | 2 +- Makefile | 8 ++++---- build.json | 3 +-- .../chttp2 => tools/codegen/core}/gen_hpack_tables.c | 0 vsprojects/Grpc.mak | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) rename {src/core/transport/chttp2 => tools/codegen/core}/gen_hpack_tables.c (100%) diff --git a/.travis.yml b/.travis.yml index c6262425571..97cf99d71ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ script: - if [ ! -z "$USE_GCC" ] ; then export CC=gcc-$USE_GCC ; export CXX=g++-$USE_GCC ; fi - ./tools/run_tests/run_tests.py -l $TEST -t -j $JOBS -c $CONFIG -s 4.0 after_success: - - if [ "$CONFIG" = "gcov" ] ; then coveralls --exclude third_party --exclude gens --exclude test --exclude src/compiler -b. --gcov-options '\-p' ; fi + - if [ "$CONFIG" = "gcov" ] ; then coveralls --exclude third_party --exclude gens --exclude test --exclude tools --exclude src/compiler -b. --gcov-options '\-p' ; fi notifications: email: false webhooks: diff --git a/Makefile b/Makefile index 26899c5c051..ff147579259 100644 --- a/Makefile +++ b/Makefile @@ -5691,7 +5691,7 @@ endif GEN_HPACK_TABLES_SRC = \ - src/core/transport/chttp2/gen_hpack_tables.c \ + tools/codegen/core/gen_hpack_tables.c \ GEN_HPACK_TABLES_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GEN_HPACK_TABLES_SRC)))) ifeq ($(NO_SECURE),true) @@ -5702,14 +5702,14 @@ $(BINDIR)/$(CONFIG)/gen_hpack_tables: openssl_dep_error else -$(BINDIR)/$(CONFIG)/gen_hpack_tables: $(GEN_HPACK_TABLES_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a +$(BINDIR)/$(CONFIG)/gen_hpack_tables: $(GEN_HPACK_TABLES_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GEN_HPACK_TABLES_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gen_hpack_tables + $(Q) $(LD) $(LDFLAGS) $(GEN_HPACK_TABLES_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gen_hpack_tables endif -$(OBJDIR)/$(CONFIG)/src/core/transport/chttp2/gen_hpack_tables.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a +$(OBJDIR)/$(CONFIG)/tools/codegen/core/gen_hpack_tables.o: $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a deps_gen_hpack_tables: $(GEN_HPACK_TABLES_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) diff --git a/build.json b/build.json index e01a419bbe6..4b9a26e94d4 100644 --- a/build.json +++ b/build.json @@ -957,10 +957,9 @@ "build": "tool", "language": "c", "src": [ - "src/core/transport/chttp2/gen_hpack_tables.c" + "tools/codegen/core/gen_hpack_tables.c" ], "deps": [ - "grpc_test_util", "gpr", "grpc" ] diff --git a/src/core/transport/chttp2/gen_hpack_tables.c b/tools/codegen/core/gen_hpack_tables.c similarity index 100% rename from src/core/transport/chttp2/gen_hpack_tables.c rename to tools/codegen/core/gen_hpack_tables.c diff --git a/vsprojects/Grpc.mak b/vsprojects/Grpc.mak index 27f0b3aec30..b3be4fcf248 100644 --- a/vsprojects/Grpc.mak +++ b/vsprojects/Grpc.mak @@ -135,8 +135,8 @@ fling_server: fling_server.exe $(OUT_DIR)\fling_server.exe gen_hpack_tables.exe: build_libs $(OUT_DIR) echo Building gen_hpack_tables - $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\src\core\transport\chttp2\gen_hpack_tables.c - $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gen_hpack_tables.exe" Debug\grpc_test_util.lib Debug\gpr.lib Debug\grpc.lib $(LIBS) $(OUT_DIR)\gen_hpack_tables.obj + $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ $(REPO_ROOT)\tools\codegen\core\gen_hpack_tables.c + $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gen_hpack_tables.exe" Debug\gpr.lib Debug\grpc.lib $(LIBS) $(OUT_DIR)\gen_hpack_tables.obj gen_hpack_tables: gen_hpack_tables.exe echo Running gen_hpack_tables $(OUT_DIR)\gen_hpack_tables.exe From eb327fba7ca55e97ab889a33c7c70e0401b767eb Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 23 Jun 2015 16:51:38 -0700 Subject: [PATCH 59/97] Make it less likely a build.json change triggers a merge conflict --- gRPC.podspec | 406 ++++++++++++++++++++++- templates/gRPC.podspec.template | 42 ++- templates/tools/doxygen/Doxyfile.include | 2 +- tools/doxygen/Doxyfile.c++ | 38 ++- tools/doxygen/Doxyfile.c++.internal | 68 +++- tools/doxygen/Doxyfile.core | 36 +- tools/doxygen/Doxyfile.core.internal | 297 ++++++++++++++++- 7 files changed, 859 insertions(+), 30 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index 9bd847be289..da68302e0dd 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -60,8 +60,410 @@ Pod::Spec.new do |s| # Core cross-platform gRPC library, written in C. s.subspec 'C-Core' do |cs| - cs.source_files = 'src/core/support/env.h', 'src/core/support/file.h', 'src/core/support/murmur_hash.h', 'src/core/support/grpc_string.h', 'src/core/support/string_win32.h', 'src/core/support/thd_internal.h', 'include/grpc/support/alloc.h', 'include/grpc/support/atm.h', 'include/grpc/support/atm_gcc_atomic.h', 'include/grpc/support/atm_gcc_sync.h', 'include/grpc/support/atm_win32.h', 'include/grpc/support/cancellable_platform.h', 'include/grpc/support/cmdline.h', 'include/grpc/support/cpu.h', 'include/grpc/support/histogram.h', 'include/grpc/support/host_port.h', 'include/grpc/support/log.h', 'include/grpc/support/log_win32.h', 'include/grpc/support/port_platform.h', 'include/grpc/support/slice.h', 'include/grpc/support/slice_buffer.h', 'include/grpc/support/string_util.h', 'include/grpc/support/subprocess.h', 'include/grpc/support/sync.h', 'include/grpc/support/sync_generic.h', 'include/grpc/support/sync_posix.h', 'include/grpc/support/sync_win32.h', 'include/grpc/support/thd.h', 'include/grpc/support/grpc_time.h', 'include/grpc/support/tls.h', 'include/grpc/support/tls_gcc.h', 'include/grpc/support/tls_msvc.h', 'include/grpc/support/tls_pthread.h', 'include/grpc/support/useful.h', 'src/core/support/alloc.c', 'src/core/support/cancellable.c', 'src/core/support/cmdline.c', 'src/core/support/cpu_iphone.c', 'src/core/support/cpu_linux.c', 'src/core/support/cpu_posix.c', 'src/core/support/cpu_windows.c', 'src/core/support/env_linux.c', 'src/core/support/env_posix.c', 'src/core/support/env_win32.c', 'src/core/support/file.c', 'src/core/support/file_posix.c', 'src/core/support/file_win32.c', 'src/core/support/histogram.c', 'src/core/support/host_port.c', 'src/core/support/log.c', 'src/core/support/log_android.c', 'src/core/support/log_linux.c', 'src/core/support/log_posix.c', 'src/core/support/log_win32.c', 'src/core/support/murmur_hash.c', 'src/core/support/slice.c', 'src/core/support/slice_buffer.c', 'src/core/support/string.c', 'src/core/support/string_posix.c', 'src/core/support/string_win32.c', 'src/core/support/subprocess_posix.c', 'src/core/support/sync.c', 'src/core/support/sync_posix.c', 'src/core/support/sync_win32.c', 'src/core/support/thd.c', 'src/core/support/thd_posix.c', 'src/core/support/thd_win32.c', 'src/core/support/time.c', 'src/core/support/time_posix.c', 'src/core/support/time_win32.c', 'src/core/support/tls_pthread.c', 'src/core/httpcli/format_request.h', 'src/core/httpcli/httpcli.h', 'src/core/httpcli/httpcli_security_connector.h', 'src/core/httpcli/parser.h', 'src/core/security/auth_filters.h', 'src/core/security/base64.h', 'src/core/security/credentials.h', 'src/core/security/json_token.h', 'src/core/security/secure_endpoint.h', 'src/core/security/secure_transport_setup.h', 'src/core/security/security_connector.h', 'src/core/security/security_context.h', 'src/core/tsi/fake_transport_security.h', 'src/core/tsi/ssl_transport_security.h', 'src/core/tsi/transport_security.h', 'src/core/tsi/transport_security_interface.h', 'src/core/census/grpc_context.h', 'src/core/channel/census_filter.h', 'src/core/channel/channel_args.h', 'src/core/channel/channel_stack.h', 'src/core/channel/child_channel.h', 'src/core/channel/client_channel.h', 'src/core/channel/client_setup.h', 'src/core/channel/connected_channel.h', 'src/core/channel/context.h', 'src/core/channel/http_client_filter.h', 'src/core/channel/http_server_filter.h', 'src/core/channel/noop_filter.h', 'src/core/compression/message_compress.h', 'src/core/debug/trace.h', 'src/core/iomgr/alarm.h', 'src/core/iomgr/alarm_heap.h', 'src/core/iomgr/alarm_internal.h', 'src/core/iomgr/endpoint.h', 'src/core/iomgr/endpoint_pair.h', 'src/core/iomgr/fd_posix.h', 'src/core/iomgr/iocp_windows.h', 'src/core/iomgr/iomgr.h', 'src/core/iomgr/iomgr_internal.h', 'src/core/iomgr/iomgr_posix.h', 'src/core/iomgr/pollset.h', 'src/core/iomgr/pollset_kick_posix.h', 'src/core/iomgr/pollset_posix.h', 'src/core/iomgr/pollset_set.h', 'src/core/iomgr/pollset_set_posix.h', 'src/core/iomgr/pollset_set_windows.h', 'src/core/iomgr/pollset_windows.h', 'src/core/iomgr/resolve_address.h', 'src/core/iomgr/sockaddr.h', 'src/core/iomgr/sockaddr_posix.h', 'src/core/iomgr/sockaddr_utils.h', 'src/core/iomgr/sockaddr_win32.h', 'src/core/iomgr/socket_utils_posix.h', 'src/core/iomgr/socket_windows.h', 'src/core/iomgr/tcp_client.h', 'src/core/iomgr/tcp_posix.h', 'src/core/iomgr/tcp_server.h', 'src/core/iomgr/tcp_windows.h', 'src/core/iomgr/time_averaged_stats.h', 'src/core/iomgr/wakeup_fd_pipe.h', 'src/core/iomgr/wakeup_fd_posix.h', 'src/core/json/json.h', 'src/core/json/json_common.h', 'src/core/json/json_reader.h', 'src/core/json/json_writer.h', 'src/core/profiling/timers.h', 'src/core/profiling/timers_preciseclock.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', 'src/core/surface/client.h', 'src/core/surface/completion_queue.h', 'src/core/surface/event_string.h', 'src/core/surface/init.h', 'src/core/surface/server.h', 'src/core/surface/surface_trace.h', 'src/core/transport/chttp2/alpn.h', 'src/core/transport/chttp2/bin_encoder.h', 'src/core/transport/chttp2/frame.h', 'src/core/transport/chttp2/frame_data.h', 'src/core/transport/chttp2/frame_goaway.h', 'src/core/transport/chttp2/frame_ping.h', 'src/core/transport/chttp2/frame_rst_stream.h', 'src/core/transport/chttp2/frame_settings.h', 'src/core/transport/chttp2/frame_window_update.h', 'src/core/transport/chttp2/hpack_parser.h', 'src/core/transport/chttp2/hpack_table.h', 'src/core/transport/chttp2/http2_errors.h', 'src/core/transport/chttp2/huffsyms.h', 'src/core/transport/chttp2/status_conversion.h', 'src/core/transport/chttp2/stream_encoder.h', 'src/core/transport/chttp2/stream_map.h', 'src/core/transport/chttp2/timeout_encoding.h', 'src/core/transport/chttp2/varint.h', 'src/core/transport/chttp2_transport.h', 'src/core/transport/metadata.h', 'src/core/transport/stream_op.h', 'src/core/transport/transport.h', 'src/core/transport/transport_impl.h', 'src/core/census/context.h', 'include/grpc/grpc_security.h', 'include/grpc/byte_buffer.h', 'include/grpc/byte_buffer_reader.h', 'include/grpc/compression.h', 'include/grpc/grpc.h', 'include/grpc/status.h', 'include/grpc/census.h', 'src/core/httpcli/format_request.c', 'src/core/httpcli/httpcli.c', 'src/core/httpcli/httpcli_security_connector.c', 'src/core/httpcli/parser.c', 'src/core/security/base64.c', 'src/core/security/client_auth_filter.c', 'src/core/security/credentials.c', 'src/core/security/credentials_metadata.c', 'src/core/security/credentials_posix.c', 'src/core/security/credentials_win32.c', 'src/core/security/google_default_credentials.c', 'src/core/security/json_token.c', 'src/core/security/secure_endpoint.c', 'src/core/security/secure_transport_setup.c', 'src/core/security/security_connector.c', 'src/core/security/security_context.c', 'src/core/security/server_auth_filter.c', 'src/core/security/server_secure_chttp2.c', 'src/core/surface/init_secure.c', 'src/core/surface/secure_channel_create.c', 'src/core/tsi/fake_transport_security.c', 'src/core/tsi/ssl_transport_security.c', 'src/core/tsi/transport_security.c', 'src/core/census/grpc_context.c', 'src/core/channel/channel_args.c', 'src/core/channel/channel_stack.c', 'src/core/channel/child_channel.c', 'src/core/channel/client_channel.c', 'src/core/channel/client_setup.c', 'src/core/channel/connected_channel.c', 'src/core/channel/http_client_filter.c', 'src/core/channel/http_server_filter.c', 'src/core/channel/noop_filter.c', 'src/core/compression/algorithm.c', 'src/core/compression/message_compress.c', 'src/core/debug/trace.c', 'src/core/iomgr/alarm.c', 'src/core/iomgr/alarm_heap.c', 'src/core/iomgr/endpoint.c', 'src/core/iomgr/endpoint_pair_posix.c', 'src/core/iomgr/endpoint_pair_windows.c', 'src/core/iomgr/fd_posix.c', 'src/core/iomgr/iocp_windows.c', 'src/core/iomgr/iomgr.c', 'src/core/iomgr/iomgr_posix.c', 'src/core/iomgr/iomgr_windows.c', 'src/core/iomgr/pollset_kick_posix.c', 'src/core/iomgr/pollset_multipoller_with_epoll.c', 'src/core/iomgr/pollset_multipoller_with_poll_posix.c', 'src/core/iomgr/pollset_posix.c', 'src/core/iomgr/pollset_set_posix.c', 'src/core/iomgr/pollset_set_windows.c', 'src/core/iomgr/pollset_windows.c', 'src/core/iomgr/resolve_address_posix.c', 'src/core/iomgr/resolve_address_windows.c', 'src/core/iomgr/sockaddr_utils.c', 'src/core/iomgr/socket_utils_common_posix.c', 'src/core/iomgr/socket_utils_linux.c', 'src/core/iomgr/socket_utils_posix.c', 'src/core/iomgr/socket_windows.c', 'src/core/iomgr/tcp_client_posix.c', 'src/core/iomgr/tcp_client_windows.c', 'src/core/iomgr/tcp_posix.c', 'src/core/iomgr/tcp_server_posix.c', 'src/core/iomgr/tcp_server_windows.c', 'src/core/iomgr/tcp_windows.c', 'src/core/iomgr/time_averaged_stats.c', 'src/core/iomgr/wakeup_fd_eventfd.c', 'src/core/iomgr/wakeup_fd_nospecial.c', 'src/core/iomgr/wakeup_fd_pipe.c', 'src/core/iomgr/wakeup_fd_posix.c', 'src/core/json/json.c', 'src/core/json/json_reader.c', 'src/core/json/json_string.c', 'src/core/json/json_writer.c', 'src/core/profiling/basic_timers.c', 'src/core/profiling/stap_timers.c', 'src/core/surface/byte_buffer.c', 'src/core/surface/byte_buffer_queue.c', 'src/core/surface/byte_buffer_reader.c', 'src/core/surface/call.c', 'src/core/surface/call_details.c', 'src/core/surface/call_log_batch.c', 'src/core/surface/channel.c', 'src/core/surface/channel_create.c', 'src/core/surface/client.c', 'src/core/surface/completion_queue.c', 'src/core/surface/event_string.c', 'src/core/surface/init.c', 'src/core/surface/lame_client.c', 'src/core/surface/metadata_array.c', 'src/core/surface/server.c', 'src/core/surface/server_chttp2.c', 'src/core/surface/server_create.c', 'src/core/surface/surface_trace.c', 'src/core/transport/chttp2/alpn.c', 'src/core/transport/chttp2/bin_encoder.c', 'src/core/transport/chttp2/frame_data.c', 'src/core/transport/chttp2/frame_goaway.c', 'src/core/transport/chttp2/frame_ping.c', 'src/core/transport/chttp2/frame_rst_stream.c', 'src/core/transport/chttp2/frame_settings.c', 'src/core/transport/chttp2/frame_window_update.c', 'src/core/transport/chttp2/hpack_parser.c', 'src/core/transport/chttp2/hpack_table.c', 'src/core/transport/chttp2/huffsyms.c', 'src/core/transport/chttp2/status_conversion.c', 'src/core/transport/chttp2/stream_encoder.c', 'src/core/transport/chttp2/stream_map.c', 'src/core/transport/chttp2/timeout_encoding.c', 'src/core/transport/chttp2/varint.c', 'src/core/transport/chttp2_transport.c', 'src/core/transport/metadata.c', 'src/core/transport/stream_op.c', 'src/core/transport/transport.c', 'src/core/transport/transport_op_string.c', 'src/core/census/context.c', 'src/core/census/initialize.c', - cs.private_header_files = 'src/core/support/env.h', 'src/core/support/file.h', 'src/core/support/murmur_hash.h', 'src/core/support/string.h', 'src/core/support/string_win32.h', 'src/core/support/thd_internal.h', 'src/core/httpcli/format_request.h', 'src/core/httpcli/httpcli.h', 'src/core/httpcli/httpcli_security_connector.h', 'src/core/httpcli/parser.h', 'src/core/security/auth_filters.h', 'src/core/security/base64.h', 'src/core/security/credentials.h', 'src/core/security/json_token.h', 'src/core/security/secure_endpoint.h', 'src/core/security/secure_transport_setup.h', 'src/core/security/security_connector.h', 'src/core/security/security_context.h', 'src/core/tsi/fake_transport_security.h', 'src/core/tsi/ssl_transport_security.h', 'src/core/tsi/transport_security.h', 'src/core/tsi/transport_security_interface.h', 'src/core/census/grpc_context.h', 'src/core/channel/census_filter.h', 'src/core/channel/channel_args.h', 'src/core/channel/channel_stack.h', 'src/core/channel/child_channel.h', 'src/core/channel/client_channel.h', 'src/core/channel/client_setup.h', 'src/core/channel/connected_channel.h', 'src/core/channel/context.h', 'src/core/channel/http_client_filter.h', 'src/core/channel/http_server_filter.h', 'src/core/channel/noop_filter.h', 'src/core/compression/message_compress.h', 'src/core/debug/trace.h', 'src/core/iomgr/alarm.h', 'src/core/iomgr/alarm_heap.h', 'src/core/iomgr/alarm_internal.h', 'src/core/iomgr/endpoint.h', 'src/core/iomgr/endpoint_pair.h', 'src/core/iomgr/fd_posix.h', 'src/core/iomgr/iocp_windows.h', 'src/core/iomgr/iomgr.h', 'src/core/iomgr/iomgr_internal.h', 'src/core/iomgr/iomgr_posix.h', 'src/core/iomgr/pollset.h', 'src/core/iomgr/pollset_kick_posix.h', 'src/core/iomgr/pollset_posix.h', 'src/core/iomgr/pollset_set.h', 'src/core/iomgr/pollset_set_posix.h', 'src/core/iomgr/pollset_set_windows.h', 'src/core/iomgr/pollset_windows.h', 'src/core/iomgr/resolve_address.h', 'src/core/iomgr/sockaddr.h', 'src/core/iomgr/sockaddr_posix.h', 'src/core/iomgr/sockaddr_utils.h', 'src/core/iomgr/sockaddr_win32.h', 'src/core/iomgr/socket_utils_posix.h', 'src/core/iomgr/socket_windows.h', 'src/core/iomgr/tcp_client.h', 'src/core/iomgr/tcp_posix.h', 'src/core/iomgr/tcp_server.h', 'src/core/iomgr/tcp_windows.h', 'src/core/iomgr/time_averaged_stats.h', 'src/core/iomgr/wakeup_fd_pipe.h', 'src/core/iomgr/wakeup_fd_posix.h', 'src/core/json/json.h', 'src/core/json/json_common.h', 'src/core/json/json_reader.h', 'src/core/json/json_writer.h', 'src/core/profiling/timers.h', 'src/core/profiling/timers_preciseclock.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', 'src/core/surface/client.h', 'src/core/surface/completion_queue.h', 'src/core/surface/event_string.h', 'src/core/surface/init.h', 'src/core/surface/server.h', 'src/core/surface/surface_trace.h', 'src/core/transport/chttp2/alpn.h', 'src/core/transport/chttp2/bin_encoder.h', 'src/core/transport/chttp2/frame.h', 'src/core/transport/chttp2/frame_data.h', 'src/core/transport/chttp2/frame_goaway.h', 'src/core/transport/chttp2/frame_ping.h', 'src/core/transport/chttp2/frame_rst_stream.h', 'src/core/transport/chttp2/frame_settings.h', 'src/core/transport/chttp2/frame_window_update.h', 'src/core/transport/chttp2/hpack_parser.h', 'src/core/transport/chttp2/hpack_table.h', 'src/core/transport/chttp2/http2_errors.h', 'src/core/transport/chttp2/huffsyms.h', 'src/core/transport/chttp2/status_conversion.h', 'src/core/transport/chttp2/stream_encoder.h', 'src/core/transport/chttp2/stream_map.h', 'src/core/transport/chttp2/timeout_encoding.h', 'src/core/transport/chttp2/varint.h', 'src/core/transport/chttp2_transport.h', 'src/core/transport/metadata.h', 'src/core/transport/stream_op.h', 'src/core/transport/transport.h', 'src/core/transport/transport_impl.h', 'src/core/census/context.h', + cs.source_files = 'src/core/support/env.h', + 'src/core/support/file.h', + 'src/core/support/murmur_hash.h', + 'src/core/support/grpc_string.h', + 'src/core/support/string_win32.h', + 'src/core/support/thd_internal.h', + 'include/grpc/support/alloc.h', + 'include/grpc/support/atm.h', + 'include/grpc/support/atm_gcc_atomic.h', + 'include/grpc/support/atm_gcc_sync.h', + 'include/grpc/support/atm_win32.h', + 'include/grpc/support/cancellable_platform.h', + 'include/grpc/support/cmdline.h', + 'include/grpc/support/cpu.h', + 'include/grpc/support/histogram.h', + 'include/grpc/support/host_port.h', + 'include/grpc/support/log.h', + 'include/grpc/support/log_win32.h', + 'include/grpc/support/port_platform.h', + 'include/grpc/support/slice.h', + 'include/grpc/support/slice_buffer.h', + 'include/grpc/support/string_util.h', + 'include/grpc/support/subprocess.h', + 'include/grpc/support/sync.h', + 'include/grpc/support/sync_generic.h', + 'include/grpc/support/sync_posix.h', + 'include/grpc/support/sync_win32.h', + 'include/grpc/support/thd.h', + 'include/grpc/support/grpc_time.h', + 'include/grpc/support/tls.h', + 'include/grpc/support/tls_gcc.h', + 'include/grpc/support/tls_msvc.h', + 'include/grpc/support/tls_pthread.h', + 'include/grpc/support/useful.h', + 'src/core/support/alloc.c', + 'src/core/support/cancellable.c', + 'src/core/support/cmdline.c', + 'src/core/support/cpu_iphone.c', + 'src/core/support/cpu_linux.c', + 'src/core/support/cpu_posix.c', + 'src/core/support/cpu_windows.c', + 'src/core/support/env_linux.c', + 'src/core/support/env_posix.c', + 'src/core/support/env_win32.c', + 'src/core/support/file.c', + 'src/core/support/file_posix.c', + 'src/core/support/file_win32.c', + 'src/core/support/histogram.c', + 'src/core/support/host_port.c', + 'src/core/support/log.c', + 'src/core/support/log_android.c', + 'src/core/support/log_linux.c', + 'src/core/support/log_posix.c', + 'src/core/support/log_win32.c', + 'src/core/support/murmur_hash.c', + 'src/core/support/slice.c', + 'src/core/support/slice_buffer.c', + 'src/core/support/string.c', + 'src/core/support/string_posix.c', + 'src/core/support/string_win32.c', + 'src/core/support/subprocess_posix.c', + 'src/core/support/sync.c', + 'src/core/support/sync_posix.c', + 'src/core/support/sync_win32.c', + 'src/core/support/thd.c', + 'src/core/support/thd_posix.c', + 'src/core/support/thd_win32.c', + 'src/core/support/time.c', + 'src/core/support/time_posix.c', + 'src/core/support/time_win32.c', + 'src/core/support/tls_pthread.c', + 'src/core/httpcli/format_request.h', + 'src/core/httpcli/httpcli.h', + 'src/core/httpcli/httpcli_security_connector.h', + 'src/core/httpcli/parser.h', + 'src/core/security/auth_filters.h', + 'src/core/security/base64.h', + 'src/core/security/credentials.h', + 'src/core/security/json_token.h', + 'src/core/security/secure_endpoint.h', + 'src/core/security/secure_transport_setup.h', + 'src/core/security/security_connector.h', + 'src/core/security/security_context.h', + 'src/core/tsi/fake_transport_security.h', + 'src/core/tsi/ssl_transport_security.h', + 'src/core/tsi/transport_security.h', + 'src/core/tsi/transport_security_interface.h', + 'src/core/census/grpc_context.h', + 'src/core/channel/census_filter.h', + 'src/core/channel/channel_args.h', + 'src/core/channel/channel_stack.h', + 'src/core/channel/child_channel.h', + 'src/core/channel/client_channel.h', + 'src/core/channel/client_setup.h', + 'src/core/channel/connected_channel.h', + 'src/core/channel/context.h', + 'src/core/channel/http_client_filter.h', + 'src/core/channel/http_server_filter.h', + 'src/core/channel/noop_filter.h', + 'src/core/compression/message_compress.h', + 'src/core/debug/trace.h', + 'src/core/iomgr/alarm.h', + 'src/core/iomgr/alarm_heap.h', + 'src/core/iomgr/alarm_internal.h', + 'src/core/iomgr/endpoint.h', + 'src/core/iomgr/endpoint_pair.h', + 'src/core/iomgr/fd_posix.h', + 'src/core/iomgr/iocp_windows.h', + 'src/core/iomgr/iomgr.h', + 'src/core/iomgr/iomgr_internal.h', + 'src/core/iomgr/iomgr_posix.h', + 'src/core/iomgr/pollset.h', + 'src/core/iomgr/pollset_kick_posix.h', + 'src/core/iomgr/pollset_posix.h', + 'src/core/iomgr/pollset_set.h', + 'src/core/iomgr/pollset_set_posix.h', + 'src/core/iomgr/pollset_set_windows.h', + 'src/core/iomgr/pollset_windows.h', + 'src/core/iomgr/resolve_address.h', + 'src/core/iomgr/sockaddr.h', + 'src/core/iomgr/sockaddr_posix.h', + 'src/core/iomgr/sockaddr_utils.h', + 'src/core/iomgr/sockaddr_win32.h', + 'src/core/iomgr/socket_utils_posix.h', + 'src/core/iomgr/socket_windows.h', + 'src/core/iomgr/tcp_client.h', + 'src/core/iomgr/tcp_posix.h', + 'src/core/iomgr/tcp_server.h', + 'src/core/iomgr/tcp_windows.h', + 'src/core/iomgr/time_averaged_stats.h', + 'src/core/iomgr/wakeup_fd_pipe.h', + 'src/core/iomgr/wakeup_fd_posix.h', + 'src/core/json/json.h', + 'src/core/json/json_common.h', + 'src/core/json/json_reader.h', + 'src/core/json/json_writer.h', + 'src/core/profiling/timers.h', + 'src/core/profiling/timers_preciseclock.h', + 'src/core/surface/byte_buffer_queue.h', + 'src/core/surface/call.h', + 'src/core/surface/channel.h', + 'src/core/surface/client.h', + 'src/core/surface/completion_queue.h', + 'src/core/surface/event_string.h', + 'src/core/surface/init.h', + 'src/core/surface/server.h', + 'src/core/surface/surface_trace.h', + 'src/core/transport/chttp2/alpn.h', + 'src/core/transport/chttp2/bin_encoder.h', + 'src/core/transport/chttp2/frame.h', + 'src/core/transport/chttp2/frame_data.h', + 'src/core/transport/chttp2/frame_goaway.h', + 'src/core/transport/chttp2/frame_ping.h', + 'src/core/transport/chttp2/frame_rst_stream.h', + 'src/core/transport/chttp2/frame_settings.h', + 'src/core/transport/chttp2/frame_window_update.h', + 'src/core/transport/chttp2/hpack_parser.h', + 'src/core/transport/chttp2/hpack_table.h', + 'src/core/transport/chttp2/http2_errors.h', + 'src/core/transport/chttp2/huffsyms.h', + 'src/core/transport/chttp2/status_conversion.h', + 'src/core/transport/chttp2/stream_encoder.h', + 'src/core/transport/chttp2/stream_map.h', + 'src/core/transport/chttp2/timeout_encoding.h', + 'src/core/transport/chttp2/varint.h', + 'src/core/transport/chttp2_transport.h', + 'src/core/transport/metadata.h', + 'src/core/transport/stream_op.h', + 'src/core/transport/transport.h', + 'src/core/transport/transport_impl.h', + 'src/core/census/context.h', + 'include/grpc/grpc_security.h', + 'include/grpc/byte_buffer.h', + 'include/grpc/byte_buffer_reader.h', + 'include/grpc/compression.h', + 'include/grpc/grpc.h', + 'include/grpc/status.h', + 'include/grpc/census.h', + 'src/core/httpcli/format_request.c', + 'src/core/httpcli/httpcli.c', + 'src/core/httpcli/httpcli_security_connector.c', + 'src/core/httpcli/parser.c', + 'src/core/security/base64.c', + 'src/core/security/client_auth_filter.c', + 'src/core/security/credentials.c', + 'src/core/security/credentials_metadata.c', + 'src/core/security/credentials_posix.c', + 'src/core/security/credentials_win32.c', + 'src/core/security/google_default_credentials.c', + 'src/core/security/json_token.c', + 'src/core/security/secure_endpoint.c', + 'src/core/security/secure_transport_setup.c', + 'src/core/security/security_connector.c', + 'src/core/security/security_context.c', + 'src/core/security/server_auth_filter.c', + 'src/core/security/server_secure_chttp2.c', + 'src/core/surface/init_secure.c', + 'src/core/surface/secure_channel_create.c', + 'src/core/tsi/fake_transport_security.c', + 'src/core/tsi/ssl_transport_security.c', + 'src/core/tsi/transport_security.c', + 'src/core/census/grpc_context.c', + 'src/core/channel/channel_args.c', + 'src/core/channel/channel_stack.c', + 'src/core/channel/child_channel.c', + 'src/core/channel/client_channel.c', + 'src/core/channel/client_setup.c', + 'src/core/channel/connected_channel.c', + 'src/core/channel/http_client_filter.c', + 'src/core/channel/http_server_filter.c', + 'src/core/channel/noop_filter.c', + 'src/core/compression/algorithm.c', + 'src/core/compression/message_compress.c', + 'src/core/debug/trace.c', + 'src/core/iomgr/alarm.c', + 'src/core/iomgr/alarm_heap.c', + 'src/core/iomgr/endpoint.c', + 'src/core/iomgr/endpoint_pair_posix.c', + 'src/core/iomgr/endpoint_pair_windows.c', + 'src/core/iomgr/fd_posix.c', + 'src/core/iomgr/iocp_windows.c', + 'src/core/iomgr/iomgr.c', + 'src/core/iomgr/iomgr_posix.c', + 'src/core/iomgr/iomgr_windows.c', + 'src/core/iomgr/pollset_kick_posix.c', + 'src/core/iomgr/pollset_multipoller_with_epoll.c', + 'src/core/iomgr/pollset_multipoller_with_poll_posix.c', + 'src/core/iomgr/pollset_posix.c', + 'src/core/iomgr/pollset_set_posix.c', + 'src/core/iomgr/pollset_set_windows.c', + 'src/core/iomgr/pollset_windows.c', + 'src/core/iomgr/resolve_address_posix.c', + 'src/core/iomgr/resolve_address_windows.c', + 'src/core/iomgr/sockaddr_utils.c', + 'src/core/iomgr/socket_utils_common_posix.c', + 'src/core/iomgr/socket_utils_linux.c', + 'src/core/iomgr/socket_utils_posix.c', + 'src/core/iomgr/socket_windows.c', + 'src/core/iomgr/tcp_client_posix.c', + 'src/core/iomgr/tcp_client_windows.c', + 'src/core/iomgr/tcp_posix.c', + 'src/core/iomgr/tcp_server_posix.c', + 'src/core/iomgr/tcp_server_windows.c', + 'src/core/iomgr/tcp_windows.c', + 'src/core/iomgr/time_averaged_stats.c', + 'src/core/iomgr/wakeup_fd_eventfd.c', + 'src/core/iomgr/wakeup_fd_nospecial.c', + 'src/core/iomgr/wakeup_fd_pipe.c', + 'src/core/iomgr/wakeup_fd_posix.c', + 'src/core/json/json.c', + 'src/core/json/json_reader.c', + 'src/core/json/json_string.c', + 'src/core/json/json_writer.c', + 'src/core/profiling/basic_timers.c', + 'src/core/profiling/stap_timers.c', + 'src/core/surface/byte_buffer.c', + 'src/core/surface/byte_buffer_queue.c', + 'src/core/surface/byte_buffer_reader.c', + 'src/core/surface/call.c', + 'src/core/surface/call_details.c', + 'src/core/surface/call_log_batch.c', + 'src/core/surface/channel.c', + 'src/core/surface/channel_create.c', + 'src/core/surface/client.c', + 'src/core/surface/completion_queue.c', + 'src/core/surface/event_string.c', + 'src/core/surface/init.c', + 'src/core/surface/lame_client.c', + 'src/core/surface/metadata_array.c', + 'src/core/surface/server.c', + 'src/core/surface/server_chttp2.c', + 'src/core/surface/server_create.c', + 'src/core/surface/surface_trace.c', + 'src/core/transport/chttp2/alpn.c', + 'src/core/transport/chttp2/bin_encoder.c', + 'src/core/transport/chttp2/frame_data.c', + 'src/core/transport/chttp2/frame_goaway.c', + 'src/core/transport/chttp2/frame_ping.c', + 'src/core/transport/chttp2/frame_rst_stream.c', + 'src/core/transport/chttp2/frame_settings.c', + 'src/core/transport/chttp2/frame_window_update.c', + 'src/core/transport/chttp2/hpack_parser.c', + 'src/core/transport/chttp2/hpack_table.c', + 'src/core/transport/chttp2/huffsyms.c', + 'src/core/transport/chttp2/status_conversion.c', + 'src/core/transport/chttp2/stream_encoder.c', + 'src/core/transport/chttp2/stream_map.c', + 'src/core/transport/chttp2/timeout_encoding.c', + 'src/core/transport/chttp2/varint.c', + 'src/core/transport/chttp2_transport.c', + 'src/core/transport/metadata.c', + 'src/core/transport/stream_op.c', + 'src/core/transport/transport.c', + 'src/core/transport/transport_op_string.c', + 'src/core/census/context.c', + 'src/core/census/initialize.c' + + cs.private_header_files = 'src/core/support/env.h', + 'src/core/support/file.h', + 'src/core/support/murmur_hash.h', + 'src/core/support/string.h', + 'src/core/support/string_win32.h', + 'src/core/support/thd_internal.h', + 'src/core/httpcli/format_request.h', + 'src/core/httpcli/httpcli.h', + 'src/core/httpcli/httpcli_security_connector.h', + 'src/core/httpcli/parser.h', + 'src/core/security/auth_filters.h', + 'src/core/security/base64.h', + 'src/core/security/credentials.h', + 'src/core/security/json_token.h', + 'src/core/security/secure_endpoint.h', + 'src/core/security/secure_transport_setup.h', + 'src/core/security/security_connector.h', + 'src/core/security/security_context.h', + 'src/core/tsi/fake_transport_security.h', + 'src/core/tsi/ssl_transport_security.h', + 'src/core/tsi/transport_security.h', + 'src/core/tsi/transport_security_interface.h', + 'src/core/census/grpc_context.h', + 'src/core/channel/census_filter.h', + 'src/core/channel/channel_args.h', + 'src/core/channel/channel_stack.h', + 'src/core/channel/child_channel.h', + 'src/core/channel/client_channel.h', + 'src/core/channel/client_setup.h', + 'src/core/channel/connected_channel.h', + 'src/core/channel/context.h', + 'src/core/channel/http_client_filter.h', + 'src/core/channel/http_server_filter.h', + 'src/core/channel/noop_filter.h', + 'src/core/compression/message_compress.h', + 'src/core/debug/trace.h', + 'src/core/iomgr/alarm.h', + 'src/core/iomgr/alarm_heap.h', + 'src/core/iomgr/alarm_internal.h', + 'src/core/iomgr/endpoint.h', + 'src/core/iomgr/endpoint_pair.h', + 'src/core/iomgr/fd_posix.h', + 'src/core/iomgr/iocp_windows.h', + 'src/core/iomgr/iomgr.h', + 'src/core/iomgr/iomgr_internal.h', + 'src/core/iomgr/iomgr_posix.h', + 'src/core/iomgr/pollset.h', + 'src/core/iomgr/pollset_kick_posix.h', + 'src/core/iomgr/pollset_posix.h', + 'src/core/iomgr/pollset_set.h', + 'src/core/iomgr/pollset_set_posix.h', + 'src/core/iomgr/pollset_set_windows.h', + 'src/core/iomgr/pollset_windows.h', + 'src/core/iomgr/resolve_address.h', + 'src/core/iomgr/sockaddr.h', + 'src/core/iomgr/sockaddr_posix.h', + 'src/core/iomgr/sockaddr_utils.h', + 'src/core/iomgr/sockaddr_win32.h', + 'src/core/iomgr/socket_utils_posix.h', + 'src/core/iomgr/socket_windows.h', + 'src/core/iomgr/tcp_client.h', + 'src/core/iomgr/tcp_posix.h', + 'src/core/iomgr/tcp_server.h', + 'src/core/iomgr/tcp_windows.h', + 'src/core/iomgr/time_averaged_stats.h', + 'src/core/iomgr/wakeup_fd_pipe.h', + 'src/core/iomgr/wakeup_fd_posix.h', + 'src/core/json/json.h', + 'src/core/json/json_common.h', + 'src/core/json/json_reader.h', + 'src/core/json/json_writer.h', + 'src/core/profiling/timers.h', + 'src/core/profiling/timers_preciseclock.h', + 'src/core/surface/byte_buffer_queue.h', + 'src/core/surface/call.h', + 'src/core/surface/channel.h', + 'src/core/surface/client.h', + 'src/core/surface/completion_queue.h', + 'src/core/surface/event_string.h', + 'src/core/surface/init.h', + 'src/core/surface/server.h', + 'src/core/surface/surface_trace.h', + 'src/core/transport/chttp2/alpn.h', + 'src/core/transport/chttp2/bin_encoder.h', + 'src/core/transport/chttp2/frame.h', + 'src/core/transport/chttp2/frame_data.h', + 'src/core/transport/chttp2/frame_goaway.h', + 'src/core/transport/chttp2/frame_ping.h', + 'src/core/transport/chttp2/frame_rst_stream.h', + 'src/core/transport/chttp2/frame_settings.h', + 'src/core/transport/chttp2/frame_window_update.h', + 'src/core/transport/chttp2/hpack_parser.h', + 'src/core/transport/chttp2/hpack_table.h', + 'src/core/transport/chttp2/http2_errors.h', + 'src/core/transport/chttp2/huffsyms.h', + 'src/core/transport/chttp2/status_conversion.h', + 'src/core/transport/chttp2/stream_encoder.h', + 'src/core/transport/chttp2/stream_map.h', + 'src/core/transport/chttp2/timeout_encoding.h', + 'src/core/transport/chttp2/varint.h', + 'src/core/transport/chttp2_transport.h', + 'src/core/transport/metadata.h', + 'src/core/transport/stream_op.h', + 'src/core/transport/transport.h', + 'src/core/transport/transport_impl.h', + 'src/core/census/context.h' + cs.header_mappings_dir = '.' # The core library includes its headers as either "src/core/..." or "grpc/...", meaning we have # to tell XCode to look for headers under the "include" subdirectory too. diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 03c303b414a..da5ca127fb0 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -41,6 +41,22 @@ def fix_header_name(name): return '/'.join(split_name[:-1] + ['grpc_' + split_name[-1]]) else: return name + +def grpc_files(libs): + out = [] + for lib in libs: + if lib.name in ("grpc", "gpr"): + out.extend(fix_header_name(h) for h in lib.get('headers', [])) + out.extend(fix_header_name(h) for h in lib.get('public_headers', [])) + out.extend(lib.get('src', [])) + return out; + +def grpc_private_headers(libs): + out = [] + for lib in libs: + if lib.name in ("grpc", "gpr"): + out.extend(lib.get('headers', [])) + return out %> Pod::Spec.new do |s| @@ -68,29 +84,9 @@ Pod::Spec.new do |s| # Core cross-platform gRPC library, written in C. s.subspec 'C-Core' do |cs| - cs.source_files = \ -% for lib in libs: -% if lib.name in ("grpc", "gpr"): -% for hdr in lib.get("headers", []): -'${fix_header_name(hdr)}', \ -% endfor -% for hdr in lib.get("public_headers", []): -'${fix_header_name(hdr)}', \ -% endfor -% for src in lib.src: -'${src}', \ -% endfor -% endif -% endfor - - cs.private_header_files = \ -% for lib in libs: -% if lib.name in ("grpc", "gpr"): -% for hdr in lib.get("headers", []): -'${hdr}', \ -% endfor -% endif -% endfor + cs.source_files = ${(',\n' + 22*' ').join('\'%s\'' % f for f in grpc_files(libs))} + + cs.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} cs.header_mappings_dir = '.' # The core library includes its headers as either "src/core/..." or "grpc/...", meaning we have diff --git a/templates/tools/doxygen/Doxyfile.include b/templates/tools/doxygen/Doxyfile.include index 1391016348f..2934ebe7d80 100644 --- a/templates/tools/doxygen/Doxyfile.include +++ b/templates/tools/doxygen/Doxyfile.include @@ -778,7 +778,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = ${' '.join( +INPUT = ${' \\\n'.join( itertools.chain.from_iterable( target.public_headers + ([] diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index f947b7823eb..d782dc18f78 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -760,7 +760,43 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc++/async_generic_service.h include/grpc++/async_unary_call.h include/grpc++/byte_buffer.h include/grpc++/channel_arguments.h include/grpc++/channel_interface.h include/grpc++/client_context.h include/grpc++/completion_queue.h include/grpc++/config.h include/grpc++/config_protobuf.h include/grpc++/create_channel.h include/grpc++/credentials.h include/grpc++/generic_stub.h include/grpc++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/proto_utils.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.h include/grpc++/server.h include/grpc++/server_builder.h include/grpc++/server_context.h include/grpc++/server_credentials.h include/grpc++/slice.h include/grpc++/status.h include/grpc++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/time.h +INPUT = include/grpc++/async_generic_service.h \ +include/grpc++/async_unary_call.h \ +include/grpc++/byte_buffer.h \ +include/grpc++/channel_arguments.h \ +include/grpc++/channel_interface.h \ +include/grpc++/client_context.h \ +include/grpc++/completion_queue.h \ +include/grpc++/config.h \ +include/grpc++/config_protobuf.h \ +include/grpc++/create_channel.h \ +include/grpc++/credentials.h \ +include/grpc++/generic_stub.h \ +include/grpc++/impl/call.h \ +include/grpc++/impl/client_unary_call.h \ +include/grpc++/impl/grpc_library.h \ +include/grpc++/impl/internal_stub.h \ +include/grpc++/impl/proto_utils.h \ +include/grpc++/impl/rpc_method.h \ +include/grpc++/impl/rpc_service_method.h \ +include/grpc++/impl/serialization_traits.h \ +include/grpc++/impl/service_type.h \ +include/grpc++/impl/sync.h \ +include/grpc++/impl/sync_cxx11.h \ +include/grpc++/impl/sync_no_cxx11.h \ +include/grpc++/impl/thd.h \ +include/grpc++/impl/thd_cxx11.h \ +include/grpc++/impl/thd_no_cxx11.h \ +include/grpc++/server.h \ +include/grpc++/server_builder.h \ +include/grpc++/server_context.h \ +include/grpc++/server_credentials.h \ +include/grpc++/slice.h \ +include/grpc++/status.h \ +include/grpc++/status_code_enum.h \ +include/grpc++/stream.h \ +include/grpc++/thread_pool_interface.h \ +include/grpc++/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index a19f89ac7be..4e0b672b41c 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -760,7 +760,73 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc++/async_generic_service.h include/grpc++/async_unary_call.h include/grpc++/byte_buffer.h include/grpc++/channel_arguments.h include/grpc++/channel_interface.h include/grpc++/client_context.h include/grpc++/completion_queue.h include/grpc++/config.h include/grpc++/config_protobuf.h include/grpc++/create_channel.h include/grpc++/credentials.h include/grpc++/generic_stub.h include/grpc++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/proto_utils.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.h include/grpc++/server.h include/grpc++/server_builder.h include/grpc++/server_context.h include/grpc++/server_credentials.h include/grpc++/slice.h include/grpc++/status.h include/grpc++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/time.h src/cpp/client/secure_credentials.h src/cpp/server/secure_server_credentials.h src/cpp/client/channel.h src/cpp/server/thread_pool.h src/cpp/client/secure_credentials.cc src/cpp/server/secure_server_credentials.cc src/cpp/client/channel.cc src/cpp/client/channel_arguments.cc src/cpp/client/client_context.cc src/cpp/client/create_channel.cc src/cpp/client/credentials.cc src/cpp/client/generic_stub.cc src/cpp/client/insecure_credentials.cc src/cpp/client/internal_stub.cc src/cpp/common/call.cc src/cpp/common/completion_queue.cc src/cpp/common/rpc_method.cc src/cpp/proto/proto_utils.cc src/cpp/server/async_generic_service.cc src/cpp/server/create_default_thread_pool.cc src/cpp/server/insecure_server_credentials.cc src/cpp/server/server.cc src/cpp/server/server_builder.cc src/cpp/server/server_context.cc src/cpp/server/server_credentials.cc src/cpp/server/thread_pool.cc src/cpp/util/byte_buffer.cc src/cpp/util/slice.cc src/cpp/util/status.cc src/cpp/util/time.cc +INPUT = include/grpc++/async_generic_service.h \ +include/grpc++/async_unary_call.h \ +include/grpc++/byte_buffer.h \ +include/grpc++/channel_arguments.h \ +include/grpc++/channel_interface.h \ +include/grpc++/client_context.h \ +include/grpc++/completion_queue.h \ +include/grpc++/config.h \ +include/grpc++/config_protobuf.h \ +include/grpc++/create_channel.h \ +include/grpc++/credentials.h \ +include/grpc++/generic_stub.h \ +include/grpc++/impl/call.h \ +include/grpc++/impl/client_unary_call.h \ +include/grpc++/impl/grpc_library.h \ +include/grpc++/impl/internal_stub.h \ +include/grpc++/impl/proto_utils.h \ +include/grpc++/impl/rpc_method.h \ +include/grpc++/impl/rpc_service_method.h \ +include/grpc++/impl/serialization_traits.h \ +include/grpc++/impl/service_type.h \ +include/grpc++/impl/sync.h \ +include/grpc++/impl/sync_cxx11.h \ +include/grpc++/impl/sync_no_cxx11.h \ +include/grpc++/impl/thd.h \ +include/grpc++/impl/thd_cxx11.h \ +include/grpc++/impl/thd_no_cxx11.h \ +include/grpc++/server.h \ +include/grpc++/server_builder.h \ +include/grpc++/server_context.h \ +include/grpc++/server_credentials.h \ +include/grpc++/slice.h \ +include/grpc++/status.h \ +include/grpc++/status_code_enum.h \ +include/grpc++/stream.h \ +include/grpc++/thread_pool_interface.h \ +include/grpc++/time.h \ +src/cpp/client/secure_credentials.h \ +src/cpp/server/secure_server_credentials.h \ +src/cpp/client/channel.h \ +src/cpp/server/thread_pool.h \ +src/cpp/client/secure_credentials.cc \ +src/cpp/server/secure_server_credentials.cc \ +src/cpp/client/channel.cc \ +src/cpp/client/channel_arguments.cc \ +src/cpp/client/client_context.cc \ +src/cpp/client/create_channel.cc \ +src/cpp/client/credentials.cc \ +src/cpp/client/generic_stub.cc \ +src/cpp/client/insecure_credentials.cc \ +src/cpp/client/internal_stub.cc \ +src/cpp/common/call.cc \ +src/cpp/common/completion_queue.cc \ +src/cpp/common/rpc_method.cc \ +src/cpp/proto/proto_utils.cc \ +src/cpp/server/async_generic_service.cc \ +src/cpp/server/create_default_thread_pool.cc \ +src/cpp/server/insecure_server_credentials.cc \ +src/cpp/server/server.cc \ +src/cpp/server/server_builder.cc \ +src/cpp/server/server_context.cc \ +src/cpp/server/server_credentials.cc \ +src/cpp/server/thread_pool.cc \ +src/cpp/util/byte_buffer.cc \ +src/cpp/util/slice.cc \ +src/cpp/util/status.cc \ +src/cpp/util/time.cc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 7cc96b2e06a..1bfd7875289 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -760,7 +760,41 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h +INPUT = include/grpc/grpc_security.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/status.h \ +include/grpc/census.h \ +include/grpc/support/alloc.h \ +include/grpc/support/atm.h \ +include/grpc/support/atm_gcc_atomic.h \ +include/grpc/support/atm_gcc_sync.h \ +include/grpc/support/atm_win32.h \ +include/grpc/support/cancellable_platform.h \ +include/grpc/support/cmdline.h \ +include/grpc/support/cpu.h \ +include/grpc/support/histogram.h \ +include/grpc/support/host_port.h \ +include/grpc/support/log.h \ +include/grpc/support/log_win32.h \ +include/grpc/support/port_platform.h \ +include/grpc/support/slice.h \ +include/grpc/support/slice_buffer.h \ +include/grpc/support/string_util.h \ +include/grpc/support/subprocess.h \ +include/grpc/support/sync.h \ +include/grpc/support/sync_generic.h \ +include/grpc/support/sync_posix.h \ +include/grpc/support/sync_win32.h \ +include/grpc/support/thd.h \ +include/grpc/support/time.h \ +include/grpc/support/tls.h \ +include/grpc/support/tls_gcc.h \ +include/grpc/support/tls_msvc.h \ +include/grpc/support/tls_pthread.h \ +include/grpc/support/useful.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index ce18bb4f272..0fa529f89e1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -760,7 +760,302 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h include/grpc/grpc.h include/grpc/status.h include/grpc/census.h src/core/httpcli/format_request.h src/core/httpcli/httpcli.h src/core/httpcli/httpcli_security_connector.h src/core/httpcli/parser.h src/core/security/auth_filters.h src/core/security/base64.h src/core/security/credentials.h src/core/security/json_token.h src/core/security/secure_endpoint.h src/core/security/secure_transport_setup.h src/core/security/security_connector.h src/core/security/security_context.h src/core/tsi/fake_transport_security.h src/core/tsi/ssl_transport_security.h src/core/tsi/transport_security.h src/core/tsi/transport_security_interface.h src/core/census/grpc_context.h src/core/channel/census_filter.h src/core/channel/channel_args.h src/core/channel/channel_stack.h src/core/channel/child_channel.h src/core/channel/client_channel.h src/core/channel/client_setup.h src/core/channel/connected_channel.h src/core/channel/context.h src/core/channel/http_client_filter.h src/core/channel/http_server_filter.h src/core/channel/noop_filter.h src/core/compression/message_compress.h src/core/debug/trace.h src/core/iomgr/alarm.h src/core/iomgr/alarm_heap.h src/core/iomgr/alarm_internal.h src/core/iomgr/endpoint.h src/core/iomgr/endpoint_pair.h src/core/iomgr/fd_posix.h src/core/iomgr/iocp_windows.h src/core/iomgr/iomgr.h src/core/iomgr/iomgr_internal.h src/core/iomgr/iomgr_posix.h src/core/iomgr/pollset.h src/core/iomgr/pollset_kick_posix.h src/core/iomgr/pollset_posix.h src/core/iomgr/pollset_set.h src/core/iomgr/pollset_set_posix.h src/core/iomgr/pollset_set_windows.h src/core/iomgr/pollset_windows.h src/core/iomgr/resolve_address.h src/core/iomgr/sockaddr.h src/core/iomgr/sockaddr_posix.h src/core/iomgr/sockaddr_utils.h src/core/iomgr/sockaddr_win32.h src/core/iomgr/socket_utils_posix.h src/core/iomgr/socket_windows.h src/core/iomgr/tcp_client.h src/core/iomgr/tcp_posix.h src/core/iomgr/tcp_server.h src/core/iomgr/tcp_windows.h src/core/iomgr/time_averaged_stats.h src/core/iomgr/wakeup_fd_pipe.h src/core/iomgr/wakeup_fd_posix.h src/core/json/json.h src/core/json/json_common.h src/core/json/json_reader.h src/core/json/json_writer.h src/core/profiling/timers.h src/core/profiling/timers_preciseclock.h src/core/surface/byte_buffer_queue.h src/core/surface/call.h src/core/surface/channel.h src/core/surface/client.h src/core/surface/completion_queue.h src/core/surface/event_string.h src/core/surface/init.h src/core/surface/server.h src/core/surface/surface_trace.h src/core/transport/chttp2/alpn.h src/core/transport/chttp2/bin_encoder.h src/core/transport/chttp2/frame.h src/core/transport/chttp2/frame_data.h src/core/transport/chttp2/frame_goaway.h src/core/transport/chttp2/frame_ping.h src/core/transport/chttp2/frame_rst_stream.h src/core/transport/chttp2/frame_settings.h src/core/transport/chttp2/frame_window_update.h src/core/transport/chttp2/hpack_parser.h src/core/transport/chttp2/hpack_table.h src/core/transport/chttp2/http2_errors.h src/core/transport/chttp2/huffsyms.h src/core/transport/chttp2/status_conversion.h src/core/transport/chttp2/stream_encoder.h src/core/transport/chttp2/stream_map.h src/core/transport/chttp2/timeout_encoding.h src/core/transport/chttp2/varint.h src/core/transport/chttp2_transport.h src/core/transport/metadata.h src/core/transport/stream_op.h src/core/transport/transport.h src/core/transport/transport_impl.h src/core/census/context.h src/core/httpcli/format_request.c src/core/httpcli/httpcli.c src/core/httpcli/httpcli_security_connector.c src/core/httpcli/parser.c src/core/security/base64.c src/core/security/client_auth_filter.c src/core/security/credentials.c src/core/security/credentials_metadata.c src/core/security/credentials_posix.c src/core/security/credentials_win32.c src/core/security/google_default_credentials.c src/core/security/json_token.c src/core/security/secure_endpoint.c src/core/security/secure_transport_setup.c src/core/security/security_connector.c src/core/security/security_context.c src/core/security/server_auth_filter.c src/core/security/server_secure_chttp2.c src/core/surface/init_secure.c src/core/surface/secure_channel_create.c src/core/tsi/fake_transport_security.c src/core/tsi/ssl_transport_security.c src/core/tsi/transport_security.c src/core/census/grpc_context.c src/core/channel/channel_args.c src/core/channel/channel_stack.c src/core/channel/child_channel.c src/core/channel/client_channel.c src/core/channel/client_setup.c src/core/channel/connected_channel.c src/core/channel/http_client_filter.c src/core/channel/http_server_filter.c src/core/channel/noop_filter.c src/core/compression/algorithm.c src/core/compression/message_compress.c src/core/debug/trace.c src/core/iomgr/alarm.c src/core/iomgr/alarm_heap.c src/core/iomgr/endpoint.c src/core/iomgr/endpoint_pair_posix.c src/core/iomgr/endpoint_pair_windows.c src/core/iomgr/fd_posix.c src/core/iomgr/iocp_windows.c src/core/iomgr/iomgr.c src/core/iomgr/iomgr_posix.c src/core/iomgr/iomgr_windows.c src/core/iomgr/pollset_kick_posix.c src/core/iomgr/pollset_multipoller_with_epoll.c src/core/iomgr/pollset_multipoller_with_poll_posix.c src/core/iomgr/pollset_posix.c src/core/iomgr/pollset_set_posix.c src/core/iomgr/pollset_set_windows.c src/core/iomgr/pollset_windows.c src/core/iomgr/resolve_address_posix.c src/core/iomgr/resolve_address_windows.c src/core/iomgr/sockaddr_utils.c src/core/iomgr/socket_utils_common_posix.c src/core/iomgr/socket_utils_linux.c src/core/iomgr/socket_utils_posix.c src/core/iomgr/socket_windows.c src/core/iomgr/tcp_client_posix.c src/core/iomgr/tcp_client_windows.c src/core/iomgr/tcp_posix.c src/core/iomgr/tcp_server_posix.c src/core/iomgr/tcp_server_windows.c src/core/iomgr/tcp_windows.c src/core/iomgr/time_averaged_stats.c src/core/iomgr/wakeup_fd_eventfd.c src/core/iomgr/wakeup_fd_nospecial.c src/core/iomgr/wakeup_fd_pipe.c src/core/iomgr/wakeup_fd_posix.c src/core/json/json.c src/core/json/json_reader.c src/core/json/json_string.c src/core/json/json_writer.c src/core/profiling/basic_timers.c src/core/profiling/stap_timers.c src/core/surface/byte_buffer.c src/core/surface/byte_buffer_queue.c src/core/surface/byte_buffer_reader.c src/core/surface/call.c src/core/surface/call_details.c src/core/surface/call_log_batch.c src/core/surface/channel.c src/core/surface/channel_create.c src/core/surface/client.c src/core/surface/completion_queue.c src/core/surface/event_string.c src/core/surface/init.c src/core/surface/lame_client.c src/core/surface/metadata_array.c src/core/surface/server.c src/core/surface/server_chttp2.c src/core/surface/server_create.c src/core/surface/surface_trace.c src/core/transport/chttp2/alpn.c src/core/transport/chttp2/bin_encoder.c src/core/transport/chttp2/frame_data.c src/core/transport/chttp2/frame_goaway.c src/core/transport/chttp2/frame_ping.c src/core/transport/chttp2/frame_rst_stream.c src/core/transport/chttp2/frame_settings.c src/core/transport/chttp2/frame_window_update.c src/core/transport/chttp2/hpack_parser.c src/core/transport/chttp2/hpack_table.c src/core/transport/chttp2/huffsyms.c src/core/transport/chttp2/status_conversion.c src/core/transport/chttp2/stream_encoder.c src/core/transport/chttp2/stream_map.c src/core/transport/chttp2/timeout_encoding.c src/core/transport/chttp2/varint.c src/core/transport/chttp2_transport.c src/core/transport/metadata.c src/core/transport/stream_op.c src/core/transport/transport.c src/core/transport/transport_op_string.c src/core/census/context.c src/core/census/initialize.c include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h include/grpc/support/atm_gcc_sync.h include/grpc/support/atm_win32.h include/grpc/support/cancellable_platform.h include/grpc/support/cmdline.h include/grpc/support/cpu.h include/grpc/support/histogram.h include/grpc/support/host_port.h include/grpc/support/log.h include/grpc/support/log_win32.h include/grpc/support/port_platform.h include/grpc/support/slice.h include/grpc/support/slice_buffer.h include/grpc/support/string_util.h include/grpc/support/subprocess.h include/grpc/support/sync.h include/grpc/support/sync_generic.h include/grpc/support/sync_posix.h include/grpc/support/sync_win32.h include/grpc/support/thd.h include/grpc/support/time.h include/grpc/support/tls.h include/grpc/support/tls_gcc.h include/grpc/support/tls_msvc.h include/grpc/support/tls_pthread.h include/grpc/support/useful.h src/core/support/env.h src/core/support/file.h src/core/support/murmur_hash.h src/core/support/string.h src/core/support/string_win32.h src/core/support/thd_internal.h src/core/support/alloc.c src/core/support/cancellable.c src/core/support/cmdline.c src/core/support/cpu_iphone.c src/core/support/cpu_linux.c src/core/support/cpu_posix.c src/core/support/cpu_windows.c src/core/support/env_linux.c src/core/support/env_posix.c src/core/support/env_win32.c src/core/support/file.c src/core/support/file_posix.c src/core/support/file_win32.c src/core/support/histogram.c src/core/support/host_port.c src/core/support/log.c src/core/support/log_android.c src/core/support/log_linux.c src/core/support/log_posix.c src/core/support/log_win32.c src/core/support/murmur_hash.c src/core/support/slice.c src/core/support/slice_buffer.c src/core/support/string.c src/core/support/string_posix.c src/core/support/string_win32.c src/core/support/subprocess_posix.c src/core/support/sync.c src/core/support/sync_posix.c src/core/support/sync_win32.c src/core/support/thd.c src/core/support/thd_posix.c src/core/support/thd_win32.c src/core/support/time.c src/core/support/time_posix.c src/core/support/time_win32.c src/core/support/tls_pthread.c +INPUT = include/grpc/grpc_security.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/status.h \ +include/grpc/census.h \ +src/core/httpcli/format_request.h \ +src/core/httpcli/httpcli.h \ +src/core/httpcli/httpcli_security_connector.h \ +src/core/httpcli/parser.h \ +src/core/security/auth_filters.h \ +src/core/security/base64.h \ +src/core/security/credentials.h \ +src/core/security/json_token.h \ +src/core/security/secure_endpoint.h \ +src/core/security/secure_transport_setup.h \ +src/core/security/security_connector.h \ +src/core/security/security_context.h \ +src/core/tsi/fake_transport_security.h \ +src/core/tsi/ssl_transport_security.h \ +src/core/tsi/transport_security.h \ +src/core/tsi/transport_security_interface.h \ +src/core/census/grpc_context.h \ +src/core/channel/census_filter.h \ +src/core/channel/channel_args.h \ +src/core/channel/channel_stack.h \ +src/core/channel/child_channel.h \ +src/core/channel/client_channel.h \ +src/core/channel/client_setup.h \ +src/core/channel/connected_channel.h \ +src/core/channel/context.h \ +src/core/channel/http_client_filter.h \ +src/core/channel/http_server_filter.h \ +src/core/channel/noop_filter.h \ +src/core/compression/message_compress.h \ +src/core/debug/trace.h \ +src/core/iomgr/alarm.h \ +src/core/iomgr/alarm_heap.h \ +src/core/iomgr/alarm_internal.h \ +src/core/iomgr/endpoint.h \ +src/core/iomgr/endpoint_pair.h \ +src/core/iomgr/fd_posix.h \ +src/core/iomgr/iocp_windows.h \ +src/core/iomgr/iomgr.h \ +src/core/iomgr/iomgr_internal.h \ +src/core/iomgr/iomgr_posix.h \ +src/core/iomgr/pollset.h \ +src/core/iomgr/pollset_kick_posix.h \ +src/core/iomgr/pollset_posix.h \ +src/core/iomgr/pollset_set.h \ +src/core/iomgr/pollset_set_posix.h \ +src/core/iomgr/pollset_set_windows.h \ +src/core/iomgr/pollset_windows.h \ +src/core/iomgr/resolve_address.h \ +src/core/iomgr/sockaddr.h \ +src/core/iomgr/sockaddr_posix.h \ +src/core/iomgr/sockaddr_utils.h \ +src/core/iomgr/sockaddr_win32.h \ +src/core/iomgr/socket_utils_posix.h \ +src/core/iomgr/socket_windows.h \ +src/core/iomgr/tcp_client.h \ +src/core/iomgr/tcp_posix.h \ +src/core/iomgr/tcp_server.h \ +src/core/iomgr/tcp_windows.h \ +src/core/iomgr/time_averaged_stats.h \ +src/core/iomgr/wakeup_fd_pipe.h \ +src/core/iomgr/wakeup_fd_posix.h \ +src/core/json/json.h \ +src/core/json/json_common.h \ +src/core/json/json_reader.h \ +src/core/json/json_writer.h \ +src/core/profiling/timers.h \ +src/core/profiling/timers_preciseclock.h \ +src/core/surface/byte_buffer_queue.h \ +src/core/surface/call.h \ +src/core/surface/channel.h \ +src/core/surface/client.h \ +src/core/surface/completion_queue.h \ +src/core/surface/event_string.h \ +src/core/surface/init.h \ +src/core/surface/server.h \ +src/core/surface/surface_trace.h \ +src/core/transport/chttp2/alpn.h \ +src/core/transport/chttp2/bin_encoder.h \ +src/core/transport/chttp2/frame.h \ +src/core/transport/chttp2/frame_data.h \ +src/core/transport/chttp2/frame_goaway.h \ +src/core/transport/chttp2/frame_ping.h \ +src/core/transport/chttp2/frame_rst_stream.h \ +src/core/transport/chttp2/frame_settings.h \ +src/core/transport/chttp2/frame_window_update.h \ +src/core/transport/chttp2/hpack_parser.h \ +src/core/transport/chttp2/hpack_table.h \ +src/core/transport/chttp2/http2_errors.h \ +src/core/transport/chttp2/huffsyms.h \ +src/core/transport/chttp2/status_conversion.h \ +src/core/transport/chttp2/stream_encoder.h \ +src/core/transport/chttp2/stream_map.h \ +src/core/transport/chttp2/timeout_encoding.h \ +src/core/transport/chttp2/varint.h \ +src/core/transport/chttp2_transport.h \ +src/core/transport/metadata.h \ +src/core/transport/stream_op.h \ +src/core/transport/transport.h \ +src/core/transport/transport_impl.h \ +src/core/census/context.h \ +src/core/httpcli/format_request.c \ +src/core/httpcli/httpcli.c \ +src/core/httpcli/httpcli_security_connector.c \ +src/core/httpcli/parser.c \ +src/core/security/base64.c \ +src/core/security/client_auth_filter.c \ +src/core/security/credentials.c \ +src/core/security/credentials_metadata.c \ +src/core/security/credentials_posix.c \ +src/core/security/credentials_win32.c \ +src/core/security/google_default_credentials.c \ +src/core/security/json_token.c \ +src/core/security/secure_endpoint.c \ +src/core/security/secure_transport_setup.c \ +src/core/security/security_connector.c \ +src/core/security/security_context.c \ +src/core/security/server_auth_filter.c \ +src/core/security/server_secure_chttp2.c \ +src/core/surface/init_secure.c \ +src/core/surface/secure_channel_create.c \ +src/core/tsi/fake_transport_security.c \ +src/core/tsi/ssl_transport_security.c \ +src/core/tsi/transport_security.c \ +src/core/census/grpc_context.c \ +src/core/channel/channel_args.c \ +src/core/channel/channel_stack.c \ +src/core/channel/child_channel.c \ +src/core/channel/client_channel.c \ +src/core/channel/client_setup.c \ +src/core/channel/connected_channel.c \ +src/core/channel/http_client_filter.c \ +src/core/channel/http_server_filter.c \ +src/core/channel/noop_filter.c \ +src/core/compression/algorithm.c \ +src/core/compression/message_compress.c \ +src/core/debug/trace.c \ +src/core/iomgr/alarm.c \ +src/core/iomgr/alarm_heap.c \ +src/core/iomgr/endpoint.c \ +src/core/iomgr/endpoint_pair_posix.c \ +src/core/iomgr/endpoint_pair_windows.c \ +src/core/iomgr/fd_posix.c \ +src/core/iomgr/iocp_windows.c \ +src/core/iomgr/iomgr.c \ +src/core/iomgr/iomgr_posix.c \ +src/core/iomgr/iomgr_windows.c \ +src/core/iomgr/pollset_kick_posix.c \ +src/core/iomgr/pollset_multipoller_with_epoll.c \ +src/core/iomgr/pollset_multipoller_with_poll_posix.c \ +src/core/iomgr/pollset_posix.c \ +src/core/iomgr/pollset_set_posix.c \ +src/core/iomgr/pollset_set_windows.c \ +src/core/iomgr/pollset_windows.c \ +src/core/iomgr/resolve_address_posix.c \ +src/core/iomgr/resolve_address_windows.c \ +src/core/iomgr/sockaddr_utils.c \ +src/core/iomgr/socket_utils_common_posix.c \ +src/core/iomgr/socket_utils_linux.c \ +src/core/iomgr/socket_utils_posix.c \ +src/core/iomgr/socket_windows.c \ +src/core/iomgr/tcp_client_posix.c \ +src/core/iomgr/tcp_client_windows.c \ +src/core/iomgr/tcp_posix.c \ +src/core/iomgr/tcp_server_posix.c \ +src/core/iomgr/tcp_server_windows.c \ +src/core/iomgr/tcp_windows.c \ +src/core/iomgr/time_averaged_stats.c \ +src/core/iomgr/wakeup_fd_eventfd.c \ +src/core/iomgr/wakeup_fd_nospecial.c \ +src/core/iomgr/wakeup_fd_pipe.c \ +src/core/iomgr/wakeup_fd_posix.c \ +src/core/json/json.c \ +src/core/json/json_reader.c \ +src/core/json/json_string.c \ +src/core/json/json_writer.c \ +src/core/profiling/basic_timers.c \ +src/core/profiling/stap_timers.c \ +src/core/surface/byte_buffer.c \ +src/core/surface/byte_buffer_queue.c \ +src/core/surface/byte_buffer_reader.c \ +src/core/surface/call.c \ +src/core/surface/call_details.c \ +src/core/surface/call_log_batch.c \ +src/core/surface/channel.c \ +src/core/surface/channel_create.c \ +src/core/surface/client.c \ +src/core/surface/completion_queue.c \ +src/core/surface/event_string.c \ +src/core/surface/init.c \ +src/core/surface/lame_client.c \ +src/core/surface/metadata_array.c \ +src/core/surface/server.c \ +src/core/surface/server_chttp2.c \ +src/core/surface/server_create.c \ +src/core/surface/surface_trace.c \ +src/core/transport/chttp2/alpn.c \ +src/core/transport/chttp2/bin_encoder.c \ +src/core/transport/chttp2/frame_data.c \ +src/core/transport/chttp2/frame_goaway.c \ +src/core/transport/chttp2/frame_ping.c \ +src/core/transport/chttp2/frame_rst_stream.c \ +src/core/transport/chttp2/frame_settings.c \ +src/core/transport/chttp2/frame_window_update.c \ +src/core/transport/chttp2/hpack_parser.c \ +src/core/transport/chttp2/hpack_table.c \ +src/core/transport/chttp2/huffsyms.c \ +src/core/transport/chttp2/status_conversion.c \ +src/core/transport/chttp2/stream_encoder.c \ +src/core/transport/chttp2/stream_map.c \ +src/core/transport/chttp2/timeout_encoding.c \ +src/core/transport/chttp2/varint.c \ +src/core/transport/chttp2_transport.c \ +src/core/transport/metadata.c \ +src/core/transport/stream_op.c \ +src/core/transport/transport.c \ +src/core/transport/transport_op_string.c \ +src/core/census/context.c \ +src/core/census/initialize.c \ +include/grpc/support/alloc.h \ +include/grpc/support/atm.h \ +include/grpc/support/atm_gcc_atomic.h \ +include/grpc/support/atm_gcc_sync.h \ +include/grpc/support/atm_win32.h \ +include/grpc/support/cancellable_platform.h \ +include/grpc/support/cmdline.h \ +include/grpc/support/cpu.h \ +include/grpc/support/histogram.h \ +include/grpc/support/host_port.h \ +include/grpc/support/log.h \ +include/grpc/support/log_win32.h \ +include/grpc/support/port_platform.h \ +include/grpc/support/slice.h \ +include/grpc/support/slice_buffer.h \ +include/grpc/support/string_util.h \ +include/grpc/support/subprocess.h \ +include/grpc/support/sync.h \ +include/grpc/support/sync_generic.h \ +include/grpc/support/sync_posix.h \ +include/grpc/support/sync_win32.h \ +include/grpc/support/thd.h \ +include/grpc/support/time.h \ +include/grpc/support/tls.h \ +include/grpc/support/tls_gcc.h \ +include/grpc/support/tls_msvc.h \ +include/grpc/support/tls_pthread.h \ +include/grpc/support/useful.h \ +src/core/support/env.h \ +src/core/support/file.h \ +src/core/support/murmur_hash.h \ +src/core/support/string.h \ +src/core/support/string_win32.h \ +src/core/support/thd_internal.h \ +src/core/support/alloc.c \ +src/core/support/cancellable.c \ +src/core/support/cmdline.c \ +src/core/support/cpu_iphone.c \ +src/core/support/cpu_linux.c \ +src/core/support/cpu_posix.c \ +src/core/support/cpu_windows.c \ +src/core/support/env_linux.c \ +src/core/support/env_posix.c \ +src/core/support/env_win32.c \ +src/core/support/file.c \ +src/core/support/file_posix.c \ +src/core/support/file_win32.c \ +src/core/support/histogram.c \ +src/core/support/host_port.c \ +src/core/support/log.c \ +src/core/support/log_android.c \ +src/core/support/log_linux.c \ +src/core/support/log_posix.c \ +src/core/support/log_win32.c \ +src/core/support/murmur_hash.c \ +src/core/support/slice.c \ +src/core/support/slice_buffer.c \ +src/core/support/string.c \ +src/core/support/string_posix.c \ +src/core/support/string_win32.c \ +src/core/support/subprocess_posix.c \ +src/core/support/sync.c \ +src/core/support/sync_posix.c \ +src/core/support/sync_win32.c \ +src/core/support/thd.c \ +src/core/support/thd_posix.c \ +src/core/support/thd_win32.c \ +src/core/support/time.c \ +src/core/support/time_posix.c \ +src/core/support/time_win32.c \ +src/core/support/tls_pthread.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses From d8c04b3603242c1c1d7e0ce779b19858449c4290 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 24 Jun 2015 02:21:17 +0200 Subject: [PATCH 60/97] std::function is no longer implicitly included. Fixing this. --- include/grpc++/impl/call.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index 33e66816f53..64fa5d6efbe 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -41,6 +41,7 @@ #include #include +#include #include #include From 140bca8c5c1fdb691136555075fb99e39a45b5d2 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sat, 20 Jun 2015 09:47:00 -0700 Subject: [PATCH 61/97] Generate objc_library for grpc_unsecure & gpr --- BUILD | 291 +++++++++++++++++++++++++++++++++++++++ templates/BUILD.template | 34 +++++ 2 files changed, 325 insertions(+) diff --git a/BUILD b/BUILD index d7f0e5a5881..ca737c3798a 100644 --- a/BUILD +++ b/BUILD @@ -790,6 +790,295 @@ cc_library( +objc_library( + name = "gpr_objc", + srcs = [ + "src/core/support/alloc.c", + "src/core/support/cancellable.c", + "src/core/support/cmdline.c", + "src/core/support/cpu_iphone.c", + "src/core/support/cpu_linux.c", + "src/core/support/cpu_posix.c", + "src/core/support/cpu_windows.c", + "src/core/support/env_linux.c", + "src/core/support/env_posix.c", + "src/core/support/env_win32.c", + "src/core/support/file.c", + "src/core/support/file_posix.c", + "src/core/support/file_win32.c", + "src/core/support/histogram.c", + "src/core/support/host_port.c", + "src/core/support/log.c", + "src/core/support/log_android.c", + "src/core/support/log_linux.c", + "src/core/support/log_posix.c", + "src/core/support/log_win32.c", + "src/core/support/murmur_hash.c", + "src/core/support/slice.c", + "src/core/support/slice_buffer.c", + "src/core/support/string.c", + "src/core/support/string_posix.c", + "src/core/support/string_win32.c", + "src/core/support/subprocess_posix.c", + "src/core/support/sync.c", + "src/core/support/sync_posix.c", + "src/core/support/sync_win32.c", + "src/core/support/thd.c", + "src/core/support/thd_posix.c", + "src/core/support/thd_win32.c", + "src/core/support/time.c", + "src/core/support/time_posix.c", + "src/core/support/time_win32.c", + "src/core/support/tls_pthread.c", + ], + hdrs = [ + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/atm_gcc_atomic.h", + "include/grpc/support/atm_gcc_sync.h", + "include/grpc/support/atm_win32.h", + "include/grpc/support/cancellable_platform.h", + "include/grpc/support/cmdline.h", + "include/grpc/support/cpu.h", + "include/grpc/support/histogram.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/log_win32.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/subprocess.h", + "include/grpc/support/sync.h", + "include/grpc/support/sync_generic.h", + "include/grpc/support/sync_posix.h", + "include/grpc/support/sync_win32.h", + "include/grpc/support/thd.h", + "include/grpc/support/time.h", + "include/grpc/support/tls.h", + "include/grpc/support/tls_gcc.h", + "include/grpc/support/tls_msvc.h", + "include/grpc/support/tls_pthread.h", + "include/grpc/support/useful.h", + "src/core/support/env.h", + "src/core/support/file.h", + "src/core/support/murmur_hash.h", + "src/core/support/string.h", + "src/core/support/string_win32.h", + "src/core/support/thd_internal.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + ], +) + + +objc_library( + name = "grpc_unsecure_objc", + srcs = [ + "src/core/surface/init_unsecure.c", + "src/core/census/grpc_context.c", + "src/core/channel/channel_args.c", + "src/core/channel/channel_stack.c", + "src/core/channel/child_channel.c", + "src/core/channel/client_channel.c", + "src/core/channel/client_setup.c", + "src/core/channel/connected_channel.c", + "src/core/channel/http_client_filter.c", + "src/core/channel/http_server_filter.c", + "src/core/channel/noop_filter.c", + "src/core/compression/algorithm.c", + "src/core/compression/message_compress.c", + "src/core/debug/trace.c", + "src/core/iomgr/alarm.c", + "src/core/iomgr/alarm_heap.c", + "src/core/iomgr/endpoint.c", + "src/core/iomgr/endpoint_pair_posix.c", + "src/core/iomgr/endpoint_pair_windows.c", + "src/core/iomgr/fd_posix.c", + "src/core/iomgr/iocp_windows.c", + "src/core/iomgr/iomgr.c", + "src/core/iomgr/iomgr_posix.c", + "src/core/iomgr/iomgr_windows.c", + "src/core/iomgr/pollset_kick_posix.c", + "src/core/iomgr/pollset_multipoller_with_epoll.c", + "src/core/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/iomgr/pollset_posix.c", + "src/core/iomgr/pollset_set_posix.c", + "src/core/iomgr/pollset_set_windows.c", + "src/core/iomgr/pollset_windows.c", + "src/core/iomgr/resolve_address_posix.c", + "src/core/iomgr/resolve_address_windows.c", + "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/socket_utils_common_posix.c", + "src/core/iomgr/socket_utils_linux.c", + "src/core/iomgr/socket_utils_posix.c", + "src/core/iomgr/socket_windows.c", + "src/core/iomgr/tcp_client_posix.c", + "src/core/iomgr/tcp_client_windows.c", + "src/core/iomgr/tcp_posix.c", + "src/core/iomgr/tcp_server_posix.c", + "src/core/iomgr/tcp_server_windows.c", + "src/core/iomgr/tcp_windows.c", + "src/core/iomgr/time_averaged_stats.c", + "src/core/iomgr/wakeup_fd_eventfd.c", + "src/core/iomgr/wakeup_fd_nospecial.c", + "src/core/iomgr/wakeup_fd_pipe.c", + "src/core/iomgr/wakeup_fd_posix.c", + "src/core/json/json.c", + "src/core/json/json_reader.c", + "src/core/json/json_string.c", + "src/core/json/json_writer.c", + "src/core/profiling/basic_timers.c", + "src/core/profiling/stap_timers.c", + "src/core/surface/byte_buffer.c", + "src/core/surface/byte_buffer_queue.c", + "src/core/surface/byte_buffer_reader.c", + "src/core/surface/call.c", + "src/core/surface/call_details.c", + "src/core/surface/call_log_batch.c", + "src/core/surface/channel.c", + "src/core/surface/channel_create.c", + "src/core/surface/client.c", + "src/core/surface/completion_queue.c", + "src/core/surface/event_string.c", + "src/core/surface/init.c", + "src/core/surface/lame_client.c", + "src/core/surface/metadata_array.c", + "src/core/surface/server.c", + "src/core/surface/server_chttp2.c", + "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", + "src/core/transport/chttp2/alpn.c", + "src/core/transport/chttp2/bin_encoder.c", + "src/core/transport/chttp2/frame_data.c", + "src/core/transport/chttp2/frame_goaway.c", + "src/core/transport/chttp2/frame_ping.c", + "src/core/transport/chttp2/frame_rst_stream.c", + "src/core/transport/chttp2/frame_settings.c", + "src/core/transport/chttp2/frame_window_update.c", + "src/core/transport/chttp2/hpack_parser.c", + "src/core/transport/chttp2/hpack_table.c", + "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/status_conversion.c", + "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_map.c", + "src/core/transport/chttp2/timeout_encoding.c", + "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2_transport.c", + "src/core/transport/metadata.c", + "src/core/transport/stream_op.c", + "src/core/transport/transport.c", + "src/core/transport/transport_op_string.c", + "src/core/census/context.c", + "src/core/census/initialize.c", + ], + hdrs = [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/status.h", + "include/grpc/census.h", + "src/core/census/grpc_context.h", + "src/core/channel/census_filter.h", + "src/core/channel/channel_args.h", + "src/core/channel/channel_stack.h", + "src/core/channel/child_channel.h", + "src/core/channel/client_channel.h", + "src/core/channel/client_setup.h", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", + "src/core/channel/http_client_filter.h", + "src/core/channel/http_server_filter.h", + "src/core/channel/noop_filter.h", + "src/core/compression/message_compress.h", + "src/core/debug/trace.h", + "src/core/iomgr/alarm.h", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", + "src/core/iomgr/fd_posix.h", + "src/core/iomgr/iocp_windows.h", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", + "src/core/iomgr/iomgr_posix.h", + "src/core/iomgr/pollset.h", + "src/core/iomgr/pollset_kick_posix.h", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", + "src/core/iomgr/pollset_set_posix.h", + "src/core/iomgr/pollset_set_windows.h", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", + "src/core/iomgr/socket_utils_posix.h", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", + "src/core/iomgr/tcp_windows.h", + "src/core/iomgr/time_averaged_stats.h", + "src/core/iomgr/wakeup_fd_pipe.h", + "src/core/iomgr/wakeup_fd_posix.h", + "src/core/json/json.h", + "src/core/json/json_common.h", + "src/core/json/json_reader.h", + "src/core/json/json_writer.h", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", + "src/core/surface/byte_buffer_queue.h", + "src/core/surface/call.h", + "src/core/surface/channel.h", + "src/core/surface/client.h", + "src/core/surface/completion_queue.h", + "src/core/surface/event_string.h", + "src/core/surface/init.h", + "src/core/surface/server.h", + "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.h", + "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.h", + "src/core/transport/metadata.h", + "src/core/transport/stream_op.h", + "src/core/transport/transport.h", + "src/core/transport/transport_impl.h", + "src/core/census/context.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + ":gpr_objc", + ], +) + + + cc_binary( name = "grpc_cpp_plugin", srcs = [ @@ -853,3 +1142,5 @@ cc_binary( + + diff --git a/templates/BUILD.template b/templates/BUILD.template index ec5fb3584f0..acb46f12073 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -63,6 +63,12 @@ ${cc_library(lib)} % endif % endfor +% for lib in libs: +% if lib.name in ("grpc_unsecure", "gpr"): +${objc_library(lib)} +% endif +% endfor + % for tgt in targets: % if tgt.build == 'protoc': ${cc_binary(tgt)} @@ -97,6 +103,34 @@ cc_library( ) +<%def name="objc_library(lib)"> +objc_library( + name = "${lib.name}_objc", + srcs = [ +% for src in lib.src: + "${src}", +% endfor + ], + hdrs = [ +% for hdr in lib.get("public_headers", []): + "${hdr}", +% endfor +% for hdr in lib.get("headers", []): + "${hdr}", +% endfor + ], + includes = [ + "include", + ".", + ], + deps = [ +% for dep in lib.get("deps", []): + ":${dep}_objc", +% endfor + ], +) + + <%def name="cc_binary(tgt)"> cc_binary( name = "${tgt.name}", From 8c1fd042e4e9c7ce719118d1958f22550a236fb0 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Mon, 22 Jun 2015 19:11:36 -0700 Subject: [PATCH 62/97] Add libz dependency to grpc_unsecure_objc --- BUILD | 1 + templates/BUILD.template | 3 +++ 2 files changed, 4 insertions(+) diff --git a/BUILD b/BUILD index ca737c3798a..f73791ab402 100644 --- a/BUILD +++ b/BUILD @@ -1075,6 +1075,7 @@ objc_library( deps = [ ":gpr_objc", ], + sdk_dylibs = ["libz"], ) diff --git a/templates/BUILD.template b/templates/BUILD.template index acb46f12073..9f3140c0acf 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -128,6 +128,9 @@ objc_library( ":${dep}_objc", % endfor ], +% if lib.get("baselib", false): + sdk_dylibs = ["libz"], +% endif ) From 98bf7e6517aa6977a1d7be459143c13e28eb5e3c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 24 Jun 2015 08:47:07 -0700 Subject: [PATCH 63/97] Added comments --- src/core/channel/http_client_filter.c | 6 +++++- src/core/channel/http_server_filter.c | 4 ++++ src/core/iomgr/iomgr.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c index 62a7a1e7d9f..08a2c0df3c0 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/channel/http_client_filter.c @@ -43,8 +43,12 @@ typedef struct call_data { int got_initial_metadata; grpc_stream_op_buffer *recv_ops; - grpc_iomgr_closure *on_done_recv; + /** Closure to call when finished with the hc_on_recv hook */ + grpc_iomgr_closure *on_done_recv; + /** Receive closures are chained: we inject this closure as the on_done_recv + up-call on transport_op, and remember to call our on_done_recv member + after handling it. */ grpc_iomgr_closure hc_on_recv; } call_data; diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c index e5ce7a5dd87..d3a01fd1a87 100644 --- a/src/core/channel/http_server_filter.c +++ b/src/core/channel/http_server_filter.c @@ -47,7 +47,11 @@ typedef struct call_data { grpc_linked_mdelem status; grpc_stream_op_buffer *recv_ops; + /** Closure to call when finished with the hs_on_recv hook */ grpc_iomgr_closure *on_done_recv; + /** Receive closures are chained: we inject this closure as the on_done_recv + up-call on transport_op, and remember to call our on_done_recv member + after handling it. */ grpc_iomgr_closure hs_on_recv; } call_data; diff --git a/src/core/iomgr/iomgr.h b/src/core/iomgr/iomgr.h index 265c817db1d..6d4a82917b1 100644 --- a/src/core/iomgr/iomgr.h +++ b/src/core/iomgr/iomgr.h @@ -73,6 +73,8 @@ void grpc_iomgr_shutdown(void); * Can be called from within a callback or from anywhere else */ void grpc_iomgr_add_callback(grpc_iomgr_closure *closure); +/** As per grpc_iomgr_add_callback, with the ability to set the success + argument. */ void grpc_iomgr_add_delayed_callback(grpc_iomgr_closure *iocb, int success); #endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_H */ From 3857d233f4b6a6abf0c8a287296be036127ab3df Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 24 Jun 2015 19:32:51 +0200 Subject: [PATCH 64/97] Let's inform the system of the lock to unlock... Fixes #2190. In grpc_pollset_work we need to pass down which lock to unlock before actually doing something. --- src/core/iomgr/pollset_windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index d0507af9602..495627ee0a6 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -68,10 +68,10 @@ int grpc_pollset_work(grpc_pollset *pollset, gpr_timespec deadline) { if (gpr_time_cmp(now, deadline) > 0) { return 0 /* GPR_FALSE */; } - if (grpc_maybe_call_delayed_callbacks(NULL, 1 /* GPR_TRUE */)) { + if (grpc_maybe_call_delayed_callbacks(&pollset->mu, 1 /* GPR_TRUE */)) { return 1 /* GPR_TRUE */; } - if (grpc_alarm_check(NULL, now, &deadline)) { + if (grpc_alarm_check(&pollset->mu, now, &deadline)) { return 1 /* GPR_TRUE */; } gpr_cv_wait(&pollset->cv, &pollset->mu, deadline); From c865c318e4df38a43c11d8565b9023ef6875f0e9 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 24 Jun 2015 10:48:39 -0700 Subject: [PATCH 65/97] php: refactor and cleanup some scripts --- src/php/bin/determine_extension_dir.sh | 49 ++++++++++++++++++++++++++ src/php/bin/interop_client.sh | 11 +++--- src/php/bin/run_gen_code_test.sh | 11 +++--- src/php/bin/run_tests.sh | 35 +++--------------- 4 files changed, 63 insertions(+), 43 deletions(-) create mode 100755 src/php/bin/determine_extension_dir.sh diff --git a/src/php/bin/determine_extension_dir.sh b/src/php/bin/determine_extension_dir.sh new file mode 100755 index 00000000000..11b23662dd6 --- /dev/null +++ b/src/php/bin/determine_extension_dir.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -e +default_extension_dir=`php -i | grep extension_dir | sed 's/.*=> //g'` +if command -v brew >/dev/null && [ -d `brew --prefix`/opt/grpc-php ]; then + # homebrew and the grpc-php formula are installed + extension_dir="-d extension_dir="`brew --prefix`/opt/grpc-php +elif [ ! -f $default_extension_dir/grpc.so ]; then + # the grpc extension is not found in the default PHP extension dir + # try the source modules directory + module_dir=../ext/grpc/modules + if [ ! -f $module_dir/grpc.so ]; then + echo "Please run 'phpize && ./configure && make' from ext/grpc first" + exit 1 + fi + # sym-link in system supplied extensions + for f in $default_extension_dir/*.so; do + ln -s $f $module_dir/$(basename $f) &> /dev/null || true + done + extension_dir="-d extension_dir="$module_dir +fi diff --git a/src/php/bin/interop_client.sh b/src/php/bin/interop_client.sh index 4fe63788c15..42e075cbe88 100755 --- a/src/php/bin/interop_client.sh +++ b/src/php/bin/interop_client.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2015, Google Inc. # All rights reserved. # @@ -28,11 +28,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -set +e +set -e cd $(dirname $0) - -module_dir=../ext/grpc/modules - -php -d extension_dir=$module_dir -d extension=grpc.so \ +source ./determine_extension_dir.sh +php $extension_dir -d extension=grpc.so \ ../tests/interop/interop_client.php $@ 1>&2 diff --git a/src/php/bin/run_gen_code_test.sh b/src/php/bin/run_gen_code_test.sh index 1be2ed3f725..f8ad9598f46 100755 --- a/src/php/bin/run_gen_code_test.sh +++ b/src/php/bin/run_gen_code_test.sh @@ -1,4 +1,4 @@ -# Runs the generated code test against the ruby server +#!/bin/bash # Copyright 2015, Google Inc. # All rights reserved. # @@ -28,10 +28,11 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +set -e cd $(dirname $0) -GRPC_TEST_HOST=localhost:50051 php -d extension_dir=../ext/grpc/modules/ \ - -d extension=grpc.so `which phpunit` -v --debug --strict \ +source ./determine_extension_dir.sh +export GRPC_TEST_HOST=localhost:7071 +php $extension_dir -d extension=grpc.so `which phpunit` -v --debug --strict \ ../tests/generated_code/GeneratedCodeTest.php -GRPC_TEST_HOST=localhost:50051 php -d extension_dir=../ext/grpc/modules/ \ - -d extension=grpc.so `which phpunit` -v --debug --strict \ +php $extension_dir -d extension=grpc.so `which phpunit` -v --debug --strict \ ../tests/generated_code/GeneratedCodeWithCallbackTest.php diff --git a/src/php/bin/run_tests.sh b/src/php/bin/run_tests.sh index 422757bb44e..e3289e34d2b 100755 --- a/src/php/bin/run_tests.sh +++ b/src/php/bin/run_tests.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2015, Google Inc. # All rights reserved. # @@ -32,33 +32,6 @@ # against it set -e cd $(dirname $0) -default_extension_dir=`php -i | grep extension_dir | sed 's/.*=> //g'` - -if command -v brew >/dev/null && [ -d `brew --prefix`/opt/grpc-php ] -then - # homebrew and the grpc-php formula are installed - extension_dir="-d extension_dir="`brew --prefix`/opt/grpc-php -elif [ ! -e $default_extension_dir/grpc.so ] -then - # the grpc extension is not found in the default PHP extension dir - # try the source modules directory - module_dir=../ext/grpc/modules - if [ ! -d $module_dir ] - then - echo "Please run 'phpize && ./configure && make' from ext/grpc first" - exit 1 - fi - - # sym-link in system supplied extensions - for f in $default_extension_dir/*.so - do - ln -s $f $module_dir/$(basename $f) &> /dev/null || true - done - - extension_dir='-d extension_dir='$module_dir -fi - -php \ - $extension_dir \ - -d extension=grpc.so \ - `which phpunit` -v --debug --strict ../tests/unit_tests +source ./determine_extension_dir.sh +php $extension_dir -d extension=grpc.so `which phpunit` -v --debug --strict \ + ../tests/unit_tests From 229e8553a6873f832bdd6362efd9e33c8d0534be Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 24 Jun 2015 11:15:26 -0700 Subject: [PATCH 66/97] replace backticks with $() --- src/php/bin/determine_extension_dir.sh | 6 +++--- src/php/bin/run_gen_code_test.sh | 4 ++-- src/php/bin/run_tests.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/php/bin/determine_extension_dir.sh b/src/php/bin/determine_extension_dir.sh index 11b23662dd6..6fc392afc0a 100755 --- a/src/php/bin/determine_extension_dir.sh +++ b/src/php/bin/determine_extension_dir.sh @@ -29,10 +29,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. set -e -default_extension_dir=`php -i | grep extension_dir | sed 's/.*=> //g'` -if command -v brew >/dev/null && [ -d `brew --prefix`/opt/grpc-php ]; then +default_extension_dir=$(php -i | grep extension_dir | sed 's/.*=> //g') +if command -v brew >/dev/null && [ -d $(brew --prefix)/opt/grpc-php ]; then # homebrew and the grpc-php formula are installed - extension_dir="-d extension_dir="`brew --prefix`/opt/grpc-php + extension_dir="-d extension_dir="$(brew --prefix)/opt/grpc-php elif [ ! -f $default_extension_dir/grpc.so ]; then # the grpc extension is not found in the default PHP extension dir # try the source modules directory diff --git a/src/php/bin/run_gen_code_test.sh b/src/php/bin/run_gen_code_test.sh index f8ad9598f46..03a9101a458 100755 --- a/src/php/bin/run_gen_code_test.sh +++ b/src/php/bin/run_gen_code_test.sh @@ -32,7 +32,7 @@ set -e cd $(dirname $0) source ./determine_extension_dir.sh export GRPC_TEST_HOST=localhost:7071 -php $extension_dir -d extension=grpc.so `which phpunit` -v --debug --strict \ +php $extension_dir -d extension=grpc.so $(which phpunit) -v --debug --strict \ ../tests/generated_code/GeneratedCodeTest.php -php $extension_dir -d extension=grpc.so `which phpunit` -v --debug --strict \ +php $extension_dir -d extension=grpc.so $(which phpunit) -v --debug --strict \ ../tests/generated_code/GeneratedCodeWithCallbackTest.php diff --git a/src/php/bin/run_tests.sh b/src/php/bin/run_tests.sh index e3289e34d2b..4c37285455b 100755 --- a/src/php/bin/run_tests.sh +++ b/src/php/bin/run_tests.sh @@ -33,5 +33,5 @@ set -e cd $(dirname $0) source ./determine_extension_dir.sh -php $extension_dir -d extension=grpc.so `which phpunit` -v --debug --strict \ +php $extension_dir -d extension=grpc.so $(which phpunit) -v --debug --strict \ ../tests/unit_tests From 91e67a2ddf0dec016a82c132c7d84ac16006aed2 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 24 Jun 2015 13:50:04 -0700 Subject: [PATCH 67/97] =?UTF-8?q?Regenerate=20BUILD=20file=20(merge=20didn?= =?UTF-8?q?=E2=80=99t=20add=20whitespace)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BUILD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILD b/BUILD index c5c5b9b3e5f..411627777a8 100644 --- a/BUILD +++ b/BUILD @@ -1144,6 +1144,8 @@ cc_binary( + + objc_path = "src/objective-c" rx_library_path = objc_path + "/RxLibrary" From aaf39abb367a24b9fe9ccaa03f643d88075319e9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 24 Jun 2015 23:22:53 +0200 Subject: [PATCH 68/97] Adding file and line number to cq debug refcount. --- src/core/surface/completion_queue.c | 16 ++++++++++------ src/core/surface/completion_queue.h | 12 ++++++++---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index bd0fabf9dac..030a8b4e6fc 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -88,9 +88,11 @@ grpc_completion_queue *grpc_completion_queue_create(void) { } #ifdef GRPC_CQ_REF_COUNT_DEBUG -void grpc_cq_internal_ref(grpc_completion_queue *cc, const char *reason) { - gpr_log(GPR_DEBUG, "CQ:%p ref %d -> %d %s", cc, (int)cc->owning_refs.count, - (int)cc->owning_refs.count + 1, reason); +void grpc_cq_internal_ref(grpc_completion_queue *cc, const char *reason, + const char *file, int line) { + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "CQ:%p ref %d -> %d %s", + cc, (int)cc->owning_refs.count, (int)cc->owning_refs.count + 1, + reason); #else void grpc_cq_internal_ref(grpc_completion_queue *cc) { #endif @@ -103,9 +105,11 @@ static void on_pollset_destroy_done(void *arg) { } #ifdef GRPC_CQ_REF_COUNT_DEBUG -void grpc_cq_internal_unref(grpc_completion_queue *cc, const char *reason) { - gpr_log(GPR_DEBUG, "CQ:%p unref %d -> %d %s", cc, (int)cc->owning_refs.count, - (int)cc->owning_refs.count - 1, reason); +void grpc_cq_internal_unref(grpc_completion_queue *cc, const char *reason, + const char *file, int line) { + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "CQ:%p unref %d -> %d %s", + cc, (int)cc->owning_refs.count, (int)cc->owning_refs.count - 1, + reason); #else void grpc_cq_internal_unref(grpc_completion_queue *cc) { #endif diff --git a/src/core/surface/completion_queue.h b/src/core/surface/completion_queue.h index e76910c00b3..1b9010f4623 100644 --- a/src/core/surface/completion_queue.h +++ b/src/core/surface/completion_queue.h @@ -40,10 +40,14 @@ #include #ifdef GRPC_CQ_REF_COUNT_DEBUG -void grpc_cq_internal_ref(grpc_completion_queue *cc, const char *reason); -void grpc_cq_internal_unref(grpc_completion_queue *cc, const char *reason); -#define GRPC_CQ_INTERNAL_REF(cc, reason) grpc_cq_internal_ref(cc, reason) -#define GRPC_CQ_INTERNAL_UNREF(cc, reason) grpc_cq_internal_unref(cc, reason) +void grpc_cq_internal_ref(grpc_completion_queue *cc, const char *reason, + const char *file, int line); +void grpc_cq_internal_unref(grpc_completion_queue *cc, const char *reason, + const char *file, int line); +#define GRPC_CQ_INTERNAL_REF(cc, reason) \ + grpc_cq_internal_ref(cc, reason, __FILE__, __LINE__) +#define GRPC_CQ_INTERNAL_UNREF(cc, reason) \ + grpc_cq_internal_unref(cc, reason, __FILE__, __LINE__) #else void grpc_cq_internal_ref(grpc_completion_queue *cc); void grpc_cq_internal_unref(grpc_completion_queue *cc); From e57dd66c9d2cb9ee804d2b3c384ac8b19d86133a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 24 Jun 2015 23:28:05 +0200 Subject: [PATCH 69/97] Cascade-kick pollsets when shutting down. In the case we're using a threadpool, depending on where the threads are waiting in completion queue's next, they'll get stuck on shutdown because we're only kicking one of them. Instead, let's cascade-kick the pollsets when we shutdown so that we make sure all of them are exitting properly. --- src/core/surface/completion_queue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index bd0fabf9dac..063a23cfb18 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -208,6 +208,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, } if (cc->shutdown) { ev = create_shutdown_event(); + grpc_pollset_kick(&cc->pollset); break; } if (!grpc_pollset_work(&cc->pollset, deadline)) { From fcb16e1a9c8558a36f7875733b8c9a19368595c8 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 24 Jun 2015 23:45:30 +0200 Subject: [PATCH 70/97] On pollset shutdown, we need to unconditionally start the kick cascade. --- src/core/iomgr/pollset_windows.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index d0507af9602..1f750f6d39e 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -39,6 +39,7 @@ #include "src/core/iomgr/alarm_internal.h" #include "src/core/iomgr/iomgr_internal.h" +#include "src/core/iomgr/pollset.h" #include "src/core/iomgr/pollset_windows.h" /* There isn't really any such thing as a pollset under Windows, due to the @@ -54,6 +55,7 @@ void grpc_pollset_init(grpc_pollset *pollset) { void grpc_pollset_shutdown(grpc_pollset *pollset, void (*shutdown_done)(void *arg), void *shutdown_done_arg) { + grpc_pollset_kick(pollset); shutdown_done(shutdown_done_arg); } From 7bce516b3b8632bfe8a7d1af9ae258ed37c93d7b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 24 Jun 2015 15:36:40 -0700 Subject: [PATCH 71/97] Spelling fix: UnImplementedService -> UnimplementedService --- test/proto/test.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/proto/test.proto b/test/proto/test.proto index b493dcd049f..1214152513f 100644 --- a/test/proto/test.proto +++ b/test/proto/test.proto @@ -75,7 +75,7 @@ service TestService { // A simple service NOT implemented at servers so clients can test for // that case. -service UnImplementedService { +service UnimplementedService { // A call that no server should implement rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty); } From 4a77f3b311c0859a97a8b69d39f90da21330ffba Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 24 Jun 2015 16:21:51 -0700 Subject: [PATCH 72/97] Remove const cast warning in GRPCSecureChannel.m --- src/objective-c/GRPCClient/private/GRPCSecureChannel.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/private/GRPCSecureChannel.m b/src/objective-c/GRPCClient/private/GRPCSecureChannel.m index 2cbc6e0f838..0f6eece885e 100644 --- a/src/objective-c/GRPCClient/private/GRPCSecureChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCSecureChannel.m @@ -38,7 +38,7 @@ @implementation GRPCSecureChannel - (instancetype)initWithHost:(NSString *)host { - static const grpc_credentials *kCredentials; + static grpc_credentials *kCredentials; static dispatch_once_t loading; dispatch_once(&loading, ^{ // Do not use NSBundle.mainBundle, as it's nil for tests of library projects. From dbda969039452c7431f2b0d60cfef0b7e08c0937 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 24 Jun 2015 16:55:55 -0700 Subject: [PATCH 73/97] Fixed 'retain cycle' warnings in GRPCWrappedCall.m --- .../GRPCClient/private/GRPCWrappedCall.m | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 4ccd5723c61..8a556e155b0 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -132,8 +132,12 @@ grpc_metadata_array_init(&_headers); _op.data.recv_initial_metadata = &_headers; if (handler) { + // Prevent reference cycle with handler + __weak typeof(self) weakSelf = self; _handler = ^{ - NSDictionary *metadata = [NSDictionary grpc_dictionaryFromMetadataArray:_headers]; + __strong typeof(self) strongSelf = weakSelf; + NSDictionary *metadata = [NSDictionary + grpc_dictionaryFromMetadataArray:strongSelf->_headers]; handler(metadata); }; } @@ -160,8 +164,11 @@ _op.op = GRPC_OP_RECV_MESSAGE; _op.data.recv_message = &_receivedMessage; if (handler) { + // Prevent reference cycle with handler + __weak typeof(self) weakSelf = self; _handler = ^{ - handler(_receivedMessage); + __strong typeof(self) strongSelf = weakSelf; + handler(strongSelf->_receivedMessage); }; } } @@ -190,9 +197,14 @@ grpc_metadata_array_init(&_trailers); _op.data.recv_status_on_client.trailing_metadata = &_trailers; if (handler) { + // Prevent reference cycle with handler + __weak typeof(self) weakSelf = self; _handler = ^{ - NSError *error = [NSError grpc_errorFromStatusCode:_statusCode details:_details]; - NSDictionary *trailers = [NSDictionary grpc_dictionaryFromMetadataArray:_trailers]; + __strong typeof(self) strongSelf = weakSelf; + NSError *error = [NSError grpc_errorFromStatusCode:strongSelf->_statusCode + details:strongSelf->_details]; + NSDictionary *trailers = [NSDictionary + grpc_dictionaryFromMetadataArray:strongSelf->_trailers]; handler(error, trailers); }; } From 964f955b226e6756c0d2375626cfebc4cf253f86 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 25 Jun 2015 02:01:27 +0200 Subject: [PATCH 74/97] Some Jenkins changes and improvements. -) Don't re-clone from github. We already have the directory here, just bind it, and copy it inside the docker container. -) Let's properly set up our environment for asan. -) Let's split the docker "run_jenkins" part into its own separate script. --- tools/jenkins/docker_run_jenkins.sh | 45 +++++++++++++++++++++ tools/jenkins/grpc_jenkins_slave/Dockerfile | 2 + tools/jenkins/run_jenkins.sh | 22 +++++----- 3 files changed, 60 insertions(+), 9 deletions(-) create mode 100755 tools/jenkins/docker_run_jenkins.sh diff --git a/tools/jenkins/docker_run_jenkins.sh b/tools/jenkins/docker_run_jenkins.sh new file mode 100755 index 00000000000..dbb04bb3c9b --- /dev/null +++ b/tools/jenkins/docker_run_jenkins.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# This script is invoked by run_jekins.sh when piggy-backing into docker. +set -e + +export CONFIG=$config +export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.5 +export CPPFLAGS=-I/tmp/prebuilt/include + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +cd /var/local/git/grpc +nvm use 0.12 +rvm use ruby-2.1 +tools/run_tests/prepare_travis.sh +tools/run_tests/run_tests.py -t -c $config -l $language diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile index 16b076cbbcb..f37c0b91038 100644 --- a/tools/jenkins/grpc_jenkins_slave/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile @@ -136,5 +136,7 @@ RUN wget http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - RUN apt-get update && apt-get install -y \ git php5 php5-dev phpunit unzip +RUN mkdir /var/local/jenkins + # Define the default command. CMD ["bash"] diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh index 534ed306ef3..513d4a35fb6 100755 --- a/tools/jenkins/run_jenkins.sh +++ b/tools/jenkins/run_jenkins.sh @@ -41,6 +41,10 @@ if [ "$platform" == "linux" ] then echo "building $language on Linux" + cd `dirname $0`/../.. + git_root=`pwd` + cd - + # Use image name based on Dockerfile checksum DOCKER_IMAGE_NAME=grpc_jenkins_slave_`sha1sum tools/jenkins/grpc_jenkins_slave/Dockerfile | cut -f1 -d\ ` @@ -57,17 +61,17 @@ then rm -f docker.cid # Run tests inside docker - docker run --cidfile=docker.cid $DOCKER_IMAGE_NAME bash -c -l "git clone --recursive $GIT_URL /var/local/git/grpc \ - && cd /var/local/git/grpc \ - $FETCH_PULL_REQUEST_CMD \ - && git checkout -f $GIT_COMMIT \ - && git submodule update \ - && nvm use 0.12 \ - && rvm use ruby-2.1 \ - && CONFIG=$config tools/run_tests/prepare_travis.sh \ - && CPPFLAGS=-I/tmp/prebuilt/include tools/run_tests/run_tests.py -t -c $config -l $language" || DOCKER_FAILED="true" + docker run \ + -e "config=$config" \ + -e "language=$language" \ + -i \ + -v "$git_root:/var/local/jenkins/grpc" \ + --cidfile=docker.cid \ + $DOCKER_IMAGE_NAME \ + bash -l /var/local/jenkins/grpc/tools/jenkins/docker_run_jenkins.sh || DOCKER_FAILED="true" DOCKER_CID=`cat docker.cid` + docker kill $DOCKER_CID if [ "$DOCKER_FAILED" == "" ] then echo "Docker finished successfully, deleting the container $DOCKER_CID" From f75fc12e3a1a614ee2d5d565742764e47d9aef96 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Jun 2015 06:58:00 -0700 Subject: [PATCH 75/97] Add a test that headers are properly in build.json Clean up anything that failed --- BUILD | 3 + Makefile | 100 +- build.json | 75 +- src/compiler/python_generator.cc | 2 +- src/core/census/context.c | 2 +- src/cpp/client/channel.cc | 1 - src/cpp/client/channel_arguments.cc | 14 - src/cpp/client/secure_channel_arguments.cc | 54 + src/cpp/server/insecure_server_credentials.cc | 3 +- src/cpp/server/server.cc | 1 - src/cpp/server/server_credentials.cc | 2 - .../sources_and_headers.json.template | 27 + test/core/bad_client/gen_build_json.py | 9 + test/core/end2end/gen_build_json.py | 34 +- test/cpp/qps/qps_worker.cc | 2 +- test/cpp/qps/worker.cc | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/run_tests/check_sources_and_headers.py | 55 + tools/run_tests/run_tests.py | 3 +- tools/run_tests/sources_and_headers.json | 10585 ++++++++++++++++ vsprojects/grpc++/grpc++.vcxproj | 2 + vsprojects/grpc++/grpc++.vcxproj.filters | 3 + .../grpc_plugin_support.vcxproj | 2 + .../grpc_test_util/grpc_test_util.vcxproj | 9 + 24 files changed, 10859 insertions(+), 133 deletions(-) create mode 100644 src/cpp/client/secure_channel_arguments.cc create mode 100644 templates/tools/run_tests/sources_and_headers.json.template create mode 100755 tools/run_tests/check_sources_and_headers.py create mode 100644 tools/run_tests/sources_and_headers.json diff --git a/BUILD b/BUILD index d7f0e5a5881..fbcfd66400c 100644 --- a/BUILD +++ b/BUILD @@ -578,6 +578,7 @@ cc_library( "src/cpp/server/secure_server_credentials.h", "src/cpp/client/channel.h", "src/cpp/server/thread_pool.h", + "src/cpp/client/secure_channel_arguments.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/server/secure_server_credentials.cc", "src/cpp/client/channel.cc", @@ -740,6 +741,8 @@ cc_library( cc_library( name = "grpc_plugin_support", srcs = [ + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", "src/compiler/config.h", "src/compiler/cpp_generator.h", "src/compiler/cpp_generator_helpers.h", diff --git a/Makefile b/Makefile index 26899c5c051..df6be1d4d28 100644 --- a/Makefile +++ b/Makefile @@ -1261,7 +1261,7 @@ privatelibs: privatelibs_c privatelibs_cxx privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_uds_posix.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_fullstack_with_poll.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack_with_poll.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a $(LIBDIR)/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_with_grpc_trace.a $(LIBDIR)/$(CONFIG)/libend2end_test_bad_hostname.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_after_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_before_invoke.a $(LIBDIR)/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a $(LIBDIR)/$(CONFIG)/libend2end_test_census_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_disappearing_server.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a $(LIBDIR)/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a $(LIBDIR)/$(CONFIG)/libend2end_test_empty_batch.a $(LIBDIR)/$(CONFIG)/libend2end_test_graceful_server_shutdown.a $(LIBDIR)/$(CONFIG)/libend2end_test_invoke_large_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_concurrent_streams.a $(LIBDIR)/$(CONFIG)/libend2end_test_max_message_length.a $(LIBDIR)/$(CONFIG)/libend2end_test_no_op.a $(LIBDIR)/$(CONFIG)/libend2end_test_ping_pong_streaming.a $(LIBDIR)/$(CONFIG)/libend2end_test_registered_call.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_payload_and_call_creds.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_flags.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_large_metadata.a $(LIBDIR)/$(CONFIG)/libend2end_test_request_with_payload.a $(LIBDIR)/$(CONFIG)/libend2end_test_server_finishes_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_delayed_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request.a $(LIBDIR)/$(CONFIG)/libend2end_test_simple_request_with_high_initial_sequence_number.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a buildtests: buildtests_c buildtests_cxx @@ -3397,6 +3397,7 @@ endif LIBGRPC++_SRC = \ + src/cpp/client/secure_channel_arguments.cc \ src/cpp/client/secure_credentials.cc \ src/cpp/server/secure_server_credentials.cc \ src/cpp/client/channel.cc \ @@ -3533,57 +3534,6 @@ endif endif -LIBGRPC++_BENCHMARK_CONFIG_SRC = \ - $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc \ - test/cpp/qps/report.cc \ - test/cpp/util/benchmark_config.cc \ - - -LIBGRPC++_BENCHMARK_CONFIG_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_BENCHMARK_CONFIG_SRC)))) - -ifeq ($(NO_SECURE),true) - -# You can't build secure libraries if you don't have OpenSSL with ALPN. - -$(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a: openssl_dep_error - - -else - -ifeq ($(NO_PROTOBUF),true) - -# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. - -$(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a: protobuf_dep_error - - -else - -$(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_BENCHMARK_CONFIG_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a - $(Q) $(AR) rcs $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBGRPC++_BENCHMARK_CONFIG_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a -endif - - - - -endif - -endif - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(LIBGRPC++_BENCHMARK_CONFIG_OBJS:.o=.dep) -endif -endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc - - LIBGRPC++_TEST_CONFIG_SRC = \ test/cpp/util/test_config.cc \ @@ -4100,9 +4050,11 @@ LIBQPS_SRC = \ test/cpp/qps/client_sync.cc \ test/cpp/qps/driver.cc \ test/cpp/qps/qps_worker.cc \ + test/cpp/qps/report.cc \ test/cpp/qps/server_async.cc \ test/cpp/qps/server_sync.cc \ test/cpp/qps/timer.cc \ + test/cpp/util/benchmark_config.cc \ LIBQPS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBQPS_SRC)))) @@ -4150,9 +4102,11 @@ $(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/cpp/qps/qpstest. $(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ @@ -7346,16 +7300,16 @@ $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test: $(PROTOBUF_DEP) $(ASYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test: $(PROTOBUF_DEP) $(ASYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(ASYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test + $(Q) $(LDXX) $(LDFLAGS) $(ASYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/async_streaming_ping_pong_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/async_streaming_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/qps/async_streaming_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_async_streaming_ping_pong_test: $(ASYNC_STREAMING_PING_PONG_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -7386,16 +7340,16 @@ $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/async_unary_ping_pong_test: $(PROTOBUF_DEP) $(ASYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/async_unary_ping_pong_test: $(PROTOBUF_DEP) $(ASYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(ASYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test + $(Q) $(LDXX) $(LDFLAGS) $(ASYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/async_unary_ping_pong_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/async_unary_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/qps/async_unary_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_async_unary_ping_pong_test: $(ASYNC_UNARY_PING_PONG_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -8264,16 +8218,16 @@ $(BINDIR)/$(CONFIG)/qps_driver: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/qps_driver: $(PROTOBUF_DEP) $(QPS_DRIVER_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a +$(BINDIR)/$(CONFIG)/qps_driver: $(PROTOBUF_DEP) $(QPS_DRIVER_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(QPS_DRIVER_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_driver + $(Q) $(LDXX) $(LDFLAGS) $(QPS_DRIVER_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_driver endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_driver.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_driver.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_qps_driver: $(QPS_DRIVER_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -8344,16 +8298,16 @@ $(BINDIR)/$(CONFIG)/qps_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/qps_test: $(PROTOBUF_DEP) $(QPS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(BINDIR)/$(CONFIG)/qps_test: $(PROTOBUF_DEP) $(QPS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(QPS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_test + $(Q) $(LDXX) $(LDFLAGS) $(QPS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_qps_test: $(QPS_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -8384,16 +8338,16 @@ $(BINDIR)/$(CONFIG)/qps_test_openloop: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/qps_test_openloop: $(PROTOBUF_DEP) $(QPS_TEST_OPENLOOP_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(BINDIR)/$(CONFIG)/qps_test_openloop: $(PROTOBUF_DEP) $(QPS_TEST_OPENLOOP_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(QPS_TEST_OPENLOOP_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_test_openloop + $(Q) $(LDXX) $(LDFLAGS) $(QPS_TEST_OPENLOOP_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_test_openloop endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_test_openloop.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_test_openloop.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_qps_test_openloop: $(QPS_TEST_OPENLOOP_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -8584,16 +8538,16 @@ $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test: $(PROTOBUF_DEP) $(SYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test: $(PROTOBUF_DEP) $(SYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(SYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test + $(Q) $(LDXX) $(LDFLAGS) $(SYNC_STREAMING_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/sync_streaming_ping_pong_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/sync_streaming_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/qps/sync_streaming_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_sync_streaming_ping_pong_test: $(SYNC_STREAMING_PING_PONG_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -8624,16 +8578,16 @@ $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test: $(PROTOBUF_DEP) $(SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test: $(PROTOBUF_DEP) $(SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test + $(Q) $(LDXX) $(LDFLAGS) $(SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/sync_unary_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_benchmark_config.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/qps/sync_unary_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_sync_unary_ping_pong_test: $(SYNC_UNARY_PING_PONG_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) diff --git a/build.json b/build.json index e01a419bbe6..282e82562a8 100644 --- a/build.json +++ b/build.json @@ -289,6 +289,14 @@ }, { "name": "grpc_test_util_base", + "headers": [ + "test/core/end2end/cq_verifier.h", + "test/core/iomgr/endpoint_tests.h", + "test/core/util/grpc_profiler.h", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", + "test/core/util/slice_splitter.h" + ], "src": [ "test/core/end2end/cq_verifier.c", "test/core/iomgr/endpoint_tests.c", @@ -466,6 +474,9 @@ "name": "grpc_test_util", "build": "private", "language": "c", + "headers": [ + "test/core/end2end/data/ssl_test_data.h" + ], "src": [ "test/core/end2end/data/server1_cert.c", "test/core/end2end/data/server1_key.c", @@ -523,6 +534,7 @@ "src/cpp/server/secure_server_credentials.h" ], "src": [ + "src/cpp/client/secure_channel_arguments.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/server/secure_server_credentials.cc" ], @@ -537,20 +549,13 @@ "secure": "check", "vs_project_guid": "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" }, - { - "name": "grpc++_benchmark_config", - "build": "private", - "language": "c++", - "src": [ - "test/cpp/qps/qpstest.proto", - "test/cpp/qps/report.cc", - "test/cpp/util/benchmark_config.cc" - ] - }, { "name": "grpc++_test_config", "build": "private", "language": "c++", + "headers": [ + "test/cpp/util/test_config.h" + ], "src": [ "test/cpp/util/test_config.cc" ] @@ -559,6 +564,12 @@ "name": "grpc++_test_util", "build": "private", "language": "c++", + "headers": [ + "test/cpp/util/cli_call.h", + "test/cpp/util/create_test_channel.h", + "test/cpp/util/fake_credentials.h", + "test/cpp/util/subprocess.h" + ], "src": [ "test/cpp/util/messages.proto", "test/cpp/util/echo.proto", @@ -567,6 +578,10 @@ "test/cpp/util/create_test_channel.cc", "test/cpp/util/fake_credentials.cc", "test/cpp/util/subprocess.cc" + ], + "deps": [ + "grpc++", + "grpc_test_util" ] }, { @@ -589,6 +604,8 @@ "build": "protoc", "language": "c++", "headers": [ + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", "src/compiler/config.h", "src/compiler/cpp_generator.h", "src/compiler/cpp_generator_helpers.h", @@ -618,6 +635,9 @@ "name": "interop_client_helper", "build": "private", "language": "c++", + "headers": [ + "test/cpp/interop/client_helper.h" + ], "src": [ "test/cpp/interop/client_helper.cc" ], @@ -633,6 +653,9 @@ "name": "interop_client_main", "build": "private", "language": "c++", + "headers": [ + "test/cpp/interop/interop_client.h" + ], "src": [ "test/proto/empty.proto", "test/proto/messages.proto", @@ -641,6 +664,7 @@ "test/cpp/interop/interop_client.cc" ], "deps": [ + "interop_client_helper", "grpc++_test_util", "grpc_test_util", "grpc++", @@ -654,6 +678,9 @@ "name": "interop_server_helper", "build": "private", "language": "c++", + "headers": [ + "test/cpp/interop/server_helper.h" + ], "src": [ "test/cpp/interop/server_helper.cc" ], @@ -675,6 +702,7 @@ "test/cpp/interop/server.cc" ], "deps": [ + "interop_server_helper", "grpc++_test_util", "grpc_test_util", "grpc++", @@ -688,6 +716,10 @@ "name": "pubsub_client_lib", "build": "do_not_build", "language": "c++", + "headers": [ + "examples/pubsub/publisher.h", + "examples/pubsub/subscriber.h" + ], "src": [ "examples/pubsub/label.proto", "examples/pubsub/empty.proto", @@ -706,11 +738,16 @@ "build": "private", "language": "c++", "headers": [ + "test/cpp/qps/client.h", "test/cpp/qps/driver.h", + "test/cpp/qps/histogram.h", "test/cpp/qps/interarrival.h", "test/cpp/qps/qps_worker.h", "test/cpp/qps/report.h", - "test/cpp/qps/timer.h" + "test/cpp/qps/server.h", + "test/cpp/qps/stats.h", + "test/cpp/qps/timer.h", + "test/cpp/util/benchmark_config.h" ], "src": [ "test/cpp/qps/qpstest.proto", @@ -718,13 +755,16 @@ "test/cpp/qps/client_sync.cc", "test/cpp/qps/driver.cc", "test/cpp/qps/qps_worker.cc", + "test/cpp/qps/report.cc", "test/cpp/qps/server_async.cc", "test/cpp/qps/server_sync.cc", - "test/cpp/qps/timer.cc" + "test/cpp/qps/timer.cc", + "test/cpp/util/benchmark_config.cc" ], "deps": [ "grpc_test_util", - "grpc++_test_util" + "grpc++_test_util", + "grpc++" ] }, { @@ -1729,7 +1769,6 @@ "deps": [ "qps", "grpc++_test_util", - "grpc++_benchmark_config", "grpc_test_util", "grpc++", "grpc", @@ -1747,7 +1786,6 @@ "deps": [ "qps", "grpc++_test_util", - "grpc++_benchmark_config", "grpc_test_util", "grpc++", "grpc", @@ -2123,8 +2161,7 @@ "grpc", "gpr_test_util", "gpr", - "grpc++_test_config", - "grpc++_benchmark_config" + "grpc++_test_config" ] }, { @@ -2155,7 +2192,6 @@ "deps": [ "qps", "grpc++_test_util", - "grpc++_benchmark_config", "grpc_test_util", "grpc++", "grpc", @@ -2174,7 +2210,6 @@ "deps": [ "qps", "grpc++_test_util", - "grpc++_benchmark_config", "grpc_test_util", "grpc++", "grpc", @@ -2263,7 +2298,6 @@ "deps": [ "qps", "grpc++_test_util", - "grpc++_benchmark_config", "grpc_test_util", "grpc++", "grpc", @@ -2281,7 +2315,6 @@ "deps": [ "qps", "grpc++_test_util", - "grpc++_benchmark_config", "grpc_test_util", "grpc++", "grpc", diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 72149bc4e3a..724b69c703f 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -42,7 +42,7 @@ #include #include -#include "grpc++/config.h" +#include #include "src/compiler/config.h" #include "src/compiler/generator_helpers.h" #include "src/compiler/python_generator.h" diff --git a/src/core/census/context.c b/src/core/census/context.c index 1358c5127b7..df238ec98ca 100644 --- a/src/core/census/context.c +++ b/src/core/census/context.c @@ -31,7 +31,7 @@ * */ -#include "context.h" +#include "src/core/census/context.h" #include #include diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index 6e6278cb058..72593f877e1 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -36,7 +36,6 @@ #include #include -#include #include #include diff --git a/src/cpp/client/channel_arguments.cc b/src/cpp/client/channel_arguments.cc index 679c4f1503d..b271650673c 100644 --- a/src/cpp/client/channel_arguments.cc +++ b/src/cpp/client/channel_arguments.cc @@ -33,28 +33,14 @@ #include -#include #include "src/core/channel/channel_args.h" namespace grpc { -void ChannelArguments::SetSslTargetNameOverride(const grpc::string& name) { - SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, name); -} - void ChannelArguments::SetCompressionLevel(grpc_compression_level level) { SetInt(GRPC_COMPRESSION_LEVEL_ARG, level); } -grpc::string ChannelArguments::GetSslTargetNameOverride() const { - for (unsigned int i = 0; i < args_.size(); i++) { - if (grpc::string(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == args_[i].key) { - return args_[i].value.string; - } - } - return ""; -} - void ChannelArguments::SetInt(const grpc::string& key, int value) { grpc_arg arg; arg.type = GRPC_ARG_INTEGER; diff --git a/src/cpp/client/secure_channel_arguments.cc b/src/cpp/client/secure_channel_arguments.cc new file mode 100644 index 00000000000..d89df999adc --- /dev/null +++ b/src/cpp/client/secure_channel_arguments.cc @@ -0,0 +1,54 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include "src/core/channel/channel_args.h" + +namespace grpc { + +void ChannelArguments::SetSslTargetNameOverride(const grpc::string& name) { + SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, name); +} + +grpc::string ChannelArguments::GetSslTargetNameOverride() const { + for (unsigned int i = 0; i < args_.size(); i++) { + if (grpc::string(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == args_[i].key) { + return args_[i].value.string; + } + } + return ""; +} + +} // namespace grpc diff --git a/src/cpp/server/insecure_server_credentials.cc b/src/cpp/server/insecure_server_credentials.cc index 55dd90d7a7e..aca3568e597 100644 --- a/src/cpp/server/insecure_server_credentials.cc +++ b/src/cpp/server/insecure_server_credentials.cc @@ -31,9 +31,10 @@ * */ -#include #include +#include + namespace grpc { namespace { class InsecureServerCredentialsImpl GRPC_FINAL : public ServerCredentials { diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index f930dbb2b89..1437b2dea79 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/src/cpp/server/server_credentials.cc b/src/cpp/server/server_credentials.cc index 6bdb465baaa..be3a7425e0f 100644 --- a/src/cpp/server/server_credentials.cc +++ b/src/cpp/server/server_credentials.cc @@ -31,8 +31,6 @@ * */ -#include - #include namespace grpc { diff --git a/templates/tools/run_tests/sources_and_headers.json.template b/templates/tools/run_tests/sources_and_headers.json.template new file mode 100644 index 00000000000..01918d0a3d3 --- /dev/null +++ b/templates/tools/run_tests/sources_and_headers.json.template @@ -0,0 +1,27 @@ +<%! +import json +import os + +def proto_headers(src): + out = [] + for f in src: + name, ext = os.path.splitext(f) + if ext == '.proto': + out.extend(fmt % name for fmt in ['%s.grpc.pb.h', '%s.pb.h']) + return out + +def no_protos(src): + out = [] + for f in src: + if os.path.splitext(f)[1] != '.proto': + out.append(f) + return out +%> + +${json.dumps([{"name": tgt.name, + "language": tgt.language, + "src": no_protos(tgt.src) + tgt.get('public_headers', []) + tgt.get('headers', []), + "headers": tgt.get('public_headers', []) + tgt.get('headers', []) + proto_headers(tgt.src), + "deps": tgt.get('deps', [])} + for tgt in (targets + libs)], + sort_keys=True, indent=2)} diff --git a/test/core/bad_client/gen_build_json.py b/test/core/bad_client/gen_build_json.py index a6fa266becd..33bf65ac042 100755 --- a/test/core/bad_client/gen_build_json.py +++ b/test/core/bad_client/gen_build_json.py @@ -54,6 +54,15 @@ def main(): 'language': 'c', 'src': [ 'test/core/bad_client/bad_client.c' + ], + 'headers': [ + 'test/core/bad_client/bad_client.h' + ], + 'deps': [ + 'grpc_test_util_unsecure', + 'grpc_unsecure', + 'gpr_test_util', + 'gpr' ] }], 'targets': [ diff --git a/test/core/end2end/gen_build_json.py b/test/core/end2end/gen_build_json.py index f47c92bc470..f1c7e85e087 100755 --- a/test/core/end2end/gen_build_json.py +++ b/test/core/end2end/gen_build_json.py @@ -93,6 +93,19 @@ END2END_TESTS = { def main(): + sec_deps = [ + 'end2end_certs', + 'grpc_test_util', + 'grpc', + 'gpr_test_util', + 'gpr' + ] + unsec_deps = [ + 'grpc_test_util_unsecure', + 'grpc_unsecure', + 'gpr_test_util', + 'gpr' + ] json = { '#': 'generated with test/end2end/gen_build_json.py', 'libs': [ @@ -103,6 +116,8 @@ def main(): 'secure': 'check' if END2END_FIXTURES[f].secure else 'no', 'src': ['test/core/end2end/fixtures/%s.c' % f], 'platforms': [ 'posix' ] if f.endswith('_posix') else END2END_FIXTURES[f].platforms, + 'deps': sec_deps if END2END_FIXTURES[f].secure else unsec_deps, + 'headers': ['test/core/end2end/end2end_tests.h'], } for f in sorted(END2END_FIXTURES.keys())] + [ { @@ -111,7 +126,9 @@ def main(): 'language': 'c', 'secure': 'check' if END2END_TESTS[t].secure else 'no', 'src': ['test/core/end2end/tests/%s.c' % t], - 'headers': ['test/core/end2end/tests/cancel_test_helpers.h'] + 'headers': ['test/core/end2end/tests/cancel_test_helpers.h', + 'test/core/end2end/end2end_tests.h'], + 'deps': sec_deps if END2END_TESTS[t].secure else unsec_deps } for t in sorted(END2END_TESTS.keys())] + [ { @@ -135,13 +152,7 @@ def main(): 'platforms': END2END_FIXTURES[f].platforms, 'deps': [ 'end2end_fixture_%s' % f, - 'end2end_test_%s' % t, - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr' - ] + 'end2end_test_%s' % t] + sec_deps } for f in sorted(END2END_FIXTURES.keys()) for t in sorted(END2END_TESTS.keys())] + [ @@ -155,12 +166,7 @@ def main(): 'platforms': END2END_FIXTURES[f].platforms, 'deps': [ 'end2end_fixture_%s' % f, - 'end2end_test_%s' % t, - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr' - ] + 'end2end_test_%s' % t] + unsec_deps } for f in sorted(END2END_FIXTURES.keys()) if not END2END_FIXTURES[f].secure for t in sorted(END2END_TESTS.keys()) if not END2END_TESTS[t].secure]} diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 423275ee859..f1cea5ee665 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -31,7 +31,7 @@ * */ -#include "qps_worker.h" +#include "test/cpp/qps/qps_worker.h" #include #include diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc index dfc102fc176..14a8b0b0891 100644 --- a/test/cpp/qps/worker.cc +++ b/test/cpp/qps/worker.cc @@ -40,7 +40,7 @@ #include #include -#include "qps_worker.h" +#include "test/cpp/qps/qps_worker.h" #include "test/cpp/util/test_config.h" DEFINE_int32(driver_port, 0, "Driver server port."); diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index a19f89ac7be..deee6837a02 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -760,7 +760,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc++/async_generic_service.h include/grpc++/async_unary_call.h include/grpc++/byte_buffer.h include/grpc++/channel_arguments.h include/grpc++/channel_interface.h include/grpc++/client_context.h include/grpc++/completion_queue.h include/grpc++/config.h include/grpc++/config_protobuf.h include/grpc++/create_channel.h include/grpc++/credentials.h include/grpc++/generic_stub.h include/grpc++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/proto_utils.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.h include/grpc++/server.h include/grpc++/server_builder.h include/grpc++/server_context.h include/grpc++/server_credentials.h include/grpc++/slice.h include/grpc++/status.h include/grpc++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/time.h src/cpp/client/secure_credentials.h src/cpp/server/secure_server_credentials.h src/cpp/client/channel.h src/cpp/server/thread_pool.h src/cpp/client/secure_credentials.cc src/cpp/server/secure_server_credentials.cc src/cpp/client/channel.cc src/cpp/client/channel_arguments.cc src/cpp/client/client_context.cc src/cpp/client/create_channel.cc src/cpp/client/credentials.cc src/cpp/client/generic_stub.cc src/cpp/client/insecure_credentials.cc src/cpp/client/internal_stub.cc src/cpp/common/call.cc src/cpp/common/completion_queue.cc src/cpp/common/rpc_method.cc src/cpp/proto/proto_utils.cc src/cpp/server/async_generic_service.cc src/cpp/server/create_default_thread_pool.cc src/cpp/server/insecure_server_credentials.cc src/cpp/server/server.cc src/cpp/server/server_builder.cc src/cpp/server/server_context.cc src/cpp/server/server_credentials.cc src/cpp/server/thread_pool.cc src/cpp/util/byte_buffer.cc src/cpp/util/slice.cc src/cpp/util/status.cc src/cpp/util/time.cc +INPUT = include/grpc++/async_generic_service.h include/grpc++/async_unary_call.h include/grpc++/byte_buffer.h include/grpc++/channel_arguments.h include/grpc++/channel_interface.h include/grpc++/client_context.h include/grpc++/completion_queue.h include/grpc++/config.h include/grpc++/config_protobuf.h include/grpc++/create_channel.h include/grpc++/credentials.h include/grpc++/generic_stub.h include/grpc++/impl/call.h include/grpc++/impl/client_unary_call.h include/grpc++/impl/grpc_library.h include/grpc++/impl/internal_stub.h include/grpc++/impl/proto_utils.h include/grpc++/impl/rpc_method.h include/grpc++/impl/rpc_service_method.h include/grpc++/impl/serialization_traits.h include/grpc++/impl/service_type.h include/grpc++/impl/sync.h include/grpc++/impl/sync_cxx11.h include/grpc++/impl/sync_no_cxx11.h include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.h include/grpc++/server.h include/grpc++/server_builder.h include/grpc++/server_context.h include/grpc++/server_credentials.h include/grpc++/slice.h include/grpc++/status.h include/grpc++/status_code_enum.h include/grpc++/stream.h include/grpc++/thread_pool_interface.h include/grpc++/time.h src/cpp/client/secure_credentials.h src/cpp/server/secure_server_credentials.h src/cpp/client/channel.h src/cpp/server/thread_pool.h src/cpp/client/secure_channel_arguments.cc src/cpp/client/secure_credentials.cc src/cpp/server/secure_server_credentials.cc src/cpp/client/channel.cc src/cpp/client/channel_arguments.cc src/cpp/client/client_context.cc src/cpp/client/create_channel.cc src/cpp/client/credentials.cc src/cpp/client/generic_stub.cc src/cpp/client/insecure_credentials.cc src/cpp/client/internal_stub.cc src/cpp/common/call.cc src/cpp/common/completion_queue.cc src/cpp/common/rpc_method.cc src/cpp/proto/proto_utils.cc src/cpp/server/async_generic_service.cc src/cpp/server/create_default_thread_pool.cc src/cpp/server/insecure_server_credentials.cc src/cpp/server/server.cc src/cpp/server/server_builder.cc src/cpp/server/server_context.cc src/cpp/server/server_credentials.cc src/cpp/server/thread_pool.cc src/cpp/util/byte_buffer.cc src/cpp/util/slice.cc src/cpp/util/status.cc src/cpp/util/time.cc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/run_tests/check_sources_and_headers.py b/tools/run_tests/check_sources_and_headers.py new file mode 100755 index 00000000000..605bdedec38 --- /dev/null +++ b/tools/run_tests/check_sources_and_headers.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python2.7 + +import json +import os +import re +import sys + +root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..')) +with open(os.path.join(root, 'tools', 'run_tests', 'sources_and_headers.json')) as f: + js = json.loads(f.read()) + +re_inc1 = re.compile(r'^#\s*include\s*"([^"]*)"') +assert re_inc1.match('#include "foo"').group(1) == 'foo' +re_inc2 = re.compile(r'^#\s*include\s*<((grpc|grpc\+\+)/[^"]*)>') +assert re_inc2.match('#include ').group(1) == 'grpc++/foo' + +def get_target(name): + for target in js: + if target['name'] == name: + return target + assert False, 'no target %s' % name + +def target_has_header(target, name): +# print target['name'], name + if name in target['headers']: + return True + for dep in target['deps']: + if target_has_header(get_target(dep), name): + return True + if name == 'src/core/profiling/stap_probes.h': + return True + return False + +errors = 0 +for target in js: + for fn in target['src']: + with open(os.path.join(root, fn)) as f: + src = f.read().splitlines() + for line in src: + m = re_inc1.match(line) + if m: + if not target_has_header(target, m.group(1)): + print ( + 'target %s (%s) does not name header %s as a dependency' % ( + target['name'], fn, m.group(1))) + errors += 1 + m = re_inc2.match(line) + if m: + if not target_has_header(target, 'include/' + m.group(1)): + print ( + 'target %s (%s) does not name header %s as a dependency' % ( + target['name'], fn, m.group(1))) + errors += 1 + +assert errors == 0 \ No newline at end of file diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 5ed70f0b7e2..ca74f57f708 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -278,7 +278,8 @@ class CSharpLanguage(object): class Sanity(object): def test_specs(self, config, travis): - return [config.job_spec('tools/run_tests/run_sanity.sh', None)] + return [config.job_spec('tools/run_tests/run_sanity.sh', None), + config.job_spec('tools/run_tests/check_sources_and_headers.py', None)] def make_targets(self): return ['run_dep_checks'] diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json new file mode 100644 index 00000000000..ff985b37346 --- /dev/null +++ b/tools/run_tests/sources_and_headers.json @@ -0,0 +1,10585 @@ + + +[ + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "alarm_heap_test", + "src": [ + "test/core/iomgr/alarm_heap_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "alarm_list_test", + "src": [ + "test/core/iomgr/alarm_list_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "alarm_test", + "src": [ + "test/core/iomgr/alarm_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "alpn_test", + "src": [ + "test/core/transport/chttp2/alpn_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "bin_encoder_test", + "src": [ + "test/core/transport/chttp2/bin_encoder_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_status_conversion_test", + "src": [ + "test/core/transport/chttp2/status_conversion_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_stream_encoder_test", + "src": [ + "test/core/transport/chttp2/stream_encoder_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_stream_map_test", + "src": [ + "test/core/transport/chttp2/stream_map_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "dualstack_socket_test", + "src": [ + "test/core/end2end/dualstack_socket_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "fd_posix_test", + "src": [ + "test/core/iomgr/fd_posix_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "fling_client", + "src": [ + "test/core/fling/client.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "fling_server", + "src": [ + "test/core/fling/server.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "fling_stream_test", + "src": [ + "test/core/fling/fling_stream_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "fling_test", + "src": [ + "test/core/fling/fling_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "gpr", + "grpc" + ], + "headers": [], + "language": "c", + "name": "gen_hpack_tables", + "src": [ + "src/core/transport/chttp2/gen_hpack_tables.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_cancellable_test", + "src": [ + "test/core/support/cancellable_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_cmdline_test", + "src": [ + "test/core/support/cmdline_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_env_test", + "src": [ + "test/core/support/env_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_file_test", + "src": [ + "test/core/support/file_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_histogram_test", + "src": [ + "test/core/support/histogram_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_host_port_test", + "src": [ + "test/core/support/host_port_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_log_test", + "src": [ + "test/core/support/log_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_slice_buffer_test", + "src": [ + "test/core/support/slice_buffer_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_slice_test", + "src": [ + "test/core/support/slice_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_string_test", + "src": [ + "test/core/support/string_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_sync_test", + "src": [ + "test/core/support/sync_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_thd_test", + "src": [ + "test/core/support/thd_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_time_test", + "src": [ + "test/core/support/time_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_tls_test", + "src": [ + "test/core/support/tls_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "gpr_useful_test", + "src": [ + "test/core/support/useful_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_auth_context_test", + "src": [ + "test/core/security/auth_context_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_base64_test", + "src": [ + "test/core/security/base64_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_byte_buffer_reader_test", + "src": [ + "test/core/surface/byte_buffer_reader_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_channel_stack_test", + "src": [ + "test/core/channel/channel_stack_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_completion_queue_test", + "src": [ + "test/core/surface/completion_queue_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_create_jwt", + "src": [ + "test/core/security/create_jwt.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_credentials_test", + "src": [ + "test/core/security/credentials_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_fetch_oauth2", + "src": [ + "test/core/security/fetch_oauth2.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_json_token_test", + "src": [ + "test/core/security/json_token_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_print_google_default_creds_token", + "src": [ + "test/core/security/print_google_default_creds_token.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_security_connector_test", + "src": [ + "test/core/security/security_connector_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "grpc_stream_op_test", + "src": [ + "test/core/transport/stream_op_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "hpack_parser_test", + "src": [ + "test/core/transport/chttp2/hpack_parser_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "hpack_table_test", + "src": [ + "test/core/transport/chttp2/hpack_table_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "httpcli_format_request_test", + "src": [ + "test/core/httpcli/format_request_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "httpcli_parser_test", + "src": [ + "test/core/httpcli/parser_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "httpcli_test", + "src": [ + "test/core/httpcli/httpcli_test.c" + ] + }, + { + "deps": [ + "grpc", + "gpr" + ], + "headers": [], + "language": "c", + "name": "json_rewrite", + "src": [ + "test/core/json/json_rewrite.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "json_rewrite_test", + "src": [ + "test/core/json/json_rewrite_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "json_test", + "src": [ + "test/core/json/json_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "lame_client_test", + "src": [ + "test/core/surface/lame_client_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "low_level_ping_pong_benchmark", + "src": [ + "test/core/network_benchmarks/low_level_ping_pong.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "message_compress_test", + "src": [ + "test/core/compression/message_compress_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "multi_init_test", + "src": [ + "test/core/surface/multi_init_test.c" + ] + }, + { + "deps": [ + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "murmur_hash_test", + "src": [ + "test/core/support/murmur_hash_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "no_server_test", + "src": [ + "test/core/end2end/no_server_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "poll_kick_posix_test", + "src": [ + "test/core/iomgr/poll_kick_posix_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "resolve_address_test", + "src": [ + "test/core/iomgr/resolve_address_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "secure_endpoint_test", + "src": [ + "test/core/security/secure_endpoint_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "sockaddr_utils_test", + "src": [ + "test/core/iomgr/sockaddr_utils_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "tcp_client_posix_test", + "src": [ + "test/core/iomgr/tcp_client_posix_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "tcp_posix_test", + "src": [ + "test/core/iomgr/tcp_posix_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "tcp_server_posix_test", + "src": [ + "test/core/iomgr/tcp_server_posix_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "time_averaged_stats_test", + "src": [ + "test/core/iomgr/time_averaged_stats_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "time_test", + "src": [ + "test/core/support/time_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "timeout_encoding_test", + "src": [ + "test/core/transport/chttp2/timeout_encoding_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "timers_test", + "src": [ + "test/core/profiling/timers_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "transport_metadata_test", + "src": [ + "test/core/transport/metadata_test.c" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "transport_security_test", + "src": [ + "test/core/tsi/transport_security_test.c" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "async_end2end_test", + "src": [ + "test/cpp/end2end/async_end2end_test.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "async_streaming_ping_pong_test", + "src": [ + "test/cpp/qps/async_streaming_ping_pong_test.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "async_unary_ping_pong_test", + "src": [ + "test/cpp/qps/async_unary_ping_pong_test.cc" + ] + }, + { + "deps": [ + "grpc++", + "grpc", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "channel_arguments_test", + "src": [ + "test/cpp/client/channel_arguments_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "cli_call_test", + "src": [ + "test/cpp/util/cli_call_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "client_crash_test", + "src": [ + "test/cpp/end2end/client_crash_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "client_crash_test_server", + "src": [ + "test/cpp/end2end/client_crash_test_server.cc" + ] + }, + { + "deps": [ + "grpc++", + "grpc", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "credentials_test", + "src": [ + "test/cpp/client/credentials_test.cc" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "cxx_byte_buffer_test", + "src": [ + "test/cpp/util/byte_buffer_test.cc" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "cxx_slice_test", + "src": [ + "test/cpp/util/slice_test.cc" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "cxx_time_test", + "src": [ + "test/cpp/util/time_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "end2end_test", + "src": [ + "test/cpp/end2end/end2end_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "generic_end2end_test", + "src": [ + "test/cpp/end2end/generic_end2end_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [], + "language": "c++", + "name": "grpc_cli", + "src": [ + "test/cpp/util/grpc_cli.cc" + ] + }, + { + "deps": [ + "grpc_plugin_support" + ], + "headers": [], + "language": "c++", + "name": "grpc_cpp_plugin", + "src": [ + "src/compiler/cpp_plugin.cc" + ] + }, + { + "deps": [ + "grpc_plugin_support" + ], + "headers": [], + "language": "c++", + "name": "grpc_csharp_plugin", + "src": [ + "src/compiler/csharp_plugin.cc" + ] + }, + { + "deps": [ + "grpc_plugin_support" + ], + "headers": [], + "language": "c++", + "name": "grpc_objective_c_plugin", + "src": [ + "src/compiler/objective_c_plugin.cc" + ] + }, + { + "deps": [ + "grpc_plugin_support" + ], + "headers": [], + "language": "c++", + "name": "grpc_python_plugin", + "src": [ + "src/compiler/python_plugin.cc" + ] + }, + { + "deps": [ + "grpc_plugin_support" + ], + "headers": [], + "language": "c++", + "name": "grpc_ruby_plugin", + "src": [ + "src/compiler/ruby_plugin.cc" + ] + }, + { + "deps": [ + "interop_client_main", + "interop_client_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [], + "language": "c++", + "name": "interop_client", + "src": [] + }, + { + "deps": [ + "interop_server_main", + "interop_server_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [], + "language": "c++", + "name": "interop_server", + "src": [] + }, + { + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "interop_test", + "src": [ + "test/cpp/interop/interop_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "mock_test", + "src": [ + "test/cpp/end2end/mock_test.cc" + ] + }, + { + "deps": [ + "pubsub_client_lib", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [], + "language": "c++", + "name": "pubsub_client", + "src": [ + "examples/pubsub/main.cc" + ] + }, + { + "deps": [ + "pubsub_client_lib", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "pubsub_publisher_test", + "src": [ + "examples/pubsub/publisher_test.cc" + ] + }, + { + "deps": [ + "pubsub_client_lib", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "pubsub_subscriber_test", + "src": [ + "examples/pubsub/subscriber_test.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [], + "language": "c++", + "name": "qps_driver", + "src": [ + "test/cpp/qps/qps_driver.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "qps_interarrival_test", + "src": [ + "test/cpp/qps/qps_interarrival_test.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [], + "language": "c++", + "name": "qps_test", + "src": [ + "test/cpp/qps/qps_test.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [], + "language": "c++", + "name": "qps_test_openloop", + "src": [ + "test/cpp/qps/qps_test_openloop.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [ + "test/cpp/qps/client.h", + "test/cpp/qps/server.h" + ], + "language": "c++", + "name": "qps_worker", + "src": [ + "test/cpp/qps/worker.cc", + "test/cpp/qps/client.h", + "test/cpp/qps/server.h" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "server_crash_test", + "src": [ + "test/cpp/end2end/server_crash_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "server_crash_test_client", + "src": [ + "test/cpp/end2end/server_crash_test_client.cc" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "status_test", + "src": [ + "test/cpp/util/status_test.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "sync_streaming_ping_pong_test", + "src": [ + "test/cpp/qps/sync_streaming_ping_pong_test.cc" + ] + }, + { + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "sync_unary_ping_pong_test", + "src": [ + "test/cpp/qps/sync_unary_ping_pong_test.cc" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "thread_pool_test", + "src": [ + "test/cpp/server/thread_pool_test.cc" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c++", + "name": "thread_stress_test", + "src": [ + "test/cpp/end2end/thread_stress_test.cc" + ] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fake_security", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fake_security_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_fullstack_with_poll_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_bad_hostname", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_bad_hostname_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_after_accept", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_after_accept_and_writes_closed", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_after_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_before_invoke", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_in_a_vacuum", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_census_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_census_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_disappearing_server", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_disappearing_server_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_early_server_shutdown_finishes_tags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_empty_batch", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_empty_batch_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_graceful_server_shutdown", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_invoke_large_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_invoke_large_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_max_concurrent_streams", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_max_message_length", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_message_length_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_no_op", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_no_op_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_ping_pong_streaming", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_registered_call", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_registered_call_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_binary_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_payload_and_call_creds", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_payload_and_call_creds_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_with_flags", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_flags_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_with_large_metadata", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_with_payload", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_payload_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_server_finishes_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_server_finishes_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_simple_delayed_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_delayed_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_simple_request", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_simple_request_with_high_initial_sequence_number", + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_bad_hostname", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_bad_hostname_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_after_accept", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_after_accept_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_after_accept_and_writes_closed", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_after_accept_and_writes_closed_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_after_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_after_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_before_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_before_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_cancel_in_a_vacuum", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_cancel_in_a_vacuum_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_census_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_census_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_disappearing_server", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_disappearing_server_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_early_server_shutdown_finishes_tags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_early_server_shutdown_finishes_tags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_empty_batch", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_empty_batch_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_graceful_server_shutdown", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_graceful_server_shutdown_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_invoke_large_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_invoke_large_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_max_concurrent_streams", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_max_concurrent_streams_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_max_message_length", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_max_message_length_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_no_op", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_no_op_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_ping_pong_streaming", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_ping_pong_streaming_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_registered_call", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_registered_call_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_binary_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_binary_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_response_with_trailing_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_with_flags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_with_flags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_with_large_metadata", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_with_large_metadata_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_request_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_request_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_server_finishes_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_server_finishes_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_simple_delayed_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_simple_delayed_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack", + "end2end_test_simple_request_with_high_initial_sequence_number", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_simple_request_with_high_initial_sequence_number_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_bad_hostname", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_bad_hostname_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_after_accept", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_after_accept_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_after_accept_and_writes_closed", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_after_accept_and_writes_closed_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_after_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_after_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_before_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_before_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_cancel_in_a_vacuum", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_cancel_in_a_vacuum_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_census_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_census_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_disappearing_server", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_disappearing_server_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_early_server_shutdown_finishes_inflight_calls_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_early_server_shutdown_finishes_tags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_early_server_shutdown_finishes_tags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_empty_batch", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_empty_batch_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_graceful_server_shutdown", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_graceful_server_shutdown_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_invoke_large_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_invoke_large_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_max_concurrent_streams", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_max_concurrent_streams_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_max_message_length", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_max_message_length_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_no_op", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_no_op_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_ping_pong_streaming", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_ping_pong_streaming_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_registered_call", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_registered_call_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_binary_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_binary_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_response_with_trailing_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_with_flags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_with_flags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_with_large_metadata", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_with_large_metadata_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_request_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_request_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_server_finishes_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_server_finishes_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_simple_delayed_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_simple_delayed_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_uds_posix", + "end2end_test_simple_request_with_high_initial_sequence_number", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_uds_posix_simple_request_with_high_initial_sequence_number_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_bad_hostname", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_bad_hostname_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_after_accept", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_after_accept_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_after_accept_and_writes_closed", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_after_accept_and_writes_closed_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_after_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_after_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_before_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_before_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_cancel_in_a_vacuum", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_cancel_in_a_vacuum_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_census_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_census_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_disappearing_server", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_disappearing_server_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_early_server_shutdown_finishes_inflight_calls_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_early_server_shutdown_finishes_tags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_early_server_shutdown_finishes_tags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_empty_batch", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_empty_batch_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_graceful_server_shutdown", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_graceful_server_shutdown_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_invoke_large_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_invoke_large_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_max_concurrent_streams", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_max_concurrent_streams_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_max_message_length", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_max_message_length_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_no_op", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_no_op_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_ping_pong_streaming", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_ping_pong_streaming_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_registered_call", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_registered_call_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_binary_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_binary_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_response_with_trailing_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_with_flags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_with_flags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_with_large_metadata", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_with_large_metadata_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_request_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_request_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_server_finishes_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_server_finishes_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_simple_delayed_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_simple_delayed_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_fullstack_with_poll", + "end2end_test_simple_request_with_high_initial_sequence_number", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_fullstack_with_poll_simple_request_with_high_initial_sequence_number_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_bad_hostname", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_bad_hostname_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_after_accept", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_after_accept_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_after_accept_and_writes_closed", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_after_accept_and_writes_closed_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_after_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_after_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_before_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_before_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_cancel_in_a_vacuum", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_cancel_in_a_vacuum_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_census_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_census_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_disappearing_server", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_disappearing_server_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_early_server_shutdown_finishes_tags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_early_server_shutdown_finishes_tags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_empty_batch", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_empty_batch_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_graceful_server_shutdown", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_graceful_server_shutdown_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_invoke_large_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_invoke_large_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_max_concurrent_streams", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_max_concurrent_streams_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_max_message_length", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_max_message_length_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_no_op", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_no_op_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_ping_pong_streaming", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_ping_pong_streaming_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_registered_call", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_registered_call_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_binary_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_binary_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_with_flags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_with_flags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_with_large_metadata", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_with_large_metadata_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_request_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_request_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_server_finishes_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_server_finishes_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_simple_delayed_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_simple_delayed_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair", + "end2end_test_simple_request_with_high_initial_sequence_number", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_simple_request_with_high_initial_sequence_number_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_bad_hostname", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_bad_hostname_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_after_accept", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_after_accept_and_writes_closed", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_after_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_before_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_cancel_in_a_vacuum", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_census_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_census_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_disappearing_server", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_disappearing_server_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_early_server_shutdown_finishes_tags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_empty_batch", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_empty_batch_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_graceful_server_shutdown", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_invoke_large_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_max_concurrent_streams", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_max_message_length", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_max_message_length_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_no_op", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_no_op_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_ping_pong_streaming", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_registered_call", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_registered_call_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_binary_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_with_flags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_flags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_with_large_metadata", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_request_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_server_finishes_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_server_finishes_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_simple_delayed_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "end2end_test_simple_request_with_high_initial_sequence_number", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_one_byte_at_a_time_simple_request_with_high_initial_sequence_number_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_bad_hostname", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_bad_hostname_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_after_accept", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_after_accept_and_writes_closed", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_and_writes_closed_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_after_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_after_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_before_invoke", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_before_invoke_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_cancel_in_a_vacuum", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_cancel_in_a_vacuum_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_census_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_census_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_disappearing_server", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_disappearing_server_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_early_server_shutdown_finishes_inflight_calls", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_inflight_calls_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_early_server_shutdown_finishes_tags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_early_server_shutdown_finishes_tags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_empty_batch", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_empty_batch_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_graceful_server_shutdown", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_graceful_server_shutdown_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_invoke_large_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_invoke_large_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_max_concurrent_streams", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_concurrent_streams_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_max_message_length", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_max_message_length_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_no_op", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_no_op_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_ping_pong_streaming", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_ping_pong_streaming_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_registered_call", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_registered_call_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_binary_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_binary_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_response_with_trailing_metadata_and_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_response_with_trailing_metadata_and_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_with_flags", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_flags_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_with_large_metadata", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_large_metadata_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_request_with_payload", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_request_with_payload_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_server_finishes_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_server_finishes_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_simple_delayed_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_delayed_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_simple_request", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_unsecure_test", + "src": [] + }, + { + "deps": [ + "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "end2end_test_simple_request_with_high_initial_sequence_number", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "chttp2_socket_pair_with_grpc_trace_simple_request_with_high_initial_sequence_number_unsecure_test", + "src": [] + }, + { + "deps": [ + "bad_client_test", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "connection_prefix_bad_client_test", + "src": [ + "test/core/bad_client/tests/connection_prefix.c" + ] + }, + { + "deps": [ + "bad_client_test", + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [], + "language": "c", + "name": "initial_settings_frame_bad_client_test", + "src": [ + "test/core/bad_client/tests/initial_settings_frame.c" + ] + }, + { + "deps": [], + "headers": [ + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/atm_gcc_atomic.h", + "include/grpc/support/atm_gcc_sync.h", + "include/grpc/support/atm_win32.h", + "include/grpc/support/cancellable_platform.h", + "include/grpc/support/cmdline.h", + "include/grpc/support/cpu.h", + "include/grpc/support/histogram.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/log_win32.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/subprocess.h", + "include/grpc/support/sync.h", + "include/grpc/support/sync_generic.h", + "include/grpc/support/sync_posix.h", + "include/grpc/support/sync_win32.h", + "include/grpc/support/thd.h", + "include/grpc/support/time.h", + "include/grpc/support/tls.h", + "include/grpc/support/tls_gcc.h", + "include/grpc/support/tls_msvc.h", + "include/grpc/support/tls_pthread.h", + "include/grpc/support/useful.h", + "src/core/support/env.h", + "src/core/support/file.h", + "src/core/support/murmur_hash.h", + "src/core/support/string.h", + "src/core/support/string_win32.h", + "src/core/support/thd_internal.h" + ], + "language": "c", + "name": "gpr", + "src": [ + "src/core/support/alloc.c", + "src/core/support/cancellable.c", + "src/core/support/cmdline.c", + "src/core/support/cpu_iphone.c", + "src/core/support/cpu_linux.c", + "src/core/support/cpu_posix.c", + "src/core/support/cpu_windows.c", + "src/core/support/env_linux.c", + "src/core/support/env_posix.c", + "src/core/support/env_win32.c", + "src/core/support/file.c", + "src/core/support/file_posix.c", + "src/core/support/file_win32.c", + "src/core/support/histogram.c", + "src/core/support/host_port.c", + "src/core/support/log.c", + "src/core/support/log_android.c", + "src/core/support/log_linux.c", + "src/core/support/log_posix.c", + "src/core/support/log_win32.c", + "src/core/support/murmur_hash.c", + "src/core/support/slice.c", + "src/core/support/slice_buffer.c", + "src/core/support/string.c", + "src/core/support/string_posix.c", + "src/core/support/string_win32.c", + "src/core/support/subprocess_posix.c", + "src/core/support/sync.c", + "src/core/support/sync_posix.c", + "src/core/support/sync_win32.c", + "src/core/support/thd.c", + "src/core/support/thd_posix.c", + "src/core/support/thd_win32.c", + "src/core/support/time.c", + "src/core/support/time_posix.c", + "src/core/support/time_win32.c", + "src/core/support/tls_pthread.c", + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/atm_gcc_atomic.h", + "include/grpc/support/atm_gcc_sync.h", + "include/grpc/support/atm_win32.h", + "include/grpc/support/cancellable_platform.h", + "include/grpc/support/cmdline.h", + "include/grpc/support/cpu.h", + "include/grpc/support/histogram.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/log_win32.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/subprocess.h", + "include/grpc/support/sync.h", + "include/grpc/support/sync_generic.h", + "include/grpc/support/sync_posix.h", + "include/grpc/support/sync_win32.h", + "include/grpc/support/thd.h", + "include/grpc/support/time.h", + "include/grpc/support/tls.h", + "include/grpc/support/tls_gcc.h", + "include/grpc/support/tls_msvc.h", + "include/grpc/support/tls_pthread.h", + "include/grpc/support/useful.h", + "src/core/support/env.h", + "src/core/support/file.h", + "src/core/support/murmur_hash.h", + "src/core/support/string.h", + "src/core/support/string_win32.h", + "src/core/support/thd_internal.h" + ] + }, + { + "deps": [ + "gpr" + ], + "headers": [ + "test/core/util/test_config.h" + ], + "language": "c", + "name": "gpr_test_util", + "src": [ + "test/core/util/test_config.c", + "test/core/util/test_config.h" + ] + }, + { + "deps": [ + "gpr" + ], + "headers": [ + "include/grpc/grpc_security.h", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/status.h", + "include/grpc/census.h", + "src/core/httpcli/format_request.h", + "src/core/httpcli/httpcli.h", + "src/core/httpcli/httpcli_security_connector.h", + "src/core/httpcli/parser.h", + "src/core/security/auth_filters.h", + "src/core/security/base64.h", + "src/core/security/credentials.h", + "src/core/security/json_token.h", + "src/core/security/secure_endpoint.h", + "src/core/security/secure_transport_setup.h", + "src/core/security/security_connector.h", + "src/core/security/security_context.h", + "src/core/tsi/fake_transport_security.h", + "src/core/tsi/ssl_transport_security.h", + "src/core/tsi/transport_security.h", + "src/core/tsi/transport_security_interface.h", + "src/core/census/grpc_context.h", + "src/core/channel/census_filter.h", + "src/core/channel/channel_args.h", + "src/core/channel/channel_stack.h", + "src/core/channel/child_channel.h", + "src/core/channel/client_channel.h", + "src/core/channel/client_setup.h", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", + "src/core/channel/http_client_filter.h", + "src/core/channel/http_server_filter.h", + "src/core/channel/noop_filter.h", + "src/core/compression/message_compress.h", + "src/core/debug/trace.h", + "src/core/iomgr/alarm.h", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", + "src/core/iomgr/fd_posix.h", + "src/core/iomgr/iocp_windows.h", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", + "src/core/iomgr/iomgr_posix.h", + "src/core/iomgr/pollset.h", + "src/core/iomgr/pollset_kick_posix.h", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", + "src/core/iomgr/pollset_set_posix.h", + "src/core/iomgr/pollset_set_windows.h", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", + "src/core/iomgr/socket_utils_posix.h", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", + "src/core/iomgr/tcp_windows.h", + "src/core/iomgr/time_averaged_stats.h", + "src/core/iomgr/wakeup_fd_pipe.h", + "src/core/iomgr/wakeup_fd_posix.h", + "src/core/json/json.h", + "src/core/json/json_common.h", + "src/core/json/json_reader.h", + "src/core/json/json_writer.h", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", + "src/core/surface/byte_buffer_queue.h", + "src/core/surface/call.h", + "src/core/surface/channel.h", + "src/core/surface/client.h", + "src/core/surface/completion_queue.h", + "src/core/surface/event_string.h", + "src/core/surface/init.h", + "src/core/surface/server.h", + "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.h", + "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.h", + "src/core/transport/metadata.h", + "src/core/transport/stream_op.h", + "src/core/transport/transport.h", + "src/core/transport/transport_impl.h", + "src/core/census/context.h" + ], + "language": "c", + "name": "grpc", + "src": [ + "src/core/httpcli/format_request.c", + "src/core/httpcli/httpcli.c", + "src/core/httpcli/httpcli_security_connector.c", + "src/core/httpcli/parser.c", + "src/core/security/base64.c", + "src/core/security/client_auth_filter.c", + "src/core/security/credentials.c", + "src/core/security/credentials_metadata.c", + "src/core/security/credentials_posix.c", + "src/core/security/credentials_win32.c", + "src/core/security/google_default_credentials.c", + "src/core/security/json_token.c", + "src/core/security/secure_endpoint.c", + "src/core/security/secure_transport_setup.c", + "src/core/security/security_connector.c", + "src/core/security/security_context.c", + "src/core/security/server_auth_filter.c", + "src/core/security/server_secure_chttp2.c", + "src/core/surface/init_secure.c", + "src/core/surface/secure_channel_create.c", + "src/core/tsi/fake_transport_security.c", + "src/core/tsi/ssl_transport_security.c", + "src/core/tsi/transport_security.c", + "src/core/census/grpc_context.c", + "src/core/channel/channel_args.c", + "src/core/channel/channel_stack.c", + "src/core/channel/child_channel.c", + "src/core/channel/client_channel.c", + "src/core/channel/client_setup.c", + "src/core/channel/connected_channel.c", + "src/core/channel/http_client_filter.c", + "src/core/channel/http_server_filter.c", + "src/core/channel/noop_filter.c", + "src/core/compression/algorithm.c", + "src/core/compression/message_compress.c", + "src/core/debug/trace.c", + "src/core/iomgr/alarm.c", + "src/core/iomgr/alarm_heap.c", + "src/core/iomgr/endpoint.c", + "src/core/iomgr/endpoint_pair_posix.c", + "src/core/iomgr/endpoint_pair_windows.c", + "src/core/iomgr/fd_posix.c", + "src/core/iomgr/iocp_windows.c", + "src/core/iomgr/iomgr.c", + "src/core/iomgr/iomgr_posix.c", + "src/core/iomgr/iomgr_windows.c", + "src/core/iomgr/pollset_kick_posix.c", + "src/core/iomgr/pollset_multipoller_with_epoll.c", + "src/core/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/iomgr/pollset_posix.c", + "src/core/iomgr/pollset_set_posix.c", + "src/core/iomgr/pollset_set_windows.c", + "src/core/iomgr/pollset_windows.c", + "src/core/iomgr/resolve_address_posix.c", + "src/core/iomgr/resolve_address_windows.c", + "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/socket_utils_common_posix.c", + "src/core/iomgr/socket_utils_linux.c", + "src/core/iomgr/socket_utils_posix.c", + "src/core/iomgr/socket_windows.c", + "src/core/iomgr/tcp_client_posix.c", + "src/core/iomgr/tcp_client_windows.c", + "src/core/iomgr/tcp_posix.c", + "src/core/iomgr/tcp_server_posix.c", + "src/core/iomgr/tcp_server_windows.c", + "src/core/iomgr/tcp_windows.c", + "src/core/iomgr/time_averaged_stats.c", + "src/core/iomgr/wakeup_fd_eventfd.c", + "src/core/iomgr/wakeup_fd_nospecial.c", + "src/core/iomgr/wakeup_fd_pipe.c", + "src/core/iomgr/wakeup_fd_posix.c", + "src/core/json/json.c", + "src/core/json/json_reader.c", + "src/core/json/json_string.c", + "src/core/json/json_writer.c", + "src/core/profiling/basic_timers.c", + "src/core/profiling/stap_timers.c", + "src/core/surface/byte_buffer.c", + "src/core/surface/byte_buffer_queue.c", + "src/core/surface/byte_buffer_reader.c", + "src/core/surface/call.c", + "src/core/surface/call_details.c", + "src/core/surface/call_log_batch.c", + "src/core/surface/channel.c", + "src/core/surface/channel_create.c", + "src/core/surface/client.c", + "src/core/surface/completion_queue.c", + "src/core/surface/event_string.c", + "src/core/surface/init.c", + "src/core/surface/lame_client.c", + "src/core/surface/metadata_array.c", + "src/core/surface/server.c", + "src/core/surface/server_chttp2.c", + "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", + "src/core/transport/chttp2/alpn.c", + "src/core/transport/chttp2/bin_encoder.c", + "src/core/transport/chttp2/frame_data.c", + "src/core/transport/chttp2/frame_goaway.c", + "src/core/transport/chttp2/frame_ping.c", + "src/core/transport/chttp2/frame_rst_stream.c", + "src/core/transport/chttp2/frame_settings.c", + "src/core/transport/chttp2/frame_window_update.c", + "src/core/transport/chttp2/hpack_parser.c", + "src/core/transport/chttp2/hpack_table.c", + "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/status_conversion.c", + "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_map.c", + "src/core/transport/chttp2/timeout_encoding.c", + "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2_transport.c", + "src/core/transport/metadata.c", + "src/core/transport/stream_op.c", + "src/core/transport/transport.c", + "src/core/transport/transport_op_string.c", + "src/core/census/context.c", + "src/core/census/initialize.c", + "include/grpc/grpc_security.h", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/status.h", + "include/grpc/census.h", + "src/core/httpcli/format_request.h", + "src/core/httpcli/httpcli.h", + "src/core/httpcli/httpcli_security_connector.h", + "src/core/httpcli/parser.h", + "src/core/security/auth_filters.h", + "src/core/security/base64.h", + "src/core/security/credentials.h", + "src/core/security/json_token.h", + "src/core/security/secure_endpoint.h", + "src/core/security/secure_transport_setup.h", + "src/core/security/security_connector.h", + "src/core/security/security_context.h", + "src/core/tsi/fake_transport_security.h", + "src/core/tsi/ssl_transport_security.h", + "src/core/tsi/transport_security.h", + "src/core/tsi/transport_security_interface.h", + "src/core/census/grpc_context.h", + "src/core/channel/census_filter.h", + "src/core/channel/channel_args.h", + "src/core/channel/channel_stack.h", + "src/core/channel/child_channel.h", + "src/core/channel/client_channel.h", + "src/core/channel/client_setup.h", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", + "src/core/channel/http_client_filter.h", + "src/core/channel/http_server_filter.h", + "src/core/channel/noop_filter.h", + "src/core/compression/message_compress.h", + "src/core/debug/trace.h", + "src/core/iomgr/alarm.h", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", + "src/core/iomgr/fd_posix.h", + "src/core/iomgr/iocp_windows.h", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", + "src/core/iomgr/iomgr_posix.h", + "src/core/iomgr/pollset.h", + "src/core/iomgr/pollset_kick_posix.h", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", + "src/core/iomgr/pollset_set_posix.h", + "src/core/iomgr/pollset_set_windows.h", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", + "src/core/iomgr/socket_utils_posix.h", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", + "src/core/iomgr/tcp_windows.h", + "src/core/iomgr/time_averaged_stats.h", + "src/core/iomgr/wakeup_fd_pipe.h", + "src/core/iomgr/wakeup_fd_posix.h", + "src/core/json/json.h", + "src/core/json/json_common.h", + "src/core/json/json_reader.h", + "src/core/json/json_writer.h", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", + "src/core/surface/byte_buffer_queue.h", + "src/core/surface/call.h", + "src/core/surface/channel.h", + "src/core/surface/client.h", + "src/core/surface/completion_queue.h", + "src/core/surface/event_string.h", + "src/core/surface/init.h", + "src/core/surface/server.h", + "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.h", + "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.h", + "src/core/transport/metadata.h", + "src/core/transport/stream_op.h", + "src/core/transport/transport.h", + "src/core/transport/transport_impl.h", + "src/core/census/context.h" + ] + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc" + ], + "headers": [ + "test/core/end2end/data/ssl_test_data.h", + "test/core/end2end/cq_verifier.h", + "test/core/iomgr/endpoint_tests.h", + "test/core/util/grpc_profiler.h", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", + "test/core/util/slice_splitter.h" + ], + "language": "c", + "name": "grpc_test_util", + "src": [ + "test/core/end2end/data/server1_cert.c", + "test/core/end2end/data/server1_key.c", + "test/core/end2end/data/test_root_cert.c", + "test/core/end2end/cq_verifier.c", + "test/core/iomgr/endpoint_tests.c", + "test/core/util/grpc_profiler.c", + "test/core/util/parse_hexstring.c", + "test/core/util/port_posix.c", + "test/core/util/port_windows.c", + "test/core/util/slice_splitter.c", + "test/core/end2end/data/ssl_test_data.h", + "test/core/end2end/cq_verifier.h", + "test/core/iomgr/endpoint_tests.h", + "test/core/util/grpc_profiler.h", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", + "test/core/util/slice_splitter.h" + ] + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc" + ], + "headers": [ + "test/core/end2end/cq_verifier.h", + "test/core/iomgr/endpoint_tests.h", + "test/core/util/grpc_profiler.h", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", + "test/core/util/slice_splitter.h" + ], + "language": "c", + "name": "grpc_test_util_unsecure", + "src": [ + "test/core/end2end/cq_verifier.c", + "test/core/iomgr/endpoint_tests.c", + "test/core/util/grpc_profiler.c", + "test/core/util/parse_hexstring.c", + "test/core/util/port_posix.c", + "test/core/util/port_windows.c", + "test/core/util/slice_splitter.c", + "test/core/end2end/cq_verifier.h", + "test/core/iomgr/endpoint_tests.h", + "test/core/util/grpc_profiler.h", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", + "test/core/util/slice_splitter.h" + ] + }, + { + "deps": [ + "gpr" + ], + "headers": [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/status.h", + "include/grpc/census.h", + "src/core/census/grpc_context.h", + "src/core/channel/census_filter.h", + "src/core/channel/channel_args.h", + "src/core/channel/channel_stack.h", + "src/core/channel/child_channel.h", + "src/core/channel/client_channel.h", + "src/core/channel/client_setup.h", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", + "src/core/channel/http_client_filter.h", + "src/core/channel/http_server_filter.h", + "src/core/channel/noop_filter.h", + "src/core/compression/message_compress.h", + "src/core/debug/trace.h", + "src/core/iomgr/alarm.h", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", + "src/core/iomgr/fd_posix.h", + "src/core/iomgr/iocp_windows.h", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", + "src/core/iomgr/iomgr_posix.h", + "src/core/iomgr/pollset.h", + "src/core/iomgr/pollset_kick_posix.h", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", + "src/core/iomgr/pollset_set_posix.h", + "src/core/iomgr/pollset_set_windows.h", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", + "src/core/iomgr/socket_utils_posix.h", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", + "src/core/iomgr/tcp_windows.h", + "src/core/iomgr/time_averaged_stats.h", + "src/core/iomgr/wakeup_fd_pipe.h", + "src/core/iomgr/wakeup_fd_posix.h", + "src/core/json/json.h", + "src/core/json/json_common.h", + "src/core/json/json_reader.h", + "src/core/json/json_writer.h", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", + "src/core/surface/byte_buffer_queue.h", + "src/core/surface/call.h", + "src/core/surface/channel.h", + "src/core/surface/client.h", + "src/core/surface/completion_queue.h", + "src/core/surface/event_string.h", + "src/core/surface/init.h", + "src/core/surface/server.h", + "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.h", + "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.h", + "src/core/transport/metadata.h", + "src/core/transport/stream_op.h", + "src/core/transport/transport.h", + "src/core/transport/transport_impl.h", + "src/core/census/context.h" + ], + "language": "c", + "name": "grpc_unsecure", + "src": [ + "src/core/surface/init_unsecure.c", + "src/core/census/grpc_context.c", + "src/core/channel/channel_args.c", + "src/core/channel/channel_stack.c", + "src/core/channel/child_channel.c", + "src/core/channel/client_channel.c", + "src/core/channel/client_setup.c", + "src/core/channel/connected_channel.c", + "src/core/channel/http_client_filter.c", + "src/core/channel/http_server_filter.c", + "src/core/channel/noop_filter.c", + "src/core/compression/algorithm.c", + "src/core/compression/message_compress.c", + "src/core/debug/trace.c", + "src/core/iomgr/alarm.c", + "src/core/iomgr/alarm_heap.c", + "src/core/iomgr/endpoint.c", + "src/core/iomgr/endpoint_pair_posix.c", + "src/core/iomgr/endpoint_pair_windows.c", + "src/core/iomgr/fd_posix.c", + "src/core/iomgr/iocp_windows.c", + "src/core/iomgr/iomgr.c", + "src/core/iomgr/iomgr_posix.c", + "src/core/iomgr/iomgr_windows.c", + "src/core/iomgr/pollset_kick_posix.c", + "src/core/iomgr/pollset_multipoller_with_epoll.c", + "src/core/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/iomgr/pollset_posix.c", + "src/core/iomgr/pollset_set_posix.c", + "src/core/iomgr/pollset_set_windows.c", + "src/core/iomgr/pollset_windows.c", + "src/core/iomgr/resolve_address_posix.c", + "src/core/iomgr/resolve_address_windows.c", + "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/socket_utils_common_posix.c", + "src/core/iomgr/socket_utils_linux.c", + "src/core/iomgr/socket_utils_posix.c", + "src/core/iomgr/socket_windows.c", + "src/core/iomgr/tcp_client_posix.c", + "src/core/iomgr/tcp_client_windows.c", + "src/core/iomgr/tcp_posix.c", + "src/core/iomgr/tcp_server_posix.c", + "src/core/iomgr/tcp_server_windows.c", + "src/core/iomgr/tcp_windows.c", + "src/core/iomgr/time_averaged_stats.c", + "src/core/iomgr/wakeup_fd_eventfd.c", + "src/core/iomgr/wakeup_fd_nospecial.c", + "src/core/iomgr/wakeup_fd_pipe.c", + "src/core/iomgr/wakeup_fd_posix.c", + "src/core/json/json.c", + "src/core/json/json_reader.c", + "src/core/json/json_string.c", + "src/core/json/json_writer.c", + "src/core/profiling/basic_timers.c", + "src/core/profiling/stap_timers.c", + "src/core/surface/byte_buffer.c", + "src/core/surface/byte_buffer_queue.c", + "src/core/surface/byte_buffer_reader.c", + "src/core/surface/call.c", + "src/core/surface/call_details.c", + "src/core/surface/call_log_batch.c", + "src/core/surface/channel.c", + "src/core/surface/channel_create.c", + "src/core/surface/client.c", + "src/core/surface/completion_queue.c", + "src/core/surface/event_string.c", + "src/core/surface/init.c", + "src/core/surface/lame_client.c", + "src/core/surface/metadata_array.c", + "src/core/surface/server.c", + "src/core/surface/server_chttp2.c", + "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", + "src/core/transport/chttp2/alpn.c", + "src/core/transport/chttp2/bin_encoder.c", + "src/core/transport/chttp2/frame_data.c", + "src/core/transport/chttp2/frame_goaway.c", + "src/core/transport/chttp2/frame_ping.c", + "src/core/transport/chttp2/frame_rst_stream.c", + "src/core/transport/chttp2/frame_settings.c", + "src/core/transport/chttp2/frame_window_update.c", + "src/core/transport/chttp2/hpack_parser.c", + "src/core/transport/chttp2/hpack_table.c", + "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/status_conversion.c", + "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_map.c", + "src/core/transport/chttp2/timeout_encoding.c", + "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2_transport.c", + "src/core/transport/metadata.c", + "src/core/transport/stream_op.c", + "src/core/transport/transport.c", + "src/core/transport/transport_op_string.c", + "src/core/census/context.c", + "src/core/census/initialize.c", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/status.h", + "include/grpc/census.h", + "src/core/census/grpc_context.h", + "src/core/channel/census_filter.h", + "src/core/channel/channel_args.h", + "src/core/channel/channel_stack.h", + "src/core/channel/child_channel.h", + "src/core/channel/client_channel.h", + "src/core/channel/client_setup.h", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", + "src/core/channel/http_client_filter.h", + "src/core/channel/http_server_filter.h", + "src/core/channel/noop_filter.h", + "src/core/compression/message_compress.h", + "src/core/debug/trace.h", + "src/core/iomgr/alarm.h", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", + "src/core/iomgr/fd_posix.h", + "src/core/iomgr/iocp_windows.h", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", + "src/core/iomgr/iomgr_posix.h", + "src/core/iomgr/pollset.h", + "src/core/iomgr/pollset_kick_posix.h", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", + "src/core/iomgr/pollset_set_posix.h", + "src/core/iomgr/pollset_set_windows.h", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", + "src/core/iomgr/socket_utils_posix.h", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", + "src/core/iomgr/tcp_windows.h", + "src/core/iomgr/time_averaged_stats.h", + "src/core/iomgr/wakeup_fd_pipe.h", + "src/core/iomgr/wakeup_fd_posix.h", + "src/core/json/json.h", + "src/core/json/json_common.h", + "src/core/json/json_reader.h", + "src/core/json/json_writer.h", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", + "src/core/surface/byte_buffer_queue.h", + "src/core/surface/call.h", + "src/core/surface/channel.h", + "src/core/surface/client.h", + "src/core/surface/completion_queue.h", + "src/core/surface/event_string.h", + "src/core/surface/init.h", + "src/core/surface/server.h", + "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.h", + "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.h", + "src/core/transport/metadata.h", + "src/core/transport/stream_op.h", + "src/core/transport/transport.h", + "src/core/transport/transport_impl.h", + "src/core/census/context.h" + ] + }, + { + "deps": [ + "gpr", + "grpc" + ], + "headers": [ + "include/grpc++/async_generic_service.h", + "include/grpc++/async_unary_call.h", + "include/grpc++/byte_buffer.h", + "include/grpc++/channel_arguments.h", + "include/grpc++/channel_interface.h", + "include/grpc++/client_context.h", + "include/grpc++/completion_queue.h", + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", + "include/grpc++/create_channel.h", + "include/grpc++/credentials.h", + "include/grpc++/generic_stub.h", + "include/grpc++/impl/call.h", + "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/grpc_library.h", + "include/grpc++/impl/internal_stub.h", + "include/grpc++/impl/proto_utils.h", + "include/grpc++/impl/rpc_method.h", + "include/grpc++/impl/rpc_service_method.h", + "include/grpc++/impl/serialization_traits.h", + "include/grpc++/impl/service_type.h", + "include/grpc++/impl/sync.h", + "include/grpc++/impl/sync_cxx11.h", + "include/grpc++/impl/sync_no_cxx11.h", + "include/grpc++/impl/thd.h", + "include/grpc++/impl/thd_cxx11.h", + "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/server.h", + "include/grpc++/server_builder.h", + "include/grpc++/server_context.h", + "include/grpc++/server_credentials.h", + "include/grpc++/slice.h", + "include/grpc++/status.h", + "include/grpc++/status_code_enum.h", + "include/grpc++/stream.h", + "include/grpc++/thread_pool_interface.h", + "include/grpc++/time.h", + "src/cpp/client/secure_credentials.h", + "src/cpp/server/secure_server_credentials.h", + "src/cpp/client/channel.h", + "src/cpp/server/thread_pool.h" + ], + "language": "c++", + "name": "grpc++", + "src": [ + "src/cpp/client/secure_channel_arguments.cc", + "src/cpp/client/secure_credentials.cc", + "src/cpp/server/secure_server_credentials.cc", + "src/cpp/client/channel.cc", + "src/cpp/client/channel_arguments.cc", + "src/cpp/client/client_context.cc", + "src/cpp/client/create_channel.cc", + "src/cpp/client/credentials.cc", + "src/cpp/client/generic_stub.cc", + "src/cpp/client/insecure_credentials.cc", + "src/cpp/client/internal_stub.cc", + "src/cpp/common/call.cc", + "src/cpp/common/completion_queue.cc", + "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_utils.cc", + "src/cpp/server/async_generic_service.cc", + "src/cpp/server/create_default_thread_pool.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/server.cc", + "src/cpp/server/server_builder.cc", + "src/cpp/server/server_context.cc", + "src/cpp/server/server_credentials.cc", + "src/cpp/server/thread_pool.cc", + "src/cpp/util/byte_buffer.cc", + "src/cpp/util/slice.cc", + "src/cpp/util/status.cc", + "src/cpp/util/time.cc", + "include/grpc++/async_generic_service.h", + "include/grpc++/async_unary_call.h", + "include/grpc++/byte_buffer.h", + "include/grpc++/channel_arguments.h", + "include/grpc++/channel_interface.h", + "include/grpc++/client_context.h", + "include/grpc++/completion_queue.h", + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", + "include/grpc++/create_channel.h", + "include/grpc++/credentials.h", + "include/grpc++/generic_stub.h", + "include/grpc++/impl/call.h", + "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/grpc_library.h", + "include/grpc++/impl/internal_stub.h", + "include/grpc++/impl/proto_utils.h", + "include/grpc++/impl/rpc_method.h", + "include/grpc++/impl/rpc_service_method.h", + "include/grpc++/impl/serialization_traits.h", + "include/grpc++/impl/service_type.h", + "include/grpc++/impl/sync.h", + "include/grpc++/impl/sync_cxx11.h", + "include/grpc++/impl/sync_no_cxx11.h", + "include/grpc++/impl/thd.h", + "include/grpc++/impl/thd_cxx11.h", + "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/server.h", + "include/grpc++/server_builder.h", + "include/grpc++/server_context.h", + "include/grpc++/server_credentials.h", + "include/grpc++/slice.h", + "include/grpc++/status.h", + "include/grpc++/status_code_enum.h", + "include/grpc++/stream.h", + "include/grpc++/thread_pool_interface.h", + "include/grpc++/time.h", + "src/cpp/client/secure_credentials.h", + "src/cpp/server/secure_server_credentials.h", + "src/cpp/client/channel.h", + "src/cpp/server/thread_pool.h" + ] + }, + { + "deps": [], + "headers": [ + "test/cpp/util/test_config.h" + ], + "language": "c++", + "name": "grpc++_test_config", + "src": [ + "test/cpp/util/test_config.cc", + "test/cpp/util/test_config.h" + ] + }, + { + "deps": [ + "grpc++", + "grpc_test_util" + ], + "headers": [ + "test/cpp/util/cli_call.h", + "test/cpp/util/create_test_channel.h", + "test/cpp/util/fake_credentials.h", + "test/cpp/util/subprocess.h", + "test/cpp/util/messages.grpc.pb.h", + "test/cpp/util/messages.pb.h", + "test/cpp/util/echo.grpc.pb.h", + "test/cpp/util/echo.pb.h", + "test/cpp/util/echo_duplicate.grpc.pb.h", + "test/cpp/util/echo_duplicate.pb.h" + ], + "language": "c++", + "name": "grpc++_test_util", + "src": [ + "test/cpp/util/cli_call.cc", + "test/cpp/util/create_test_channel.cc", + "test/cpp/util/fake_credentials.cc", + "test/cpp/util/subprocess.cc", + "test/cpp/util/cli_call.h", + "test/cpp/util/create_test_channel.h", + "test/cpp/util/fake_credentials.h", + "test/cpp/util/subprocess.h" + ] + }, + { + "deps": [ + "gpr", + "grpc_unsecure" + ], + "headers": [ + "include/grpc++/async_generic_service.h", + "include/grpc++/async_unary_call.h", + "include/grpc++/byte_buffer.h", + "include/grpc++/channel_arguments.h", + "include/grpc++/channel_interface.h", + "include/grpc++/client_context.h", + "include/grpc++/completion_queue.h", + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", + "include/grpc++/create_channel.h", + "include/grpc++/credentials.h", + "include/grpc++/generic_stub.h", + "include/grpc++/impl/call.h", + "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/grpc_library.h", + "include/grpc++/impl/internal_stub.h", + "include/grpc++/impl/proto_utils.h", + "include/grpc++/impl/rpc_method.h", + "include/grpc++/impl/rpc_service_method.h", + "include/grpc++/impl/serialization_traits.h", + "include/grpc++/impl/service_type.h", + "include/grpc++/impl/sync.h", + "include/grpc++/impl/sync_cxx11.h", + "include/grpc++/impl/sync_no_cxx11.h", + "include/grpc++/impl/thd.h", + "include/grpc++/impl/thd_cxx11.h", + "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/server.h", + "include/grpc++/server_builder.h", + "include/grpc++/server_context.h", + "include/grpc++/server_credentials.h", + "include/grpc++/slice.h", + "include/grpc++/status.h", + "include/grpc++/status_code_enum.h", + "include/grpc++/stream.h", + "include/grpc++/thread_pool_interface.h", + "include/grpc++/time.h", + "src/cpp/client/channel.h", + "src/cpp/server/thread_pool.h" + ], + "language": "c++", + "name": "grpc++_unsecure", + "src": [ + "src/cpp/client/channel.cc", + "src/cpp/client/channel_arguments.cc", + "src/cpp/client/client_context.cc", + "src/cpp/client/create_channel.cc", + "src/cpp/client/credentials.cc", + "src/cpp/client/generic_stub.cc", + "src/cpp/client/insecure_credentials.cc", + "src/cpp/client/internal_stub.cc", + "src/cpp/common/call.cc", + "src/cpp/common/completion_queue.cc", + "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_utils.cc", + "src/cpp/server/async_generic_service.cc", + "src/cpp/server/create_default_thread_pool.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/server.cc", + "src/cpp/server/server_builder.cc", + "src/cpp/server/server_context.cc", + "src/cpp/server/server_credentials.cc", + "src/cpp/server/thread_pool.cc", + "src/cpp/util/byte_buffer.cc", + "src/cpp/util/slice.cc", + "src/cpp/util/status.cc", + "src/cpp/util/time.cc", + "include/grpc++/async_generic_service.h", + "include/grpc++/async_unary_call.h", + "include/grpc++/byte_buffer.h", + "include/grpc++/channel_arguments.h", + "include/grpc++/channel_interface.h", + "include/grpc++/client_context.h", + "include/grpc++/completion_queue.h", + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", + "include/grpc++/create_channel.h", + "include/grpc++/credentials.h", + "include/grpc++/generic_stub.h", + "include/grpc++/impl/call.h", + "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/grpc_library.h", + "include/grpc++/impl/internal_stub.h", + "include/grpc++/impl/proto_utils.h", + "include/grpc++/impl/rpc_method.h", + "include/grpc++/impl/rpc_service_method.h", + "include/grpc++/impl/serialization_traits.h", + "include/grpc++/impl/service_type.h", + "include/grpc++/impl/sync.h", + "include/grpc++/impl/sync_cxx11.h", + "include/grpc++/impl/sync_no_cxx11.h", + "include/grpc++/impl/thd.h", + "include/grpc++/impl/thd_cxx11.h", + "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/server.h", + "include/grpc++/server_builder.h", + "include/grpc++/server_context.h", + "include/grpc++/server_credentials.h", + "include/grpc++/slice.h", + "include/grpc++/status.h", + "include/grpc++/status_code_enum.h", + "include/grpc++/stream.h", + "include/grpc++/thread_pool_interface.h", + "include/grpc++/time.h", + "src/cpp/client/channel.h", + "src/cpp/server/thread_pool.h" + ] + }, + { + "deps": [], + "headers": [ + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", + "src/compiler/config.h", + "src/compiler/cpp_generator.h", + "src/compiler/cpp_generator_helpers.h", + "src/compiler/csharp_generator.h", + "src/compiler/csharp_generator_helpers.h", + "src/compiler/generator_helpers.h", + "src/compiler/objective_c_generator.h", + "src/compiler/objective_c_generator_helpers.h", + "src/compiler/python_generator.h", + "src/compiler/ruby_generator.h", + "src/compiler/ruby_generator_helpers-inl.h", + "src/compiler/ruby_generator_map-inl.h", + "src/compiler/ruby_generator_string-inl.h" + ], + "language": "c++", + "name": "grpc_plugin_support", + "src": [ + "src/compiler/cpp_generator.cc", + "src/compiler/csharp_generator.cc", + "src/compiler/objective_c_generator.cc", + "src/compiler/python_generator.cc", + "src/compiler/ruby_generator.cc", + "include/grpc++/config.h", + "include/grpc++/config_protobuf.h", + "src/compiler/config.h", + "src/compiler/cpp_generator.h", + "src/compiler/cpp_generator_helpers.h", + "src/compiler/csharp_generator.h", + "src/compiler/csharp_generator_helpers.h", + "src/compiler/generator_helpers.h", + "src/compiler/objective_c_generator.h", + "src/compiler/objective_c_generator_helpers.h", + "src/compiler/python_generator.h", + "src/compiler/ruby_generator.h", + "src/compiler/ruby_generator_helpers-inl.h", + "src/compiler/ruby_generator_map-inl.h", + "src/compiler/ruby_generator_string-inl.h" + ] + }, + { + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr" + ], + "headers": [ + "test/cpp/interop/client_helper.h" + ], + "language": "c++", + "name": "interop_client_helper", + "src": [ + "test/cpp/interop/client_helper.cc", + "test/cpp/interop/client_helper.h" + ] + }, + { + "deps": [ + "interop_client_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [ + "test/cpp/interop/interop_client.h", + "test/proto/empty.grpc.pb.h", + "test/proto/empty.pb.h", + "test/proto/messages.grpc.pb.h", + "test/proto/messages.pb.h", + "test/proto/test.grpc.pb.h", + "test/proto/test.pb.h" + ], + "language": "c++", + "name": "interop_client_main", + "src": [ + "test/cpp/interop/client.cc", + "test/cpp/interop/interop_client.cc", + "test/cpp/interop/interop_client.h" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr" + ], + "headers": [ + "test/cpp/interop/server_helper.h" + ], + "language": "c++", + "name": "interop_server_helper", + "src": [ + "test/cpp/interop/server_helper.cc", + "test/cpp/interop/server_helper.h" + ] + }, + { + "deps": [ + "interop_server_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "headers": [ + "test/proto/empty.grpc.pb.h", + "test/proto/empty.pb.h", + "test/proto/messages.grpc.pb.h", + "test/proto/messages.pb.h", + "test/proto/test.grpc.pb.h", + "test/proto/test.pb.h" + ], + "language": "c++", + "name": "interop_server_main", + "src": [ + "test/cpp/interop/server.cc" + ] + }, + { + "deps": [ + "grpc++", + "grpc", + "gpr" + ], + "headers": [ + "examples/pubsub/publisher.h", + "examples/pubsub/subscriber.h", + "examples/pubsub/label.grpc.pb.h", + "examples/pubsub/label.pb.h", + "examples/pubsub/empty.grpc.pb.h", + "examples/pubsub/empty.pb.h", + "examples/pubsub/pubsub.grpc.pb.h", + "examples/pubsub/pubsub.pb.h" + ], + "language": "c++", + "name": "pubsub_client_lib", + "src": [ + "examples/pubsub/publisher.cc", + "examples/pubsub/subscriber.cc", + "examples/pubsub/publisher.h", + "examples/pubsub/subscriber.h" + ] + }, + { + "deps": [ + "grpc_test_util", + "grpc++_test_util", + "grpc++" + ], + "headers": [ + "test/cpp/qps/client.h", + "test/cpp/qps/driver.h", + "test/cpp/qps/histogram.h", + "test/cpp/qps/interarrival.h", + "test/cpp/qps/qps_worker.h", + "test/cpp/qps/report.h", + "test/cpp/qps/server.h", + "test/cpp/qps/stats.h", + "test/cpp/qps/timer.h", + "test/cpp/util/benchmark_config.h", + "test/cpp/qps/qpstest.grpc.pb.h", + "test/cpp/qps/qpstest.pb.h" + ], + "language": "c++", + "name": "qps", + "src": [ + "test/cpp/qps/client_async.cc", + "test/cpp/qps/client_sync.cc", + "test/cpp/qps/driver.cc", + "test/cpp/qps/qps_worker.cc", + "test/cpp/qps/report.cc", + "test/cpp/qps/server_async.cc", + "test/cpp/qps/server_sync.cc", + "test/cpp/qps/timer.cc", + "test/cpp/util/benchmark_config.cc", + "test/cpp/qps/client.h", + "test/cpp/qps/driver.h", + "test/cpp/qps/histogram.h", + "test/cpp/qps/interarrival.h", + "test/cpp/qps/qps_worker.h", + "test/cpp/qps/report.h", + "test/cpp/qps/server.h", + "test/cpp/qps/stats.h", + "test/cpp/qps/timer.h", + "test/cpp/util/benchmark_config.h" + ] + }, + { + "deps": [ + "gpr", + "grpc" + ], + "headers": [], + "language": "csharp", + "name": "grpc_csharp_ext", + "src": [ + "src/csharp/ext/grpc_csharp_ext.c" + ] + }, + { + "deps": [ + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_fake_security", + "src": [ + "test/core/end2end/fixtures/chttp2_fake_security.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_fullstack", + "src": [ + "test/core/end2end/fixtures/chttp2_fullstack.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_fullstack_uds_posix", + "src": [ + "test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_fullstack_with_poll", + "src": [ + "test/core/end2end/fixtures/chttp2_fullstack_with_poll.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_simple_ssl_fullstack", + "src": [ + "test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", + "src": [ + "test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_poll.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", + "src": [ + "test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_socket_pair", + "src": [ + "test/core/end2end/fixtures/chttp2_socket_pair.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", + "src": [ + "test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_fixture_chttp2_socket_pair_with_grpc_trace", + "src": [ + "test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_bad_hostname", + "src": [ + "test/core/end2end/tests/bad_hostname.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_cancel_after_accept", + "src": [ + "test/core/end2end/tests/cancel_after_accept.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_cancel_after_accept_and_writes_closed", + "src": [ + "test/core/end2end/tests/cancel_after_accept_and_writes_closed.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_cancel_after_invoke", + "src": [ + "test/core/end2end/tests/cancel_after_invoke.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_cancel_before_invoke", + "src": [ + "test/core/end2end/tests/cancel_before_invoke.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_cancel_in_a_vacuum", + "src": [ + "test/core/end2end/tests/cancel_in_a_vacuum.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_census_simple_request", + "src": [ + "test/core/end2end/tests/census_simple_request.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_disappearing_server", + "src": [ + "test/core/end2end/tests/disappearing_server.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_early_server_shutdown_finishes_inflight_calls", + "src": [ + "test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_early_server_shutdown_finishes_tags", + "src": [ + "test/core/end2end/tests/early_server_shutdown_finishes_tags.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_empty_batch", + "src": [ + "test/core/end2end/tests/empty_batch.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_graceful_server_shutdown", + "src": [ + "test/core/end2end/tests/graceful_server_shutdown.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_invoke_large_request", + "src": [ + "test/core/end2end/tests/invoke_large_request.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_max_concurrent_streams", + "src": [ + "test/core/end2end/tests/max_concurrent_streams.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_max_message_length", + "src": [ + "test/core/end2end/tests/max_message_length.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_no_op", + "src": [ + "test/core/end2end/tests/no_op.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_ping_pong_streaming", + "src": [ + "test/core/end2end/tests/ping_pong_streaming.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_registered_call", + "src": [ + "test/core/end2end/tests/registered_call.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_response_with_binary_metadata_and_payload", + "src": [ + "test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_response_with_metadata_and_payload", + "src": [ + "test/core/end2end/tests/request_response_with_metadata_and_payload.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_response_with_payload", + "src": [ + "test/core/end2end/tests/request_response_with_payload.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "end2end_certs", + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_response_with_payload_and_call_creds", + "src": [ + "test/core/end2end/tests/request_response_with_payload_and_call_creds.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_response_with_trailing_metadata_and_payload", + "src": [ + "test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_with_flags", + "src": [ + "test/core/end2end/tests/request_with_flags.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_with_large_metadata", + "src": [ + "test/core/end2end/tests/request_with_large_metadata.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_request_with_payload", + "src": [ + "test/core/end2end/tests/request_with_payload.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_server_finishes_request", + "src": [ + "test/core/end2end/tests/server_finishes_request.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_simple_delayed_request", + "src": [ + "test/core/end2end/tests/simple_delayed_request.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_simple_request", + "src": [ + "test/core/end2end/tests/simple_request.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ], + "language": "c", + "name": "end2end_test_simple_request_with_high_initial_sequence_number", + "src": [ + "test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/end2end_tests.h" + ] + }, + { + "deps": [], + "headers": [], + "language": "c", + "name": "end2end_certs", + "src": [ + "test/core/end2end/data/test_root_cert.c", + "test/core/end2end/data/server1_cert.c", + "test/core/end2end/data/server1_key.c" + ] + }, + { + "deps": [ + "grpc_test_util_unsecure", + "grpc_unsecure", + "gpr_test_util", + "gpr" + ], + "headers": [ + "test/core/bad_client/bad_client.h" + ], + "language": "c", + "name": "bad_client_test", + "src": [ + "test/core/bad_client/bad_client.c", + "test/core/bad_client/bad_client.h" + ] + } +] diff --git a/vsprojects/grpc++/grpc++.vcxproj b/vsprojects/grpc++/grpc++.vcxproj index e7afd991899..f69d50ffb8e 100644 --- a/vsprojects/grpc++/grpc++.vcxproj +++ b/vsprojects/grpc++/grpc++.vcxproj @@ -191,6 +191,8 @@ + + diff --git a/vsprojects/grpc++/grpc++.vcxproj.filters b/vsprojects/grpc++/grpc++.vcxproj.filters index fb0bcab09dd..aa4b50e33f4 100644 --- a/vsprojects/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/grpc++/grpc++.vcxproj.filters @@ -1,6 +1,9 @@ + + src\cpp\client + src\cpp\client diff --git a/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj index c0188e56e70..4f0e4a6e1d4 100644 --- a/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -146,6 +146,8 @@ + + diff --git a/vsprojects/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/grpc_test_util/grpc_test_util.vcxproj index e5288f4d447..f250d0a632b 100644 --- a/vsprojects/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/grpc_test_util/grpc_test_util.vcxproj @@ -145,6 +145,15 @@ true + + + + + + + + + From 224b04f6ef68549a7461e048fb2614974d69ee70 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Jun 2015 07:11:18 -0700 Subject: [PATCH 76/97] Make this more robust against merges --- .../sources_and_headers.json.template | 12 +- tools/run_tests/sources_and_headers.json | 5484 ++++++++--------- 2 files changed, 2751 insertions(+), 2745 deletions(-) diff --git a/templates/tools/run_tests/sources_and_headers.json.template b/templates/tools/run_tests/sources_and_headers.json.template index 01918d0a3d3..1c0e04283aa 100644 --- a/templates/tools/run_tests/sources_and_headers.json.template +++ b/templates/tools/run_tests/sources_and_headers.json.template @@ -20,8 +20,14 @@ def no_protos(src): ${json.dumps([{"name": tgt.name, "language": tgt.language, - "src": no_protos(tgt.src) + tgt.get('public_headers', []) + tgt.get('headers', []), - "headers": tgt.get('public_headers', []) + tgt.get('headers', []) + proto_headers(tgt.src), - "deps": tgt.get('deps', [])} + "src": sorted( + no_protos(tgt.src) + + tgt.get('public_headers', []) + + tgt.get('headers', [])), + "headers": sorted( + tgt.get('public_headers', []) + + tgt.get('headers', []) + + proto_headers(tgt.src)), + "deps": sorted(tgt.get('deps', []))} for tgt in (targets + libs)], sort_keys=True, indent=2)} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 4092759b2d8..5c74bf1eea3 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3,10 +3,10 @@ [ { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -17,10 +17,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -31,10 +31,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -45,10 +45,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -59,10 +59,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -73,10 +73,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -87,10 +87,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -101,10 +101,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -115,10 +115,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -129,10 +129,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -143,10 +143,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -157,10 +157,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -171,10 +171,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -185,10 +185,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -211,8 +211,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -223,8 +223,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -235,8 +235,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -247,8 +247,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -259,8 +259,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -271,8 +271,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -283,8 +283,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -295,8 +295,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -307,8 +307,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -319,8 +319,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -331,8 +331,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -343,8 +343,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -355,8 +355,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -367,8 +367,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -379,8 +379,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -391,10 +391,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -405,10 +405,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -419,10 +419,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -433,10 +433,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -447,10 +447,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -461,10 +461,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -475,10 +475,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -489,10 +489,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -503,10 +503,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -517,10 +517,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -531,10 +531,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -545,10 +545,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -559,10 +559,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -573,10 +573,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -587,10 +587,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -601,10 +601,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -615,10 +615,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -629,8 +629,8 @@ }, { "deps": [ - "grpc", - "gpr" + "gpr", + "grpc" ], "headers": [], "language": "c", @@ -641,10 +641,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -655,10 +655,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -669,10 +669,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -683,10 +683,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -697,10 +697,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -711,10 +711,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -725,8 +725,8 @@ }, { "deps": [ - "gpr_test_util", - "gpr" + "gpr", + "gpr_test_util" ], "headers": [], "language": "c", @@ -737,10 +737,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -751,10 +751,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -765,10 +765,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -779,10 +779,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -793,10 +793,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -807,10 +807,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -821,10 +821,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -835,10 +835,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -849,10 +849,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -863,10 +863,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -877,10 +877,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -891,10 +891,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -905,10 +905,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -919,10 +919,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -933,12 +933,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -949,13 +949,13 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" + "qps" ], "headers": [], "language": "c++", @@ -966,13 +966,13 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" + "qps" ], "headers": [], "language": "c++", @@ -983,9 +983,9 @@ }, { "deps": [ - "grpc++", + "gpr", "grpc", - "gpr" + "grpc++" ], "headers": [], "language": "c++", @@ -996,12 +996,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1012,12 +1012,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1028,12 +1028,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1044,9 +1044,9 @@ }, { "deps": [ - "grpc++", + "gpr", "grpc", - "gpr" + "grpc++" ], "headers": [], "language": "c++", @@ -1057,11 +1057,11 @@ }, { "deps": [ - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1072,11 +1072,11 @@ }, { "deps": [ - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1087,11 +1087,11 @@ }, { "deps": [ - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1102,12 +1102,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1118,12 +1118,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1134,13 +1134,13 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", "gpr", - "grpc++_test_config" + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1206,15 +1206,15 @@ }, { "deps": [ - "interop_client_main", - "interop_client_helper", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "interop_client_helper", + "interop_client_main" ], "headers": [], "language": "c++", @@ -1223,15 +1223,15 @@ }, { "deps": [ - "interop_server_main", - "interop_server_helper", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "interop_server_helper", + "interop_server_main" ], "headers": [], "language": "c++", @@ -1240,10 +1240,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1254,12 +1254,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1270,13 +1270,13 @@ }, { "deps": [ - "pubsub_client_lib", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", "gpr", - "grpc++_test_config" + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", + "grpc_test_util", + "pubsub_client_lib" ], "headers": [], "language": "c++", @@ -1287,13 +1287,13 @@ }, { "deps": [ - "pubsub_client_lib", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" + "pubsub_client_lib" ], "headers": [], "language": "c++", @@ -1304,13 +1304,13 @@ }, { "deps": [ - "pubsub_client_lib", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" + "pubsub_client_lib" ], "headers": [], "language": "c++", @@ -1321,14 +1321,14 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "qps" ], "headers": [], "language": "c++", @@ -1339,13 +1339,13 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" + "qps" ], "headers": [], "language": "c++", @@ -1356,14 +1356,14 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "qps" ], "headers": [], "language": "c++", @@ -1374,14 +1374,14 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "qps" ], "headers": [], "language": "c++", @@ -1392,14 +1392,14 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "qps" ], "headers": [ "test/cpp/qps/client.h", @@ -1408,19 +1408,19 @@ "language": "c++", "name": "qps_worker", "src": [ - "test/cpp/qps/worker.cc", "test/cpp/qps/client.h", - "test/cpp/qps/server.h" + "test/cpp/qps/server.h", + "test/cpp/qps/worker.cc" ] }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1431,12 +1431,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1447,11 +1447,11 @@ }, { "deps": [ - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1462,13 +1462,13 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" + "qps" ], "headers": [], "language": "c++", @@ -1479,13 +1479,13 @@ }, { "deps": [ - "qps", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" + "qps" ], "headers": [], "language": "c++", @@ -1496,11 +1496,11 @@ }, { "deps": [ - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1511,12 +1511,12 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [], "language": "c++", @@ -1527,13 +1527,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1542,13 +1542,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1557,13 +1557,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1572,13 +1572,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1587,13 +1587,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1602,13 +1602,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1617,13 +1617,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1632,13 +1632,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1647,13 +1647,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1662,13 +1662,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1677,13 +1677,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1692,13 +1692,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1707,13 +1707,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1722,13 +1722,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1737,13 +1737,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1752,13 +1752,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1767,13 +1767,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1782,13 +1782,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1797,13 +1797,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1812,13 +1812,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1827,13 +1827,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1842,13 +1842,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1857,13 +1857,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1872,13 +1872,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1887,13 +1887,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1902,13 +1902,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1917,13 +1917,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1932,13 +1932,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1947,13 +1947,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1962,13 +1962,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fake_security", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1977,13 +1977,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -1992,13 +1992,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2007,13 +2007,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2022,13 +2022,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2037,13 +2037,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2052,13 +2052,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2067,13 +2067,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2082,13 +2082,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2097,13 +2097,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2112,13 +2112,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2127,13 +2127,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2142,13 +2142,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2157,13 +2157,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2172,13 +2172,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2187,13 +2187,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2202,13 +2202,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2217,13 +2217,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2232,13 +2232,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2247,13 +2247,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2262,13 +2262,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2277,13 +2277,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2292,13 +2292,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2307,13 +2307,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2322,13 +2322,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2337,13 +2337,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2352,13 +2352,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2367,13 +2367,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2382,13 +2382,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2397,13 +2397,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2412,13 +2412,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2427,13 +2427,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2442,13 +2442,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2457,13 +2457,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2472,13 +2472,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2487,13 +2487,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2502,13 +2502,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2517,13 +2517,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2532,13 +2532,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2547,13 +2547,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2562,13 +2562,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2577,13 +2577,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2592,13 +2592,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2607,13 +2607,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2622,13 +2622,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2637,13 +2637,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2652,13 +2652,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2667,13 +2667,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2682,13 +2682,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2697,13 +2697,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2712,13 +2712,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2727,13 +2727,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2742,13 +2742,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2757,13 +2757,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2772,13 +2772,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2787,13 +2787,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2802,13 +2802,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2817,13 +2817,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2832,13 +2832,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2847,13 +2847,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2862,13 +2862,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2877,13 +2877,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2892,13 +2892,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2907,13 +2907,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2922,13 +2922,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2937,13 +2937,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2952,13 +2952,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2967,13 +2967,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2982,13 +2982,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -2997,13 +2997,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3012,13 +3012,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3027,13 +3027,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3042,13 +3042,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3057,13 +3057,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3072,13 +3072,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3087,13 +3087,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3102,13 +3102,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3117,13 +3117,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3132,13 +3132,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3147,13 +3147,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3162,13 +3162,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3177,13 +3177,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3192,13 +3192,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3207,13 +3207,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3222,13 +3222,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3237,13 +3237,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3252,13 +3252,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3267,13 +3267,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3282,13 +3282,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3297,13 +3297,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3312,13 +3312,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3327,13 +3327,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3342,13 +3342,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3357,13 +3357,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3372,13 +3372,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3387,13 +3387,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3402,13 +3402,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3417,13 +3417,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3432,13 +3432,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3447,13 +3447,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3462,13 +3462,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3477,13 +3477,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3492,13 +3492,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3507,13 +3507,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3522,13 +3522,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3537,13 +3537,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3552,13 +3552,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3567,13 +3567,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3582,13 +3582,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3597,13 +3597,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3612,13 +3612,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3627,13 +3627,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3642,13 +3642,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3657,13 +3657,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3672,13 +3672,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3687,13 +3687,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3702,13 +3702,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3717,13 +3717,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3732,13 +3732,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3747,13 +3747,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3762,13 +3762,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3777,13 +3777,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3792,13 +3792,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3807,13 +3807,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3822,13 +3822,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3837,13 +3837,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3852,13 +3852,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3867,13 +3867,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3882,13 +3882,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3897,13 +3897,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3912,13 +3912,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3927,13 +3927,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3942,13 +3942,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3957,13 +3957,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3972,13 +3972,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -3987,13 +3987,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4002,13 +4002,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4017,13 +4017,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4032,13 +4032,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4047,13 +4047,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4062,13 +4062,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4077,13 +4077,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4092,13 +4092,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4107,13 +4107,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4122,13 +4122,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4137,13 +4137,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4152,13 +4152,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4167,13 +4167,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4182,13 +4182,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4197,13 +4197,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4212,13 +4212,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4227,13 +4227,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4242,13 +4242,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4257,13 +4257,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4272,13 +4272,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4287,13 +4287,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4302,13 +4302,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4317,13 +4317,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4332,13 +4332,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4347,13 +4347,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4362,13 +4362,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4377,13 +4377,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4392,13 +4392,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4407,13 +4407,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4422,13 +4422,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4437,13 +4437,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4452,13 +4452,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4467,13 +4467,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4482,13 +4482,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4497,13 +4497,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4512,13 +4512,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4527,13 +4527,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4542,13 +4542,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4557,13 +4557,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4572,13 +4572,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4587,13 +4587,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4602,13 +4602,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4617,13 +4617,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4632,13 +4632,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4647,13 +4647,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4662,13 +4662,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4677,13 +4677,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4692,13 +4692,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4707,13 +4707,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4722,13 +4722,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4737,13 +4737,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4752,13 +4752,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4767,13 +4767,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4782,13 +4782,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4797,13 +4797,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4812,13 +4812,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4827,13 +4827,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4842,13 +4842,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4857,13 +4857,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4872,13 +4872,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4887,13 +4887,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4902,13 +4902,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4917,13 +4917,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4932,13 +4932,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4947,13 +4947,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4962,13 +4962,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4977,13 +4977,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -4992,13 +4992,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5007,13 +5007,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5022,13 +5022,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5037,13 +5037,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5052,13 +5052,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5067,13 +5067,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5082,13 +5082,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5097,13 +5097,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5112,13 +5112,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5127,13 +5127,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5142,13 +5142,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5157,13 +5157,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5172,13 +5172,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5187,13 +5187,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5202,13 +5202,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5217,13 +5217,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5232,13 +5232,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5247,13 +5247,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5262,13 +5262,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5277,13 +5277,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5292,13 +5292,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5307,13 +5307,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5322,13 +5322,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5337,13 +5337,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5352,13 +5352,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5367,13 +5367,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5382,13 +5382,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5397,13 +5397,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5412,13 +5412,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5427,13 +5427,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5442,13 +5442,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5457,13 +5457,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5472,13 +5472,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5487,13 +5487,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5502,13 +5502,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5517,13 +5517,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5532,13 +5532,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5547,13 +5547,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5562,13 +5562,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5577,13 +5577,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_bad_hostname", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5592,13 +5592,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_after_accept", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5607,13 +5607,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_after_accept_and_writes_closed", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5622,13 +5622,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_after_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5637,13 +5637,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_before_invoke", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5652,13 +5652,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_in_a_vacuum", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5667,13 +5667,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_census_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5682,13 +5682,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_disappearing_server", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5697,13 +5697,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5712,13 +5712,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_early_server_shutdown_finishes_tags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5727,13 +5727,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_empty_batch", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5742,13 +5742,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_graceful_server_shutdown", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5757,13 +5757,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_invoke_large_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5772,13 +5772,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_max_concurrent_streams", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5787,13 +5787,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_max_message_length", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5802,13 +5802,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_no_op", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5817,13 +5817,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_ping_pong_streaming", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5832,13 +5832,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_registered_call", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5847,13 +5847,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_binary_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5862,13 +5862,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5877,13 +5877,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5892,13 +5892,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_payload_and_call_creds", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5907,13 +5907,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_trailing_metadata_and_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5922,13 +5922,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_with_flags", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5937,13 +5937,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_with_large_metadata", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5952,13 +5952,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_with_payload", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5967,13 +5967,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_server_finishes_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5982,13 +5982,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_simple_delayed_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -5997,13 +5997,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_simple_request", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -6012,13 +6012,13 @@ }, { "deps": [ + "end2end_certs", "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_simple_request_with_high_initial_sequence_number", - "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [], "language": "c", @@ -6029,10 +6029,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_bad_hostname", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6043,10 +6043,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_after_accept", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6057,10 +6057,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_after_accept_and_writes_closed", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6071,10 +6071,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_after_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6085,10 +6085,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_before_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6099,10 +6099,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_cancel_in_a_vacuum", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6113,10 +6113,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_census_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6127,10 +6127,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_disappearing_server", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6141,10 +6141,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6155,10 +6155,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_early_server_shutdown_finishes_tags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6169,10 +6169,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_empty_batch", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6183,10 +6183,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_graceful_server_shutdown", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6197,10 +6197,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_invoke_large_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6211,10 +6211,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_max_concurrent_streams", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6225,10 +6225,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_max_message_length", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6239,10 +6239,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_no_op", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6253,10 +6253,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_ping_pong_streaming", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6267,10 +6267,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_registered_call", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6281,10 +6281,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_binary_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6295,10 +6295,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6309,10 +6309,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6323,10 +6323,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_request_response_with_trailing_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6337,10 +6337,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_request_with_flags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6351,10 +6351,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_request_with_large_metadata", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6365,10 +6365,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_request_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6379,10 +6379,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_server_finishes_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6393,10 +6393,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_simple_delayed_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6407,10 +6407,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6421,10 +6421,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack", "end2end_test_simple_request_with_high_initial_sequence_number", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6435,10 +6435,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_bad_hostname", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6449,10 +6449,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_after_accept", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6463,10 +6463,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_after_accept_and_writes_closed", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6477,10 +6477,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_after_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6491,10 +6491,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_before_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6505,10 +6505,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_cancel_in_a_vacuum", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6519,10 +6519,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_census_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6533,10 +6533,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_disappearing_server", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6547,10 +6547,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6561,10 +6561,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_early_server_shutdown_finishes_tags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6575,10 +6575,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_empty_batch", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6589,10 +6589,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_graceful_server_shutdown", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6603,10 +6603,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_invoke_large_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6617,10 +6617,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_max_concurrent_streams", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6631,10 +6631,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_max_message_length", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6645,10 +6645,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_no_op", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6659,10 +6659,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_ping_pong_streaming", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6673,10 +6673,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_registered_call", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6687,10 +6687,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_binary_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6701,10 +6701,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6715,10 +6715,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6729,10 +6729,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_response_with_trailing_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6743,10 +6743,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_with_flags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6757,10 +6757,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_with_large_metadata", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6771,10 +6771,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_request_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6785,10 +6785,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_server_finishes_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6799,10 +6799,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_simple_delayed_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6813,10 +6813,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6827,10 +6827,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_uds_posix", "end2end_test_simple_request_with_high_initial_sequence_number", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6841,10 +6841,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_bad_hostname", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6855,10 +6855,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_after_accept", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6869,10 +6869,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_after_accept_and_writes_closed", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6883,10 +6883,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_after_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6897,10 +6897,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_before_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6911,10 +6911,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_cancel_in_a_vacuum", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6925,10 +6925,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_census_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6939,10 +6939,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_disappearing_server", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6953,10 +6953,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6967,10 +6967,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_early_server_shutdown_finishes_tags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6981,10 +6981,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_empty_batch", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -6995,10 +6995,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_graceful_server_shutdown", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7009,10 +7009,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_invoke_large_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7023,10 +7023,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_max_concurrent_streams", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7037,10 +7037,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_max_message_length", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7051,10 +7051,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_no_op", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7065,10 +7065,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_ping_pong_streaming", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7079,10 +7079,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_registered_call", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7093,10 +7093,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_binary_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7107,10 +7107,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7121,10 +7121,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7135,10 +7135,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_response_with_trailing_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7149,10 +7149,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_with_flags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7163,10 +7163,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_with_large_metadata", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7177,10 +7177,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_request_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7191,10 +7191,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_server_finishes_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7205,10 +7205,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_simple_delayed_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7219,10 +7219,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7233,10 +7233,10 @@ "deps": [ "end2end_fixture_chttp2_fullstack_with_poll", "end2end_test_simple_request_with_high_initial_sequence_number", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7247,10 +7247,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_bad_hostname", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7261,10 +7261,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_after_accept", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7275,10 +7275,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_after_accept_and_writes_closed", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7289,10 +7289,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_after_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7303,10 +7303,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_before_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7317,10 +7317,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_cancel_in_a_vacuum", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7331,10 +7331,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_census_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7345,10 +7345,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_disappearing_server", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7359,10 +7359,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7373,10 +7373,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_early_server_shutdown_finishes_tags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7387,10 +7387,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_empty_batch", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7401,10 +7401,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_graceful_server_shutdown", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7415,10 +7415,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_invoke_large_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7429,10 +7429,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_max_concurrent_streams", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7443,10 +7443,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_max_message_length", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7457,10 +7457,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_no_op", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7471,10 +7471,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_ping_pong_streaming", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7485,10 +7485,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_registered_call", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7499,10 +7499,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_binary_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7513,10 +7513,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7527,10 +7527,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7541,11 +7541,11 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_request_response_with_trailing_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" - ], + "grpc_test_util_unsecure", + "grpc_unsecure" + ], "headers": [], "language": "c", "name": "chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_unsecure_test", @@ -7555,10 +7555,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_request_with_flags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7569,10 +7569,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_request_with_large_metadata", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7583,10 +7583,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_request_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7597,10 +7597,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_server_finishes_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7611,10 +7611,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_simple_delayed_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7625,10 +7625,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7639,10 +7639,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair", "end2end_test_simple_request_with_high_initial_sequence_number", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7653,10 +7653,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_bad_hostname", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7667,10 +7667,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_after_accept", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7681,10 +7681,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_after_accept_and_writes_closed", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7695,10 +7695,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_after_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7709,10 +7709,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_before_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7723,10 +7723,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_cancel_in_a_vacuum", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7737,10 +7737,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_census_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7751,10 +7751,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_disappearing_server", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7765,10 +7765,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7779,10 +7779,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_early_server_shutdown_finishes_tags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7793,10 +7793,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_empty_batch", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7807,10 +7807,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_graceful_server_shutdown", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7821,10 +7821,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_invoke_large_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7835,10 +7835,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_max_concurrent_streams", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7849,10 +7849,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_max_message_length", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7863,10 +7863,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_no_op", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7877,10 +7877,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_ping_pong_streaming", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7891,10 +7891,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_registered_call", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7905,10 +7905,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_binary_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7919,10 +7919,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7933,10 +7933,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7947,10 +7947,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_response_with_trailing_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7961,10 +7961,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_with_flags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7975,10 +7975,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_with_large_metadata", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -7989,10 +7989,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_request_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8003,10 +8003,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_server_finishes_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8017,10 +8017,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_simple_delayed_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8031,10 +8031,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8045,10 +8045,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "end2end_test_simple_request_with_high_initial_sequence_number", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8059,10 +8059,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_bad_hostname", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8073,10 +8073,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_after_accept", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8087,10 +8087,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_after_accept_and_writes_closed", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8101,10 +8101,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_after_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8115,10 +8115,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_before_invoke", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8129,10 +8129,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_cancel_in_a_vacuum", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8143,10 +8143,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_census_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8157,10 +8157,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_disappearing_server", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8171,10 +8171,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_early_server_shutdown_finishes_inflight_calls", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8185,10 +8185,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_early_server_shutdown_finishes_tags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8199,10 +8199,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_empty_batch", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8213,10 +8213,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_graceful_server_shutdown", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8227,10 +8227,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_invoke_large_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8241,10 +8241,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_max_concurrent_streams", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8255,10 +8255,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_max_message_length", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8269,10 +8269,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_no_op", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8283,10 +8283,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_ping_pong_streaming", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8297,10 +8297,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_registered_call", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8311,10 +8311,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_binary_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8325,10 +8325,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8339,10 +8339,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8353,10 +8353,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_response_with_trailing_metadata_and_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8367,10 +8367,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_with_flags", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8381,10 +8381,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_with_large_metadata", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8395,10 +8395,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_request_with_payload", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8409,10 +8409,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_server_finishes_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8423,10 +8423,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_simple_delayed_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8437,10 +8437,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_simple_request", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8451,10 +8451,10 @@ "deps": [ "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "end2end_test_simple_request_with_high_initial_sequence_number", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8464,10 +8464,10 @@ { "deps": [ "bad_client_test", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8479,10 +8479,10 @@ { "deps": [ "bad_client_test", - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "language": "c", @@ -8532,6 +8532,34 @@ "language": "c", "name": "gpr", "src": [ + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/atm_gcc_atomic.h", + "include/grpc/support/atm_gcc_sync.h", + "include/grpc/support/atm_win32.h", + "include/grpc/support/cancellable_platform.h", + "include/grpc/support/cmdline.h", + "include/grpc/support/cpu.h", + "include/grpc/support/histogram.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/log_win32.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/subprocess.h", + "include/grpc/support/sync.h", + "include/grpc/support/sync_generic.h", + "include/grpc/support/sync_posix.h", + "include/grpc/support/sync_win32.h", + "include/grpc/support/thd.h", + "include/grpc/support/time.h", + "include/grpc/support/tls.h", + "include/grpc/support/tls_gcc.h", + "include/grpc/support/tls_msvc.h", + "include/grpc/support/tls_pthread.h", + "include/grpc/support/useful.h", "src/core/support/alloc.c", "src/core/support/cancellable.c", "src/core/support/cmdline.c", @@ -8539,10 +8567,12 @@ "src/core/support/cpu_linux.c", "src/core/support/cpu_posix.c", "src/core/support/cpu_windows.c", + "src/core/support/env.h", "src/core/support/env_linux.c", "src/core/support/env_posix.c", "src/core/support/env_win32.c", "src/core/support/file.c", + "src/core/support/file.h", "src/core/support/file_posix.c", "src/core/support/file_win32.c", "src/core/support/histogram.c", @@ -8553,56 +8583,26 @@ "src/core/support/log_posix.c", "src/core/support/log_win32.c", "src/core/support/murmur_hash.c", + "src/core/support/murmur_hash.h", "src/core/support/slice.c", "src/core/support/slice_buffer.c", "src/core/support/string.c", + "src/core/support/string.h", "src/core/support/string_posix.c", "src/core/support/string_win32.c", + "src/core/support/string_win32.h", "src/core/support/subprocess_posix.c", "src/core/support/sync.c", "src/core/support/sync_posix.c", "src/core/support/sync_win32.c", "src/core/support/thd.c", + "src/core/support/thd_internal.h", "src/core/support/thd_posix.c", "src/core/support/thd_win32.c", "src/core/support/time.c", "src/core/support/time_posix.c", "src/core/support/time_win32.c", - "src/core/support/tls_pthread.c", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/atm_gcc_atomic.h", - "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_win32.h", - "include/grpc/support/cancellable_platform.h", - "include/grpc/support/cmdline.h", - "include/grpc/support/cpu.h", - "include/grpc/support/histogram.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/log_win32.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", - "include/grpc/support/sync.h", - "include/grpc/support/sync_generic.h", - "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_win32.h", - "include/grpc/support/thd.h", - "include/grpc/support/time.h", - "include/grpc/support/tls.h", - "include/grpc/support/tls_gcc.h", - "include/grpc/support/tls_msvc.h", - "include/grpc/support/tls_pthread.h", - "include/grpc/support/useful.h", - "src/core/support/env.h", - "src/core/support/file.h", - "src/core/support/murmur_hash.h", - "src/core/support/string.h", - "src/core/support/string_win32.h", - "src/core/support/thd_internal.h" + "src/core/support/tls_pthread.c" ] }, { @@ -8624,29 +8624,14 @@ "gpr" ], "headers": [ - "include/grpc/grpc_security.h", "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/grpc_security.h", "include/grpc/status.h", - "include/grpc/census.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/httpcli_security_connector.h", - "src/core/httpcli/parser.h", - "src/core/security/auth_filters.h", - "src/core/security/base64.h", - "src/core/security/credentials.h", - "src/core/security/json_token.h", - "src/core/security/secure_endpoint.h", - "src/core/security/secure_transport_setup.h", - "src/core/security/security_connector.h", - "src/core/security/security_context.h", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h", + "src/core/census/context.h", "src/core/census/grpc_context.h", "src/core/channel/census_filter.h", "src/core/channel/channel_args.h", @@ -8661,6 +8646,10 @@ "src/core/channel/noop_filter.h", "src/core/compression/message_compress.h", "src/core/debug/trace.h", + "src/core/httpcli/format_request.h", + "src/core/httpcli/httpcli.h", + "src/core/httpcli/httpcli_security_connector.h", + "src/core/httpcli/parser.h", "src/core/iomgr/alarm.h", "src/core/iomgr/alarm_heap.h", "src/core/iomgr/alarm_internal.h", @@ -8698,6 +8687,14 @@ "src/core/json/json_writer.h", "src/core/profiling/timers.h", "src/core/profiling/timers_preciseclock.h", + "src/core/security/auth_filters.h", + "src/core/security/base64.h", + "src/core/security/credentials.h", + "src/core/security/json_token.h", + "src/core/security/secure_endpoint.h", + "src/core/security/secure_transport_setup.h", + "src/core/security/security_connector.h", + "src/core/security/security_context.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -8730,236 +8727,239 @@ "src/core/transport/stream_op.h", "src/core/transport/transport.h", "src/core/transport/transport_impl.h", - "src/core/census/context.h" + "src/core/tsi/fake_transport_security.h", + "src/core/tsi/ssl_transport_security.h", + "src/core/tsi/transport_security.h", + "src/core/tsi/transport_security_interface.h" ], "language": "c", "name": "grpc", "src": [ - "src/core/httpcli/format_request.c", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/httpcli_security_connector.c", - "src/core/httpcli/parser.c", - "src/core/security/base64.c", - "src/core/security/client_auth_filter.c", - "src/core/security/credentials.c", - "src/core/security/credentials_metadata.c", - "src/core/security/credentials_posix.c", - "src/core/security/credentials_win32.c", - "src/core/security/google_default_credentials.c", - "src/core/security/json_token.c", - "src/core/security/secure_endpoint.c", - "src/core/security/secure_transport_setup.c", - "src/core/security/security_connector.c", - "src/core/security/security_context.c", - "src/core/security/server_auth_filter.c", - "src/core/security/server_secure_chttp2.c", - "src/core/surface/init_secure.c", - "src/core/surface/secure_channel_create.c", - "src/core/tsi/fake_transport_security.c", - "src/core/tsi/ssl_transport_security.c", - "src/core/tsi/transport_security.c", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/grpc_security.h", + "include/grpc/status.h", + "src/core/census/context.c", + "src/core/census/context.h", "src/core/census/grpc_context.c", + "src/core/census/grpc_context.h", + "src/core/census/initialize.c", + "src/core/channel/census_filter.h", "src/core/channel/channel_args.c", + "src/core/channel/channel_args.h", "src/core/channel/channel_stack.c", + "src/core/channel/channel_stack.h", "src/core/channel/child_channel.c", + "src/core/channel/child_channel.h", "src/core/channel/client_channel.c", + "src/core/channel/client_channel.h", "src/core/channel/client_setup.c", + "src/core/channel/client_setup.h", "src/core/channel/connected_channel.c", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", "src/core/channel/http_client_filter.c", + "src/core/channel/http_client_filter.h", "src/core/channel/http_server_filter.c", + "src/core/channel/http_server_filter.h", "src/core/channel/noop_filter.c", + "src/core/channel/noop_filter.h", "src/core/compression/algorithm.c", "src/core/compression/message_compress.c", + "src/core/compression/message_compress.h", "src/core/debug/trace.c", + "src/core/debug/trace.h", + "src/core/httpcli/format_request.c", + "src/core/httpcli/format_request.h", + "src/core/httpcli/httpcli.c", + "src/core/httpcli/httpcli.h", + "src/core/httpcli/httpcli_security_connector.c", + "src/core/httpcli/httpcli_security_connector.h", + "src/core/httpcli/parser.c", + "src/core/httpcli/parser.h", "src/core/iomgr/alarm.c", + "src/core/iomgr/alarm.h", "src/core/iomgr/alarm_heap.c", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", "src/core/iomgr/endpoint.c", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/endpoint_pair_posix.c", "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/fd_posix.c", + "src/core/iomgr/fd_posix.h", "src/core/iomgr/iocp_windows.c", + "src/core/iomgr/iocp_windows.h", "src/core/iomgr/iomgr.c", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", "src/core/iomgr/iomgr_posix.c", + "src/core/iomgr/iomgr_posix.h", "src/core/iomgr/iomgr_windows.c", + "src/core/iomgr/pollset.h", "src/core/iomgr/pollset_kick_posix.c", + "src/core/iomgr/pollset_kick_posix.h", "src/core/iomgr/pollset_multipoller_with_epoll.c", "src/core/iomgr/pollset_multipoller_with_poll_posix.c", "src/core/iomgr/pollset_posix.c", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", "src/core/iomgr/pollset_set_posix.c", + "src/core/iomgr/pollset_set_posix.h", "src/core/iomgr/pollset_set_windows.c", + "src/core/iomgr/pollset_set_windows.h", "src/core/iomgr/pollset_windows.c", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", "src/core/iomgr/resolve_address_posix.c", "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", + "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", "src/core/iomgr/socket_utils_common_posix.c", "src/core/iomgr/socket_utils_linux.c", "src/core/iomgr/socket_utils_posix.c", + "src/core/iomgr/socket_utils_posix.h", "src/core/iomgr/socket_windows.c", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", "src/core/iomgr/tcp_client_posix.c", "src/core/iomgr/tcp_client_windows.c", "src/core/iomgr/tcp_posix.c", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", "src/core/iomgr/tcp_server_posix.c", "src/core/iomgr/tcp_server_windows.c", "src/core/iomgr/tcp_windows.c", + "src/core/iomgr/tcp_windows.h", "src/core/iomgr/time_averaged_stats.c", + "src/core/iomgr/time_averaged_stats.h", "src/core/iomgr/wakeup_fd_eventfd.c", "src/core/iomgr/wakeup_fd_nospecial.c", "src/core/iomgr/wakeup_fd_pipe.c", + "src/core/iomgr/wakeup_fd_pipe.h", "src/core/iomgr/wakeup_fd_posix.c", + "src/core/iomgr/wakeup_fd_posix.h", "src/core/json/json.c", + "src/core/json/json.h", + "src/core/json/json_common.h", "src/core/json/json_reader.c", + "src/core/json/json_reader.h", "src/core/json/json_string.c", "src/core/json/json_writer.c", + "src/core/json/json_writer.h", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", + "src/core/security/auth_filters.h", + "src/core/security/base64.c", + "src/core/security/base64.h", + "src/core/security/client_auth_filter.c", + "src/core/security/credentials.c", + "src/core/security/credentials.h", + "src/core/security/credentials_metadata.c", + "src/core/security/credentials_posix.c", + "src/core/security/credentials_win32.c", + "src/core/security/google_default_credentials.c", + "src/core/security/json_token.c", + "src/core/security/json_token.h", + "src/core/security/secure_endpoint.c", + "src/core/security/secure_endpoint.h", + "src/core/security/secure_transport_setup.c", + "src/core/security/secure_transport_setup.h", + "src/core/security/security_connector.c", + "src/core/security/security_connector.h", + "src/core/security/security_context.c", + "src/core/security/security_context.h", + "src/core/security/server_auth_filter.c", + "src/core/security/server_secure_chttp2.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", + "src/core/surface/byte_buffer_queue.h", "src/core/surface/byte_buffer_reader.c", "src/core/surface/call.c", + "src/core/surface/call.h", "src/core/surface/call_details.c", "src/core/surface/call_log_batch.c", "src/core/surface/channel.c", + "src/core/surface/channel.h", "src/core/surface/channel_create.c", "src/core/surface/client.c", + "src/core/surface/client.h", "src/core/surface/completion_queue.c", + "src/core/surface/completion_queue.h", "src/core/surface/event_string.c", + "src/core/surface/event_string.h", "src/core/surface/init.c", + "src/core/surface/init.h", + "src/core/surface/init_secure.c", "src/core/surface/lame_client.c", "src/core/surface/metadata_array.c", + "src/core/surface/secure_channel_create.c", "src/core/surface/server.c", + "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", "src/core/surface/surface_trace.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_encoder.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/metadata.c", - "src/core/transport/stream_op.c", - "src/core/transport/transport.c", - "src/core/transport/transport_op_string.c", - "src/core/census/context.c", - "src/core/census/initialize.c", - "include/grpc/grpc_security.h", - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/status.h", - "include/grpc/census.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/httpcli_security_connector.h", - "src/core/httpcli/parser.h", - "src/core/security/auth_filters.h", - "src/core/security/base64.h", - "src/core/security/credentials.h", - "src/core/security/json_token.h", - "src/core/security/secure_endpoint.h", - "src/core/security/secure_transport_setup.h", - "src/core/security/security_connector.h", - "src/core/security/security_context.h", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h", - "src/core/census/grpc_context.h", - "src/core/channel/census_filter.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/child_channel.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_setup.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/noop_filter.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/iomgr/alarm.h", - "src/core/iomgr/alarm_heap.h", - "src/core/iomgr/alarm_internal.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_kick_posix.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/profiling/timers.h", - "src/core/profiling/timers_preciseclock.h", - "src/core/surface/byte_buffer_queue.h", - "src/core/surface/call.h", - "src/core/surface/channel.h", - "src/core/surface/client.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.c", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.c", "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.c", "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.c", "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.c", "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.c", "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.c", "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.c", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.c", "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.c", "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.c", "src/core/transport/chttp2_transport.h", + "src/core/transport/metadata.c", "src/core/transport/metadata.h", + "src/core/transport/stream_op.c", "src/core/transport/stream_op.h", + "src/core/transport/transport.c", "src/core/transport/transport.h", "src/core/transport/transport_impl.h", - "src/core/census/context.h" + "src/core/transport/transport_op_string.c", + "src/core/tsi/fake_transport_security.c", + "src/core/tsi/fake_transport_security.h", + "src/core/tsi/ssl_transport_security.c", + "src/core/tsi/ssl_transport_security.h", + "src/core/tsi/transport_security.c", + "src/core/tsi/transport_security.h", + "src/core/tsi/transport_security_interface.h" ] }, { @@ -8969,8 +8969,8 @@ "grpc" ], "headers": [ - "test/core/end2end/data/ssl_test_data.h", "test/core/end2end/cq_verifier.h", + "test/core/end2end/data/ssl_test_data.h", "test/core/iomgr/endpoint_tests.h", "test/core/util/grpc_profiler.h", "test/core/util/parse_hexstring.h", @@ -8980,22 +8980,22 @@ "language": "c", "name": "grpc_test_util", "src": [ + "test/core/end2end/cq_verifier.c", + "test/core/end2end/cq_verifier.h", "test/core/end2end/data/server1_cert.c", "test/core/end2end/data/server1_key.c", + "test/core/end2end/data/ssl_test_data.h", "test/core/end2end/data/test_root_cert.c", - "test/core/end2end/cq_verifier.c", "test/core/iomgr/endpoint_tests.c", + "test/core/iomgr/endpoint_tests.h", "test/core/util/grpc_profiler.c", + "test/core/util/grpc_profiler.h", "test/core/util/parse_hexstring.c", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", "test/core/util/port_posix.c", "test/core/util/port_windows.c", "test/core/util/slice_splitter.c", - "test/core/end2end/data/ssl_test_data.h", - "test/core/end2end/cq_verifier.h", - "test/core/iomgr/endpoint_tests.h", - "test/core/util/grpc_profiler.h", - "test/core/util/parse_hexstring.h", - "test/core/util/port.h", "test/core/util/slice_splitter.h" ] }, @@ -9017,17 +9017,17 @@ "name": "grpc_test_util_unsecure", "src": [ "test/core/end2end/cq_verifier.c", + "test/core/end2end/cq_verifier.h", "test/core/iomgr/endpoint_tests.c", + "test/core/iomgr/endpoint_tests.h", "test/core/util/grpc_profiler.c", + "test/core/util/grpc_profiler.h", "test/core/util/parse_hexstring.c", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", "test/core/util/port_posix.c", "test/core/util/port_windows.c", "test/core/util/slice_splitter.c", - "test/core/end2end/cq_verifier.h", - "test/core/iomgr/endpoint_tests.h", - "test/core/util/grpc_profiler.h", - "test/core/util/parse_hexstring.h", - "test/core/util/port.h", "test/core/util/slice_splitter.h" ] }, @@ -9038,10 +9038,11 @@ "headers": [ "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", - "include/grpc/census.h", + "src/core/census/context.h", "src/core/census/grpc_context.h", "src/core/channel/census_filter.h", "src/core/channel/channel_args.h", @@ -9124,198 +9125,197 @@ "src/core/transport/metadata.h", "src/core/transport/stream_op.h", "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/census/context.h" + "src/core/transport/transport_impl.h" ], "language": "c", "name": "grpc_unsecure", "src": [ - "src/core/surface/init_unsecure.c", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/status.h", + "src/core/census/context.c", + "src/core/census/context.h", "src/core/census/grpc_context.c", + "src/core/census/grpc_context.h", + "src/core/census/initialize.c", + "src/core/channel/census_filter.h", "src/core/channel/channel_args.c", + "src/core/channel/channel_args.h", "src/core/channel/channel_stack.c", + "src/core/channel/channel_stack.h", "src/core/channel/child_channel.c", + "src/core/channel/child_channel.h", "src/core/channel/client_channel.c", + "src/core/channel/client_channel.h", "src/core/channel/client_setup.c", + "src/core/channel/client_setup.h", "src/core/channel/connected_channel.c", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", "src/core/channel/http_client_filter.c", + "src/core/channel/http_client_filter.h", "src/core/channel/http_server_filter.c", + "src/core/channel/http_server_filter.h", "src/core/channel/noop_filter.c", + "src/core/channel/noop_filter.h", "src/core/compression/algorithm.c", "src/core/compression/message_compress.c", + "src/core/compression/message_compress.h", "src/core/debug/trace.c", + "src/core/debug/trace.h", "src/core/iomgr/alarm.c", + "src/core/iomgr/alarm.h", "src/core/iomgr/alarm_heap.c", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", "src/core/iomgr/endpoint.c", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/endpoint_pair_posix.c", "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/fd_posix.c", + "src/core/iomgr/fd_posix.h", "src/core/iomgr/iocp_windows.c", + "src/core/iomgr/iocp_windows.h", "src/core/iomgr/iomgr.c", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", "src/core/iomgr/iomgr_posix.c", + "src/core/iomgr/iomgr_posix.h", "src/core/iomgr/iomgr_windows.c", + "src/core/iomgr/pollset.h", "src/core/iomgr/pollset_kick_posix.c", + "src/core/iomgr/pollset_kick_posix.h", "src/core/iomgr/pollset_multipoller_with_epoll.c", "src/core/iomgr/pollset_multipoller_with_poll_posix.c", "src/core/iomgr/pollset_posix.c", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", "src/core/iomgr/pollset_set_posix.c", + "src/core/iomgr/pollset_set_posix.h", "src/core/iomgr/pollset_set_windows.c", + "src/core/iomgr/pollset_set_windows.h", "src/core/iomgr/pollset_windows.c", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", "src/core/iomgr/resolve_address_posix.c", "src/core/iomgr/resolve_address_windows.c", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", "src/core/iomgr/socket_utils_common_posix.c", "src/core/iomgr/socket_utils_linux.c", "src/core/iomgr/socket_utils_posix.c", + "src/core/iomgr/socket_utils_posix.h", "src/core/iomgr/socket_windows.c", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", "src/core/iomgr/tcp_client_posix.c", "src/core/iomgr/tcp_client_windows.c", "src/core/iomgr/tcp_posix.c", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", "src/core/iomgr/tcp_server_posix.c", "src/core/iomgr/tcp_server_windows.c", "src/core/iomgr/tcp_windows.c", + "src/core/iomgr/tcp_windows.h", "src/core/iomgr/time_averaged_stats.c", + "src/core/iomgr/time_averaged_stats.h", "src/core/iomgr/wakeup_fd_eventfd.c", "src/core/iomgr/wakeup_fd_nospecial.c", "src/core/iomgr/wakeup_fd_pipe.c", + "src/core/iomgr/wakeup_fd_pipe.h", "src/core/iomgr/wakeup_fd_posix.c", + "src/core/iomgr/wakeup_fd_posix.h", "src/core/json/json.c", + "src/core/json/json.h", + "src/core/json/json_common.h", "src/core/json/json_reader.c", + "src/core/json/json_reader.h", "src/core/json/json_string.c", "src/core/json/json_writer.c", + "src/core/json/json_writer.h", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", + "src/core/surface/byte_buffer_queue.h", "src/core/surface/byte_buffer_reader.c", "src/core/surface/call.c", + "src/core/surface/call.h", "src/core/surface/call_details.c", "src/core/surface/call_log_batch.c", "src/core/surface/channel.c", + "src/core/surface/channel.h", "src/core/surface/channel_create.c", "src/core/surface/client.c", + "src/core/surface/client.h", "src/core/surface/completion_queue.c", + "src/core/surface/completion_queue.h", "src/core/surface/event_string.c", + "src/core/surface/event_string.h", "src/core/surface/init.c", + "src/core/surface/init.h", + "src/core/surface/init_unsecure.c", "src/core/surface/lame_client.c", "src/core/surface/metadata_array.c", "src/core/surface/server.c", + "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", "src/core/surface/surface_trace.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_encoder.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/metadata.c", - "src/core/transport/stream_op.c", - "src/core/transport/transport.c", - "src/core/transport/transport_op_string.c", - "src/core/census/context.c", - "src/core/census/initialize.c", - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/status.h", - "include/grpc/census.h", - "src/core/census/grpc_context.h", - "src/core/channel/census_filter.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/child_channel.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_setup.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/noop_filter.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/iomgr/alarm.h", - "src/core/iomgr/alarm_heap.h", - "src/core/iomgr/alarm_internal.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_kick_posix.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/profiling/timers.h", - "src/core/profiling/timers_preciseclock.h", - "src/core/surface/byte_buffer_queue.h", - "src/core/surface/call.h", - "src/core/surface/channel.h", - "src/core/surface/client.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.c", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.c", "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.c", "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.c", "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.c", "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.c", "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.c", "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.c", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.c", "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.c", "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.c", "src/core/transport/chttp2_transport.h", + "src/core/transport/metadata.c", "src/core/transport/metadata.h", + "src/core/transport/stream_op.c", "src/core/transport/stream_op.h", + "src/core/transport/transport.c", "src/core/transport/transport.h", "src/core/transport/transport_impl.h", - "src/core/census/context.h" + "src/core/transport/transport_op_string.c" ] }, { @@ -9361,41 +9361,14 @@ "include/grpc++/stream.h", "include/grpc++/thread_pool_interface.h", "include/grpc++/time.h", + "src/cpp/client/channel.h", "src/cpp/client/secure_credentials.h", "src/cpp/server/secure_server_credentials.h", - "src/cpp/client/channel.h", "src/cpp/server/thread_pool.h" ], "language": "c++", "name": "grpc++", "src": [ - "src/cpp/client/secure_channel_arguments.cc", - "src/cpp/client/secure_credentials.cc", - "src/cpp/server/secure_server_credentials.cc", - "src/cpp/client/channel.cc", - "src/cpp/client/channel_arguments.cc", - "src/cpp/client/client_context.cc", - "src/cpp/client/create_channel.cc", - "src/cpp/client/credentials.cc", - "src/cpp/client/generic_stub.cc", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/client/internal_stub.cc", - "src/cpp/common/call.cc", - "src/cpp/common/completion_queue.cc", - "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_utils.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/server/server.cc", - "src/cpp/server/server_builder.cc", - "src/cpp/server/server_context.cc", - "src/cpp/server/server_credentials.cc", - "src/cpp/server/thread_pool.cc", - "src/cpp/util/byte_buffer.cc", - "src/cpp/util/slice.cc", - "src/cpp/util/status.cc", - "src/cpp/util/time.cc", "include/grpc++/async_generic_service.h", "include/grpc++/async_unary_call.h", "include/grpc++/byte_buffer.h", @@ -9433,10 +9406,37 @@ "include/grpc++/stream.h", "include/grpc++/thread_pool_interface.h", "include/grpc++/time.h", + "src/cpp/client/channel.cc", + "src/cpp/client/channel.h", + "src/cpp/client/channel_arguments.cc", + "src/cpp/client/client_context.cc", + "src/cpp/client/create_channel.cc", + "src/cpp/client/credentials.cc", + "src/cpp/client/generic_stub.cc", + "src/cpp/client/insecure_credentials.cc", + "src/cpp/client/internal_stub.cc", + "src/cpp/client/secure_channel_arguments.cc", + "src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.h", + "src/cpp/common/call.cc", + "src/cpp/common/completion_queue.cc", + "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_utils.cc", + "src/cpp/server/async_generic_service.cc", + "src/cpp/server/create_default_thread_pool.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/secure_server_credentials.cc", "src/cpp/server/secure_server_credentials.h", - "src/cpp/client/channel.h", - "src/cpp/server/thread_pool.h" + "src/cpp/server/server.cc", + "src/cpp/server/server_builder.cc", + "src/cpp/server/server_context.cc", + "src/cpp/server/server_credentials.cc", + "src/cpp/server/thread_pool.cc", + "src/cpp/server/thread_pool.h", + "src/cpp/util/byte_buffer.cc", + "src/cpp/util/slice.cc", + "src/cpp/util/status.cc", + "src/cpp/util/time.cc" ] }, { @@ -9459,25 +9459,25 @@ "headers": [ "test/cpp/util/cli_call.h", "test/cpp/util/create_test_channel.h", - "test/cpp/util/fake_credentials.h", - "test/cpp/util/subprocess.h", - "test/cpp/util/messages.grpc.pb.h", - "test/cpp/util/messages.pb.h", "test/cpp/util/echo.grpc.pb.h", "test/cpp/util/echo.pb.h", "test/cpp/util/echo_duplicate.grpc.pb.h", - "test/cpp/util/echo_duplicate.pb.h" + "test/cpp/util/echo_duplicate.pb.h", + "test/cpp/util/fake_credentials.h", + "test/cpp/util/messages.grpc.pb.h", + "test/cpp/util/messages.pb.h", + "test/cpp/util/subprocess.h" ], "language": "c++", "name": "grpc++_test_util", "src": [ "test/cpp/util/cli_call.cc", - "test/cpp/util/create_test_channel.cc", - "test/cpp/util/fake_credentials.cc", - "test/cpp/util/subprocess.cc", "test/cpp/util/cli_call.h", + "test/cpp/util/create_test_channel.cc", "test/cpp/util/create_test_channel.h", + "test/cpp/util/fake_credentials.cc", "test/cpp/util/fake_credentials.h", + "test/cpp/util/subprocess.cc", "test/cpp/util/subprocess.h" ] }, @@ -9530,30 +9530,6 @@ "language": "c++", "name": "grpc++_unsecure", "src": [ - "src/cpp/client/channel.cc", - "src/cpp/client/channel_arguments.cc", - "src/cpp/client/client_context.cc", - "src/cpp/client/create_channel.cc", - "src/cpp/client/credentials.cc", - "src/cpp/client/generic_stub.cc", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/client/internal_stub.cc", - "src/cpp/common/call.cc", - "src/cpp/common/completion_queue.cc", - "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_utils.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/server/server.cc", - "src/cpp/server/server_builder.cc", - "src/cpp/server/server_context.cc", - "src/cpp/server/server_credentials.cc", - "src/cpp/server/thread_pool.cc", - "src/cpp/util/byte_buffer.cc", - "src/cpp/util/slice.cc", - "src/cpp/util/status.cc", - "src/cpp/util/time.cc", "include/grpc++/async_generic_service.h", "include/grpc++/async_unary_call.h", "include/grpc++/byte_buffer.h", @@ -9591,8 +9567,32 @@ "include/grpc++/stream.h", "include/grpc++/thread_pool_interface.h", "include/grpc++/time.h", + "src/cpp/client/channel.cc", "src/cpp/client/channel.h", - "src/cpp/server/thread_pool.h" + "src/cpp/client/channel_arguments.cc", + "src/cpp/client/client_context.cc", + "src/cpp/client/create_channel.cc", + "src/cpp/client/credentials.cc", + "src/cpp/client/generic_stub.cc", + "src/cpp/client/insecure_credentials.cc", + "src/cpp/client/internal_stub.cc", + "src/cpp/common/call.cc", + "src/cpp/common/completion_queue.cc", + "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_utils.cc", + "src/cpp/server/async_generic_service.cc", + "src/cpp/server/create_default_thread_pool.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/server.cc", + "src/cpp/server/server_builder.cc", + "src/cpp/server/server_context.cc", + "src/cpp/server/server_credentials.cc", + "src/cpp/server/thread_pool.cc", + "src/cpp/server/thread_pool.h", + "src/cpp/util/byte_buffer.cc", + "src/cpp/util/slice.cc", + "src/cpp/util/status.cc", + "src/cpp/util/time.cc" ] }, { @@ -9617,22 +9617,22 @@ "language": "c++", "name": "grpc_plugin_support", "src": [ - "src/compiler/cpp_generator.cc", - "src/compiler/csharp_generator.cc", - "src/compiler/objective_c_generator.cc", - "src/compiler/python_generator.cc", - "src/compiler/ruby_generator.cc", "include/grpc++/config.h", "include/grpc++/config_protobuf.h", "src/compiler/config.h", + "src/compiler/cpp_generator.cc", "src/compiler/cpp_generator.h", "src/compiler/cpp_generator_helpers.h", + "src/compiler/csharp_generator.cc", "src/compiler/csharp_generator.h", "src/compiler/csharp_generator_helpers.h", "src/compiler/generator_helpers.h", + "src/compiler/objective_c_generator.cc", "src/compiler/objective_c_generator.h", "src/compiler/objective_c_generator_helpers.h", + "src/compiler/python_generator.cc", "src/compiler/python_generator.h", + "src/compiler/ruby_generator.cc", "src/compiler/ruby_generator.h", "src/compiler/ruby_generator_helpers-inl.h", "src/compiler/ruby_generator_map-inl.h", @@ -9641,11 +9641,11 @@ }, { "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", + "gpr", "grpc", - "gpr" + "grpc++", + "grpc++_test_util", + "grpc_test_util" ], "headers": [ "test/cpp/interop/client_helper.h" @@ -9659,14 +9659,14 @@ }, { "deps": [ - "interop_client_helper", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "interop_client_helper" ], "headers": [ "test/cpp/interop/interop_client.h", @@ -9687,10 +9687,10 @@ }, { "deps": [ - "grpc_test_util", - "grpc++", + "gpr", "grpc", - "gpr" + "grpc++", + "grpc_test_util" ], "headers": [ "test/cpp/interop/server_helper.h" @@ -9704,14 +9704,14 @@ }, { "deps": [ - "interop_server_helper", + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_config", "grpc++_test_util", "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" + "interop_server_helper" ], "headers": [ "test/proto/empty.grpc.pb.h", @@ -9729,34 +9729,34 @@ }, { "deps": [ - "grpc++", + "gpr", "grpc", - "gpr" + "grpc++" ], "headers": [ - "examples/pubsub/publisher.h", - "examples/pubsub/subscriber.h", - "examples/pubsub/label.grpc.pb.h", - "examples/pubsub/label.pb.h", "examples/pubsub/empty.grpc.pb.h", "examples/pubsub/empty.pb.h", + "examples/pubsub/label.grpc.pb.h", + "examples/pubsub/label.pb.h", + "examples/pubsub/publisher.h", "examples/pubsub/pubsub.grpc.pb.h", - "examples/pubsub/pubsub.pb.h" + "examples/pubsub/pubsub.pb.h", + "examples/pubsub/subscriber.h" ], "language": "c++", "name": "pubsub_client_lib", "src": [ "examples/pubsub/publisher.cc", - "examples/pubsub/subscriber.cc", "examples/pubsub/publisher.h", + "examples/pubsub/subscriber.cc", "examples/pubsub/subscriber.h" ] }, { "deps": [ - "grpc_test_util", + "grpc++", "grpc++_test_util", - "grpc++" + "grpc_test_util" ], "headers": [ "test/cpp/qps/client.h", @@ -9764,35 +9764,35 @@ "test/cpp/qps/histogram.h", "test/cpp/qps/interarrival.h", "test/cpp/qps/qps_worker.h", + "test/cpp/qps/qpstest.grpc.pb.h", + "test/cpp/qps/qpstest.pb.h", "test/cpp/qps/report.h", "test/cpp/qps/server.h", "test/cpp/qps/stats.h", "test/cpp/qps/timer.h", - "test/cpp/util/benchmark_config.h", - "test/cpp/qps/qpstest.grpc.pb.h", - "test/cpp/qps/qpstest.pb.h" + "test/cpp/util/benchmark_config.h" ], "language": "c++", "name": "qps", "src": [ + "test/cpp/qps/client.h", "test/cpp/qps/client_async.cc", "test/cpp/qps/client_sync.cc", "test/cpp/qps/driver.cc", - "test/cpp/qps/qps_worker.cc", - "test/cpp/qps/report.cc", - "test/cpp/qps/server_async.cc", - "test/cpp/qps/server_sync.cc", - "test/cpp/qps/timer.cc", - "test/cpp/util/benchmark_config.cc", - "test/cpp/qps/client.h", "test/cpp/qps/driver.h", "test/cpp/qps/histogram.h", "test/cpp/qps/interarrival.h", + "test/cpp/qps/qps_worker.cc", "test/cpp/qps/qps_worker.h", + "test/cpp/qps/report.cc", "test/cpp/qps/report.h", "test/cpp/qps/server.h", + "test/cpp/qps/server_async.cc", + "test/cpp/qps/server_sync.cc", "test/cpp/qps/stats.h", + "test/cpp/qps/timer.cc", "test/cpp/qps/timer.h", + "test/cpp/util/benchmark_config.cc", "test/cpp/util/benchmark_config.h" ] }, @@ -9811,10 +9811,10 @@ { "deps": [ "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9822,16 +9822,16 @@ "language": "c", "name": "end2end_fixture_chttp2_fake_security", "src": [ - "test/core/end2end/fixtures/chttp2_fake_security.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_fake_security.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9839,16 +9839,16 @@ "language": "c", "name": "end2end_fixture_chttp2_fullstack", "src": [ - "test/core/end2end/fixtures/chttp2_fullstack.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_fullstack.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9856,16 +9856,16 @@ "language": "c", "name": "end2end_fixture_chttp2_fullstack_uds_posix", "src": [ - "test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_fullstack_uds_posix.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9873,17 +9873,17 @@ "language": "c", "name": "end2end_fixture_chttp2_fullstack_with_poll", "src": [ - "test/core/end2end/fixtures/chttp2_fullstack_with_poll.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_fullstack_with_poll.c" ] }, { "deps": [ "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9891,17 +9891,17 @@ "language": "c", "name": "end2end_fixture_chttp2_simple_ssl_fullstack", "src": [ - "test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_simple_ssl_fullstack.c" ] }, { "deps": [ "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9909,17 +9909,17 @@ "language": "c", "name": "end2end_fixture_chttp2_simple_ssl_fullstack_with_poll", "src": [ - "test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_poll.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_simple_ssl_fullstack_with_poll.c" ] }, { "deps": [ "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9927,16 +9927,16 @@ "language": "c", "name": "end2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack", "src": [ - "test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_simple_ssl_with_oauth2_fullstack.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9944,16 +9944,16 @@ "language": "c", "name": "end2end_fixture_chttp2_socket_pair", "src": [ - "test/core/end2end/fixtures/chttp2_socket_pair.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_socket_pair.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9961,16 +9961,16 @@ "language": "c", "name": "end2end_fixture_chttp2_socket_pair_one_byte_at_a_time", "src": [ - "test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/core/end2end/end2end_tests.h" @@ -9978,579 +9978,579 @@ "language": "c", "name": "end2end_fixture_chttp2_socket_pair_with_grpc_trace", "src": [ - "test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_bad_hostname", "src": [ + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/bad_hostname.c", - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/cancel_test_helpers.h" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_cancel_after_accept", "src": [ + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_after_accept.c", - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/cancel_test_helpers.h" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_cancel_after_accept_and_writes_closed", "src": [ + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_after_accept_and_writes_closed.c", - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/cancel_test_helpers.h" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_cancel_after_invoke", "src": [ + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_after_invoke.c", - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/cancel_test_helpers.h" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_cancel_before_invoke", "src": [ + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_before_invoke.c", - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/cancel_test_helpers.h" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_cancel_in_a_vacuum", "src": [ + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_in_a_vacuum.c", - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/cancel_test_helpers.h" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_census_simple_request", "src": [ - "test/core/end2end/tests/census_simple_request.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/census_simple_request.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_disappearing_server", "src": [ - "test/core/end2end/tests/disappearing_server.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/disappearing_server.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_early_server_shutdown_finishes_inflight_calls", "src": [ - "test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/early_server_shutdown_finishes_inflight_calls.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_early_server_shutdown_finishes_tags", "src": [ - "test/core/end2end/tests/early_server_shutdown_finishes_tags.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/early_server_shutdown_finishes_tags.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_empty_batch", "src": [ - "test/core/end2end/tests/empty_batch.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/empty_batch.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_graceful_server_shutdown", "src": [ - "test/core/end2end/tests/graceful_server_shutdown.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/graceful_server_shutdown.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_invoke_large_request", "src": [ - "test/core/end2end/tests/invoke_large_request.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/invoke_large_request.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_max_concurrent_streams", "src": [ - "test/core/end2end/tests/max_concurrent_streams.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/max_concurrent_streams.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_max_message_length", "src": [ - "test/core/end2end/tests/max_message_length.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/max_message_length.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_no_op", "src": [ - "test/core/end2end/tests/no_op.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/no_op.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_ping_pong_streaming", "src": [ - "test/core/end2end/tests/ping_pong_streaming.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/ping_pong_streaming.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_registered_call", "src": [ - "test/core/end2end/tests/registered_call.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/registered_call.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_response_with_binary_metadata_and_payload", "src": [ - "test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_response_with_binary_metadata_and_payload.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_response_with_metadata_and_payload", "src": [ - "test/core/end2end/tests/request_response_with_metadata_and_payload.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_response_with_metadata_and_payload.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_response_with_payload", "src": [ - "test/core/end2end/tests/request_response_with_payload.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_response_with_payload.c" ] }, { "deps": [ "end2end_certs", - "grpc_test_util", - "grpc", + "gpr", "gpr_test_util", - "gpr" + "grpc", + "grpc_test_util" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_response_with_payload_and_call_creds", "src": [ - "test/core/end2end/tests/request_response_with_payload_and_call_creds.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_response_with_payload_and_call_creds.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_response_with_trailing_metadata_and_payload", "src": [ - "test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_response_with_trailing_metadata_and_payload.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_with_flags", "src": [ - "test/core/end2end/tests/request_with_flags.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_with_flags.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_with_large_metadata", "src": [ - "test/core/end2end/tests/request_with_large_metadata.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_with_large_metadata.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_request_with_payload", "src": [ - "test/core/end2end/tests/request_with_payload.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/request_with_payload.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_server_finishes_request", "src": [ - "test/core/end2end/tests/server_finishes_request.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/server_finishes_request.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_simple_delayed_request", "src": [ - "test/core/end2end/tests/simple_delayed_request.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/simple_delayed_request.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_simple_request", "src": [ - "test/core/end2end/tests/simple_request.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/simple_request.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" ], "language": "c", "name": "end2end_test_simple_request_with_high_initial_sequence_number", "src": [ - "test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c", + "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h" + "test/core/end2end/tests/simple_request_with_high_initial_sequence_number.c" ] }, { @@ -10559,17 +10559,17 @@ "language": "c", "name": "end2end_certs", "src": [ - "test/core/end2end/data/test_root_cert.c", "test/core/end2end/data/server1_cert.c", - "test/core/end2end/data/server1_key.c" + "test/core/end2end/data/server1_key.c", + "test/core/end2end/data/test_root_cert.c" ] }, { "deps": [ - "grpc_test_util_unsecure", - "grpc_unsecure", + "gpr", "gpr_test_util", - "gpr" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/core/bad_client/bad_client.h" From b032af0d000561ec5c91d1c2c378801c37d53262 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Jun 2015 08:53:38 -0700 Subject: [PATCH 77/97] Remove dead code --- src/core/transport/chttp2/incoming_metadata.c | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c index ea5215b1bd9..08b47f7dee3 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -179,29 +179,3 @@ void grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( } } } - -#if 0 -void grpc_chttp2_parsing_add_metadata_batch( - grpc_chttp2_transport_parsing *transport_parsing, - grpc_chttp2_stream_parsing *stream_parsing) { - grpc_metadata_batch b; - - b.list.head = NULL; - /* Store away the last element of the list, so that in patch_metadata_ops - we can reconstitute the list. - We can't do list building here as later incoming metadata may reallocate - the underlying array. */ - b.list.tail = (void *)(gpr_intptr)stream_parsing->incoming_metadata_count; - b.garbage.head = b.garbage.tail = NULL; - b.deadline = stream_parsing->incoming_deadline; - stream_parsing->incoming_deadline = gpr_inf_future; - - grpc_sopb_add_metadata(&stream_parsing->data_parser.incoming_sopb, b); -} -#endif - -#if 0 -static void patch_metadata_ops(grpc_chttp2_stream_global *stream_global, - grpc_chttp2_stream_parsing *stream_parsing) { -} -#endif From 48f0a13f3872876787f4d7588b396db914319b1b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Jun 2015 08:56:48 -0700 Subject: [PATCH 78/97] Simpler code --- src/core/transport/chttp2/incoming_metadata.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c index 08b47f7dee3..e81927ab200 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -99,11 +99,7 @@ void grpc_incoming_metadata_buffer_move_to_referencing_sopb( grpc_chttp2_incoming_metadata_buffer *dst, grpc_stream_op_buffer *sopb) { size_t delta; size_t i; - if (gpr_time_cmp(dst->deadline, gpr_inf_future) == 0) { - dst->deadline = src->deadline; - } else if (gpr_time_cmp(src->deadline, gpr_inf_future) != 0) { - dst->deadline = gpr_time_min(src->deadline, dst->deadline); - } + dst->deadline = gpr_time_min(src->deadline, dst->deadline); if (src->count == 0) { return; From 231103ba39303cc713631280deccb3b96d165174 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 25 Jun 2015 10:14:09 -0700 Subject: [PATCH 79/97] Fixed name in comments --- src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 8a556e155b0..d94b25091e6 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -132,7 +132,7 @@ grpc_metadata_array_init(&_headers); _op.data.recv_initial_metadata = &_headers; if (handler) { - // Prevent reference cycle with handler + // Prevent reference cycle with _handler __weak typeof(self) weakSelf = self; _handler = ^{ __strong typeof(self) strongSelf = weakSelf; @@ -164,7 +164,7 @@ _op.op = GRPC_OP_RECV_MESSAGE; _op.data.recv_message = &_receivedMessage; if (handler) { - // Prevent reference cycle with handler + // Prevent reference cycle with _handler __weak typeof(self) weakSelf = self; _handler = ^{ __strong typeof(self) strongSelf = weakSelf; @@ -197,7 +197,7 @@ grpc_metadata_array_init(&_trailers); _op.data.recv_status_on_client.trailing_metadata = &_trailers; if (handler) { - // Prevent reference cycle with handler + // Prevent reference cycle with _handler __weak typeof(self) weakSelf = self; _handler = ^{ __strong typeof(self) strongSelf = weakSelf; From ab6307356a3558ff93f990d333100e9bb218dcdf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Jun 2015 11:20:01 -0700 Subject: [PATCH 80/97] Addressing comments --- src/core/transport/chttp2/internal.h | 149 ++++++++--------------- src/core/transport/chttp2/parsing.c | 108 ++++++++-------- src/core/transport/chttp2/stream_lists.c | 7 +- src/core/transport/chttp2/writing.c | 28 ++--- src/core/transport/chttp2_transport.c | 71 +++++++---- 5 files changed, 170 insertions(+), 193 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 3d1cd56e618..02c94744ee2 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -72,56 +72,56 @@ typedef enum { /* deframer state for the overall http2 stream of bytes */ typedef enum { /* prefix: one entry per http2 connection prefix byte */ - DTS_CLIENT_PREFIX_0 = 0, - DTS_CLIENT_PREFIX_1, - DTS_CLIENT_PREFIX_2, - DTS_CLIENT_PREFIX_3, - DTS_CLIENT_PREFIX_4, - DTS_CLIENT_PREFIX_5, - DTS_CLIENT_PREFIX_6, - DTS_CLIENT_PREFIX_7, - DTS_CLIENT_PREFIX_8, - DTS_CLIENT_PREFIX_9, - DTS_CLIENT_PREFIX_10, - DTS_CLIENT_PREFIX_11, - DTS_CLIENT_PREFIX_12, - DTS_CLIENT_PREFIX_13, - DTS_CLIENT_PREFIX_14, - DTS_CLIENT_PREFIX_15, - DTS_CLIENT_PREFIX_16, - DTS_CLIENT_PREFIX_17, - DTS_CLIENT_PREFIX_18, - DTS_CLIENT_PREFIX_19, - DTS_CLIENT_PREFIX_20, - DTS_CLIENT_PREFIX_21, - DTS_CLIENT_PREFIX_22, - DTS_CLIENT_PREFIX_23, + GRPC_DTS_CLIENT_PREFIX_0 = 0, + GRPC_DTS_CLIENT_PREFIX_1, + GRPC_DTS_CLIENT_PREFIX_2, + GRPC_DTS_CLIENT_PREFIX_3, + GRPC_DTS_CLIENT_PREFIX_4, + GRPC_DTS_CLIENT_PREFIX_5, + GRPC_DTS_CLIENT_PREFIX_6, + GRPC_DTS_CLIENT_PREFIX_7, + GRPC_DTS_CLIENT_PREFIX_8, + GRPC_DTS_CLIENT_PREFIX_9, + GRPC_DTS_CLIENT_PREFIX_10, + GRPC_DTS_CLIENT_PREFIX_11, + GRPC_DTS_CLIENT_PREFIX_12, + GRPC_DTS_CLIENT_PREFIX_13, + GRPC_DTS_CLIENT_PREFIX_14, + GRPC_DTS_CLIENT_PREFIX_15, + GRPC_DTS_CLIENT_PREFIX_16, + GRPC_DTS_CLIENT_PREFIX_17, + GRPC_DTS_CLIENT_PREFIX_18, + GRPC_DTS_CLIENT_PREFIX_19, + GRPC_DTS_CLIENT_PREFIX_20, + GRPC_DTS_CLIENT_PREFIX_21, + GRPC_DTS_CLIENT_PREFIX_22, + GRPC_DTS_CLIENT_PREFIX_23, /* frame header byte 0... */ /* must follow from the prefix states */ - DTS_FH_0, - DTS_FH_1, - DTS_FH_2, - DTS_FH_3, - DTS_FH_4, - DTS_FH_5, - DTS_FH_6, - DTS_FH_7, + GRPC_DTS_FH_0, + GRPC_DTS_FH_1, + GRPC_DTS_FH_2, + GRPC_DTS_FH_3, + GRPC_DTS_FH_4, + GRPC_DTS_FH_5, + GRPC_DTS_FH_6, + GRPC_DTS_FH_7, /* ... frame header byte 8 */ - DTS_FH_8, + GRPC_DTS_FH_8, /* inside a http2 frame */ - DTS_FRAME + GRPC_DTS_FRAME } grpc_chttp2_deframe_transport_state; typedef enum { - WRITE_STATE_OPEN, - WRITE_STATE_QUEUED_CLOSE, - WRITE_STATE_SENT_CLOSE + GRPC_WRITE_STATE_OPEN, + GRPC_WRITE_STATE_QUEUED_CLOSE, + GRPC_WRITE_STATE_SENT_CLOSE } grpc_chttp2_write_state; typedef enum { - DONT_SEND_CLOSED = 0, - SEND_CLOSED, - SEND_CLOSED_WITH_RST_STREAM + GRPC_DONT_SEND_CLOSED = 0, + GRPC_SEND_CLOSED, + GRPC_SEND_CLOSED_WITH_RST_STREAM } grpc_chttp2_send_closed; typedef struct { @@ -143,14 +143,14 @@ typedef enum { /* We keep several sets of connection wide parameters */ typedef enum { /* The settings our peer has asked for (and we have acked) */ - PEER_SETTINGS = 0, + GRPC_PEER_SETTINGS = 0, /* The settings we'd like to have */ - LOCAL_SETTINGS, + GRPC_LOCAL_SETTINGS, /* The settings we've published to our peer */ - SENT_SETTINGS, + GRPC_SENT_SETTINGS, /* The settings the peer has acked */ - ACKED_SETTINGS, - NUM_SETTING_SETS + GRPC_ACKED_SETTINGS, + GRPC_NUM_SETTING_SETS } grpc_chttp2_setting_set; /* Outstanding ping request data */ @@ -183,7 +183,7 @@ typedef struct { /** bitmask of setting indexes to send out */ gpr_uint32 force_send_settings; /** settings values */ - gpr_uint32 settings[NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; + gpr_uint32 settings[GRPC_NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]; /** has there been a connection level error, and have we notified anyone about it? */ @@ -352,34 +352,6 @@ struct grpc_chttp2_transport { /** closure for notifying transport closure */ grpc_iomgr_closure notify_closed; } channel_callback; - -#if 0 - /* basic state management - what are we doing at the moment? */ - gpr_uint8 reading; - /** are we calling back any grpc_transport_op completion events */ - gpr_uint8 calling_back_ops; - gpr_uint8 destroying; - gpr_uint8 closed; - - /* stream indexing */ - gpr_uint32 next_stream_id; - - /* window management */ - gpr_uint32 outgoing_window_update; - - /* state for a stream that's not yet been created */ - grpc_stream_op_buffer new_stream_sopb; - - /* stream ops that need to be destroyed, but outside of the lock */ - grpc_stream_op_buffer nuke_later_sopb; - - /* pings */ - gpr_int64 ping_counter; - - - grpc_chttp2_stream **accepting_stream; - -#endif }; typedef struct { @@ -451,14 +423,6 @@ struct grpc_chttp2_stream_parsing { /** incoming metadata */ grpc_chttp2_incoming_metadata_buffer incoming_metadata; - - /* - grpc_linked_mdelem *incoming_metadata; - size_t incoming_metadata_count; - size_t incoming_metadata_capacity; - grpc_linked_mdelem *old_incoming_metadata; - gpr_timespec incoming_deadline; - */ }; struct grpc_chttp2_stream { @@ -468,14 +432,6 @@ struct grpc_chttp2_stream { grpc_chttp2_stream_link links[STREAM_LIST_COUNT]; gpr_uint8 included[STREAM_LIST_COUNT]; - -#if 0 - gpr_uint32 outgoing_window_update; - gpr_uint8 cancelled; - - grpc_stream_state callback_state; - grpc_stream_op_buffer callback_sopb; -#endif }; /** Transport writing call flow: @@ -502,14 +458,15 @@ void grpc_chttp2_cleanup_writing(grpc_chttp2_transport_global *global, void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); -/** Process one slice of incoming data */ +/** Process one slice of incoming data; return 1 if the connection is still + viable after reading, or 0 if the connection should be torn down */ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice slice); void grpc_chttp2_publish_reads(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); /** Get a writable stream - \return non-zero if there was a stream available */ + returns non-zero if there was a stream available */ void grpc_chttp2_list_add_writable_stream( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); @@ -622,10 +579,10 @@ void grpc_chttp2_parsing_become_skip_parser( extern int grpc_http_trace; extern int grpc_flowctl_trace; -#define IF_TRACING(stmt) \ - if (!(grpc_http_trace)) \ - ; \ - else \ +#define GRPC_CHTTP2_IF_TRACING(stmt) \ + if (!(grpc_http_trace)) \ + ; \ + else \ stmt #define GRPC_CHTTP2_FLOWCTL_TRACE_STREAM(reason, transport, context, var, \ diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 42f47af65ce..8f682e9017c 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -117,15 +117,15 @@ void grpc_chttp2_publish_reads( /* update global settings */ if (transport_parsing->settings_updated) { - memcpy(transport_global->settings[PEER_SETTINGS], + memcpy(transport_global->settings[GRPC_PEER_SETTINGS], transport_parsing->settings, sizeof(transport_parsing->settings)); transport_parsing->settings_updated = 0; } /* update settings based on ack if received */ if (transport_parsing->settings_ack_received) { - memcpy(transport_global->settings[ACKED_SETTINGS], - transport_global->settings[SENT_SETTINGS], + memcpy(transport_global->settings[GRPC_ACKED_SETTINGS], + transport_global->settings[GRPC_SENT_SETTINGS], GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); transport_parsing->settings_ack_received = 0; } @@ -238,34 +238,34 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, if (cur == end) return 1; switch (transport_parsing->deframe_state) { - case DTS_CLIENT_PREFIX_0: - case DTS_CLIENT_PREFIX_1: - case DTS_CLIENT_PREFIX_2: - case DTS_CLIENT_PREFIX_3: - case DTS_CLIENT_PREFIX_4: - case DTS_CLIENT_PREFIX_5: - case DTS_CLIENT_PREFIX_6: - case DTS_CLIENT_PREFIX_7: - case DTS_CLIENT_PREFIX_8: - case DTS_CLIENT_PREFIX_9: - case DTS_CLIENT_PREFIX_10: - case DTS_CLIENT_PREFIX_11: - case DTS_CLIENT_PREFIX_12: - case DTS_CLIENT_PREFIX_13: - case DTS_CLIENT_PREFIX_14: - case DTS_CLIENT_PREFIX_15: - case DTS_CLIENT_PREFIX_16: - case DTS_CLIENT_PREFIX_17: - case DTS_CLIENT_PREFIX_18: - case DTS_CLIENT_PREFIX_19: - case DTS_CLIENT_PREFIX_20: - case DTS_CLIENT_PREFIX_21: - case DTS_CLIENT_PREFIX_22: - case DTS_CLIENT_PREFIX_23: - while (cur != end && transport_parsing->deframe_state != DTS_FH_0) { + case GRPC_DTS_CLIENT_PREFIX_0: + case GRPC_DTS_CLIENT_PREFIX_1: + case GRPC_DTS_CLIENT_PREFIX_2: + case GRPC_DTS_CLIENT_PREFIX_3: + case GRPC_DTS_CLIENT_PREFIX_4: + case GRPC_DTS_CLIENT_PREFIX_5: + case GRPC_DTS_CLIENT_PREFIX_6: + case GRPC_DTS_CLIENT_PREFIX_7: + case GRPC_DTS_CLIENT_PREFIX_8: + case GRPC_DTS_CLIENT_PREFIX_9: + case GRPC_DTS_CLIENT_PREFIX_10: + case GRPC_DTS_CLIENT_PREFIX_11: + case GRPC_DTS_CLIENT_PREFIX_12: + case GRPC_DTS_CLIENT_PREFIX_13: + case GRPC_DTS_CLIENT_PREFIX_14: + case GRPC_DTS_CLIENT_PREFIX_15: + case GRPC_DTS_CLIENT_PREFIX_16: + case GRPC_DTS_CLIENT_PREFIX_17: + case GRPC_DTS_CLIENT_PREFIX_18: + case GRPC_DTS_CLIENT_PREFIX_19: + case GRPC_DTS_CLIENT_PREFIX_20: + case GRPC_DTS_CLIENT_PREFIX_21: + case GRPC_DTS_CLIENT_PREFIX_22: + case GRPC_DTS_CLIENT_PREFIX_23: + while (cur != end && transport_parsing->deframe_state != GRPC_DTS_FH_0) { if (*cur != GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing ->deframe_state]) { - gpr_log(GPR_ERROR, + gpr_log(GPR_INFO, "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " "at byte %d", GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing @@ -283,74 +283,74 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, } /* fallthrough */ dts_fh_0: - case DTS_FH_0: + case GRPC_DTS_FH_0: GPR_ASSERT(cur < end); transport_parsing->incoming_frame_size = ((gpr_uint32)*cur) << 16; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_1; + transport_parsing->deframe_state = GRPC_DTS_FH_1; return 1; } /* fallthrough */ - case DTS_FH_1: + case GRPC_DTS_FH_1: GPR_ASSERT(cur < end); transport_parsing->incoming_frame_size |= ((gpr_uint32)*cur) << 8; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_2; + transport_parsing->deframe_state = GRPC_DTS_FH_2; return 1; } /* fallthrough */ - case DTS_FH_2: + case GRPC_DTS_FH_2: GPR_ASSERT(cur < end); transport_parsing->incoming_frame_size |= *cur; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_3; + transport_parsing->deframe_state = GRPC_DTS_FH_3; return 1; } /* fallthrough */ - case DTS_FH_3: + case GRPC_DTS_FH_3: GPR_ASSERT(cur < end); transport_parsing->incoming_frame_type = *cur; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_4; + transport_parsing->deframe_state = GRPC_DTS_FH_4; return 1; } /* fallthrough */ - case DTS_FH_4: + case GRPC_DTS_FH_4: GPR_ASSERT(cur < end); transport_parsing->incoming_frame_flags = *cur; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_5; + transport_parsing->deframe_state = GRPC_DTS_FH_5; return 1; } /* fallthrough */ - case DTS_FH_5: + case GRPC_DTS_FH_5: GPR_ASSERT(cur < end); transport_parsing->incoming_stream_id = (((gpr_uint32)*cur) & 0x7f) << 24; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_6; + transport_parsing->deframe_state = GRPC_DTS_FH_6; return 1; } /* fallthrough */ - case DTS_FH_6: + case GRPC_DTS_FH_6: GPR_ASSERT(cur < end); transport_parsing->incoming_stream_id |= ((gpr_uint32)*cur) << 16; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_7; + transport_parsing->deframe_state = GRPC_DTS_FH_7; return 1; } /* fallthrough */ - case DTS_FH_7: + case GRPC_DTS_FH_7: GPR_ASSERT(cur < end); transport_parsing->incoming_stream_id |= ((gpr_uint32)*cur) << 8; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_8; + transport_parsing->deframe_state = GRPC_DTS_FH_8; return 1; } /* fallthrough */ - case DTS_FH_8: + case GRPC_DTS_FH_8: GPR_ASSERT(cur < end); transport_parsing->incoming_stream_id |= ((gpr_uint32)*cur); - transport_parsing->deframe_state = DTS_FRAME; + transport_parsing->deframe_state = GRPC_DTS_FRAME; if (!init_frame_parser(transport_parsing)) { return 0; } @@ -364,7 +364,7 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, } transport_parsing->incoming_stream = NULL; if (++cur == end) { - transport_parsing->deframe_state = DTS_FH_0; + transport_parsing->deframe_state = GRPC_DTS_FH_0; return 1; } goto dts_fh_0; /* loop */ @@ -373,7 +373,7 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, return 1; } /* fallthrough */ - case DTS_FRAME: + case GRPC_DTS_FRAME: GPR_ASSERT(cur < end); if ((gpr_uint32)(end - cur) == transport_parsing->incoming_frame_size) { if (!parse_frame_slice( @@ -381,7 +381,7 @@ int grpc_chttp2_perform_read(grpc_chttp2_transport_parsing *transport_parsing, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 1)) { return 0; } - transport_parsing->deframe_state = DTS_FH_0; + transport_parsing->deframe_state = GRPC_DTS_FH_0; transport_parsing->incoming_stream = NULL; return 1; } else if ((gpr_uint32)(end - cur) > @@ -582,10 +582,10 @@ static void on_header(void *tp, grpc_mdelem *md) { GPR_ASSERT(stream_parsing); - IF_TRACING(gpr_log(GPR_INFO, "HTTP:%d:HDR: %s: %s", stream_parsing->id, - transport_parsing->is_client ? "CLI" : "SVR", - grpc_mdstr_as_c_string(md->key), - grpc_mdstr_as_c_string(md->value))); + GRPC_CHTTP2_IF_TRACING(gpr_log( + GPR_INFO, "HTTP:%d:HDR: %s: %s", stream_parsing->id, + transport_parsing->is_client ? "CLI" : "SVR", + grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value))); if (md->key == transport_parsing->str_grpc_timeout) { gpr_timespec *cached_timeout = grpc_mdelem_get_user_data(md, free_timeout); diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 706612e4f04..c6ba12fca87 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -344,10 +344,9 @@ void grpc_chttp2_for_all_streams( void (*cb)(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global)) { grpc_chttp2_stream *s; - for (s = TRANSPORT_FROM_GLOBAL(transport_global) - ->lists[GRPC_CHTTP2_LIST_ALL_STREAMS] - .head; - s; s = s->links[GRPC_CHTTP2_LIST_ALL_STREAMS].next) { + grpc_chttp2_transport *t = TRANSPORT_FROM_GLOBAL(transport_global); + for (s = t->lists[GRPC_CHTTP2_LIST_ALL_STREAMS].head; s != NULL; + s = s->links[GRPC_CHTTP2_LIST_ALL_STREAMS].next) { cb(transport_global, user_data, &s->global); } } diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index a8e87c3fe3a..fdcc3000991 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -54,10 +54,10 @@ int grpc_chttp2_unlocking_check_writes( !transport_global->sent_local_settings) { gpr_slice_buffer_add( &transport_writing->outbuf, - grpc_chttp2_settings_create(transport_global->settings[SENT_SETTINGS], - transport_global->settings[LOCAL_SETTINGS], - transport_global->force_send_settings, - GRPC_CHTTP2_NUM_SETTINGS)); + grpc_chttp2_settings_create( + transport_global->settings[GRPC_SENT_SETTINGS], + transport_global->settings[GRPC_LOCAL_SETTINGS], + transport_global->force_send_settings, GRPC_CHTTP2_NUM_SETTINGS)); transport_global->force_send_settings = 0; transport_global->dirtied_local_settings = 0; transport_global->sent_local_settings = 1; @@ -84,16 +84,16 @@ int grpc_chttp2_unlocking_check_writes( transport_global->outgoing_window -= window_delta; stream_global->outgoing_window -= window_delta; - if (stream_global->write_state == WRITE_STATE_QUEUED_CLOSE && + if (stream_global->write_state == GRPC_WRITE_STATE_QUEUED_CLOSE && stream_global->outgoing_sopb->nops == 0) { if (!transport_global->is_client && !stream_global->read_closed) { - stream_writing->send_closed = SEND_CLOSED_WITH_RST_STREAM; + stream_writing->send_closed = GRPC_SEND_CLOSED_WITH_RST_STREAM; } else { - stream_writing->send_closed = SEND_CLOSED; + stream_writing->send_closed = GRPC_SEND_CLOSED; } } if (stream_writing->sopb.nops > 0 || - stream_writing->send_closed != DONT_SEND_CLOSED) { + stream_writing->send_closed != GRPC_DONT_SEND_CLOSED) { grpc_chttp2_list_add_writing_stream(transport_writing, stream_writing); } @@ -112,7 +112,7 @@ int grpc_chttp2_unlocking_check_writes( while (grpc_chttp2_list_pop_writable_window_update_stream(transport_global, &stream_global)) { window_delta = - transport_global->settings[LOCAL_SETTINGS] + transport_global->settings[GRPC_LOCAL_SETTINGS] [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] - stream_global->incoming_window; if (!stream_global->read_closed && window_delta > 0) { @@ -128,7 +128,7 @@ int grpc_chttp2_unlocking_check_writes( } /* if the grpc_chttp2_transport is ready to send a window update, do so here - * also */ + also; 3/4 is a magic number that will likely get tuned soon */ if (transport_global->incoming_window < transport_global->connection_window_target * 3 / 4) { window_delta = transport_global->connection_window_target - @@ -174,11 +174,11 @@ static void finalize_outbuf(grpc_chttp2_transport_writing *transport_writing) { while ( grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) { grpc_chttp2_encode(stream_writing->sopb.ops, stream_writing->sopb.nops, - stream_writing->send_closed != DONT_SEND_CLOSED, + stream_writing->send_closed != GRPC_DONT_SEND_CLOSED, stream_writing->id, &transport_writing->hpack_compressor, &transport_writing->outbuf); stream_writing->sopb.nops = 0; - if (stream_writing->send_closed == SEND_CLOSED_WITH_RST_STREAM) { + if (stream_writing->send_closed == GRPC_SEND_CLOSED_WITH_RST_STREAM) { gpr_slice_buffer_add(&transport_writing->outbuf, grpc_chttp2_rst_stream_create(stream_writing->id, GRPC_CHTTP2_NO_ERROR)); @@ -201,8 +201,8 @@ void grpc_chttp2_cleanup_writing( while (grpc_chttp2_list_pop_written_stream( transport_global, transport_writing, &stream_global, &stream_writing)) { - if (stream_writing->send_closed != DONT_SEND_CLOSED) { - stream_global->write_state = WRITE_STATE_SENT_CLOSE; + if (stream_writing->send_closed != GRPC_DONT_SEND_CLOSED) { + stream_global->write_state = GRPC_WRITE_STATE_SENT_CLOSE; if (!transport_global->is_client) { stream_global->read_closed = 1; } diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index e96f6e0cdc9..94659a6bdf9 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -230,7 +230,8 @@ static void init_transport(grpc_chttp2_transport *t, t->parsing.is_client = is_client; t->parsing.str_grpc_timeout = grpc_mdstr_from_string(t->metadata_context, "grpc-timeout"); - t->parsing.deframe_state = is_client ? DTS_FH_0 : DTS_CLIENT_PREFIX_0; + t->parsing.deframe_state = + is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0; t->writing.is_client = is_client; gpr_slice_buffer_init(&t->global.qbuf); @@ -261,7 +262,7 @@ static void init_transport(grpc_chttp2_transport *t, /* copy in initial settings to all setting sets */ for (i = 0; i < GRPC_CHTTP2_NUM_SETTINGS; i++) { t->parsing.settings[i] = grpc_chttp2_settings_parameters[i].default_value; - for (j = 0; j < NUM_SETTING_SETS; j++) { + for (j = 0; j < GRPC_NUM_SETTING_SETS; j++) { t->global.settings[j][i] = grpc_chttp2_settings_parameters[i].default_value; } @@ -388,11 +389,11 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, GPR_ASSERT(t->parsing_active); s->global.id = (gpr_uint32)(gpr_uintptr)server_data; s->global.outgoing_window = - t->global - .settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + t->global.settings[GRPC_PEER_SETTINGS] + [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; s->parsing.incoming_window = s->global.incoming_window = - t->global - .settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + t->global.settings[GRPC_SENT_SETTINGS] + [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; *t->accepting_stream = s; grpc_chttp2_stream_map_add(&t->parsing_stream_map, s->global.id, s); s->global.in_stream_map = 1; @@ -509,8 +510,8 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, gpr_log(GPR_INFO, "Requested parameter %s clamped from %d to %d", sp->name, value, use_value); } - if (use_value != t->global.settings[LOCAL_SETTINGS][id]) { - t->global.settings[LOCAL_SETTINGS][id] = use_value; + if (use_value != t->global.settings[GRPC_LOCAL_SETTINGS][id]) { + t->global.settings[GRPC_LOCAL_SETTINGS][id] = use_value; t->global.dirtied_local_settings = 1; } } @@ -569,14 +570,15 @@ static void maybe_start_some_streams( * concurrency */ while (transport_global->next_stream_id <= MAX_CLIENT_STREAM_ID && transport_global->concurrent_stream_count < - transport_global->settings - [PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && + transport_global + ->settings[GRPC_PEER_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS] && grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { - IF_TRACING(gpr_log(GPR_DEBUG, - "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", - transport_global->is_client ? "CLI" : "SVR", - stream_global, transport_global->next_stream_id)); + GRPC_CHTTP2_IF_TRACING(gpr_log( + GPR_DEBUG, "HTTP:%s: Allocating new grpc_chttp2_stream %p to id %d", + transport_global->is_client ? "CLI" : "SVR", stream_global, + transport_global->next_stream_id)); GPR_ASSERT(stream_global->id == 0); stream_global->id = transport_global->next_stream_id; @@ -589,11 +591,11 @@ static void maybe_start_some_streams( } stream_global->outgoing_window = - transport_global - ->settings[PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + transport_global->settings[GRPC_PEER_SETTINGS] + [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; stream_global->incoming_window = - transport_global - ->settings[SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; + transport_global->settings[GRPC_SENT_SETTINGS] + [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; grpc_chttp2_stream_map_add( &TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map, stream_global->id, STREAM_FROM_GLOBAL(stream_global)); @@ -623,11 +625,12 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, stream_global->send_done_closure = op->on_done_send; if (!stream_global->cancelled) { stream_global->outgoing_sopb = op->send_ops; - if (op->is_last_send && stream_global->write_state == WRITE_STATE_OPEN) { - stream_global->write_state = WRITE_STATE_QUEUED_CLOSE; + if (op->is_last_send && + stream_global->write_state == GRPC_WRITE_STATE_OPEN) { + stream_global->write_state = GRPC_WRITE_STATE_QUEUED_CLOSE; } if (stream_global->id == 0) { - IF_TRACING(gpr_log( + GRPC_CHTTP2_IF_TRACING(gpr_log( GPR_DEBUG, "HTTP:%s: New grpc_chttp2_stream %p waiting for concurrency", transport_global->is_client ? "CLI" : "SVR", stream_global)); @@ -747,7 +750,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { while (grpc_chttp2_list_pop_closed_waiting_for_parsing(transport_global, &stream_global)) { GPR_ASSERT(stream_global->in_stream_map); - GPR_ASSERT(stream_global->write_state != WRITE_STATE_OPEN); + GPR_ASSERT(stream_global->write_state != GRPC_WRITE_STATE_OPEN); GPR_ASSERT(stream_global->read_closed); remove_stream(t, stream_global->id); grpc_chttp2_list_add_read_write_state_changed(transport_global, @@ -758,7 +761,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { while (grpc_chttp2_list_pop_read_write_state_changed(transport_global, &stream_global)) { if (stream_global->cancelled) { - stream_global->write_state = WRITE_STATE_SENT_CLOSE; + stream_global->write_state = GRPC_WRITE_STATE_SENT_CLOSE; stream_global->read_closed = 1; if (!stream_global->published_cancelled) { char buffer[GPR_LTOA_MIN_BUFSIZE]; @@ -771,7 +774,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { stream_global->published_cancelled = 1; } } - if (stream_global->write_state == WRITE_STATE_SENT_CLOSE && + if (stream_global->write_state == GRPC_WRITE_STATE_SENT_CLOSE && stream_global->read_closed && stream_global->in_stream_map) { if (t->parsing_active) { grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, @@ -790,7 +793,8 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { To fix this will require having an edge after stream-closed indicating that the stream is closed AND safe to delete. */ state = compute_state( - stream_global->write_state == WRITE_STATE_SENT_CLOSE && !stream_global->in_stream_map, + stream_global->write_state == GRPC_WRITE_STATE_SENT_CLOSE && + !stream_global->in_stream_map, stream_global->read_closed); if (stream_global->incoming_sopb.nops == 0 && state == stream_global->published_state) { @@ -842,6 +846,19 @@ static void drop_connection(grpc_chttp2_transport *t) { end_all_the_calls(t); } +/** update window from a settings change */ +static void update_global_window(void *args, gpr_uint32 id, void *stream) { + grpc_chttp2_transport *t = args; + grpc_chttp2_stream *s = stream; + grpc_chttp2_transport_global *transport_global = &t->global; + grpc_chttp2_stream_global *stream_global = &s->global; + + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("settings", transport_global, stream_global, + outgoing_window, + t->parsing.initial_window_update); + stream_global->outgoing_window += t->parsing.initial_window_update; +} + /* tcp read callback */ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { @@ -888,6 +905,10 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); t->global.concurrent_stream_count = grpc_chttp2_stream_map_size(&t->parsing_stream_map); + if (t->parsing.initial_window_update != 0) { + grpc_chttp2_stream_map_for_each(&t->parsing_stream_map, + update_global_window, t); + } /* handle higher level things */ grpc_chttp2_publish_reads(&t->global, &t->parsing); t->parsing_active = 0; From 25a2661d6daef0854040fde231e36d8e9e4cbae0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 25 Jun 2015 11:22:23 -0700 Subject: [PATCH 81/97] Changed argument names in Objective-C generated code --- src/compiler/objective_c_generator.cc | 23 ++++++++++++++--------- src/objective-c/tests/InteropTests.m | 8 ++++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index b235911479c..79a84b4a7a5 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -68,18 +68,19 @@ void PrintMethodSignature(Printer *printer, printer->Print(vars, "- ($return_type$)$method_name$With"); if (method->client_streaming()) { - printer->Print("RequestsWriter:(id)request"); + printer->Print("RequestsWriter:(id)requestWriter"); } else { printer->Print(vars, "Request:($request_class$ *)request"); } // TODO(jcanizales): Put this on a new line and align colons. - // TODO(jcanizales): eventHandler for server streaming? - printer->Print(" handler:(void(^)("); if (method->server_streaming()) { - printer->Print("BOOL done, "); + printer->Print(vars, " eventHandler:(void(^)(BOOL done, " + "$response_class$ *response, NSError *error))eventHandler"); + } else { + printer->Print(vars, " handler:(void(^)($response_class$ *response, " + "NSError *error))handler"); } - printer->Print(vars, "$response_class$ *response, NSError *error))handler"); } void PrintSimpleSignature(Printer *printer, @@ -125,11 +126,15 @@ void PrintSimpleImplementation(Printer *printer, printer->Print("{\n"); printer->Print(vars, " [[self RPCTo$method_name$With"); if (method->client_streaming()) { - printer->Print("RequestsWriter:request"); + printer->Print("RequestsWriter:requestWriter"); } else { printer->Print("Request:request"); } - printer->Print(" handler:handler] start];\n"); + if (method->server_streaming()) { + printer->Print(" eventHandler:eventHandler] start];\n"); + } else { + printer->Print(" handler:handler] start];\n"); + } printer->Print("}\n"); } @@ -141,7 +146,7 @@ void PrintAdvancedImplementation(Printer *printer, printer->Print(" requestsWriter:"); if (method->client_streaming()) { - printer->Print("request\n"); + printer->Print("requestWriter\n"); } else { printer->Print("[GRXWriter writerWithValue:request]\n"); } @@ -150,7 +155,7 @@ void PrintAdvancedImplementation(Printer *printer, printer->Print(" responsesWriteable:[GRXWriteable "); if (method->server_streaming()) { - printer->Print("writeableWithStreamHandler:handler]];\n"); + printer->Print("writeableWithStreamHandler:eventHandler]];\n"); } else { printer->Print("writeableWithSingleValueHandler:handler]];\n"); } diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 684f7c2ff6f..74f6b231cfd 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -174,7 +174,7 @@ __block int index = 0; [_service streamingOutputCallWithRequest:request - handler:^(BOOL done, + eventHandler:^(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error){ XCTAssertNil(error, @"Finished with unexpected error: %@", error); @@ -211,7 +211,7 @@ [requestsBuffer writeValue:request]; [_service fullDuplexCallWithRequestsWriter:requestsBuffer - handler:^(BOOL done, + eventHandler:^(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error) { XCTAssertNil(error, @"Finished with unexpected error: %@", error); @@ -242,7 +242,7 @@ - (void)testEmptyStreamRPC { __weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"]; [_service fullDuplexCallWithRequestsWriter:[GRXWriter emptyWriter] - handler:^(BOOL done, + eventHandler:^(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error) { XCTAssertNil(error, @"Finished with unexpected error: %@", error); @@ -283,7 +283,7 @@ [requestsBuffer writeValue:request]; __block ProtoRPC *call = [_service RPCToFullDuplexCallWithRequestsWriter:requestsBuffer - handler:^(BOOL done, + eventHandler:^(BOOL done, RMTStreamingOutputCallResponse *response, NSError *error) { if (receivedResponse) { From 857d250764f6eed65feb816439057f8411dae809 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 25 Jun 2015 21:58:18 +0200 Subject: [PATCH 82/97] Reworking the cascade kick to be Windows-specific. This brings the Windows port more in-par with Linux. We're now making sure all of the pollsets are going to return immediately before calling the shutdown callback. --- src/core/iomgr/pollset_windows.c | 10 ++++++++-- src/core/iomgr/pollset_windows.h | 1 + src/core/surface/completion_queue.c | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index 926ee8fdd90..8d6bc79c96c 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -48,6 +48,7 @@ won't actually do any polling, and return as quickly as possible. */ void grpc_pollset_init(grpc_pollset *pollset) { + memset(pollset, 0, sizeof(*pollset)); gpr_mu_init(&pollset->mu); gpr_cv_init(&pollset->cv); } @@ -55,7 +56,10 @@ void grpc_pollset_init(grpc_pollset *pollset) { void grpc_pollset_shutdown(grpc_pollset *pollset, void (*shutdown_done)(void *arg), void *shutdown_done_arg) { - grpc_pollset_kick(pollset); + gpr_mu_lock(&pollset->mu); + pollset->shutting_down = 1; + gpr_cv_broadcast(&pollset->cv); + gpr_mu_unlock(&pollset->mu); shutdown_done(shutdown_done_arg); } @@ -76,7 +80,9 @@ int grpc_pollset_work(grpc_pollset *pollset, gpr_timespec deadline) { if (grpc_alarm_check(&pollset->mu, now, &deadline)) { return 1 /* GPR_TRUE */; } - gpr_cv_wait(&pollset->cv, &pollset->mu, deadline); + if (!pollset->shutting_down) { + gpr_cv_wait(&pollset->cv, &pollset->mu, deadline); + } return 1 /* GPR_TRUE */; } diff --git a/src/core/iomgr/pollset_windows.h b/src/core/iomgr/pollset_windows.h index b4aec1b8098..57a29079266 100644 --- a/src/core/iomgr/pollset_windows.h +++ b/src/core/iomgr/pollset_windows.h @@ -46,6 +46,7 @@ typedef struct grpc_pollset { gpr_mu mu; gpr_cv cv; + int shutting_down; } grpc_pollset; #define GRPC_POLLSET_MU(pollset) (&(pollset)->mu) diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index 063a23cfb18..bd0fabf9dac 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -208,7 +208,6 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, } if (cc->shutdown) { ev = create_shutdown_event(); - grpc_pollset_kick(&cc->pollset); break; } if (!grpc_pollset_work(&cc->pollset, deadline)) { From 0b6ad7d4bc686c78995a830cccb39a7de2a929ae Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 25 Jun 2015 14:39:01 -0700 Subject: [PATCH 83/97] Bug fix. Do not push to incoming_queue after it is flushed. --- src/core/surface/call.c | 18 +++++++++------ test/cpp/end2end/end2end_test.cc | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 7 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index dd8eaa943e5..549ef8ca0da 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -156,6 +156,9 @@ struct grpc_call { gpr_uint8 reading_message; /* have we bound a pollset yet? */ gpr_uint8 bound_pollset; + /* is an error status set */ + gpr_uint8 error_status_set; + /* flags with bits corresponding to write states allowing us to determine what was sent */ gpr_uint16 last_send_contains; @@ -214,7 +217,7 @@ struct grpc_call { /* Received call statuses from various sources */ received_status status[STATUS_SOURCE_COUNT]; - /** Compression level for the call */ + /* Compression level for the call */ grpc_compression_level compression_level; /* Contexts for various subsystems (security, tracing, ...). */ @@ -409,6 +412,7 @@ static void set_status_code(grpc_call *call, status_source source, call->status[source].is_set = 1; call->status[source].code = status; + call->error_status_set = status != GRPC_STATUS_OK; if (status != GRPC_STATUS_OK && !grpc_bbq_empty(&call->incoming_queue)) { grpc_bbq_flush(&call->incoming_queue); @@ -686,13 +690,13 @@ static void call_on_done_send(void *pc, int success) { } static void finish_message(grpc_call *call) { - /* TODO(ctiller): this could be a lot faster if coded directly */ - grpc_byte_buffer *byte_buffer = grpc_raw_byte_buffer_create( - call->incoming_message.slices, call->incoming_message.count); + if (call->error_status_set == 0) { + /* TODO(ctiller): this could be a lot faster if coded directly */ + grpc_byte_buffer *byte_buffer = grpc_raw_byte_buffer_create( + call->incoming_message.slices, call->incoming_message.count); + grpc_bbq_push(&call->incoming_queue, byte_buffer); + } gpr_slice_buffer_reset_and_unref(&call->incoming_message); - - grpc_bbq_push(&call->incoming_queue, byte_buffer); - GPR_ASSERT(call->incoming_message.count == 0); call->reading_message = 0; } diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 45ba8b0878b..5e850ea30af 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -68,6 +68,8 @@ namespace testing { namespace { +const char* kServerCancelAfterReads = "cancel_after_reads"; + // When echo_deadline is requested, deadline seen in the ServerContext is set in // the response in seconds. void MaybeEchoDeadline(ServerContext* context, const EchoRequest* request, @@ -131,7 +133,23 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { EchoResponse* response) GRPC_OVERRIDE { EchoRequest request; response->set_message(""); + int cancel_after_reads = 0; + const std::multimap client_initial_metadata = + context->client_metadata(); + if (client_initial_metadata.find(kServerCancelAfterReads) != + client_initial_metadata.end()) { + std::istringstream iss( + client_initial_metadata.find(kServerCancelAfterReads)->second); + iss >> cancel_after_reads; + gpr_log(GPR_INFO, "cancel_after_reads %d", cancel_after_reads); + } while (reader->Read(&request)) { + if (cancel_after_reads == 1) { + gpr_log(GPR_INFO, "return cancel status"); + return Status::CANCELLED; + } else if (cancel_after_reads > 0) { + cancel_after_reads--; + } response->mutable_message()->append(request.message()); } return Status::OK; @@ -687,6 +705,27 @@ TEST_F(End2endTest, OverridePerCallCredentials) { EXPECT_TRUE(s.ok()); } +// Client sends 20 requests and the server returns CANCELLED status after +// reading 10 requests. +TEST_F(End2endTest, RequestStreamServerEarlyCancelTest) { + ResetStub(); + EchoRequest request; + EchoResponse response; + ClientContext context; + + context.AddMetadata(kServerCancelAfterReads, "10"); + auto stream = stub_->RequestStream(&context, &response); + request.set_message("hello"); + int send_messages = 20; + while (send_messages > 0) { + EXPECT_TRUE(stream->Write(request)); + send_messages--; + } + stream->WritesDone(); + Status s = stream->Finish(); + EXPECT_EQ(s.error_code(), StatusCode::CANCELLED); +} + } // namespace testing } // namespace grpc From f4a99a1471a97a9c4b623f42aed8a988fc7e605f Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 25 Jun 2015 15:12:41 -0700 Subject: [PATCH 84/97] php extension: do not link rt in osx --- src/php/ext/grpc/config.m4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4 index b485aabf404..8bacdfbfeca 100755 --- a/src/php/ext/grpc/config.m4 +++ b/src/php/ext/grpc/config.m4 @@ -35,8 +35,13 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(dl) - PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(rt) + case $host in + *darwin*) ;; + *) + PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) + PHP_ADD_LIBRARY(rt) + ;; + esac GRPC_LIBDIR=$GRPC_DIR/${GRPC_LIB_SUBDIR-lib} From 76ed0cc26a69d768513d59d0f1913e669f002f72 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 25 Jun 2015 15:38:59 -0700 Subject: [PATCH 85/97] php: update README --- src/php/README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/php/README.md b/src/php/README.md index 42ddb2d7317..370a8107f4f 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -5,14 +5,27 @@ This directory contains source code for PHP implementation of gRPC layered on sh #Status -Pre-Alpha : This gRPC PHP implementation is work-in-progress and is not expected to work yet. +Alpha : Ready for early adopters ## ENVIRONMENT -Prerequisite: PHP 5.5 or later, PHPUnit, pecl +Prerequisite: PHP 5.5 or later, `phpunit`, `pecl` + +Linux: + +```sh +$ sudo apt-get install php5 php5-dev phpunit php-pear +``` + +OS X: ```sh -sudo apt-get install php5 php5-dev phpunit php-pear +$ curl https://phar.phpunit.de/phpunit.phar -o phpunit.phar +$ chmod +x phpunit.phar +$ sudo mv phpunit.phar /usr/local/bin/phpunit + +$ curl -O http://pear.php.net/go-pear.phar +$ sudo php -d detect_unicode=0 go-pear.phar ``` ## Build from Homebrew @@ -71,8 +84,8 @@ $ make $ sudo make install ``` -In your php.ini file, add the line `extension=grpc.so` to load the extension -at PHP startup. +(Optional) In your php.ini file, add the line `extension=grpc.so` to load +the extension at PHP startup. Install Composer From f8bfd9a76d904200837661aa04a6f867ac2a9005 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 25 Jun 2015 16:11:20 -0700 Subject: [PATCH 86/97] revert wording of optional in php doc --- src/php/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/php/README.md b/src/php/README.md index 370a8107f4f..1804606e091 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -84,8 +84,8 @@ $ make $ sudo make install ``` -(Optional) In your php.ini file, add the line `extension=grpc.so` to load -the extension at PHP startup. +In your php.ini file, add the line `extension=grpc.so` to load the extension +at PHP startup. Install Composer From 5937b5bc5a6ff73b6e64cdda1c2f76fe1d2aa621 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 26 Jun 2015 02:04:12 +0200 Subject: [PATCH 87/97] Exporting XML reports, JUnit-compatible. --- tools/jenkins/docker_run_jenkins.sh | 2 +- tools/jenkins/run_jenkins.sh | 3 ++- tools/run_tests/jobset.py | 31 ++++++++++++++++++++++------- tools/run_tests/run_tests.py | 18 ++++++++++++++--- 4 files changed, 42 insertions(+), 12 deletions(-) diff --git a/tools/jenkins/docker_run_jenkins.sh b/tools/jenkins/docker_run_jenkins.sh index dbb04bb3c9b..90107169baa 100755 --- a/tools/jenkins/docker_run_jenkins.sh +++ b/tools/jenkins/docker_run_jenkins.sh @@ -42,4 +42,4 @@ cd /var/local/git/grpc nvm use 0.12 rvm use ruby-2.1 tools/run_tests/prepare_travis.sh -tools/run_tests/run_tests.py -t -c $config -l $language +tools/run_tests/run_tests.py -t -c $config -l $language -x report.xml diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh index 513d4a35fb6..6042655a275 100755 --- a/tools/jenkins/run_jenkins.sh +++ b/tools/jenkins/run_jenkins.sh @@ -72,6 +72,7 @@ then DOCKER_CID=`cat docker.cid` docker kill $DOCKER_CID + docker cp $DOCKER_CID:/var/local/git/grpc/report.xml $git_root if [ "$DOCKER_FAILED" == "" ] then echo "Docker finished successfully, deleting the container $DOCKER_CID" @@ -93,7 +94,7 @@ then /cygdrive/c/nuget/nuget.exe restore vsprojects/grpc.sln /cygdrive/c/nuget/nuget.exe restore src/csharp/Grpc.sln - python tools/run_tests/run_tests.py -t -l $language + python tools/run_tests/run_tests.py -t -l $language -x report.xml else echo "Unknown platform $platform" exit 1 diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 058a30d1ce2..8694b8f6bd7 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -34,10 +34,12 @@ import multiprocessing import os import platform import signal +import string import subprocess import sys import tempfile import time +import xml.etree.cElementTree as ET _DEFAULT_MAX_JOBS = 16 * multiprocessing.cpu_count() @@ -159,7 +161,7 @@ class JobSpec(object): class Job(object): """Manages one job.""" - def __init__(self, spec, bin_hash, newline_on_success, travis): + def __init__(self, spec, bin_hash, newline_on_success, travis, xml_report): self._spec = spec self._bin_hash = bin_hash self._tempfile = tempfile.TemporaryFile() @@ -176,19 +178,27 @@ class Job(object): self._state = _RUNNING self._newline_on_success = newline_on_success self._travis = travis + self._xml_test = ET.SubElement(xml_report, 'testcase', + name=self._spec.shortname) if xml_report is not None else None message('START', spec.shortname, do_newline=self._travis) def state(self, update_cache): """Poll current state of the job. Prints messages at completion.""" if self._state == _RUNNING and self._process.poll() is not None: elapsed = time.time() - self._start + self._tempfile.seek(0) + stdout = self._tempfile.read() + filtered_stdout = filter(lambda x: x in string.printable, stdout.decode(errors='ignore')) + if self._xml_test is not None: + self._xml_test.set('time', str(elapsed)) + ET.SubElement(self._xml_test, 'system-out').text = filtered_stdout if self._process.returncode != 0: self._state = _FAILURE - self._tempfile.seek(0) - stdout = self._tempfile.read() message('FAILED', '%s [ret=%d, pid=%d]' % ( self._spec.shortname, self._process.returncode, self._process.pid), stdout, do_newline=True) + if self._xml_test is not None: + ET.SubElement(self._xml_test, 'failure', message='Failure').text else: self._state = _SUCCESS message('PASSED', '%s [time=%.1fsec]' % (self._spec.shortname, elapsed), @@ -200,6 +210,9 @@ class Job(object): stdout = self._tempfile.read() message('TIMEOUT', self._spec.shortname, stdout, do_newline=True) self.kill() + if self._xml_test is not None: + ET.SubElement(self._xml_test, 'system-out').text = stdout + ET.SubElement(self._xml_test, 'error', message='Timeout') return self._state def kill(self): @@ -212,7 +225,7 @@ class Jobset(object): """Manages one run of jobs.""" def __init__(self, check_cancelled, maxjobs, newline_on_success, travis, - stop_on_failure, cache): + stop_on_failure, cache, xml_report): self._running = set() self._check_cancelled = check_cancelled self._cancelled = False @@ -224,6 +237,7 @@ class Jobset(object): self._cache = cache self._stop_on_failure = stop_on_failure self._hashes = {} + self._xml_report = xml_report def start(self, spec): """Start a job. Return True on success, False on failure.""" @@ -250,7 +264,8 @@ class Jobset(object): self._running.add(Job(spec, bin_hash, self._newline_on_success, - self._travis)) + self._travis, + self._xml_report)) except: message('FAILED', spec.shortname) self._cancelled = True @@ -324,11 +339,13 @@ def run(cmdlines, travis=False, infinite_runs=False, stop_on_failure=False, - cache=None): + cache=None, + xml_report=None): js = Jobset(check_cancelled, maxjobs if maxjobs is not None else _DEFAULT_MAX_JOBS, newline_on_success, travis, stop_on_failure, - cache if cache is not None else NoCache()) + cache if cache is not None else NoCache(), + xml_report) for cmdline in cmdlines: if not js.start(cmdline): break diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 5ed70f0b7e2..9edef4603c1 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -42,6 +42,7 @@ import re import subprocess import sys import time +import xml.etree.cElementTree as ET import jobset import watch_dirs @@ -396,6 +397,8 @@ argp.add_argument('-S', '--stop_on_failure', action='store_const', const=True) argp.add_argument('-a', '--antagonists', default=0, type=int) +argp.add_argument('-x', '--xml_report', default=None, type=str, + help='Generates a JUnit-compatible XML report') args = argp.parse_args() # grab config @@ -492,7 +495,7 @@ class TestCache(object): self.parse(json.loads(f.read())) -def _build_and_run(check_cancelled, newline_on_success, travis, cache): +def _build_and_run(check_cancelled, newline_on_success, travis, cache, xml_report): """Do one pass of building & running tests.""" # build latest sequentially if not jobset.run(build_steps, maxjobs=1, @@ -518,16 +521,24 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache): runs_sequence = (itertools.repeat(massaged_one_run) if infinite_runs else itertools.repeat(massaged_one_run, runs_per_test)) all_runs = itertools.chain.from_iterable(runs_sequence) + + root = ET.Element('testsuites') if xml_report else None + testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') if xml_report else None + if not jobset.run(all_runs, check_cancelled, newline_on_success=newline_on_success, travis=travis, infinite_runs=infinite_runs, maxjobs=args.jobs, stop_on_failure=args.stop_on_failure, - cache=cache): + cache=cache if not xml_report else None, + xml_report=testsuite): return 2 finally: for antagonist in antagonists: antagonist.kill() + if xml_report: + tree = ET.ElementTree(root) + tree.write(xml_report, encoding='UTF-8') if cache: cache.save() @@ -559,7 +570,8 @@ else: result = _build_and_run(check_cancelled=lambda: False, newline_on_success=args.newline_on_success, travis=args.travis, - cache=test_cache) + cache=test_cache, + xml_report=args.xml_report) if result == 0: jobset.message('SUCCESS', 'All tests passed', do_newline=True) else: From d35f93d1b3c648abc6b16c24fe584d23287e35f8 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 27 Jun 2015 00:57:29 +0200 Subject: [PATCH 88/97] Merges broke the build - regenerating. --- BUILD | 6 ++++++ tools/run_tests/sources_and_headers.json | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/BUILD b/BUILD index 2110d02abe7..7273b17d739 100644 --- a/BUILD +++ b/BUILD @@ -978,11 +978,15 @@ objc_library( "src/core/transport/chttp2/hpack_parser.c", "src/core/transport/chttp2/hpack_table.c", "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/incoming_metadata.c", + "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_lists.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2/writing.c", "src/core/transport/chttp2_transport.c", "src/core/transport/metadata.c", "src/core/transport/stream_op.c", @@ -1071,6 +1075,8 @@ objc_library( "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.h", + "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", "src/core/transport/chttp2/stream_map.h", diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 5c74bf1eea3..eb2514fa46d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -8717,6 +8717,8 @@ "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.h", + "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", "src/core/transport/chttp2/stream_map.h", @@ -8933,16 +8935,22 @@ "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.c", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.c", + "src/core/transport/chttp2/incoming_metadata.h", + "src/core/transport/chttp2/internal.h", + "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.c", "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_lists.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/stream_map.h", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/timeout_encoding.h", "src/core/transport/chttp2/varint.c", "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2/writing.c", "src/core/transport/chttp2_transport.c", "src/core/transport/chttp2_transport.h", "src/core/transport/metadata.c", @@ -9116,6 +9124,8 @@ "src/core/transport/chttp2/hpack_table.h", "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.h", + "src/core/transport/chttp2/internal.h", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.h", "src/core/transport/chttp2/stream_map.h", @@ -9296,16 +9306,22 @@ "src/core/transport/chttp2/http2_errors.h", "src/core/transport/chttp2/huffsyms.c", "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.c", + "src/core/transport/chttp2/incoming_metadata.h", + "src/core/transport/chttp2/internal.h", + "src/core/transport/chttp2/parsing.c", "src/core/transport/chttp2/status_conversion.c", "src/core/transport/chttp2/status_conversion.h", "src/core/transport/chttp2/stream_encoder.c", "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_lists.c", "src/core/transport/chttp2/stream_map.c", "src/core/transport/chttp2/stream_map.h", "src/core/transport/chttp2/timeout_encoding.c", "src/core/transport/chttp2/timeout_encoding.h", "src/core/transport/chttp2/varint.c", "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2/writing.c", "src/core/transport/chttp2_transport.c", "src/core/transport/chttp2_transport.h", "src/core/transport/metadata.c", From b70b70956d11ab909d92129be63fbc42ec06ff74 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 26 Jun 2015 16:25:11 -0700 Subject: [PATCH 89/97] Clarify caller contract for grpc_call_start_batch --- include/grpc/grpc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 8b4676562bb..637f473b821 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -396,7 +396,9 @@ grpc_call *grpc_channel_create_registered_call( completion of type 'tag' to the completion queue bound to the call. The order of ops specified in the batch has no significance. Only one operation of each type can be active at once in any given - batch. + batch. You must call grpc_completion_queue_next or + grpc_completion_queue_pluck on the completion queue associated with 'call' + for work to be performed. THREAD SAFETY: access to grpc_call_start_batch in multi-threaded environment needs to be synchronized. As an optimization, you may synchronize batches containing just send operations independently from batches containing just From 7b1a0ca2dd14fbbb99923b5c68534d890c3bb8f9 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 26 Jun 2015 21:49:42 -0700 Subject: [PATCH 90/97] Switch to grpc secure --- BUILD | 43 ++++++++++++++++++++++++++++++++++++++-- templates/BUILD.template | 2 +- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/BUILD b/BUILD index 7273b17d739..9263918880e 100644 --- a/BUILD +++ b/BUILD @@ -892,9 +892,31 @@ objc_library( objc_library( - name = "grpc_unsecure_objc", + name = "grpc_objc", srcs = [ - "src/core/surface/init_unsecure.c", + "src/core/httpcli/format_request.c", + "src/core/httpcli/httpcli.c", + "src/core/httpcli/httpcli_security_connector.c", + "src/core/httpcli/parser.c", + "src/core/security/base64.c", + "src/core/security/client_auth_filter.c", + "src/core/security/credentials.c", + "src/core/security/credentials_metadata.c", + "src/core/security/credentials_posix.c", + "src/core/security/credentials_win32.c", + "src/core/security/google_default_credentials.c", + "src/core/security/json_token.c", + "src/core/security/secure_endpoint.c", + "src/core/security/secure_transport_setup.c", + "src/core/security/security_connector.c", + "src/core/security/security_context.c", + "src/core/security/server_auth_filter.c", + "src/core/security/server_secure_chttp2.c", + "src/core/surface/init_secure.c", + "src/core/surface/secure_channel_create.c", + "src/core/tsi/fake_transport_security.c", + "src/core/tsi/ssl_transport_security.c", + "src/core/tsi/transport_security.c", "src/core/census/grpc_context.c", "src/core/channel/channel_args.c", "src/core/channel/channel_stack.c", @@ -996,12 +1018,29 @@ objc_library( "src/core/census/initialize.c", ], hdrs = [ + "include/grpc/grpc_security.h", "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", "include/grpc/census.h", + "src/core/httpcli/format_request.h", + "src/core/httpcli/httpcli.h", + "src/core/httpcli/httpcli_security_connector.h", + "src/core/httpcli/parser.h", + "src/core/security/auth_filters.h", + "src/core/security/base64.h", + "src/core/security/credentials.h", + "src/core/security/json_token.h", + "src/core/security/secure_endpoint.h", + "src/core/security/secure_transport_setup.h", + "src/core/security/security_connector.h", + "src/core/security/security_context.h", + "src/core/tsi/fake_transport_security.h", + "src/core/tsi/ssl_transport_security.h", + "src/core/tsi/transport_security.h", + "src/core/tsi/transport_security_interface.h", "src/core/census/grpc_context.h", "src/core/channel/census_filter.h", "src/core/channel/channel_args.h", diff --git a/templates/BUILD.template b/templates/BUILD.template index 98ad08a01c8..fcfaef0d485 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -64,7 +64,7 @@ ${cc_library(lib)} % endfor % for lib in libs: -% if lib.name in ("grpc_unsecure", "gpr"): +% if lib.name in ("grpc", "gpr"): ${objc_library(lib)} % endif % endfor From 4dc4e3dffb9cfab2e077545d29e7b3c9bd786264 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 26 Jun 2015 22:12:02 -0700 Subject: [PATCH 91/97] Blaze dependency on //external:libssl_objc --- BUILD | 1 + templates/BUILD.template | 3 +++ 2 files changed, 4 insertions(+) diff --git a/BUILD b/BUILD index 9263918880e..83130eabb31 100644 --- a/BUILD +++ b/BUILD @@ -1134,6 +1134,7 @@ objc_library( ], deps = [ ":gpr_objc", + "//external:libssl_objc", ], sdk_dylibs = ["libz"], ) diff --git a/templates/BUILD.template b/templates/BUILD.template index fcfaef0d485..76f06c2caab 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -127,6 +127,9 @@ objc_library( % for dep in lib.get("deps", []): ":${dep}_objc", % endfor +% if lib.get('secure', 'no') == 'yes': + "//external:libssl_objc", +% endif ], % if lib.get("baselib", false): sdk_dylibs = ["libz"], From 66e358b1e08b978bcd50e1f357d8968acac07a1f Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 27 Jun 2015 22:37:50 +0200 Subject: [PATCH 92/97] Disabling saving failed containers. We clearly don't have enough space for that, if we are to run our tests every few minutes. We can revisit that later and automatically purge old containers for example. --- tools/jenkins/run_jenkins.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh index 6042655a275..f2091e2423c 100755 --- a/tools/jenkins/run_jenkins.sh +++ b/tools/jenkins/run_jenkins.sh @@ -73,15 +73,7 @@ then DOCKER_CID=`cat docker.cid` docker kill $DOCKER_CID docker cp $DOCKER_CID:/var/local/git/grpc/report.xml $git_root - if [ "$DOCKER_FAILED" == "" ] - then - echo "Docker finished successfully, deleting the container $DOCKER_CID" - docker rm $DOCKER_CID - else - echo "Docker exited with failure, keeping container $DOCKER_CID." - echo "You can SSH to the worker and use 'docker commit CID YOUR_IMAGE_NAME' and 'docker run -i -t YOUR_IMAGE_NAME bash' to debug the problem." - exit 1 - fi + docker rm $DOCKER_CID elif [ "$platform" == "windows" ] then From 866255ec29ab09ce59950d0c3580b18b92d4db25 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sat, 20 Jun 2015 18:58:38 -0700 Subject: [PATCH 93/97] Add BUILD target for GRPCClient --- BUILD | 19 +++++++++++++++++++ templates/BUILD.template | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/BUILD b/BUILD index 83130eabb31..648c030930d 100644 --- a/BUILD +++ b/BUILD @@ -1233,3 +1233,22 @@ objc_library( srcs = glob([rx_library_path + "/private/*.m"]), visibility = ["//visibility:private"], ) + +objc_client_path = objc_path + "/GRPCClient" + +objc_library( + name = "grpc_client", + hdrs = glob([ + objc_client_path + "/*.h", + objc_client_path + "/private/*.h", + ]), + srcs = glob([ + objc_client_path + "/*.m", + objc_client_path + "/private/*.m", + ]), + includes = [objc_path], + deps = [ + ":grpc_objc", + ":rx_library", + ], +) diff --git a/templates/BUILD.template b/templates/BUILD.template index 76f06c2caab..0841b66e7cb 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -179,3 +179,22 @@ objc_library( srcs = glob([rx_library_path + "/private/*.m"]), visibility = ["//visibility:private"], ) + +objc_client_path = objc_path + "/GRPCClient" + +objc_library( + name = "grpc_client", + hdrs = glob([ + objc_client_path + "/*.h", + objc_client_path + "/private/*.h", + ]), + srcs = glob([ + objc_client_path + "/*.m", + objc_client_path + "/private/*.m", + ]), + includes = [objc_path], + deps = [ + ":grpc_objc", + ":rx_library", + ], +) From bb54ae8073d7069808e4e34f3f13480704c9b55b Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 28 Jun 2015 06:50:58 -0700 Subject: [PATCH 94/97] Add roots.pem bundle to the Bazel target, and use a better bundle name. --- BUILD | 7 +++++++ gRPC.podspec | 2 +- src/objective-c/GRPCClient/private/GRPCSecureChannel.m | 6 +++++- templates/BUILD.template | 7 +++++++ templates/gRPC.podspec.template | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/BUILD b/BUILD index 648c030930d..424cb970a80 100644 --- a/BUILD +++ b/BUILD @@ -1247,8 +1247,15 @@ objc_library( objc_client_path + "/private/*.m", ]), includes = [objc_path], + bundles = [":gRPCCertificates"], deps = [ ":grpc_objc", ":rx_library", ], ) + +objc_bundle_library( + # The choice of name is signicant here, since it determines the bundle name. + name = "gRPCCertificates", + resources = ["etc/roots.pem"], +) diff --git a/gRPC.podspec b/gRPC.podspec index 37b52dea1b6..1a4dfd4c9a6 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -520,7 +520,7 @@ Pod::Spec.new do |s| ss.dependency 'gRPC/RxLibrary' # Certificates, to be able to establish TLS connections: - ss.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } + ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } end # RPC library for ProtocolBuffers, based on gRPC diff --git a/src/objective-c/GRPCClient/private/GRPCSecureChannel.m b/src/objective-c/GRPCClient/private/GRPCSecureChannel.m index 0f6eece885e..43a8bd539ed 100644 --- a/src/objective-c/GRPCClient/private/GRPCSecureChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCSecureChannel.m @@ -43,8 +43,12 @@ dispatch_once(&loading, ^{ // Do not use NSBundle.mainBundle, as it's nil for tests of library projects. NSBundle *bundle = [NSBundle bundleForClass:self.class]; - NSString *certsPath = [bundle pathForResource:@"gRPC.bundle/roots" ofType:@"pem"]; + NSString *certsPath = [bundle pathForResource:@"gRPCCertificates.bundle/roots" ofType:@"pem"]; + NSAssert(certsPath.length, + @"gRPCCertificates.bundle/roots.pem not found under %@. This file, with the root " + "certificates, is needed to establish TLS (HTTPS) connections.", bundle.bundlePath); NSData *certsData = [NSData dataWithContentsOfFile:certsPath]; + NSAssert(certsData.length, @"No data read from %@", certsPath); NSString *certsString = [[NSString alloc] initWithData:certsData encoding:NSUTF8StringEncoding]; kCredentials = grpc_ssl_credentials_create(certsString.UTF8String, NULL); }); diff --git a/templates/BUILD.template b/templates/BUILD.template index 0841b66e7cb..37be9671da7 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -193,8 +193,15 @@ objc_library( objc_client_path + "/private/*.m", ]), includes = [objc_path], + bundles = [":gRPCCertificates"], deps = [ ":grpc_objc", ":rx_library", ], ) + +objc_bundle_library( + # The choice of name is signicant here, since it determines the bundle name. + name = "gRPCCertificates", + resources = ["etc/roots.pem"], +) diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 02e90d71804..deea07cee35 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -137,7 +137,7 @@ Pod::Spec.new do |s| ss.dependency 'gRPC/RxLibrary' # Certificates, to be able to establish TLS connections: - ss.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } + ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } end # RPC library for ProtocolBuffers, based on gRPC From bba8076ed4539205c5ecaaff31fae0571bd199f3 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 26 Jun 2015 23:25:48 -0700 Subject: [PATCH 95/97] Fix indents of rx_library blaze target --- BUILD | 34 +++++++++++++++++----------------- templates/BUILD.template | 34 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/BUILD b/BUILD index 424cb970a80..934146f57e0 100644 --- a/BUILD +++ b/BUILD @@ -1212,26 +1212,26 @@ objc_path = "src/objective-c" rx_library_path = objc_path + "/RxLibrary" objc_library( - name = "rx_library", - hdrs = glob([ - rx_library_path + "/*.h", - rx_library_path + "/transformations/*.h", - ]), - srcs = glob([ - rx_library_path + "/*.m", - rx_library_path + "/transformations/*.m", - ]), - includes = [objc_path], - deps = [ - ":rx_library_private", - ], + name = "rx_library", + hdrs = glob([ + rx_library_path + "/*.h", + rx_library_path + "/transformations/*.h", + ]), + srcs = glob([ + rx_library_path + "/*.m", + rx_library_path + "/transformations/*.m", + ]), + includes = [objc_path], + deps = [ + ":rx_library_private", + ], ) objc_library( - name = "rx_library_private", - hdrs = glob([rx_library_path + "/private/*.h"]), - srcs = glob([rx_library_path + "/private/*.m"]), - visibility = ["//visibility:private"], + name = "rx_library_private", + hdrs = glob([rx_library_path + "/private/*.h"]), + srcs = glob([rx_library_path + "/private/*.m"]), + visibility = ["//visibility:private"], ) objc_client_path = objc_path + "/GRPCClient" diff --git a/templates/BUILD.template b/templates/BUILD.template index 37be9671da7..4d2bf7db283 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -158,26 +158,26 @@ objc_path = "src/objective-c" rx_library_path = objc_path + "/RxLibrary" objc_library( - name = "rx_library", - hdrs = glob([ - rx_library_path + "/*.h", - rx_library_path + "/transformations/*.h", - ]), - srcs = glob([ - rx_library_path + "/*.m", - rx_library_path + "/transformations/*.m", - ]), - includes = [objc_path], - deps = [ - ":rx_library_private", - ], + name = "rx_library", + hdrs = glob([ + rx_library_path + "/*.h", + rx_library_path + "/transformations/*.h", + ]), + srcs = glob([ + rx_library_path + "/*.m", + rx_library_path + "/transformations/*.m", + ]), + includes = [objc_path], + deps = [ + ":rx_library_private", + ], ) objc_library( - name = "rx_library_private", - hdrs = glob([rx_library_path + "/private/*.h"]), - srcs = glob([rx_library_path + "/private/*.m"]), - visibility = ["//visibility:private"], + name = "rx_library_private", + hdrs = glob([rx_library_path + "/private/*.h"]), + srcs = glob([rx_library_path + "/private/*.m"]), + visibility = ["//visibility:private"], ) objc_client_path = objc_path + "/GRPCClient" From bb30971cecb6a2e0af4bcea95995892567e68b95 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 28 Jun 2015 16:04:47 -0700 Subject: [PATCH 96/97] Fix run_tests forever mode --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a0e0fac27b1..fd90613ad66 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -496,7 +496,7 @@ class TestCache(object): self.parse(json.loads(f.read())) -def _build_and_run(check_cancelled, newline_on_success, travis, cache, xml_report): +def _build_and_run(check_cancelled, newline_on_success, travis, cache, xml_report=None): """Do one pass of building & running tests.""" # build latest sequentially if not jobset.run(build_steps, maxjobs=1, From 85b5d76c2b9e3e4ccdd28cb724e5306d3c7ad311 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Mon, 29 Jun 2015 10:15:04 -0700 Subject: [PATCH 97/97] php minor script fix --- src/php/bin/determine_extension_dir.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/php/bin/determine_extension_dir.sh b/src/php/bin/determine_extension_dir.sh index 6fc392afc0a..6bbd934bf13 100755 --- a/src/php/bin/determine_extension_dir.sh +++ b/src/php/bin/determine_extension_dir.sh @@ -29,15 +29,15 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. set -e -default_extension_dir=$(php -i | grep extension_dir | sed 's/.*=> //g') +default_extension_dir=$(php-config --extension-dir) if command -v brew >/dev/null && [ -d $(brew --prefix)/opt/grpc-php ]; then # homebrew and the grpc-php formula are installed extension_dir="-d extension_dir="$(brew --prefix)/opt/grpc-php -elif [ ! -f $default_extension_dir/grpc.so ]; then +elif [ ! -e $default_extension_dir/grpc.so ]; then # the grpc extension is not found in the default PHP extension dir # try the source modules directory module_dir=../ext/grpc/modules - if [ ! -f $module_dir/grpc.so ]; then + if [ ! -e $module_dir/grpc.so ]; then echo "Please run 'phpize && ./configure && make' from ext/grpc first" exit 1 fi