CLEANUP: quic: reorganize TP flow-control initialization
Adjust initialization of flow-control transport parameters via quic_transport_params_init(). This is purely cosmetic, with some comments added. It is also a preparatory step for future patches with addition of new configuration keywords related to flow-control TP values.
This commit is contained in:
parent
a71007c088
commit
3db5320289
@ -48,6 +48,7 @@ void quic_transport_params_init(struct quic_transport_params *p, int server)
|
|||||||
{
|
{
|
||||||
const uint64_t stream_rx_bufsz = qmux_stream_rx_bufsz();
|
const uint64_t stream_rx_bufsz = qmux_stream_rx_bufsz();
|
||||||
const int max_streams_bidi = global.tune.quic_frontend_max_streams_bidi;
|
const int max_streams_bidi = global.tune.quic_frontend_max_streams_bidi;
|
||||||
|
/* TODO value used to conform with HTTP/3, should be derived from app_ops */
|
||||||
const int max_streams_uni = 3;
|
const int max_streams_uni = 3;
|
||||||
|
|
||||||
/* Set RFC default values for unspecified parameters. */
|
/* Set RFC default values for unspecified parameters. */
|
||||||
@ -62,13 +63,25 @@ void quic_transport_params_init(struct quic_transport_params *p, int server)
|
|||||||
else
|
else
|
||||||
p->max_idle_timeout = global.tune.quic_backend_max_idle_timeout;
|
p->max_idle_timeout = global.tune.quic_backend_max_idle_timeout;
|
||||||
|
|
||||||
|
/* Set limit on number of concurrently opened streams. */
|
||||||
p->initial_max_streams_bidi = max_streams_bidi;
|
p->initial_max_streams_bidi = max_streams_bidi;
|
||||||
p->initial_max_streams_uni = max_streams_uni;
|
p->initial_max_streams_uni = max_streams_uni;
|
||||||
p->initial_max_stream_data_bidi_local = stream_rx_bufsz;
|
|
||||||
p->initial_max_stream_data_bidi_remote = stream_rx_bufsz * QMUX_STREAM_RX_BUF_FACTOR;
|
/* Set connection flow-control data limit, automatically calculated
|
||||||
p->initial_max_stream_data_uni = stream_rx_bufsz;
|
* from max number of concurrently opened streams.
|
||||||
|
*/
|
||||||
p->initial_max_data = (max_streams_bidi + max_streams_uni) * stream_rx_bufsz;
|
p->initial_max_data = (max_streams_bidi + max_streams_uni) * stream_rx_bufsz;
|
||||||
|
|
||||||
|
/* Set remote streams flow-control data limit. */
|
||||||
|
p->initial_max_stream_data_bidi_remote = stream_rx_bufsz * QMUX_STREAM_RX_BUF_FACTOR;
|
||||||
|
|
||||||
|
/* Set remaining flow-control data limit. Local bidi streams are unused
|
||||||
|
* on server side. Uni streams are only used for control exchange, so
|
||||||
|
* only a single buffer for in flight data should be enough.
|
||||||
|
*/
|
||||||
|
p->initial_max_stream_data_bidi_local = stream_rx_bufsz;
|
||||||
|
p->initial_max_stream_data_uni = stream_rx_bufsz;
|
||||||
|
|
||||||
if (server) {
|
if (server) {
|
||||||
p->with_stateless_reset_token = 1;
|
p->with_stateless_reset_token = 1;
|
||||||
p->disable_active_migration = 1;
|
p->disable_active_migration = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user