]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: quic: do not call qc_send() if nothing to emit
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 10 Apr 2024 08:14:01 +0000 (10:14 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 10 Apr 2024 09:17:21 +0000 (11:17 +0200)
commit34b31d85cba4fb3d82860deadf16c4163b419ea8
tree07d79bcdc9516f20cfb8e379d0887529df230094
parent7fc1ce5bc85ff81deb6b58d2328c31dbf1b4f917
OPTIM: quic: do not call qc_send() if nothing to emit

qc_send() was systematically called by quic_conn IO handlers with all
instantiated quic_enc_level. Change this to only register quic_enc_level
for send if needed. Do not call at all qc_send() if no qel registered.

A new function qel_need_sending() is defined to detect if sending is
required. First, it checks if quic_enc_level has prepared frames or
probing is set. It can also returns true if ACK required either on
quic_enc_level itself or because of quic_conn ack timer fired. Finally,
a CONNECTION_CLOSE emission for quic_conn is also a valid case.

This should reduce the number of invocations of qc_send(). This could
improve slightly performance, as well as simplify traces debugging.
include/haproxy/quic_tx.h
src/quic_conn.c
src/quic_tx.c