]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-h1: clean up conditions to enabled and disabled splicing
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 6 Apr 2021 15:24:39 +0000 (17:24 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 May 2021 07:21:00 +0000 (09:21 +0200)
commit2b861bf723841d921715961dba7eb4f4253e1cb0
tree6637db565f8ed7d1bdb53eddaab7796a8e55a57b
parent16b37510bc1114ab7603240f8bbfeea20e5ee23b
MINOR: mux-h1: clean up conditions to enabled and disabled splicing

First, there is no reason to announce the splicing support at the
conn-stream level when it is created, at least for now. GTUNE_USE_SPLICE
option is already handled at the stream level.

Second, in h1_rcv_buf(), there is no reason to test the message state to
switch the H1C in splicing mode (via H1C_F_WANT_SPLICE flag).
h1_process_input() already takes care to set CS_FL_MAY_SPLICE flag on the
conn-stream when appropriate. Thus, in h1_rcv_buf(), we can rely on this
flag to change the H1C state.

Finally, if h1_rcv_pipe() is called, it means the H1C is already in the
splicing mode. H1C_F_WANT_SPLICE flag is necessarily already set. Thus no
reason to force it.
src/mux_h1.c