]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: implement function to check if STREAM is fully acked
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Aug 2024 15:36:56 +0000 (17:36 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 7 Aug 2024 08:57:10 +0000 (10:57 +0200)
commit714009b7bcf921836c2df7fc0d26b2ad257c8307
treec2a03085b05fd3e8a21bb6d7c5f07d81d47219a7
parentbb9ac256a1e5468535b8242dc762e7bb0d9a8bf3
MINOR: quic: implement function to check if STREAM is fully acked

When a STREAM frame is retransmitted, a check is performed to remove
range of data already acked from it. This is useful when STREAM frames
are duplicated and splitted to cover different data ranges. The newly
retransmitted frame contains only unacked data.

This process is performed similarly in qc_dup_pkt_frms() and
qc_build_frms(). Refactor the code into a new function named
qc_stream_frm_is_acked(). It returns true if frame data are already
fully acked and retransmission can be avoided. If only a partial range
of data is acknowledged, frame content is updated to only cover the
unacked data.

This patch does not have any functional change. However, it simplifies
retransmission for STREAM frames. Also, it will be reused to fix
retransmission for empty STREAM frames with FIN set from the following
patch :
  BUG/MEDIUM: quic: handle retransmit for standalone FIN STREAM

As such, it must be backported prior to it.
include/haproxy/quic_retransmit.h
src/quic_retransmit.c
src/quic_rx.c
src/quic_tx.c