]> git.kaiwu.me - haproxy.git/commit
MINOR: ssl-sock: pass the CO_SFL_MSG_MORE info down the stack
authorWilly Tarreau <w@1wt.eu>
Fri, 17 Mar 2023 15:13:05 +0000 (16:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Mar 2023 15:43:51 +0000 (16:43 +0100)
commitac78c4fd9d87c93bfb61c9c15182c9c0e38053f9
tree5538b3dbd6cc993e22be00a4e5643a66d596be78
parent464fa06e9adbadc0c93fa5866d8fa4f55d69c2eb
MINOR: ssl-sock: pass the CO_SFL_MSG_MORE info down the stack

Despite having replaced the SSL BIOs to use our own raw_sock layer, we
still didn't exploit the CO_SFL_MSG_MORE flag which is pretty useful to
avoid sending incomplete packets. It's particularly important for SSL
since the extra overhead almost guarantees that each send() will be
followed by an incomplete (and often odd-sided) segment.

We already have an xprt_st set of flags to pass info to the various
layers, so let's just add a new one, SSL_SOCK_SEND_MORE, that is set
or cleared during ssl_sock_from_buf() to transfer the knowledge of
CO_SFL_MSG_MORE. This way we can recover this information and pass
it to raw_sock.

This alone is sufficient to increase by ~5-10% the H2 bandwidth over
SSL when multiple streams are used in parallel.
include/haproxy/ssl_sock-t.h
src/ssl_sock.c