|
|
|
@ -338,12 +338,10 @@ static void init_transport(grpc_exec_ctx* exec_ctx, grpc_chttp2_transport* t, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
t->dirtied_local_settings = 1; |
|
|
|
|
if (!true /*diable flow control */) { |
|
|
|
|
/* 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->write_buffer_size = grpc_core::chttp2::kDefaultWindow; |
|
|
|
|
|
|
|
|
|
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*/) { |
|
|
|
|
t->flow_control.Init<grpc_core::chttp2::TransportFlowControlDisabled>(); |
|
|
|
|
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; |
|
|
|
|
t->flow_control.Init<grpc_core::chttp2::TransportFlowControlDisabled>(t); |
|
|
|
|
enable_bdp = false; |
|
|
|
|
} else { |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (true /* disable flow control */) { |
|
|
|
|
s->flow_control.Init<grpc_core::chttp2::StreamFlowControlDisabled>(); |
|
|
|
|
} else { |
|
|
|
|
if (t->flow_control->flow_control_enabled()) { |
|
|
|
|
s->flow_control.Init<grpc_core::chttp2::StreamFlowControl>( |
|
|
|
|
static_cast<grpc_core::chttp2::TransportFlowControl*>( |
|
|
|
|
t->flow_control.get()), |
|
|
|
|
s); |
|
|
|
|
} else { |
|
|
|
|
s->flow_control.Init<grpc_core::chttp2::StreamFlowControlDisabled>(); |
|
|
|
|
} |
|
|
|
|
GPR_TIMER_END("init_stream", 0); |
|
|
|
|
|
|
|
|
|