]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: Add new mux callbacks to perform data fast-forwarding
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 3 Aug 2023 13:47:49 +0000 (15:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Oct 2023 16:51:13 +0000 (18:51 +0200)
commit242c6f0dedc64defc1de3fb3334f2a349db79321
tree6713fb80654c0dbcc285e7da10c4382c5cea94e0
parent1d68bebb7050d869a926a34441ce06ec7fcbe4d0
MINOR: connection: Add new mux callbacks to perform data fast-forwarding

To perform the mux-to-mux data fast-forwarding, 4 new callbacks were added
into the mux_ops structure. 2 callbacks will be used from the stconn for
fast-forward data. The 2 other callbacks will be used by the endpoint to
request an iobuf to the opposite endpoint.

 * fastfwd() callback function is used by a producer to forward data

 * resume_fastfwd() callback function is used by a consumer if some data are
   blocked in the iobuf, to resume the data forwarding.

 * init_fastfwd() must be used by an endpoint (the producer one), inside the
   fastfwd() callback to request an iobuf to the opposite side (the consumer
   one).

 * done_fastfwd() must be used by an endpoint (the producer one) at the end
   of fastfwd() to notify the opposite endpoint (the consumer one) if data
   were forwarded or not.

This API is still under development, so it may evolved. Especially when the
fast-forward will be extended to applets.

2 helper functions were also added into the SE api to wrap init_fastfwd()
and done_fastfwd() callback function of the underlying endpoint.

For now, this API is unsed and not implemented at all in muxes.
include/haproxy/connection-t.h
include/haproxy/stconn.h