]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: allocate stream txbuf via qc_stream_desc API
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 13 Aug 2024 09:08:08 +0000 (11:08 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Aug 2024 15:17:17 +0000 (17:17 +0200)
commit635fbaaa4aa1fd27d89e4e7549f71c79fb8a47fb
tree855e8579b156f088760436484fb3902b1a246ac3
parentc24c8667b28cf7f67df71b715eb52f519c190f4d
MINOR: quic: allocate stream txbuf via qc_stream_desc API

This commit simply adjusts QUIC stream buffer allocation. This operation
is conducted by QUIC MUX using qc_stream_desc layer. Previously,
qc_stream_buf_alloc() would return a qc_stream_buf instance and QUIC MUX
would finalized the buffer area allocation. Change this to perform the
buffer allocation directly into qc_stream_buf_alloc().

This patch clarifies the interaction between QUIC MUX and
qc_stream_desc. It is cleaner to allocate the buffer via qc_stream_desc
as it is already responsible to free the buffer.

It also ensures that connection buffer accounting is only done after the
whole qc_stream_buf and its buffer are allocated. Previously, the
increment operation was performed between the two steps. This was not an
issue, as this kind of error triggers the whole connection closure.
However, if in the future this is handled as a stream closure instead,
this commit ensures that the buffer remains valid in all cases.
src/mux_quic.c
src/quic_stream.c