]> git.kaiwu.me - haproxy.git/commit
MINOR: quic_sock: index li->per_thr[] on local thread id, not global one
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Apr 2023 08:46:45 +0000 (10:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Apr 2023 15:41:26 +0000 (17:41 +0200)
commit6a4d48b73633afc4b480b8989a5b2613033ed80d
tree4611986e3d974dc3d1ef34c026796be8811e43ab
parent77d37b07b182a3bfd8f70f3f3639a75ddcc32b06
MINOR: quic_sock: index li->per_thr[] on local thread id, not global one

There's a li_per_thread array in each listener for use with QUIC
listeners. Since thread groups were introduced, this array can be
allocated too large because global.nbthread is allocated for each
listener, while only no more than MIN(nbthread,MAX_THREADS_PER_GROUP)
may be used by a single listener. This was because the global thread
ID is used as the index instead of the local ID (since a listener may
only be used by a single group). Let's just switch to local ID and
reduce the allocated size.
include/haproxy/listener-t.h
src/listener.c
src/quic_sock.c