]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: quic: support GSO when encoding datagrams
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 30 May 2024 13:15:14 +0000 (15:15 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 11 Jul 2024 09:02:44 +0000 (11:02 +0200)
commitaf22792a43dc88af252f2c9e95ad78063be94049
tree3f05dc438961f1de49276cdbe22a63f97713a849
parent448d3d388abf29f5e6b2b453fc235d157a875240
MAJOR: quic: support GSO when encoding datagrams

QUIC datagrams are encoded during emission via the function
qc_prep_pkts(). By default, if GSO is not used, each datagram is
prefixed by a metadata header which specify its length and address of
its first quic_tx_packet instance.

If GSO is activated, metadata header won't be inserted for datagrams
following the first one sent in a single syscall. Length field will
contain the total size of these datagrams. This allows to support both
GSO and non-GSO prepared datagram in the same Tx buffer.

qc_send_ppkts() is invoked just after datagrams encoding. It iterates
over each metadata header in Tx buffer to sent each datagram
individually. If length field is bigger than network MTU, GSO usage is
assumed and qc_snd_buf() GSO parameter will be set.

Another important point to note regarding GSO implementation is that
during datagram encoding, packets from the same datagram instance are
attached together. However, if using GSO, consecutive packets from
different datagrams are also linked, but without
QUIC_FL_TX_PACKET_COALESCED flag. This allows to properly update
quic_conn status with all sent packets in qc_send_ppkts(). Packets from
different datagrams are then unlinked to treat them separately when
receiving corresponding ACK frames.
src/quic_tx.c