BUG/MEDIUM: quic: properly take shards into account on bind lines
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2022 08:09:19 +0000 (09:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2022 08:27:26 +0000 (09:27 +0100)
commiteed782652999f57e35061f06bdb03f60fbf90334
treebb16fa759f7a9729f8cb25068339bc2de78447ee
parent15337fd8085288ac10de66bb048c8d655fbb0f25
BUG/MEDIUM: quic: properly take shards into account on bind lines

Shards were completely forgotten in commit f5a0c8abf ("MEDIUM: quic:
respect the threads assigned to a bind line"). The thread mask is
taken from the bind_conf, but since shards were introduced in 2.5,
the per-listener mask is held by the receiver and can be smaller
than the bind_conf's mask.

The effect here is that the traffic is not distributed to the
appropriate thread. At first glance it's not dramatic since it remains
one of the threads eligible by the bind_conf, but it still means that
in some contexts such as "shards by-thread", some concurrency may
persist on listeners while they're expected to be alone. One identified
impact is that it requires more rxbufs than necessary, but there may
possibly be other not yet identified side effects.

This must be backported to 2.7 and everywhere the commit above is
backported.
include/haproxy/quic_conn.h
src/quic_conn.c
src/quic_sock.c