]> git.kaiwu.me - haproxy.git/commit
MINOR: connection: realign empty buffers in muxes, not transport layers
authorWilly Tarreau <w@1wt.eu>
Fri, 14 Dec 2018 09:51:23 +0000 (10:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Dec 2018 09:51:23 +0000 (10:51 +0100)
commite0f24ee14942545a78ad39d6b6a5588e63fa24fa
tree0fcae16bb18f61acbcdfe5f5c7b23d40ec7edbd3
parenta73da1ed25df3ade12c5ae3aafdad82bf2ec5384
MINOR: connection: realign empty buffers in muxes, not transport layers

For a long time we've been realigning empty buffers in the transport
layers, where the I/Os were performed based on callbacks. Doing so is
optimal for higher data throughput but makes it trickier to optimize
unaligned data, where mux_h1/h2 have to claim some data are present
in the buffer to force unaligned accesses to skip the frame's header
or the chunk header.

We don't need to do this anymore since the I/O calls are now always
performed from top to bottom, so it's only the mux's responsibility
to realign an empty buffer if it wants to.

In practice it doesn't change anything, it's just a convention, and
it will allow the code to be simplified in a next patch.
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c
src/raw_sock.c
src/ssl_sock.c