]> git.kaiwu.me - haproxy.git/commit
OPTIM: quic: reduce the size of struct quic_dgram
authorMaxime Henrion <mhenrion@haproxy.com>
Tue, 21 Apr 2026 19:25:58 +0000 (15:25 -0400)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 30 Apr 2026 13:33:07 +0000 (15:33 +0200)
commitcc231f3468d4654aaecf77afeadd616abd7c73dd
treeacb48b191048e4a04e8a4c3dd2639560fefbe61f
parentdf0614b177adfdce073b6bcf9ece84aa56453105
OPTIM: quic: reduce the size of struct quic_dgram

The QUIC code can only handle IPv4 or IPv6 addresses, so using two
sockaddr_storage structs wastes a lot of space in the quic_dgram struct.
This is a very large overhead since this structure is written in the MPSC
ring buffers before every datagram, while many of those datagrams are only
50 bytes or less. Using an union instead saves 200 bytes per datagram,
increasing the capacity of the buffers significantly.
include/haproxy/quic_rx-t.h
include/haproxy/quic_sock-t.h
src/quic_retry.c
src/quic_rules.c
src/quic_rx.c
src/quic_sock.c
src/quic_token.c
src/quic_trace.c