Support for multiple Rx buffers per QCS instance has been introduced by
previous patches. However, due to flow-control initial values, client
were still unable to fully used this to increase their upload
throughput.
This patch increases max-stream-data-bidi-remote flow-control initial
values. A new define QMUX_STREAM_RX_BUF_FACTOR will fix the number of
concurrent buffers allocable per QCS. It is set to 90.
Note that connection flow-control initial value did not changed. It is
still configured to be equivalent to bufsize multiplied by the maximum
concurrent streams. This ensures that Rx buffers allocation is still
constrained per connection, so that it won't be possible to have all
active QCS instances using in parallel their maximum Rx buffers count.
return global.tune.bufsize - NCB_RESERVED_SZ;
}
+/* Number of buffers usable on Rx per QCS instance. */
+#define QMUX_STREAM_RX_BUF_FACTOR 90
+
/* Bit shift to get the stream sub ID for internal use which is obtained
* shifting the stream IDs by this value, knowing that the
* QCS_ID_TYPE_SHIFT less significant bits identify the stream ID
p->initial_max_streams_bidi = max_streams_bidi;
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;
+ p->initial_max_stream_data_bidi_remote = stream_rx_bufsz * QMUX_STREAM_RX_BUF_FACTOR;
p->initial_max_stream_data_uni = stream_rx_bufsz;
p->initial_max_data = (max_streams_bidi + max_streams_uni) * stream_rx_bufsz;