]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: stream-interface: restore splicing mechanism
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Aug 2012 22:46:52 +0000 (00:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Sep 2012 18:47:31 +0000 (20:47 +0200)
commit96199b101658e5cf1c67079d273535229a565c21
tree33db16faee83b2d8593ad68794b68bb24a907ad0
parent5368d80ede227406d7346b324fc6ef5fcfa134b8
MAJOR: stream-interface: restore splicing mechanism

The splicing is now provided by the data-layer rcv_pipe/snd_pipe functions
which in turn are called by the stream interface's recv and send callbacks.

The presence of the rcv_pipe/snd_pipe functions is used to attest support
for splicing at the data layer. It looks like the stream-interface's
SI_FL_CAP_SPLICE flag does not make sense anymore as it's used as a proxy
for the pointers above.

It also appears that we call chk_snd() from the recv callback and then
try to call it again in update_conn(). It is very likely that this last
function will progressively slip into the recv/send callbacks in order
to avoid duplicate check code.

The code works right now with and without splicing. Only raw_sock provides
support for it and it is automatically selected when the various splice
options are set. However it looks like splice-auto doesn't enable it, which
possibly means that the streamer detection code does not work anymore, or
that it's only called at a time where it's too late to enable splicing (in
process_session).
include/types/stream_interface.h
src/proto_tcp.c
src/raw_sock.c
src/session.c
src/stream_interface.c