MEDIUM/OPTIM: mux-quic: define a recv_list for demux resumption
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 5 Dec 2024 09:48:51 +0000 (10:48 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 Jan 2025 10:21:39 +0000 (11:21 +0100)
commita9f2d063d86ebc1f7c635fab5f05fcd4b2b96390
tree009950dd8d366b3cda9f9f3aa3373dbc27b1e80a
parentac30691da333d5a91305f219d81a65dc7d278f2d
MEDIUM/OPTIM: mux-quic: define a recv_list for demux resumption

This commit is part of the current serie which aims to refactor and
improve overall performance of QUIC MUX I/O handler.

Define a recv_list element into qcc structure. This is used to
registered every instance of qcs which are currently blocked on
demuxing, which happen on no more space in <rx.appbuf>.

The purpose of this patch is to reduce qcc_io_recv() CPU usage. Now,
only recv_list iteration is performed, instead of the previous looping
over every qcs instances. This is useful as qcc_io_recv() is called each
time qcc_io_cb() is scheduled, even if only sending condition was the
wakeup origin.

A qcs is not inserted into recv_list immediately after blocking on demux
full buffer. Instead, this is only done after unblocking via stream
rcv_buf callback, which ensure that new buffer space is available.

This should be backported up to 3.1.

(cherry picked from commit 4b42dd4ae0d65c62d1979791b50dadd0d42774bb)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
include/haproxy/mux_quic-t.h
src/mux_quic.c