]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stconn: move the RXBLK flags to the stream connector
authorWilly Tarreau <w@1wt.eu>
Wed, 25 May 2022 14:36:21 +0000 (16:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:35 +0000 (19:33 +0200)
commit15252cd9c058366d44b99967b18c850c479dac20
tree7e8767d71f4cf514bd09a5b38482b7ad49f762a4
parent8c02f8de143a1ae49051c7dd91bcbda8e76ce52b
MEDIUM: stconn: move the RXBLK flags to the stream connector

The following flags are not at all related to the endpoint but to the
connector itself:
  - SE_FL_RXBLK_ROOM
  - SE_FL_RXBLK_BUFF
  - SE_FL_RXBLK_CHAN

As such they have no business staying in the endpoint descriptor and
they must move to the stream connector. They've also been renamed
accordingly to better match what they correspond to (the same name
as the function that sets them).

The rare occurrences of cs_rx_blocked() were replaced by an explicit
test on the list of flags. The reason is that cs_rx_blocked() used to
preserve some tests that are not needed at certain places since already
known. For the same reason SE_FL_RXBLK_ANY wasn't converted. As such it
will later be possible to carefully review these few locations and
eliminate the unneeded flags from the tests. No particular function
was made to test them since they're explicit enough.

It now looks like ci_putchk() and friends could very well place the flag
themselves on the connector when they detect a buffer full condition, as
this would significantly simplify the high-level API. But all usages must
first be reviewed before this simplification can be done. For now it
remains done by applet_put*() instead.
dev/flags/flags.c
include/haproxy/applet.h
include/haproxy/conn_stream-t.h
include/haproxy/conn_stream.h
include/haproxy/cs_utils.h
src/applet.c
src/conn_stream.c
src/stream.c