]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: refactor qc_prep_pkts() loop
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 30 May 2024 12:53:06 +0000 (14:53 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 12 Jun 2024 16:05:40 +0000 (18:05 +0200)
commitcdfceb10ae136b02e51f9bb346321cf0045d58e0
tree22496d7f020f5b353e162c7bfbf0a789f115a1e5
parentba00431625b958588a343cab1bbbdb9a3126c165
MINOR: quic: refactor qc_prep_pkts() loop

qc_prep_pkts() is built around a double loop iteration. First, it
iterates over every QEL instance register on sending. The inner loop is
used to repeatdly called qc_build_pkt() with a QEL instance. If the QEL
instance has no more data to sent, the next QEL entry is selected. It
can also be interrupted earlier if there is not enough room on the sent
buffer.

Clarify the inner loop by using qc_may_build_pkt() directly into it
besides the check on buffer room left. This function is used to test if
the QEL instance has something to send.

This should simplify send evolution, in particular GSO implementation.
src/quic_tx.c