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 MINOR: global: export many symbols. 2015-02-28 23:12:32 +01:00
auth.h MEDIUM: pattern: The match function browse itself the list or the tree. 2014-03-17 18:06:07 +01:00
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 MEDIUM: Allow suppression of email alerts by log level 2015-02-06 07:59:58 +01:00
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 MAJOR: polling: centralize calls to I/O callbacks 2014-11-21 20:37:32 +01:00
freq_ctr.h MINOR: freq_ctr: introduce a new averaging method 2014-06-17 17:15:51 +02:00
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 CLEANUP: fix missing include <string.h> in proto/listener.h 2013-06-14 19:52:17 +02:00
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 BUG/MEDIUM: pattern: don't load more than once a pattern list. 2014-11-24 15:40:16 +01:00
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 MEDIUM: protocol: use a family array to index the protocol handlers 2015-02-28 23:12:31 +01:00
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 REORG: connection: rename the data layer the "transport layer" 2012-10-04 22:26:09 +02:00
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 BUG/MAJOR: ssl: Fallback to private session cache if current lock mode is not supported. 2014-05-08 22:46:32 +02:00
signal.h CLEANUP: includes: fix includes for a number of users of fd.h 2012-09-03 20:49:14 +02:00
ssl_sock.h BUILD: ssl: use OPENSSL_NO_OCSP to detect OCSP support 2014-12-09 20:49:22 +01:00
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 MAJOR: poll: only rely on wake_expired_tasks() to compute the wait delay 2015-02-28 23:12:30 +01:00
template.h