]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-quic: account stream txbuf in QCC
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 13 Aug 2024 09:57:50 +0000 (11:57 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Aug 2024 15:17:17 +0000 (17:17 +0200)
commitf4d1bd0b7676e39c20bfe609d32f0da021c4aba7
tree8e05a434191d5e7700ec879c6b52817cf98da2b1
parent635fbaaa4aa1fd27d89e4e7549f71c79fb8a47fb
MINOR: mux-quic: account stream txbuf in QCC

A limit per connection is put on the number of buffers allocated by QUIC
MUX for emission accross all its streams. This ensures memory
consumption remains under control. This limit is simply explained as a
count of buffers which can be concurrently allocated for each
connection.

As such, quic_conn structure was used to account currently allocated
buffers. However, a quic_conn nevers allocates new stream buffers. This
is only done at QUIC MUX layer. As such, this commit moves buffer
accounting inside QCC structure. This simplifies the API, most notably
qc_stream_buf_alloc() usage.

Note that this commit inverts the accounting. Previously, it was
initially set to 0 and increment for each allocated buffer. Now, it is
set to the maximum value and decrement for each buf usage. This is
considered as clearer to use.
include/haproxy/mux_quic-t.h
include/haproxy/mux_quic.h
include/haproxy/quic_conn-t.h
include/haproxy/quic_stream.h
src/mux_quic.c
src/quic_conn.c
src/quic_stream.c