mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-30 01:52:53 +00:00
haproxy public development tree
00a3e5f786
Previously, QUIC MUX sending was implemented with data transfered along two different buffer instances per stream. The first QCS buffer was used for HTX blocks conversion into H3 (or other application protocol) during snd_buf stream callback. QCS instance is then registered for sending via qcc_io_cb(). For each sending QCS, data memcpy is performed from the first to a secondary buffer. A STREAM frame is produced for each QCS based on the content of their secondary buffer. This model is useful for QUIC MUX which has a major difference with other muxes : data must be preserved longer, even after sent to the lower layer. Data references is shared with quic-conn layer which implements retransmission and data deletion on ACK reception. This double buffering stages was the first model implemented and remains active until today. One of its major drawbacks is that it requires memcpy invocation for every data transferred between the two buffers. Another important drawback is that the first buffer was is allocated by each QCS individually without restriction. On the other hand, secondary buffers are accounted for the connection. A bottleneck can appear if secondary buffer pool is exhausted, causing unnecessary haproxy buffering. The purpose of this commit is to completely break this model. The first buffer instance is removed. Now, application protocols will directly allocate buffer from qc_stream_desc layer. This removes completely the memcpy invocation. This commit has a lot of code modifications. The most obvious one is the removal of <qcs.tx.buf> field. Now, qcc_get_stream_txbuf() returns a buffer instance from qc_stream_desc layer. qcs_xfer_data() which was responsible for the memcpy between the two buffers is also completely removed. Offset fields of QCS and QCC are now incremented directly by qcc_send_stream(). These values are used as boundary with flow control real offset to delimit the STREAM frames built. As this change has a big impact on the code, this commit is only the first part to fully support single buffer emission. For the moment, some limitations are reintroduced and will be fixed in the next patches : * on snd_buf if QCS sent buffer in used has room but not enough for the application protocol to store its content * on snd_buf if QCS sent buffer is NULL and allocation cannot succeeds due to connection pool exhaustion One final important aspect is that extra care is necessary now in snd_buf callback. The same buffer instance is referenced by both the stream and quic-conn layer. As such, some operation such as realign cannot be done anymore freely. |
||
---|---|---|
.github | ||
addons | ||
admin | ||
dev | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
BRANCHES | ||
BSDmakefile | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
SUBVERS | ||
VERDATE | ||
VERSION |
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)