MINOR: quic-stream: refactor ack management
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Apr 2022 07:32:53 +0000 (09:32 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Apr 2022 10:04:04 +0000 (12:04 +0200)
commit1b81dda3e06f8f04b1342346fedb5937e1e9e257
tree1795c5bd49c9764a77f28cadb9ab58a4fc15823b
parenta45692049182e0c1770a4cb7725896c5f4e2457a
MINOR: quic-stream: refactor ack management

Acknowledge of STREAM has been complexified with the introduction of
stream multi buffers. Two functions are executing roughly the same set
of instructions in xprt_quic.c.

To simplify this, move the code complexity in a new function
qc_stream_desc_ack(). It will handle offset calculation, removal of
data, freeing oldest buffer and freeing stream instance if required.
The qc_stream_desc API is cleaner as qc_stream_desc_free_buf() ambiguous
function has been removed.
include/haproxy/quic_stream.h
src/quic_stream.c
src/xprt_quic.c