|
|
@ -338,12 +338,10 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
t->dirtied_local_settings = 1; |
|
|
|
t->dirtied_local_settings = 1; |
|
|
|
if (!true /*diable flow control */) { |
|
|
|
|
|
|
|
/* Hack: it's common for implementations to assume 65536 bytes initial send
|
|
|
|
/* Hack: it's common for implementations to assume 65536 bytes initial send
|
|
|
|
window -- this should by rights be 0 */ |
|
|
|
window -- this should by rights be 0 */ |
|
|
|
t->force_send_settings = 1 << GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; |
|
|
|
t->force_send_settings = 1 << GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; |
|
|
|
t->sent_local_settings = 0; |
|
|
|
t->sent_local_settings = 0; |
|
|
|
} |
|
|
|
|
|
|
|
t->write_buffer_size = grpc_core::chttp2::kDefaultWindow; |
|
|
|
t->write_buffer_size = grpc_core::chttp2::kDefaultWindow; |
|
|
|
|
|
|
|
|
|
|
|
if (is_client) { |
|
|
|
if (is_client) { |
|
|
@ -546,23 +544,8 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Tune the heck out of this
|
|
|
|
|
|
|
|
const uint32_t kFrameSize = 1024 * 1024; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (true /* disable flow control*/) { |
|
|
|
if (true /* disable flow control*/) { |
|
|
|
t->flow_control.Init<grpc_core::chttp2::TransportFlowControlDisabled>(); |
|
|
|
t->flow_control.Init<grpc_core::chttp2::TransportFlowControlDisabled>(t); |
|
|
|
t->settings[GRPC_PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE] = |
|
|
|
|
|
|
|
kFrameSize; |
|
|
|
|
|
|
|
t->settings[GRPC_SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE] = |
|
|
|
|
|
|
|
kFrameSize; |
|
|
|
|
|
|
|
t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE] = |
|
|
|
|
|
|
|
kFrameSize; |
|
|
|
|
|
|
|
t->settings[GRPC_PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] = |
|
|
|
|
|
|
|
grpc_core::chttp2::kMaxWindow; |
|
|
|
|
|
|
|
t->settings[GRPC_SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] = |
|
|
|
|
|
|
|
grpc_core::chttp2::kMaxWindow; |
|
|
|
|
|
|
|
t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE] = |
|
|
|
|
|
|
|
grpc_core::chttp2::kMaxWindow; |
|
|
|
|
|
|
|
enable_bdp = false; |
|
|
|
enable_bdp = false; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
t->flow_control.Init<grpc_core::chttp2::TransportFlowControl>(exec_ctx, t, |
|
|
|
t->flow_control.Init<grpc_core::chttp2::TransportFlowControl>(exec_ctx, t, |
|
|
@ -739,13 +722,13 @@ static int init_stream(grpc_exec_ctx* exec_ctx, grpc_transport* gt, |
|
|
|
post_destructive_reclaimer(exec_ctx, t); |
|
|
|
post_destructive_reclaimer(exec_ctx, t); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (true /* disable flow control */) { |
|
|
|
if (t->flow_control->flow_control_enabled()) { |
|
|
|
s->flow_control.Init<grpc_core::chttp2::StreamFlowControlDisabled>(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
s->flow_control.Init<grpc_core::chttp2::StreamFlowControl>( |
|
|
|
s->flow_control.Init<grpc_core::chttp2::StreamFlowControl>( |
|
|
|
static_cast<grpc_core::chttp2::TransportFlowControl*>( |
|
|
|
static_cast<grpc_core::chttp2::TransportFlowControl*>( |
|
|
|
t->flow_control.get()), |
|
|
|
t->flow_control.get()), |
|
|
|
s); |
|
|
|
s); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
s->flow_control.Init<grpc_core::chttp2::StreamFlowControlDisabled>(); |
|
|
|
} |
|
|
|
} |
|
|
|
GPR_TIMER_END("init_stream", 0); |
|
|
|
GPR_TIMER_END("init_stream", 0); |
|
|
|
|
|
|
|
|
|
|
|