]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: buffer: add a new buffer ring API to manipulate rings of buffers
authorWilly Tarreau <w@1wt.eu>
Fri, 24 May 2019 12:55:06 +0000 (14:55 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 26 May 2019 07:26:59 +0000 (09:26 +0200)
commitc4943d5170c15e46b09d92b59b74b42724a52478
tree81fb412dfcfe62faa3d1cef4c4d76d63108d1ec1
parente39b58f0450bcbc7df60167d758e2dd31c11025a
MINOR: buffer: add a new buffer ring API to manipulate rings of buffers

The purpose is to manipulate rings made of series of buffers so that
it is possible to continue to work on a next buffer once one is full.
This will be used by muxes to deal with contention between multiple
streams and a single output buffer. No data is expected to span over
multiple buffers, all of them will be used like a regular buffer. This
will significantly limit the amount of changes and the code complexity
while still supporting larger output buffering.

The ring is made of a head and a tail indexes both of which point to a
buffer descriptor. At least one descriptor is always valid, so it could
be seen as a form of pagination always presenting one buffer. The root
of the ring is itself stored into a buffer descriptor so that the user
only has to declare a buffer array and to call br_init() on it in order
to use it.
include/common/buf.h