]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: quic: fill whole Tx buffer if needed
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 5 Jun 2024 15:26:14 +0000 (17:26 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 12 Jun 2024 16:05:40 +0000 (18:05 +0200)
commitab37b8692141cd2b5e6ac7328e79162106c70d58
treea99b0fa02d2eaa0c901d7bfe274d507cb490de99
parenta60609f1aa3e5f61d2a2286fdb40ebf6936a80ee
OPTIM: quic: fill whole Tx buffer if needed

Previously, packets encoding was stopped as soon as buffer room left is
less than UDP MTU. This is suboptimal if the next packet would be
smaller than that.

To improve this, only check if there is at least enough room for the
mandatory packet header. qc_build_pkt() would ensure there is thus
responsible to return QC_BUILD_PKT_ERR_BUFROOM as soon as buffer left is
insufficient to stop packets encoding. An extra check is added to ensure
end pointer would never exceed buffer end.

This should not have any significant impact on the performance. However,
this renders the code intention clearer.
src/quic_tx.c