]> git.kaiwu.me - haproxy.git/commit
MEDIUM: stconn: Forward kip hint right before the endpoint callback
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 20 Nov 2026 08:30:20 +0000 (09:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 23 Nov 2026 13:50:40 +0000 (14:50 +0100)
commitf4a1595d362b1c17121891a102caf3f3eddcd13d
tree84f5342c98194262b6ddaac8edb866fa3bca9e84
parente582abe8ad24cd3e606b1939bf699b5d569f099f
MEDIUM: stconn: Forward kip hint right before the endpoint callback

sc_ep_fwd_kip_when_committed() forwards the <kip> hint of the producer to
the <kop> hint of the consumer, so the latter may use it as an optimization
(the H1 mux announcing a chunk covering the whole payload at once).

It is currently called at the entry of sc_conn_send() and sc_applet_send(),
and in task_run_applet() before checking the applet was not shut. Thus the
hint may be forwarded while no endpoint callback is invoked, or while the
applet is not called at all. This leaves a pending guarantee on the
consumer side for data that may never be emitted by this call.

Move the call right before the callbacks which may consume <kop>
(resume_fastfwd() and snd_buf() for a connection, appctx_snd_buf() for an
applet), and inside the applet shutdown check, so the hint is forwarded
only when a callback is really invoked. resume_fastfwd() does not use <kop>
for now, but it is not the stconn's business to know which callback consumes
it. The recv side already works this way, before fastfwd() and
appctx_fastfwd().

This is not a fix and there is nothing to backport.
src/applet.c
src/stconn.c