]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: Code factorization (TX buffer reuse)
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 14 Mar 2022 11:21:03 +0000 (12:21 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 21 Mar 2022 10:29:40 +0000 (11:29 +0100)
commit302c2b1120902cb66baf6fce8fd9d1508519e6f8
tree29bfb91952468104b85c5a7047748b6333191b85
parentfbbbc33df42901e52eca0f2e0617a1e4e5129af3
MINOR: quic: Code factorization (TX buffer reuse)

Add qc_may_reuse_cbuf() function used by qc_prep_pkts() and qc_prep_app_pkts().
Simplification of the factorized section code: there is no need to check there
is enough room to mark the end of the data in the TX buf. This is done by
the callers (qc_prep_pkts() and qc_prep_app_pkts()). Add a diagram to explain
the conditions which must be verified to be able to reuse a cbuf struct.

This should improve the QUIC stack implementation maintenability.
src/xprt_quic.c