]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stconn/muxes: Add an abort reason for SE shutdowns on muxes
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 29 Apr 2024 06:12:07 +0000 (08:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 May 2024 20:00:00 +0000 (22:00 +0200)
commit96f8b7ad0857c7e069b884a70a298ccfeaaeb60c
tree86fa986a4134f7501878de3ab8886cf08843b468
parent28489021b334584bbfc3405447d61ce05c088c7c
MEDIUM: stconn/muxes: Add an abort reason for SE shutdowns on muxes

A reason is now passed as parameter to muxes shutdowns to pass additional
info about the abort, if any. No info means no abort or only generic one.

For now, the reason is composed of 2 32-bits integer. The first on represents
the abort code and the other one represents the info about the code (for
instance the source). The code should be interpreted according to the associated
info.

One info is the source, encoding on 5 bits. Other bits are reserverd for now.
For now, the muxes are the only supported source. But we can imagine to extend
it to applets, streams, health-checks...

The current design is quite simple and will most probably evolved.. But the
idea is to let the opposite side forward some errors and let's a mux know
why its stream was aborted. At first glance, a abort reason must only be
evaluated if SE_SHW_SILENT flag is set.

The main goal at short term, is to forward some H2 RST_STREAM codes because
it is mandatory for gRPC applications, mainly to forward gRPC cancellation
from an H2 client to an H2 server. But we can imagine to alter this reason
at the applicative level to enrich it. It would also be used to report more
accurate errors in logs.
include/haproxy/connection-t.h
include/haproxy/stconn-t.h
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/mux_quic.c
src/stconn.c