mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-01 17:10:59 +01:00
QUIC emission can use GSO to emit multiple datagrams with a single syscall invokation. However, this feature relies on several kernel parameters which are checked on haproxy process startup. Even if these checks report no issue, GSO may still be unable due to the underlying network adapter underneath. Thus, if a EIO occured on sendmsg() with GSO, listener is flagged to mark GSO as unsupported. This allows every other QUIC connections to share the status and avoid using GSO when using this listener. Previously, listener flag was checked for every QUIC emission. This was done using an atomic operation to prevent races. Improve this by duplicating GSO unsupported status as the connection level. This is done on qc_new_conn() and also on thread rebinding if a new listener instance is used. The main benefit from this patch is to reduce the dependency between quic_conn and listener instances.