haproxy/include/proto
Willy Tarreau eb406dc73c MINOR: stream-int: add two flags to indicate an applet's wishes regarding I/O
Currently we have a problem. There are some cases where a sleeping applet
is not woken up (eg: show sess during an injection). The reason is that
the applet is marked WAIT_DATA and is not woken up when WAIT_ROOM leaves,
because we wait for both flags to be cleared in order to call it.

And if we wait for either flag, then we have the opposite situation, which
is that we're not waiting for room in the output buffer so we're spinning
calling the applet to do nothing.

What is missing is an indication of what the applet needs. Since it only
manipulates the WAIT_ROOM/WAIT_DATA which are overwritten later, that cannot
work. In the case of connections, the problem doesn't happen because the
connection maintains these extra states. Ideally we'd need to have similar
states for each appctx and to store those information there. But it would
be overcomplicated given that an applet doesn't exist alone without a
stream-int, so we can safely put these information into the stream int and
make the code simpler.

With this patch we introduce two new flags in the stream interface :
  - SI_FL_WANT_PUT : the applet wants to put something into the buffer
  - SI_FL_WANT_GET : the applet wants to get something from the buffer

We also have the new functions si_applet_{stop|want|cant}_{get|put}
to make the code look similar to the connection code.

For now these flags are not used yet.
2015-04-23 17:56:17 +02:00
..
acl.h MAJOR: sample: pass a pointer to the session to each sample fetch function 2015-04-06 11:37:25 +02:00
applet.h MEDIUM: applet: implement a run queue for active appctx 2015-04-23 17:56:16 +02:00
arg.h
auth.h
backend.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
channel.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
checks.h
compression.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
connection.h REORG: connection: move conn_drain() to connection.c and rename it 2015-03-13 00:42:48 +01:00
cttproxy.h
dumpstats.h CLEANUP: applet: rename struct si_applet to applet 2015-04-23 17:56:16 +02:00
fd.h
freq_ctr.h
frontend.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
hdr_idx.h
hlua.h BUG/MEDIUM: lua: the Lua process is not waked up after sending data on requests side 2015-03-09 17:47:52 +01:00
lb_chash.h
lb_fas.h
lb_fwlc.h
lb_fwrr.h
lb_map.h
listener.h
log.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
map.h MINOR: lua: map system integration in Lua 2015-04-07 15:56:21 +02:00
obj_type.h CLEANUP: applet: rename struct si_applet to applet 2015-04-23 17:56:16 +02:00
pattern.h
payload.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
peers.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
pipe.h
port_range.h
proto_http.h MAJOR: sample: pass a pointer to the session to each sample fetch function 2015-04-06 11:37:25 +02:00
proto_tcp.h MAJOR: tcp: make tcp_exec_req_rules() only rely on the session 2015-04-06 11:37:31 +02:00
proto_uxst.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
protocol.h
proxy.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
queue.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
raw_sock.h
sample.h MAJOR: sample: pass a pointer to the session to each sample fetch function 2015-04-06 11:37:25 +02:00
server.h REORG/MEDIUM: stream: rename stream flags from SN_* to SF_* 2015-04-06 11:23:57 +02:00
session.h MINOR: session: introduce session_new() 2015-04-06 11:37:33 +02:00
shctx.h
signal.h
ssl_sock.h
stick_table.h REORG: stktable: move the stkctr_* functions from stream to sticktable 2015-04-06 11:37:30 +02:00
stream_interface.h MINOR: stream-int: add two flags to indicate an applet's wishes regarding I/O 2015-04-23 17:56:17 +02:00
stream.h MINOR: stream: pass the pointer to the origin explicitly to stream_new() 2015-04-08 18:26:29 +02:00
task.h
template.h