]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stream-int: fix loss of CO_SFL_MSG_MORE flag in forwarding
authorWilly Tarreau <w@1wt.eu>
Fri, 19 Jun 2020 15:07:06 +0000 (17:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Jun 2020 15:42:42 +0000 (17:42 +0200)
commit8945bb6c05e83e008f05cf70a9f740a8bb26d7e5
tree40c62c6a8bfbdaa2a32cde3dc3d798b5a12382b5
parentd1d005d7f6b894ed243c177937626d888b3d03e1
BUG/MEDIUM: stream-int: fix loss of CO_SFL_MSG_MORE flag in forwarding

In 2.2-dev1, a change was made by commit 46230363a ("MINOR: mux-h1: Inherit
send flags from the upper layer"). The purpose was to accurately set the
CO_SFL_MSG_MORE flag on the transport layer because previously it as only
set based on the buffer full condition, which does not accurately indicate
that there are more data to follow.

The problem is that the stream-interface never sets this flag anymore in
HTX mode due to the channel's to_forward always being set to infinity.
Because of this, HTX transfers are always performed without the MSG_MORE
flag and experience a severe performance degradation on large transfers.

This patch addresses this by making the stream-interface aware of HTX and
having it check for CF_EOI to check if more contents are expected or not.
With this change, the single-threaded forwarding performance on 10 MB
objects jumped from 29 to 40 Gbps.

No backport is needed.
src/stream_interface.c