MINOR: stconn: Extend iobuf to handle a buffer in addition to a pipe
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 3 Aug 2023 13:30:55 +0000 (15:30 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Oct 2023 16:51:13 +0000 (18:51 +0200)
commit1d68bebb7050d869a926a34441ce06ec7fcbe4d0
treededb37073ae73b50f4f2d409c2368938df4c99d4
parente52519ac83218cecdfd24aa16d2b75fc2703f58a
MINOR: stconn: Extend iobuf to handle a buffer in addition to a pipe

It is unused for now, but the iobuf structure now owns a pointer to a
buffer. This buffer will be used to perform mux-to-mux fast-forwarding when
splicing is not supported or unusable. This pointer should be filled by an
endpoint to let the opposite one forward data.

Extra fields, in addition to the buffer, are mandatory because the buffer
may already contains some data. the ".offset" field may be used may be used
as the position to start to copy data. Finally, the amount of data copied in
this buffer must be saved in ".data" field.

Some flags are also added to prepare next changes. And helper stconn
fnuctions are updated to also count data in the buffer. For a first
implementation, it is not planned to handle data in the buffer and in the
pipe in same time. But it will be possible to do so.
include/haproxy/stconn-t.h
include/haproxy/stconn.h
src/stconn.c
src/stream.c