]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-quic: properly handle conn Tx buf exhaustion
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 17 Jan 2024 14:15:55 +0000 (15:15 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 31 Jan 2024 15:28:54 +0000 (16:28 +0100)
commit4513787d0d5b85da1cd94adaef44f3a5d8259eef
treefe6b9ffb9cffc15ad9df0b474b8fce4dbd5b02aa
parentcd22200d239773a851c6b78e722864fa5103af6a
MEDIUM: mux-quic: properly handle conn Tx buf exhaustion

This commit is a direct follow-up on the major rearchitecture of send
buffering. This patch implements the proper handling of connection pool
buffer temporary exhaustion.

The first step is to be able to differentiate a fatal allocation error
from a temporary pool exhaustion. This is done via a new output argument
on qcc_get_stream_txbuf(). For a fatal error, application protocol layer
will schedule the immediate connection closing. For a pool exhaustion,
QCC is flagged with QC_CF_CONN_FULL and stream sending process is
interrupted. QCS instance is also registered in a new list
<qcc.buf_wait_list>.

A new connection buffer can become available when all ACKs are received
for an older buffer. This process is taken in charge by quic-conn layer.
It uses qcc_notify_buf() function to clear QC_CF_CONN_FULL and to wake
up every streams registered on buf_wait_list to resume sending process.
include/haproxy/mux_quic-t.h
include/haproxy/mux_quic.h
src/h3.c
src/hq_interop.c
src/mux_quic.c
src/quic_stream.c