]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: quic: do not call qc_prep_pkts() if everything sent
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 10 Apr 2024 07:38:00 +0000 (09:38 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 10 Apr 2024 09:18:01 +0000 (11:18 +0200)
commitc6e3d60fc12fdf3dacd0dc64af8c66520b2f47bb
treed56a865207aad75162dc31ce2f2037068a365227
parent34b31d85cba4fb3d82860deadf16c4163b419ea8
OPTIM: quic: do not call qc_prep_pkts() if everything sent

qc_send() is implemented as a loop to repeatedly invoke
qc_prep_pkts()/qc_send_ppkts(). This ensures that all data are emitted
even if bigger that a single Tx buffer instance. This is useful if
congestion window is empty but big enough for application data.

Looping is interrupted if qc_prep_pkts() returns a negative error
code, for example due to no space left in congestion window. It can also
returns 0 if no input data to sent, which also interrupt the loop.

To limit this last case, removed quic_enc_level from send_list each time
everything already send via qc_prep_pkts(). Loop can then be interrupted
as soon as send_list is empty, avoiding an extra superfluous call to
qc_prep_pkts().
src/quic_tx.c