]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: purge txbuf before preparing new packets
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 28 Feb 2023 14:10:00 +0000 (15:10 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 1 Mar 2023 13:29:16 +0000 (14:29 +0100)
commit147862de6199542fa95f2203ec7617e61de9e181
tree26df76c0ee595c19201cdaf4afceafcb326bde0d
parente0fe118dad6cf78c3e563aff9726b8e015d87340
MINOR: quic: purge txbuf before preparing new packets

Sending is implemented in two parts on quic-conn module. First, QUIC
packets are prepared in a buffer and then sendto() is called with this
buffer as input.

qc.tx.buf is used as the input buffer. It must always be empty before
starting to prepare new packets in it. Currently, this is guarantee by
the fact that either sendto() is completed, a fatal error is encountered
which prevent future send, or a transient error is encountered and we
rely on retransmission to send the remaining data.

This will change when poller subscribe of socket FD on sendto()
transient error will be implemented. In this case, qc.tx.buf will not be
emptied to resume sending when the transient error is cleared. To allow
the current sending process to work as expected, a new function
qc_purge_txbuf() is implemented. It will try to send remaining data
before preparing new packets for sending. If successful, txbuf will be
emptied and sending can continue. If not, sending will be interrupted.

This should be backported up to 2.7.
src/quic_conn.c