diff options
Diffstat (limited to 'src/plugins/quic')
-rw-r--r-- | src/plugins/quic/quic.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c index dcab5e34c9a..076fd5eed0f 100644 --- a/src/plugins/quic/quic.c +++ b/src/plugins/quic/quic.c @@ -509,7 +509,12 @@ quic_on_receive (quicly_stream_t * stream, size_t off, const void *src, /* Streams live on the same thread so (f, stream_data) should stay consistent */ rlen = svm_fifo_enqueue (f, len, (u8 *) src); stream_data->app_rx_data_len += rlen; - ASSERT (rlen >= len); + if (PREDICT_FALSE (rlen != len)) + { + clib_warning ("ERROR: Could not enqueue all data (rlen %u, len %u)", + rlen, len); + ASSERT (rlen == len); + } app_wrk = app_worker_get_if_valid (stream_session->app_wrk_index); if (PREDICT_TRUE (app_wrk != 0)) app_worker_lock_and_send_event (app_wrk, stream_session, @@ -861,6 +866,7 @@ quic_store_quicly_ctx (application_t * app, u32 cert_key_index) quicly_context_t *quicly_ctx; ptls_iovec_t key_vec; app_cert_key_pair_t *ckpair; + u64 max_enq; if (app->quicly_ctx) return; @@ -899,8 +905,12 @@ quic_store_quicly_ctx (application_t * app, u32 cert_key_index) quicly_ctx->transport_params.max_data = QUIC_INT_MAX; quicly_ctx->transport_params.max_streams_uni = (uint64_t) 1 << 60; quicly_ctx->transport_params.max_streams_bidi = (uint64_t) 1 << 60; - quicly_ctx->transport_params.max_stream_data.bidi_local = (qm->udp_fifo_size - 1); /* max_enq is SIZE - 1 */ - quicly_ctx->transport_params.max_stream_data.bidi_remote = (qm->udp_fifo_size - 1); /* max_enq is SIZE - 1 */ + + /* max_enq is FIFO_SIZE - 1 */ + max_enq = app->sm_properties.rx_fifo_size - 1; + quicly_ctx->transport_params.max_stream_data.bidi_local = max_enq; + max_enq = app->sm_properties.tx_fifo_size - 1; + quicly_ctx->transport_params.max_stream_data.bidi_remote = max_enq; quicly_ctx->transport_params.max_stream_data.uni = QUIC_INT_MAX; quicly_ctx->tls->random_bytes (quicly_ctx_data->cid_key, 16); |