mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-05 04:56:10 +02:00
BUG/MEDIUM: quic: properly decount out-of-order ACK on stream release
Out-of-order STREAM ACK are buffered in its related streambuf tree. On insertion, overlapping or contiguous ranges are merged together. The total size of buffered ack range is stored in <room> streambuf member and reported to QUIC MUX layer on streambuf release. The objective is to ensure QUIC MUX layer can allocate Tx buffers conveniently to preserve a good transfer throughput. Streamdesc is the overall container of many streambufs. It may also been released when its upper QCS instance is freed, after all stream data have been emitted. In this case, the active streambuf is also released via custom code. However, in this code path, <room> was not reported to the QUIC MUX layer. This bug caused wrong estimation for the QUIC MUX txbuf window, with bytes reamining even after all ACK reception. This may cause transfer freeze on other connection streams, with RESET_STREAM emission on timeout client. To fix this, reuse the existing qc_stream_buf_release() function on streamdesc release. This ensures that notify_room is correctly used. No need to backport.
This commit is contained in:
parent
f0049d0748
commit
456c3997b2
@ -128,15 +128,14 @@ void qc_stream_desc_release(struct qc_stream_desc *stream,
|
||||
if (final_size < tail_offset)
|
||||
b_sub(buf, tail_offset - final_size);
|
||||
|
||||
if (!b_data(buf)) {
|
||||
/* This will ensure notify_room is triggered. */
|
||||
/* Release active buffer, or delete it immediatly if there is
|
||||
* no data to acknowledge. Both functions will reset active
|
||||
* buf pointer and invoke <notify_room> if necessary.
|
||||
*/
|
||||
if (!b_data(buf))
|
||||
qc_stream_buf_free(stream, &stream_buf);
|
||||
}
|
||||
else if (stream->notify_room && b_room(buf)) {
|
||||
stream->notify_room(stream, b_room(buf));
|
||||
}
|
||||
|
||||
stream->buf = NULL;
|
||||
else
|
||||
qc_stream_buf_release(stream);
|
||||
}
|
||||
|
||||
if (qc_stream_desc_done(stream)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user