/src/haproxy/include/haproxy/stream.h
Line | Count | Source |
1 | | /* |
2 | | * include/haproxy/stream.h |
3 | | * This file defines everything related to streams. |
4 | | * |
5 | | * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu |
6 | | * |
7 | | * This library is free software; you can redistribute it and/or |
8 | | * modify it under the terms of the GNU Lesser General Public |
9 | | * License as published by the Free Software Foundation, version 2.1 |
10 | | * exclusively. |
11 | | * |
12 | | * This library is distributed in the hope that it will be useful, |
13 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | | * Lesser General Public License for more details. |
16 | | * |
17 | | * You should have received a copy of the GNU Lesser General Public |
18 | | * License along with this library; if not, write to the Free Software |
19 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | | */ |
21 | | |
22 | | #ifndef _HAPROXY_STREAM_H |
23 | | #define _HAPROXY_STREAM_H |
24 | | |
25 | | #include <haproxy/action-t.h> |
26 | | #include <haproxy/api.h> |
27 | | #include <haproxy/fd.h> |
28 | | #include <haproxy/freq_ctr.h> |
29 | | #include <haproxy/obj_type.h> |
30 | | #include <haproxy/pool-t.h> |
31 | | #include <haproxy/queue.h> |
32 | | #include <haproxy/session.h> |
33 | | #include <haproxy/stconn.h> |
34 | | #include <haproxy/stick_table.h> |
35 | | #include <haproxy/stream-t.h> |
36 | | #include <haproxy/task-t.h> |
37 | | #include <haproxy/trace-t.h> |
38 | | |
39 | | extern struct trace_source trace_strm; |
40 | | |
41 | | /* Details about these events are defined in <src/stream.c> */ |
42 | | #define STRM_EV_STRM_NEW (1ULL << 0) |
43 | | #define STRM_EV_STRM_FREE (1ULL << 1) |
44 | | #define STRM_EV_STRM_ERR (1ULL << 2) |
45 | | #define STRM_EV_STRM_ANA (1ULL << 3) |
46 | | #define STRM_EV_STRM_PROC (1ULL << 4) |
47 | | #define STRM_EV_CS_ST (1ULL << 5) |
48 | | #define STRM_EV_HTTP_ANA (1ULL << 6) |
49 | | #define STRM_EV_HTTP_ERR (1ULL << 7) |
50 | | #define STRM_EV_TCP_ANA (1ULL << 8) |
51 | | #define STRM_EV_TCP_ERR (1ULL << 9) |
52 | | #define STRM_EV_FLT_ANA (1ULL << 10) |
53 | | #define STRM_EV_FLT_ERR (1ULL << 11) |
54 | | |
55 | 0 | #define IS_HTX_STRM(strm) ((strm)->flags & SF_HTX) |
56 | | |
57 | | extern struct pool_head *pool_head_stream; |
58 | | extern struct pool_head *pool_head_uniqueid; |
59 | | |
60 | | extern struct data_cb sess_conn_cb; |
61 | | |
62 | | void *stream_new(struct session *sess, struct stconn *sc, struct buffer *input); |
63 | | void stream_free(struct stream *s); |
64 | | int stream_upgrade_from_sc(struct stconn *sc, struct buffer *input); |
65 | | int stream_set_http_mode(struct stream *s, const struct mux_proto_list *mux_proto); |
66 | | |
67 | | /* shutdown the stream from itself */ |
68 | | void stream_shutdown_self(struct stream *stream, int why); |
69 | | void stream_dump_and_crash(enum obj_type *obj, int rate); |
70 | | void strm_dump_to_buffer(struct buffer *buf, const struct stream *strm, const char *pfx, uint32_t anon_key); |
71 | | |
72 | | void stream_process_counters(struct stream *s); |
73 | | void sess_change_server(struct stream *strm, struct server *newsrv); |
74 | | struct task *process_stream(struct task *t, void *context, unsigned int state); |
75 | | void default_srv_error(struct stream *s, struct stconn *sc); |
76 | | |
77 | | /* Update the stream's backend and server time stats */ |
78 | | void stream_update_time_stats(struct stream *s); |
79 | | void stream_release_buffers(struct stream *s); |
80 | | int stream_buf_available(void *arg); |
81 | | |
82 | | /* returns the session this stream belongs to */ |
83 | | static inline struct session *strm_sess(const struct stream *strm) |
84 | 0 | { |
85 | 0 | return strm->sess; |
86 | 0 | } Unexecuted instantiation: debug.c:strm_sess Unexecuted instantiation: fd.c:strm_sess Unexecuted instantiation: haproxy.c:strm_sess Unexecuted instantiation: http_htx.c:strm_sess Unexecuted instantiation: limits.c:strm_sess Unexecuted instantiation: listener.c:strm_sess Unexecuted instantiation: log.c:strm_sess Unexecuted instantiation: mworker.c:strm_sess Unexecuted instantiation: peers.c:strm_sess Unexecuted instantiation: pool.c:strm_sess Unexecuted instantiation: proto_sockpair.c:strm_sess Unexecuted instantiation: proxy.c:strm_sess Unexecuted instantiation: resolvers.c:strm_sess Unexecuted instantiation: ring.c:strm_sess Unexecuted instantiation: sample.c:strm_sess Unexecuted instantiation: server.c:strm_sess Unexecuted instantiation: session.c:strm_sess Unexecuted instantiation: sink.c:strm_sess Unexecuted instantiation: sock.c:strm_sess Unexecuted instantiation: stats.c:strm_sess Unexecuted instantiation: stconn.c:strm_sess Unexecuted instantiation: stick_table.c:strm_sess Unexecuted instantiation: stream.c:strm_sess Unexecuted instantiation: tcp_rules.c:strm_sess Unexecuted instantiation: tcpcheck.c:strm_sess Unexecuted instantiation: thread.c:strm_sess Unexecuted instantiation: tools.c:strm_sess Unexecuted instantiation: trace.c:strm_sess Unexecuted instantiation: vars.c:strm_sess Unexecuted instantiation: activity.c:strm_sess Unexecuted instantiation: applet.c:strm_sess Unexecuted instantiation: backend.c:strm_sess Unexecuted instantiation: cfgparse-listen.c:strm_sess Unexecuted instantiation: cfgparse.c:strm_sess Unexecuted instantiation: channel.c:strm_sess Unexecuted instantiation: check.c:strm_sess Unexecuted instantiation: cli.c:strm_sess Unexecuted instantiation: connection.c:strm_sess Unexecuted instantiation: dns.c:strm_sess Unexecuted instantiation: dns_ring.c:strm_sess Unexecuted instantiation: errors.c:strm_sess Unexecuted instantiation: extcheck.c:strm_sess Unexecuted instantiation: filters.c:strm_sess Unexecuted instantiation: flt_http_comp.c:strm_sess Unexecuted instantiation: frontend.c:strm_sess Unexecuted instantiation: haterm.c:strm_sess Unexecuted instantiation: http_ana.c:strm_sess Unexecuted instantiation: http_ext.c:strm_sess Unexecuted instantiation: http_fetch.c:strm_sess Unexecuted instantiation: http_rules.c:strm_sess Unexecuted instantiation: pattern.c:strm_sess Unexecuted instantiation: payload.c:strm_sess Unexecuted instantiation: proto_rhttp.c:strm_sess Unexecuted instantiation: queue.c:strm_sess Unexecuted instantiation: stats-html.c:strm_sess Unexecuted instantiation: stats-json.c:strm_sess Unexecuted instantiation: stats-proxy.c:strm_sess Unexecuted instantiation: cache.c:strm_sess Unexecuted instantiation: cfgparse-global.c:strm_sess Unexecuted instantiation: compression.c:strm_sess Unexecuted instantiation: fcgi-app.c:strm_sess Unexecuted instantiation: flt_spoe.c:strm_sess Unexecuted instantiation: proto_tcp.c:strm_sess |
87 | | |
88 | | /* returns the frontend this stream was initiated from */ |
89 | | static inline struct proxy *strm_fe(const struct stream *strm) |
90 | 0 | { |
91 | 0 | return strm->sess->fe; |
92 | 0 | } Unexecuted instantiation: debug.c:strm_fe Unexecuted instantiation: fd.c:strm_fe Unexecuted instantiation: haproxy.c:strm_fe Unexecuted instantiation: http_htx.c:strm_fe Unexecuted instantiation: limits.c:strm_fe Unexecuted instantiation: listener.c:strm_fe Unexecuted instantiation: log.c:strm_fe Unexecuted instantiation: mworker.c:strm_fe Unexecuted instantiation: peers.c:strm_fe Unexecuted instantiation: pool.c:strm_fe Unexecuted instantiation: proto_sockpair.c:strm_fe Unexecuted instantiation: proxy.c:strm_fe Unexecuted instantiation: resolvers.c:strm_fe Unexecuted instantiation: ring.c:strm_fe Unexecuted instantiation: sample.c:strm_fe Unexecuted instantiation: server.c:strm_fe Unexecuted instantiation: session.c:strm_fe Unexecuted instantiation: sink.c:strm_fe Unexecuted instantiation: sock.c:strm_fe Unexecuted instantiation: stats.c:strm_fe Unexecuted instantiation: stconn.c:strm_fe Unexecuted instantiation: stick_table.c:strm_fe Unexecuted instantiation: stream.c:strm_fe Unexecuted instantiation: tcp_rules.c:strm_fe Unexecuted instantiation: tcpcheck.c:strm_fe Unexecuted instantiation: thread.c:strm_fe Unexecuted instantiation: tools.c:strm_fe Unexecuted instantiation: trace.c:strm_fe Unexecuted instantiation: vars.c:strm_fe Unexecuted instantiation: activity.c:strm_fe Unexecuted instantiation: applet.c:strm_fe Unexecuted instantiation: backend.c:strm_fe Unexecuted instantiation: cfgparse-listen.c:strm_fe Unexecuted instantiation: cfgparse.c:strm_fe Unexecuted instantiation: channel.c:strm_fe Unexecuted instantiation: check.c:strm_fe Unexecuted instantiation: cli.c:strm_fe Unexecuted instantiation: connection.c:strm_fe Unexecuted instantiation: dns.c:strm_fe Unexecuted instantiation: dns_ring.c:strm_fe Unexecuted instantiation: errors.c:strm_fe Unexecuted instantiation: extcheck.c:strm_fe Unexecuted instantiation: filters.c:strm_fe Unexecuted instantiation: flt_http_comp.c:strm_fe Unexecuted instantiation: frontend.c:strm_fe Unexecuted instantiation: haterm.c:strm_fe Unexecuted instantiation: http_ana.c:strm_fe Unexecuted instantiation: http_ext.c:strm_fe Unexecuted instantiation: http_fetch.c:strm_fe Unexecuted instantiation: http_rules.c:strm_fe Unexecuted instantiation: pattern.c:strm_fe Unexecuted instantiation: payload.c:strm_fe Unexecuted instantiation: proto_rhttp.c:strm_fe Unexecuted instantiation: queue.c:strm_fe Unexecuted instantiation: stats-html.c:strm_fe Unexecuted instantiation: stats-json.c:strm_fe Unexecuted instantiation: stats-proxy.c:strm_fe Unexecuted instantiation: cache.c:strm_fe Unexecuted instantiation: cfgparse-global.c:strm_fe Unexecuted instantiation: compression.c:strm_fe Unexecuted instantiation: fcgi-app.c:strm_fe Unexecuted instantiation: flt_spoe.c:strm_fe Unexecuted instantiation: proto_tcp.c:strm_fe |
93 | | |
94 | | /* returns the listener this stream was initiated from */ |
95 | | static inline struct listener *strm_li(const struct stream *strm) |
96 | 0 | { |
97 | 0 | return strm->sess->listener; |
98 | 0 | } Unexecuted instantiation: debug.c:strm_li Unexecuted instantiation: fd.c:strm_li Unexecuted instantiation: haproxy.c:strm_li Unexecuted instantiation: http_htx.c:strm_li Unexecuted instantiation: limits.c:strm_li Unexecuted instantiation: listener.c:strm_li Unexecuted instantiation: log.c:strm_li Unexecuted instantiation: mworker.c:strm_li Unexecuted instantiation: peers.c:strm_li Unexecuted instantiation: pool.c:strm_li Unexecuted instantiation: proto_sockpair.c:strm_li Unexecuted instantiation: proxy.c:strm_li Unexecuted instantiation: resolvers.c:strm_li Unexecuted instantiation: ring.c:strm_li Unexecuted instantiation: sample.c:strm_li Unexecuted instantiation: server.c:strm_li Unexecuted instantiation: session.c:strm_li Unexecuted instantiation: sink.c:strm_li Unexecuted instantiation: sock.c:strm_li Unexecuted instantiation: stats.c:strm_li Unexecuted instantiation: stconn.c:strm_li Unexecuted instantiation: stick_table.c:strm_li Unexecuted instantiation: stream.c:strm_li Unexecuted instantiation: tcp_rules.c:strm_li Unexecuted instantiation: tcpcheck.c:strm_li Unexecuted instantiation: thread.c:strm_li Unexecuted instantiation: tools.c:strm_li Unexecuted instantiation: trace.c:strm_li Unexecuted instantiation: vars.c:strm_li Unexecuted instantiation: activity.c:strm_li Unexecuted instantiation: applet.c:strm_li Unexecuted instantiation: backend.c:strm_li Unexecuted instantiation: cfgparse-listen.c:strm_li Unexecuted instantiation: cfgparse.c:strm_li Unexecuted instantiation: channel.c:strm_li Unexecuted instantiation: check.c:strm_li Unexecuted instantiation: cli.c:strm_li Unexecuted instantiation: connection.c:strm_li Unexecuted instantiation: dns.c:strm_li Unexecuted instantiation: dns_ring.c:strm_li Unexecuted instantiation: errors.c:strm_li Unexecuted instantiation: extcheck.c:strm_li Unexecuted instantiation: filters.c:strm_li Unexecuted instantiation: flt_http_comp.c:strm_li Unexecuted instantiation: frontend.c:strm_li Unexecuted instantiation: haterm.c:strm_li Unexecuted instantiation: http_ana.c:strm_li Unexecuted instantiation: http_ext.c:strm_li Unexecuted instantiation: http_fetch.c:strm_li Unexecuted instantiation: http_rules.c:strm_li Unexecuted instantiation: pattern.c:strm_li Unexecuted instantiation: payload.c:strm_li Unexecuted instantiation: proto_rhttp.c:strm_li Unexecuted instantiation: queue.c:strm_li Unexecuted instantiation: stats-html.c:strm_li Unexecuted instantiation: stats-json.c:strm_li Unexecuted instantiation: stats-proxy.c:strm_li Unexecuted instantiation: cache.c:strm_li Unexecuted instantiation: cfgparse-global.c:strm_li Unexecuted instantiation: compression.c:strm_li Unexecuted instantiation: fcgi-app.c:strm_li Unexecuted instantiation: flt_spoe.c:strm_li Unexecuted instantiation: proto_tcp.c:strm_li |
99 | | |
100 | | /* returns a pointer to the origin of the session which created this stream */ |
101 | | static inline enum obj_type *strm_orig(const struct stream *strm) |
102 | 0 | { |
103 | 0 | return strm->sess->origin; |
104 | 0 | } Unexecuted instantiation: debug.c:strm_orig Unexecuted instantiation: fd.c:strm_orig Unexecuted instantiation: haproxy.c:strm_orig Unexecuted instantiation: http_htx.c:strm_orig Unexecuted instantiation: limits.c:strm_orig Unexecuted instantiation: listener.c:strm_orig Unexecuted instantiation: log.c:strm_orig Unexecuted instantiation: mworker.c:strm_orig Unexecuted instantiation: peers.c:strm_orig Unexecuted instantiation: pool.c:strm_orig Unexecuted instantiation: proto_sockpair.c:strm_orig Unexecuted instantiation: proxy.c:strm_orig Unexecuted instantiation: resolvers.c:strm_orig Unexecuted instantiation: ring.c:strm_orig Unexecuted instantiation: sample.c:strm_orig Unexecuted instantiation: server.c:strm_orig Unexecuted instantiation: session.c:strm_orig Unexecuted instantiation: sink.c:strm_orig Unexecuted instantiation: sock.c:strm_orig Unexecuted instantiation: stats.c:strm_orig Unexecuted instantiation: stconn.c:strm_orig Unexecuted instantiation: stick_table.c:strm_orig Unexecuted instantiation: stream.c:strm_orig Unexecuted instantiation: tcp_rules.c:strm_orig Unexecuted instantiation: tcpcheck.c:strm_orig Unexecuted instantiation: thread.c:strm_orig Unexecuted instantiation: tools.c:strm_orig Unexecuted instantiation: trace.c:strm_orig Unexecuted instantiation: vars.c:strm_orig Unexecuted instantiation: activity.c:strm_orig Unexecuted instantiation: applet.c:strm_orig Unexecuted instantiation: backend.c:strm_orig Unexecuted instantiation: cfgparse-listen.c:strm_orig Unexecuted instantiation: cfgparse.c:strm_orig Unexecuted instantiation: channel.c:strm_orig Unexecuted instantiation: check.c:strm_orig Unexecuted instantiation: cli.c:strm_orig Unexecuted instantiation: connection.c:strm_orig Unexecuted instantiation: dns.c:strm_orig Unexecuted instantiation: dns_ring.c:strm_orig Unexecuted instantiation: errors.c:strm_orig Unexecuted instantiation: extcheck.c:strm_orig Unexecuted instantiation: filters.c:strm_orig Unexecuted instantiation: flt_http_comp.c:strm_orig Unexecuted instantiation: frontend.c:strm_orig Unexecuted instantiation: haterm.c:strm_orig Unexecuted instantiation: http_ana.c:strm_orig Unexecuted instantiation: http_ext.c:strm_orig Unexecuted instantiation: http_fetch.c:strm_orig Unexecuted instantiation: http_rules.c:strm_orig Unexecuted instantiation: pattern.c:strm_orig Unexecuted instantiation: payload.c:strm_orig Unexecuted instantiation: proto_rhttp.c:strm_orig Unexecuted instantiation: queue.c:strm_orig Unexecuted instantiation: stats-html.c:strm_orig Unexecuted instantiation: stats-json.c:strm_orig Unexecuted instantiation: stats-proxy.c:strm_orig Unexecuted instantiation: cache.c:strm_orig Unexecuted instantiation: cfgparse-global.c:strm_orig Unexecuted instantiation: compression.c:strm_orig Unexecuted instantiation: fcgi-app.c:strm_orig Unexecuted instantiation: flt_spoe.c:strm_orig Unexecuted instantiation: proto_tcp.c:strm_orig |
105 | | |
106 | | /* Remove the refcount from the stream to the tracked counters, and clear the |
107 | | * pointer to ensure this is only performed once. The caller is responsible for |
108 | | * ensuring that the pointer is valid first. We must be extremely careful not |
109 | | * to touch the entries we inherited from the session. |
110 | | */ |
111 | | static inline void stream_store_counters(struct stream *s) |
112 | 0 | { |
113 | 0 | void *ptr; |
114 | 0 | int i; |
115 | 0 | struct stksess *ts; |
116 | |
|
117 | 0 | if (unlikely(!s->stkctr)) // pool not allocated yet |
118 | 0 | return; |
119 | | |
120 | 0 | for (i = 0; i < global.tune.nb_stk_ctr; i++) { |
121 | 0 | ts = stkctr_entry(&s->stkctr[i]); |
122 | 0 | if (!ts) |
123 | 0 | continue; |
124 | | |
125 | 0 | if (stkctr_entry(&s->sess->stkctr[i])) |
126 | 0 | continue; |
127 | | |
128 | 0 | ptr = stktable_data_ptr(s->stkctr[i].table, ts, STKTABLE_DT_CONN_CUR); |
129 | 0 | if (ptr) { |
130 | 0 | HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock); |
131 | |
|
132 | 0 | if (stktable_data_cast(ptr, std_t_uint) > 0) |
133 | 0 | stktable_data_cast(ptr, std_t_uint)--; |
134 | |
|
135 | 0 | HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock); |
136 | | |
137 | | /* If data was modified, we need to touch to re-schedule sync */ |
138 | 0 | stktable_touch_local(s->stkctr[i].table, ts, 0); |
139 | 0 | } |
140 | 0 | stkctr_set_entry(&s->stkctr[i], NULL); |
141 | 0 | stksess_kill_if_expired(s->stkctr[i].table, ts); |
142 | 0 | } |
143 | 0 | } Unexecuted instantiation: debug.c:stream_store_counters Unexecuted instantiation: fd.c:stream_store_counters Unexecuted instantiation: haproxy.c:stream_store_counters Unexecuted instantiation: http_htx.c:stream_store_counters Unexecuted instantiation: limits.c:stream_store_counters Unexecuted instantiation: listener.c:stream_store_counters Unexecuted instantiation: log.c:stream_store_counters Unexecuted instantiation: mworker.c:stream_store_counters Unexecuted instantiation: peers.c:stream_store_counters Unexecuted instantiation: pool.c:stream_store_counters Unexecuted instantiation: proto_sockpair.c:stream_store_counters Unexecuted instantiation: proxy.c:stream_store_counters Unexecuted instantiation: resolvers.c:stream_store_counters Unexecuted instantiation: ring.c:stream_store_counters Unexecuted instantiation: sample.c:stream_store_counters Unexecuted instantiation: server.c:stream_store_counters Unexecuted instantiation: session.c:stream_store_counters Unexecuted instantiation: sink.c:stream_store_counters Unexecuted instantiation: sock.c:stream_store_counters Unexecuted instantiation: stats.c:stream_store_counters Unexecuted instantiation: stconn.c:stream_store_counters Unexecuted instantiation: stick_table.c:stream_store_counters Unexecuted instantiation: stream.c:stream_store_counters Unexecuted instantiation: tcp_rules.c:stream_store_counters Unexecuted instantiation: tcpcheck.c:stream_store_counters Unexecuted instantiation: thread.c:stream_store_counters Unexecuted instantiation: tools.c:stream_store_counters Unexecuted instantiation: trace.c:stream_store_counters Unexecuted instantiation: vars.c:stream_store_counters Unexecuted instantiation: activity.c:stream_store_counters Unexecuted instantiation: applet.c:stream_store_counters Unexecuted instantiation: backend.c:stream_store_counters Unexecuted instantiation: cfgparse-listen.c:stream_store_counters Unexecuted instantiation: cfgparse.c:stream_store_counters Unexecuted instantiation: channel.c:stream_store_counters Unexecuted instantiation: check.c:stream_store_counters Unexecuted instantiation: cli.c:stream_store_counters Unexecuted instantiation: connection.c:stream_store_counters Unexecuted instantiation: dns.c:stream_store_counters Unexecuted instantiation: dns_ring.c:stream_store_counters Unexecuted instantiation: errors.c:stream_store_counters Unexecuted instantiation: extcheck.c:stream_store_counters Unexecuted instantiation: filters.c:stream_store_counters Unexecuted instantiation: flt_http_comp.c:stream_store_counters Unexecuted instantiation: frontend.c:stream_store_counters Unexecuted instantiation: haterm.c:stream_store_counters Unexecuted instantiation: http_ana.c:stream_store_counters Unexecuted instantiation: http_ext.c:stream_store_counters Unexecuted instantiation: http_fetch.c:stream_store_counters Unexecuted instantiation: http_rules.c:stream_store_counters Unexecuted instantiation: pattern.c:stream_store_counters Unexecuted instantiation: payload.c:stream_store_counters Unexecuted instantiation: proto_rhttp.c:stream_store_counters Unexecuted instantiation: queue.c:stream_store_counters Unexecuted instantiation: stats-html.c:stream_store_counters Unexecuted instantiation: stats-json.c:stream_store_counters Unexecuted instantiation: stats-proxy.c:stream_store_counters Unexecuted instantiation: cache.c:stream_store_counters Unexecuted instantiation: cfgparse-global.c:stream_store_counters Unexecuted instantiation: compression.c:stream_store_counters Unexecuted instantiation: fcgi-app.c:stream_store_counters Unexecuted instantiation: flt_spoe.c:stream_store_counters Unexecuted instantiation: proto_tcp.c:stream_store_counters |
144 | | |
145 | | /* Remove the refcount from the stream counters tracked at the content level if |
146 | | * any, and clear the pointer to ensure this is only performed once. The caller |
147 | | * is responsible for ensuring that the pointer is valid first. We must be |
148 | | * extremely careful not to touch the entries we inherited from the session. |
149 | | */ |
150 | | static inline void stream_stop_content_counters(struct stream *s) |
151 | 0 | { |
152 | 0 | struct stksess *ts; |
153 | 0 | void *ptr; |
154 | 0 | int i; |
155 | |
|
156 | 0 | if (unlikely(!s->stkctr)) // pool not allocated yet |
157 | 0 | return; |
158 | | |
159 | 0 | for (i = 0; i < global.tune.nb_stk_ctr; i++) { |
160 | 0 | ts = stkctr_entry(&s->stkctr[i]); |
161 | 0 | if (!ts) |
162 | 0 | continue; |
163 | | |
164 | 0 | if (stkctr_entry(&s->sess->stkctr[i])) |
165 | 0 | continue; |
166 | | |
167 | 0 | if (!(stkctr_flags(&s->stkctr[i]) & STKCTR_TRACK_CONTENT)) |
168 | 0 | continue; |
169 | | |
170 | 0 | ptr = stktable_data_ptr(s->stkctr[i].table, ts, STKTABLE_DT_CONN_CUR); |
171 | 0 | if (ptr) { |
172 | 0 | HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock); |
173 | |
|
174 | 0 | if (stktable_data_cast(ptr, std_t_uint) > 0) |
175 | 0 | stktable_data_cast(ptr, std_t_uint)--; |
176 | |
|
177 | 0 | HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock); |
178 | | |
179 | | /* If data was modified, we need to touch to re-schedule sync */ |
180 | 0 | stktable_touch_local(s->stkctr[i].table, ts, 0); |
181 | 0 | } |
182 | 0 | stkctr_set_entry(&s->stkctr[i], NULL); |
183 | 0 | stksess_kill_if_expired(s->stkctr[i].table, ts); |
184 | 0 | } |
185 | 0 | } Unexecuted instantiation: debug.c:stream_stop_content_counters Unexecuted instantiation: fd.c:stream_stop_content_counters Unexecuted instantiation: haproxy.c:stream_stop_content_counters Unexecuted instantiation: http_htx.c:stream_stop_content_counters Unexecuted instantiation: limits.c:stream_stop_content_counters Unexecuted instantiation: listener.c:stream_stop_content_counters Unexecuted instantiation: log.c:stream_stop_content_counters Unexecuted instantiation: mworker.c:stream_stop_content_counters Unexecuted instantiation: peers.c:stream_stop_content_counters Unexecuted instantiation: pool.c:stream_stop_content_counters Unexecuted instantiation: proto_sockpair.c:stream_stop_content_counters Unexecuted instantiation: proxy.c:stream_stop_content_counters Unexecuted instantiation: resolvers.c:stream_stop_content_counters Unexecuted instantiation: ring.c:stream_stop_content_counters Unexecuted instantiation: sample.c:stream_stop_content_counters Unexecuted instantiation: server.c:stream_stop_content_counters Unexecuted instantiation: session.c:stream_stop_content_counters Unexecuted instantiation: sink.c:stream_stop_content_counters Unexecuted instantiation: sock.c:stream_stop_content_counters Unexecuted instantiation: stats.c:stream_stop_content_counters Unexecuted instantiation: stconn.c:stream_stop_content_counters Unexecuted instantiation: stick_table.c:stream_stop_content_counters Unexecuted instantiation: stream.c:stream_stop_content_counters Unexecuted instantiation: tcp_rules.c:stream_stop_content_counters Unexecuted instantiation: tcpcheck.c:stream_stop_content_counters Unexecuted instantiation: thread.c:stream_stop_content_counters Unexecuted instantiation: tools.c:stream_stop_content_counters Unexecuted instantiation: trace.c:stream_stop_content_counters Unexecuted instantiation: vars.c:stream_stop_content_counters Unexecuted instantiation: activity.c:stream_stop_content_counters Unexecuted instantiation: applet.c:stream_stop_content_counters Unexecuted instantiation: backend.c:stream_stop_content_counters Unexecuted instantiation: cfgparse-listen.c:stream_stop_content_counters Unexecuted instantiation: cfgparse.c:stream_stop_content_counters Unexecuted instantiation: channel.c:stream_stop_content_counters Unexecuted instantiation: check.c:stream_stop_content_counters Unexecuted instantiation: cli.c:stream_stop_content_counters Unexecuted instantiation: connection.c:stream_stop_content_counters Unexecuted instantiation: dns.c:stream_stop_content_counters Unexecuted instantiation: dns_ring.c:stream_stop_content_counters Unexecuted instantiation: errors.c:stream_stop_content_counters Unexecuted instantiation: extcheck.c:stream_stop_content_counters Unexecuted instantiation: filters.c:stream_stop_content_counters Unexecuted instantiation: flt_http_comp.c:stream_stop_content_counters Unexecuted instantiation: frontend.c:stream_stop_content_counters Unexecuted instantiation: haterm.c:stream_stop_content_counters Unexecuted instantiation: http_ana.c:stream_stop_content_counters Unexecuted instantiation: http_ext.c:stream_stop_content_counters Unexecuted instantiation: http_fetch.c:stream_stop_content_counters Unexecuted instantiation: http_rules.c:stream_stop_content_counters Unexecuted instantiation: pattern.c:stream_stop_content_counters Unexecuted instantiation: payload.c:stream_stop_content_counters Unexecuted instantiation: proto_rhttp.c:stream_stop_content_counters Unexecuted instantiation: queue.c:stream_stop_content_counters Unexecuted instantiation: stats-html.c:stream_stop_content_counters Unexecuted instantiation: stats-json.c:stream_stop_content_counters Unexecuted instantiation: stats-proxy.c:stream_stop_content_counters Unexecuted instantiation: cache.c:stream_stop_content_counters Unexecuted instantiation: cfgparse-global.c:stream_stop_content_counters Unexecuted instantiation: compression.c:stream_stop_content_counters Unexecuted instantiation: fcgi-app.c:stream_stop_content_counters Unexecuted instantiation: flt_spoe.c:stream_stop_content_counters Unexecuted instantiation: proto_tcp.c:stream_stop_content_counters |
186 | | |
187 | | /* Increase total and concurrent connection count for stick entry <ts> of table |
188 | | * <t>. The caller is responsible for ensuring that <t> and <ts> are valid |
189 | | * pointers, and for calling this only once per connection. |
190 | | */ |
191 | | static inline void stream_start_counters(struct stktable *t, struct stksess *ts) |
192 | 0 | { |
193 | 0 | void *ptr; |
194 | |
|
195 | 0 | HA_RWLOCK_WRLOCK(STK_SESS_LOCK, &ts->lock); |
196 | |
|
197 | 0 | ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_CUR); |
198 | 0 | if (ptr) |
199 | 0 | stktable_data_cast(ptr, std_t_uint)++; |
200 | |
|
201 | 0 | ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_CNT); |
202 | 0 | if (ptr) |
203 | 0 | stktable_data_cast(ptr, std_t_uint)++; |
204 | |
|
205 | 0 | ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_RATE); |
206 | 0 | if (ptr) |
207 | 0 | update_freq_ctr_period(&stktable_data_cast(ptr, std_t_frqp), |
208 | 0 | t->data_arg[STKTABLE_DT_CONN_RATE].u, 1); |
209 | 0 | if (tick_isset(t->expire)) |
210 | 0 | ts->expire = tick_add(now_ms, MS_TO_TICKS(t->expire)); |
211 | |
|
212 | 0 | HA_RWLOCK_WRUNLOCK(STK_SESS_LOCK, &ts->lock); |
213 | | |
214 | | /* If data was modified, we need to touch to re-schedule sync */ |
215 | 0 | stktable_touch_local(t, ts, 0); |
216 | 0 | } Unexecuted instantiation: debug.c:stream_start_counters Unexecuted instantiation: fd.c:stream_start_counters Unexecuted instantiation: haproxy.c:stream_start_counters Unexecuted instantiation: http_htx.c:stream_start_counters Unexecuted instantiation: limits.c:stream_start_counters Unexecuted instantiation: listener.c:stream_start_counters Unexecuted instantiation: log.c:stream_start_counters Unexecuted instantiation: mworker.c:stream_start_counters Unexecuted instantiation: peers.c:stream_start_counters Unexecuted instantiation: pool.c:stream_start_counters Unexecuted instantiation: proto_sockpair.c:stream_start_counters Unexecuted instantiation: proxy.c:stream_start_counters Unexecuted instantiation: resolvers.c:stream_start_counters Unexecuted instantiation: ring.c:stream_start_counters Unexecuted instantiation: sample.c:stream_start_counters Unexecuted instantiation: server.c:stream_start_counters Unexecuted instantiation: session.c:stream_start_counters Unexecuted instantiation: sink.c:stream_start_counters Unexecuted instantiation: sock.c:stream_start_counters Unexecuted instantiation: stats.c:stream_start_counters Unexecuted instantiation: stconn.c:stream_start_counters Unexecuted instantiation: stick_table.c:stream_start_counters Unexecuted instantiation: stream.c:stream_start_counters Unexecuted instantiation: tcp_rules.c:stream_start_counters Unexecuted instantiation: tcpcheck.c:stream_start_counters Unexecuted instantiation: thread.c:stream_start_counters Unexecuted instantiation: tools.c:stream_start_counters Unexecuted instantiation: trace.c:stream_start_counters Unexecuted instantiation: vars.c:stream_start_counters Unexecuted instantiation: activity.c:stream_start_counters Unexecuted instantiation: applet.c:stream_start_counters Unexecuted instantiation: backend.c:stream_start_counters Unexecuted instantiation: cfgparse-listen.c:stream_start_counters Unexecuted instantiation: cfgparse.c:stream_start_counters Unexecuted instantiation: channel.c:stream_start_counters Unexecuted instantiation: check.c:stream_start_counters Unexecuted instantiation: cli.c:stream_start_counters Unexecuted instantiation: connection.c:stream_start_counters Unexecuted instantiation: dns.c:stream_start_counters Unexecuted instantiation: dns_ring.c:stream_start_counters Unexecuted instantiation: errors.c:stream_start_counters Unexecuted instantiation: extcheck.c:stream_start_counters Unexecuted instantiation: filters.c:stream_start_counters Unexecuted instantiation: flt_http_comp.c:stream_start_counters Unexecuted instantiation: frontend.c:stream_start_counters Unexecuted instantiation: haterm.c:stream_start_counters Unexecuted instantiation: http_ana.c:stream_start_counters Unexecuted instantiation: http_ext.c:stream_start_counters Unexecuted instantiation: http_fetch.c:stream_start_counters Unexecuted instantiation: http_rules.c:stream_start_counters Unexecuted instantiation: pattern.c:stream_start_counters Unexecuted instantiation: payload.c:stream_start_counters Unexecuted instantiation: proto_rhttp.c:stream_start_counters Unexecuted instantiation: queue.c:stream_start_counters Unexecuted instantiation: stats-html.c:stream_start_counters Unexecuted instantiation: stats-json.c:stream_start_counters Unexecuted instantiation: stats-proxy.c:stream_start_counters Unexecuted instantiation: cache.c:stream_start_counters Unexecuted instantiation: cfgparse-global.c:stream_start_counters Unexecuted instantiation: compression.c:stream_start_counters Unexecuted instantiation: fcgi-app.c:stream_start_counters Unexecuted instantiation: flt_spoe.c:stream_start_counters Unexecuted instantiation: proto_tcp.c:stream_start_counters |
217 | | |
218 | | /* Enable tracking of stream counters as <stkctr> on stksess <ts>. The caller is |
219 | | * responsible for ensuring that <t> and <ts> are valid pointers. Some controls |
220 | | * are performed to ensure the state can still change. |
221 | | */ |
222 | | static inline void stream_track_stkctr(struct stkctr *ctr, struct stktable *t, struct stksess *ts) |
223 | 0 | { |
224 | | /* Why this test ???? */ |
225 | 0 | if (stkctr_entry(ctr)) |
226 | 0 | return; |
227 | | |
228 | 0 | ctr->table = t; |
229 | 0 | stkctr_set_entry(ctr, ts); |
230 | 0 | stream_start_counters(t, ts); |
231 | 0 | } Unexecuted instantiation: debug.c:stream_track_stkctr Unexecuted instantiation: fd.c:stream_track_stkctr Unexecuted instantiation: haproxy.c:stream_track_stkctr Unexecuted instantiation: http_htx.c:stream_track_stkctr Unexecuted instantiation: limits.c:stream_track_stkctr Unexecuted instantiation: listener.c:stream_track_stkctr Unexecuted instantiation: log.c:stream_track_stkctr Unexecuted instantiation: mworker.c:stream_track_stkctr Unexecuted instantiation: peers.c:stream_track_stkctr Unexecuted instantiation: pool.c:stream_track_stkctr Unexecuted instantiation: proto_sockpair.c:stream_track_stkctr Unexecuted instantiation: proxy.c:stream_track_stkctr Unexecuted instantiation: resolvers.c:stream_track_stkctr Unexecuted instantiation: ring.c:stream_track_stkctr Unexecuted instantiation: sample.c:stream_track_stkctr Unexecuted instantiation: server.c:stream_track_stkctr Unexecuted instantiation: session.c:stream_track_stkctr Unexecuted instantiation: sink.c:stream_track_stkctr Unexecuted instantiation: sock.c:stream_track_stkctr Unexecuted instantiation: stats.c:stream_track_stkctr Unexecuted instantiation: stconn.c:stream_track_stkctr Unexecuted instantiation: stick_table.c:stream_track_stkctr Unexecuted instantiation: stream.c:stream_track_stkctr Unexecuted instantiation: tcp_rules.c:stream_track_stkctr Unexecuted instantiation: tcpcheck.c:stream_track_stkctr Unexecuted instantiation: thread.c:stream_track_stkctr Unexecuted instantiation: tools.c:stream_track_stkctr Unexecuted instantiation: trace.c:stream_track_stkctr Unexecuted instantiation: vars.c:stream_track_stkctr Unexecuted instantiation: activity.c:stream_track_stkctr Unexecuted instantiation: applet.c:stream_track_stkctr Unexecuted instantiation: backend.c:stream_track_stkctr Unexecuted instantiation: cfgparse-listen.c:stream_track_stkctr Unexecuted instantiation: cfgparse.c:stream_track_stkctr Unexecuted instantiation: channel.c:stream_track_stkctr Unexecuted instantiation: check.c:stream_track_stkctr Unexecuted instantiation: cli.c:stream_track_stkctr Unexecuted instantiation: connection.c:stream_track_stkctr Unexecuted instantiation: dns.c:stream_track_stkctr Unexecuted instantiation: dns_ring.c:stream_track_stkctr Unexecuted instantiation: errors.c:stream_track_stkctr Unexecuted instantiation: extcheck.c:stream_track_stkctr Unexecuted instantiation: filters.c:stream_track_stkctr Unexecuted instantiation: flt_http_comp.c:stream_track_stkctr Unexecuted instantiation: frontend.c:stream_track_stkctr Unexecuted instantiation: haterm.c:stream_track_stkctr Unexecuted instantiation: http_ana.c:stream_track_stkctr Unexecuted instantiation: http_ext.c:stream_track_stkctr Unexecuted instantiation: http_fetch.c:stream_track_stkctr Unexecuted instantiation: http_rules.c:stream_track_stkctr Unexecuted instantiation: pattern.c:stream_track_stkctr Unexecuted instantiation: payload.c:stream_track_stkctr Unexecuted instantiation: proto_rhttp.c:stream_track_stkctr Unexecuted instantiation: queue.c:stream_track_stkctr Unexecuted instantiation: stats-html.c:stream_track_stkctr Unexecuted instantiation: stats-json.c:stream_track_stkctr Unexecuted instantiation: stats-proxy.c:stream_track_stkctr Unexecuted instantiation: cache.c:stream_track_stkctr Unexecuted instantiation: cfgparse-global.c:stream_track_stkctr Unexecuted instantiation: compression.c:stream_track_stkctr Unexecuted instantiation: fcgi-app.c:stream_track_stkctr Unexecuted instantiation: flt_spoe.c:stream_track_stkctr Unexecuted instantiation: proto_tcp.c:stream_track_stkctr |
232 | | |
233 | | /* Increase the number of cumulated HTTP requests in the tracked counters */ |
234 | | static inline void stream_inc_http_req_ctr(struct stream *s) |
235 | 0 | { |
236 | 0 | int i; |
237 | |
|
238 | 0 | if (unlikely(!s->stkctr)) // pool not allocated yet |
239 | 0 | return; |
240 | | |
241 | 0 | for (i = 0; i < global.tune.nb_stk_ctr; i++) { |
242 | 0 | if (!stkctr_inc_http_req_ctr(&s->stkctr[i])) |
243 | 0 | stkctr_inc_http_req_ctr(&s->sess->stkctr[i]); |
244 | 0 | } |
245 | 0 | } Unexecuted instantiation: debug.c:stream_inc_http_req_ctr Unexecuted instantiation: fd.c:stream_inc_http_req_ctr Unexecuted instantiation: haproxy.c:stream_inc_http_req_ctr Unexecuted instantiation: http_htx.c:stream_inc_http_req_ctr Unexecuted instantiation: limits.c:stream_inc_http_req_ctr Unexecuted instantiation: listener.c:stream_inc_http_req_ctr Unexecuted instantiation: log.c:stream_inc_http_req_ctr Unexecuted instantiation: mworker.c:stream_inc_http_req_ctr Unexecuted instantiation: peers.c:stream_inc_http_req_ctr Unexecuted instantiation: pool.c:stream_inc_http_req_ctr Unexecuted instantiation: proto_sockpair.c:stream_inc_http_req_ctr Unexecuted instantiation: proxy.c:stream_inc_http_req_ctr Unexecuted instantiation: resolvers.c:stream_inc_http_req_ctr Unexecuted instantiation: ring.c:stream_inc_http_req_ctr Unexecuted instantiation: sample.c:stream_inc_http_req_ctr Unexecuted instantiation: server.c:stream_inc_http_req_ctr Unexecuted instantiation: session.c:stream_inc_http_req_ctr Unexecuted instantiation: sink.c:stream_inc_http_req_ctr Unexecuted instantiation: sock.c:stream_inc_http_req_ctr Unexecuted instantiation: stats.c:stream_inc_http_req_ctr Unexecuted instantiation: stconn.c:stream_inc_http_req_ctr Unexecuted instantiation: stick_table.c:stream_inc_http_req_ctr Unexecuted instantiation: stream.c:stream_inc_http_req_ctr Unexecuted instantiation: tcp_rules.c:stream_inc_http_req_ctr Unexecuted instantiation: tcpcheck.c:stream_inc_http_req_ctr Unexecuted instantiation: thread.c:stream_inc_http_req_ctr Unexecuted instantiation: tools.c:stream_inc_http_req_ctr Unexecuted instantiation: trace.c:stream_inc_http_req_ctr Unexecuted instantiation: vars.c:stream_inc_http_req_ctr Unexecuted instantiation: activity.c:stream_inc_http_req_ctr Unexecuted instantiation: applet.c:stream_inc_http_req_ctr Unexecuted instantiation: backend.c:stream_inc_http_req_ctr Unexecuted instantiation: cfgparse-listen.c:stream_inc_http_req_ctr Unexecuted instantiation: cfgparse.c:stream_inc_http_req_ctr Unexecuted instantiation: channel.c:stream_inc_http_req_ctr Unexecuted instantiation: check.c:stream_inc_http_req_ctr Unexecuted instantiation: cli.c:stream_inc_http_req_ctr Unexecuted instantiation: connection.c:stream_inc_http_req_ctr Unexecuted instantiation: dns.c:stream_inc_http_req_ctr Unexecuted instantiation: dns_ring.c:stream_inc_http_req_ctr Unexecuted instantiation: errors.c:stream_inc_http_req_ctr Unexecuted instantiation: extcheck.c:stream_inc_http_req_ctr Unexecuted instantiation: filters.c:stream_inc_http_req_ctr Unexecuted instantiation: flt_http_comp.c:stream_inc_http_req_ctr Unexecuted instantiation: frontend.c:stream_inc_http_req_ctr Unexecuted instantiation: haterm.c:stream_inc_http_req_ctr Unexecuted instantiation: http_ana.c:stream_inc_http_req_ctr Unexecuted instantiation: http_ext.c:stream_inc_http_req_ctr Unexecuted instantiation: http_fetch.c:stream_inc_http_req_ctr Unexecuted instantiation: http_rules.c:stream_inc_http_req_ctr Unexecuted instantiation: pattern.c:stream_inc_http_req_ctr Unexecuted instantiation: payload.c:stream_inc_http_req_ctr Unexecuted instantiation: proto_rhttp.c:stream_inc_http_req_ctr Unexecuted instantiation: queue.c:stream_inc_http_req_ctr Unexecuted instantiation: stats-html.c:stream_inc_http_req_ctr Unexecuted instantiation: stats-json.c:stream_inc_http_req_ctr Unexecuted instantiation: stats-proxy.c:stream_inc_http_req_ctr Unexecuted instantiation: cache.c:stream_inc_http_req_ctr Unexecuted instantiation: cfgparse-global.c:stream_inc_http_req_ctr Unexecuted instantiation: compression.c:stream_inc_http_req_ctr Unexecuted instantiation: fcgi-app.c:stream_inc_http_req_ctr Unexecuted instantiation: flt_spoe.c:stream_inc_http_req_ctr Unexecuted instantiation: proto_tcp.c:stream_inc_http_req_ctr |
246 | | |
247 | | /* Increase the number of cumulated HTTP requests in the backend's tracked |
248 | | * counters. We don't look up the session since it cannot happen in the backend. |
249 | | */ |
250 | | static inline void stream_inc_be_http_req_ctr(struct stream *s) |
251 | 0 | { |
252 | 0 | int i; |
253 | |
|
254 | 0 | if (unlikely(!s->stkctr)) // pool not allocated yet |
255 | 0 | return; |
256 | | |
257 | 0 | for (i = 0; i < global.tune.nb_stk_ctr; i++) { |
258 | 0 | if (!stkctr_entry(&s->stkctr[i]) || !(stkctr_flags(&s->stkctr[i]) & STKCTR_TRACK_BACKEND)) |
259 | 0 | continue; |
260 | | |
261 | 0 | stkctr_inc_http_req_ctr(&s->stkctr[i]); |
262 | 0 | } |
263 | 0 | } Unexecuted instantiation: debug.c:stream_inc_be_http_req_ctr Unexecuted instantiation: fd.c:stream_inc_be_http_req_ctr Unexecuted instantiation: haproxy.c:stream_inc_be_http_req_ctr Unexecuted instantiation: http_htx.c:stream_inc_be_http_req_ctr Unexecuted instantiation: limits.c:stream_inc_be_http_req_ctr Unexecuted instantiation: listener.c:stream_inc_be_http_req_ctr Unexecuted instantiation: log.c:stream_inc_be_http_req_ctr Unexecuted instantiation: mworker.c:stream_inc_be_http_req_ctr Unexecuted instantiation: peers.c:stream_inc_be_http_req_ctr Unexecuted instantiation: pool.c:stream_inc_be_http_req_ctr Unexecuted instantiation: proto_sockpair.c:stream_inc_be_http_req_ctr Unexecuted instantiation: proxy.c:stream_inc_be_http_req_ctr Unexecuted instantiation: resolvers.c:stream_inc_be_http_req_ctr Unexecuted instantiation: ring.c:stream_inc_be_http_req_ctr Unexecuted instantiation: sample.c:stream_inc_be_http_req_ctr Unexecuted instantiation: server.c:stream_inc_be_http_req_ctr Unexecuted instantiation: session.c:stream_inc_be_http_req_ctr Unexecuted instantiation: sink.c:stream_inc_be_http_req_ctr Unexecuted instantiation: sock.c:stream_inc_be_http_req_ctr Unexecuted instantiation: stats.c:stream_inc_be_http_req_ctr Unexecuted instantiation: stconn.c:stream_inc_be_http_req_ctr Unexecuted instantiation: stick_table.c:stream_inc_be_http_req_ctr Unexecuted instantiation: stream.c:stream_inc_be_http_req_ctr Unexecuted instantiation: tcp_rules.c:stream_inc_be_http_req_ctr Unexecuted instantiation: tcpcheck.c:stream_inc_be_http_req_ctr Unexecuted instantiation: thread.c:stream_inc_be_http_req_ctr Unexecuted instantiation: tools.c:stream_inc_be_http_req_ctr Unexecuted instantiation: trace.c:stream_inc_be_http_req_ctr Unexecuted instantiation: vars.c:stream_inc_be_http_req_ctr Unexecuted instantiation: activity.c:stream_inc_be_http_req_ctr Unexecuted instantiation: applet.c:stream_inc_be_http_req_ctr Unexecuted instantiation: backend.c:stream_inc_be_http_req_ctr Unexecuted instantiation: cfgparse-listen.c:stream_inc_be_http_req_ctr Unexecuted instantiation: cfgparse.c:stream_inc_be_http_req_ctr Unexecuted instantiation: channel.c:stream_inc_be_http_req_ctr Unexecuted instantiation: check.c:stream_inc_be_http_req_ctr Unexecuted instantiation: cli.c:stream_inc_be_http_req_ctr Unexecuted instantiation: connection.c:stream_inc_be_http_req_ctr Unexecuted instantiation: dns.c:stream_inc_be_http_req_ctr Unexecuted instantiation: dns_ring.c:stream_inc_be_http_req_ctr Unexecuted instantiation: errors.c:stream_inc_be_http_req_ctr Unexecuted instantiation: extcheck.c:stream_inc_be_http_req_ctr Unexecuted instantiation: filters.c:stream_inc_be_http_req_ctr Unexecuted instantiation: flt_http_comp.c:stream_inc_be_http_req_ctr Unexecuted instantiation: frontend.c:stream_inc_be_http_req_ctr Unexecuted instantiation: haterm.c:stream_inc_be_http_req_ctr Unexecuted instantiation: http_ana.c:stream_inc_be_http_req_ctr Unexecuted instantiation: http_ext.c:stream_inc_be_http_req_ctr Unexecuted instantiation: http_fetch.c:stream_inc_be_http_req_ctr Unexecuted instantiation: http_rules.c:stream_inc_be_http_req_ctr Unexecuted instantiation: pattern.c:stream_inc_be_http_req_ctr Unexecuted instantiation: payload.c:stream_inc_be_http_req_ctr Unexecuted instantiation: proto_rhttp.c:stream_inc_be_http_req_ctr Unexecuted instantiation: queue.c:stream_inc_be_http_req_ctr Unexecuted instantiation: stats-html.c:stream_inc_be_http_req_ctr Unexecuted instantiation: stats-json.c:stream_inc_be_http_req_ctr Unexecuted instantiation: stats-proxy.c:stream_inc_be_http_req_ctr Unexecuted instantiation: cache.c:stream_inc_be_http_req_ctr Unexecuted instantiation: cfgparse-global.c:stream_inc_be_http_req_ctr Unexecuted instantiation: compression.c:stream_inc_be_http_req_ctr Unexecuted instantiation: fcgi-app.c:stream_inc_be_http_req_ctr Unexecuted instantiation: flt_spoe.c:stream_inc_be_http_req_ctr Unexecuted instantiation: proto_tcp.c:stream_inc_be_http_req_ctr |
264 | | |
265 | | /* Increase the number of cumulated failed HTTP requests in the tracked |
266 | | * counters. Only 4xx requests should be counted here so that we can |
267 | | * distinguish between errors caused by client behaviour and other ones. |
268 | | * Note that even 404 are interesting because they're generally caused by |
269 | | * vulnerability scans. |
270 | | */ |
271 | | static inline void stream_inc_http_err_ctr(struct stream *s) |
272 | 0 | { |
273 | 0 | int i; |
274 | |
|
275 | 0 | if (unlikely(!s->stkctr)) // pool not allocated yet |
276 | 0 | return; |
277 | | |
278 | 0 | for (i = 0; i < global.tune.nb_stk_ctr; i++) { |
279 | 0 | if (!stkctr_inc_http_err_ctr(&s->stkctr[i])) |
280 | 0 | stkctr_inc_http_err_ctr(&s->sess->stkctr[i]); |
281 | 0 | } |
282 | 0 | } Unexecuted instantiation: debug.c:stream_inc_http_err_ctr Unexecuted instantiation: fd.c:stream_inc_http_err_ctr Unexecuted instantiation: haproxy.c:stream_inc_http_err_ctr Unexecuted instantiation: http_htx.c:stream_inc_http_err_ctr Unexecuted instantiation: limits.c:stream_inc_http_err_ctr Unexecuted instantiation: listener.c:stream_inc_http_err_ctr Unexecuted instantiation: log.c:stream_inc_http_err_ctr Unexecuted instantiation: mworker.c:stream_inc_http_err_ctr Unexecuted instantiation: peers.c:stream_inc_http_err_ctr Unexecuted instantiation: pool.c:stream_inc_http_err_ctr Unexecuted instantiation: proto_sockpair.c:stream_inc_http_err_ctr Unexecuted instantiation: proxy.c:stream_inc_http_err_ctr Unexecuted instantiation: resolvers.c:stream_inc_http_err_ctr Unexecuted instantiation: ring.c:stream_inc_http_err_ctr Unexecuted instantiation: sample.c:stream_inc_http_err_ctr Unexecuted instantiation: server.c:stream_inc_http_err_ctr Unexecuted instantiation: session.c:stream_inc_http_err_ctr Unexecuted instantiation: sink.c:stream_inc_http_err_ctr Unexecuted instantiation: sock.c:stream_inc_http_err_ctr Unexecuted instantiation: stats.c:stream_inc_http_err_ctr Unexecuted instantiation: stconn.c:stream_inc_http_err_ctr Unexecuted instantiation: stick_table.c:stream_inc_http_err_ctr Unexecuted instantiation: stream.c:stream_inc_http_err_ctr Unexecuted instantiation: tcp_rules.c:stream_inc_http_err_ctr Unexecuted instantiation: tcpcheck.c:stream_inc_http_err_ctr Unexecuted instantiation: thread.c:stream_inc_http_err_ctr Unexecuted instantiation: tools.c:stream_inc_http_err_ctr Unexecuted instantiation: trace.c:stream_inc_http_err_ctr Unexecuted instantiation: vars.c:stream_inc_http_err_ctr Unexecuted instantiation: activity.c:stream_inc_http_err_ctr Unexecuted instantiation: applet.c:stream_inc_http_err_ctr Unexecuted instantiation: backend.c:stream_inc_http_err_ctr Unexecuted instantiation: cfgparse-listen.c:stream_inc_http_err_ctr Unexecuted instantiation: cfgparse.c:stream_inc_http_err_ctr Unexecuted instantiation: channel.c:stream_inc_http_err_ctr Unexecuted instantiation: check.c:stream_inc_http_err_ctr Unexecuted instantiation: cli.c:stream_inc_http_err_ctr Unexecuted instantiation: connection.c:stream_inc_http_err_ctr Unexecuted instantiation: dns.c:stream_inc_http_err_ctr Unexecuted instantiation: dns_ring.c:stream_inc_http_err_ctr Unexecuted instantiation: errors.c:stream_inc_http_err_ctr Unexecuted instantiation: extcheck.c:stream_inc_http_err_ctr Unexecuted instantiation: filters.c:stream_inc_http_err_ctr Unexecuted instantiation: flt_http_comp.c:stream_inc_http_err_ctr Unexecuted instantiation: frontend.c:stream_inc_http_err_ctr Unexecuted instantiation: haterm.c:stream_inc_http_err_ctr Unexecuted instantiation: http_ana.c:stream_inc_http_err_ctr Unexecuted instantiation: http_ext.c:stream_inc_http_err_ctr Unexecuted instantiation: http_fetch.c:stream_inc_http_err_ctr Unexecuted instantiation: http_rules.c:stream_inc_http_err_ctr Unexecuted instantiation: pattern.c:stream_inc_http_err_ctr Unexecuted instantiation: payload.c:stream_inc_http_err_ctr Unexecuted instantiation: proto_rhttp.c:stream_inc_http_err_ctr Unexecuted instantiation: queue.c:stream_inc_http_err_ctr Unexecuted instantiation: stats-html.c:stream_inc_http_err_ctr Unexecuted instantiation: stats-json.c:stream_inc_http_err_ctr Unexecuted instantiation: stats-proxy.c:stream_inc_http_err_ctr Unexecuted instantiation: cache.c:stream_inc_http_err_ctr Unexecuted instantiation: cfgparse-global.c:stream_inc_http_err_ctr Unexecuted instantiation: compression.c:stream_inc_http_err_ctr Unexecuted instantiation: fcgi-app.c:stream_inc_http_err_ctr Unexecuted instantiation: flt_spoe.c:stream_inc_http_err_ctr Unexecuted instantiation: proto_tcp.c:stream_inc_http_err_ctr |
283 | | |
284 | | /* Increase the number of cumulated failed HTTP responses in the tracked |
285 | | * counters. Only some 5xx responses should be counted here so that we can |
286 | | * distinguish between server failures and errors triggered by the client |
287 | | * (i.e. 501 and 505 may be triggered and must be ignored). |
288 | | */ |
289 | | static inline void stream_inc_http_fail_ctr(struct stream *s) |
290 | 0 | { |
291 | 0 | int i; |
292 | |
|
293 | 0 | if (unlikely(!s->stkctr)) // pool not allocated yet |
294 | 0 | return; |
295 | | |
296 | 0 | for (i = 0; i < global.tune.nb_stk_ctr; i++) { |
297 | 0 | if (!stkctr_inc_http_fail_ctr(&s->stkctr[i])) |
298 | 0 | stkctr_inc_http_fail_ctr(&s->sess->stkctr[i]); |
299 | 0 | } |
300 | 0 | } Unexecuted instantiation: debug.c:stream_inc_http_fail_ctr Unexecuted instantiation: fd.c:stream_inc_http_fail_ctr Unexecuted instantiation: haproxy.c:stream_inc_http_fail_ctr Unexecuted instantiation: http_htx.c:stream_inc_http_fail_ctr Unexecuted instantiation: limits.c:stream_inc_http_fail_ctr Unexecuted instantiation: listener.c:stream_inc_http_fail_ctr Unexecuted instantiation: log.c:stream_inc_http_fail_ctr Unexecuted instantiation: mworker.c:stream_inc_http_fail_ctr Unexecuted instantiation: peers.c:stream_inc_http_fail_ctr Unexecuted instantiation: pool.c:stream_inc_http_fail_ctr Unexecuted instantiation: proto_sockpair.c:stream_inc_http_fail_ctr Unexecuted instantiation: proxy.c:stream_inc_http_fail_ctr Unexecuted instantiation: resolvers.c:stream_inc_http_fail_ctr Unexecuted instantiation: ring.c:stream_inc_http_fail_ctr Unexecuted instantiation: sample.c:stream_inc_http_fail_ctr Unexecuted instantiation: server.c:stream_inc_http_fail_ctr Unexecuted instantiation: session.c:stream_inc_http_fail_ctr Unexecuted instantiation: sink.c:stream_inc_http_fail_ctr Unexecuted instantiation: sock.c:stream_inc_http_fail_ctr Unexecuted instantiation: stats.c:stream_inc_http_fail_ctr Unexecuted instantiation: stconn.c:stream_inc_http_fail_ctr Unexecuted instantiation: stick_table.c:stream_inc_http_fail_ctr Unexecuted instantiation: stream.c:stream_inc_http_fail_ctr Unexecuted instantiation: tcp_rules.c:stream_inc_http_fail_ctr Unexecuted instantiation: tcpcheck.c:stream_inc_http_fail_ctr Unexecuted instantiation: thread.c:stream_inc_http_fail_ctr Unexecuted instantiation: tools.c:stream_inc_http_fail_ctr Unexecuted instantiation: trace.c:stream_inc_http_fail_ctr Unexecuted instantiation: vars.c:stream_inc_http_fail_ctr Unexecuted instantiation: activity.c:stream_inc_http_fail_ctr Unexecuted instantiation: applet.c:stream_inc_http_fail_ctr Unexecuted instantiation: backend.c:stream_inc_http_fail_ctr Unexecuted instantiation: cfgparse-listen.c:stream_inc_http_fail_ctr Unexecuted instantiation: cfgparse.c:stream_inc_http_fail_ctr Unexecuted instantiation: channel.c:stream_inc_http_fail_ctr Unexecuted instantiation: check.c:stream_inc_http_fail_ctr Unexecuted instantiation: cli.c:stream_inc_http_fail_ctr Unexecuted instantiation: connection.c:stream_inc_http_fail_ctr Unexecuted instantiation: dns.c:stream_inc_http_fail_ctr Unexecuted instantiation: dns_ring.c:stream_inc_http_fail_ctr Unexecuted instantiation: errors.c:stream_inc_http_fail_ctr Unexecuted instantiation: extcheck.c:stream_inc_http_fail_ctr Unexecuted instantiation: filters.c:stream_inc_http_fail_ctr Unexecuted instantiation: flt_http_comp.c:stream_inc_http_fail_ctr Unexecuted instantiation: frontend.c:stream_inc_http_fail_ctr Unexecuted instantiation: haterm.c:stream_inc_http_fail_ctr Unexecuted instantiation: http_ana.c:stream_inc_http_fail_ctr Unexecuted instantiation: http_ext.c:stream_inc_http_fail_ctr Unexecuted instantiation: http_fetch.c:stream_inc_http_fail_ctr Unexecuted instantiation: http_rules.c:stream_inc_http_fail_ctr Unexecuted instantiation: pattern.c:stream_inc_http_fail_ctr Unexecuted instantiation: payload.c:stream_inc_http_fail_ctr Unexecuted instantiation: proto_rhttp.c:stream_inc_http_fail_ctr Unexecuted instantiation: queue.c:stream_inc_http_fail_ctr Unexecuted instantiation: stats-html.c:stream_inc_http_fail_ctr Unexecuted instantiation: stats-json.c:stream_inc_http_fail_ctr Unexecuted instantiation: stats-proxy.c:stream_inc_http_fail_ctr Unexecuted instantiation: cache.c:stream_inc_http_fail_ctr Unexecuted instantiation: cfgparse-global.c:stream_inc_http_fail_ctr Unexecuted instantiation: compression.c:stream_inc_http_fail_ctr Unexecuted instantiation: fcgi-app.c:stream_inc_http_fail_ctr Unexecuted instantiation: flt_spoe.c:stream_inc_http_fail_ctr Unexecuted instantiation: proto_tcp.c:stream_inc_http_fail_ctr |
301 | | |
302 | | static inline void stream_add_srv_conn(struct stream *strm, struct server *srv) |
303 | 0 | { |
304 | | /* note: this inserts in reverse order but we do not care, it's only |
305 | | * used for massive kills (i.e. almost never). MT_LIST_INSERT() is a bit |
306 | | * faster than MT_LIST_APPEND under contention due to a faster recovery |
307 | | * from a conflict with an adjacent MT_LIST_DELETE, and using it improves |
308 | | * the performance by about 3% on 32-cores. |
309 | | */ |
310 | 0 | MT_LIST_INSERT(&srv->per_thr[tid].streams, &strm->by_srv); |
311 | 0 | HA_ATOMIC_STORE(&strm->srv_conn, srv); |
312 | 0 | } Unexecuted instantiation: debug.c:stream_add_srv_conn Unexecuted instantiation: fd.c:stream_add_srv_conn Unexecuted instantiation: haproxy.c:stream_add_srv_conn Unexecuted instantiation: http_htx.c:stream_add_srv_conn Unexecuted instantiation: limits.c:stream_add_srv_conn Unexecuted instantiation: listener.c:stream_add_srv_conn Unexecuted instantiation: log.c:stream_add_srv_conn Unexecuted instantiation: mworker.c:stream_add_srv_conn Unexecuted instantiation: peers.c:stream_add_srv_conn Unexecuted instantiation: pool.c:stream_add_srv_conn Unexecuted instantiation: proto_sockpair.c:stream_add_srv_conn Unexecuted instantiation: proxy.c:stream_add_srv_conn Unexecuted instantiation: resolvers.c:stream_add_srv_conn Unexecuted instantiation: ring.c:stream_add_srv_conn Unexecuted instantiation: sample.c:stream_add_srv_conn Unexecuted instantiation: server.c:stream_add_srv_conn Unexecuted instantiation: session.c:stream_add_srv_conn Unexecuted instantiation: sink.c:stream_add_srv_conn Unexecuted instantiation: sock.c:stream_add_srv_conn Unexecuted instantiation: stats.c:stream_add_srv_conn Unexecuted instantiation: stconn.c:stream_add_srv_conn Unexecuted instantiation: stick_table.c:stream_add_srv_conn Unexecuted instantiation: stream.c:stream_add_srv_conn Unexecuted instantiation: tcp_rules.c:stream_add_srv_conn Unexecuted instantiation: tcpcheck.c:stream_add_srv_conn Unexecuted instantiation: thread.c:stream_add_srv_conn Unexecuted instantiation: tools.c:stream_add_srv_conn Unexecuted instantiation: trace.c:stream_add_srv_conn Unexecuted instantiation: vars.c:stream_add_srv_conn Unexecuted instantiation: activity.c:stream_add_srv_conn Unexecuted instantiation: applet.c:stream_add_srv_conn Unexecuted instantiation: backend.c:stream_add_srv_conn Unexecuted instantiation: cfgparse-listen.c:stream_add_srv_conn Unexecuted instantiation: cfgparse.c:stream_add_srv_conn Unexecuted instantiation: channel.c:stream_add_srv_conn Unexecuted instantiation: check.c:stream_add_srv_conn Unexecuted instantiation: cli.c:stream_add_srv_conn Unexecuted instantiation: connection.c:stream_add_srv_conn Unexecuted instantiation: dns.c:stream_add_srv_conn Unexecuted instantiation: dns_ring.c:stream_add_srv_conn Unexecuted instantiation: errors.c:stream_add_srv_conn Unexecuted instantiation: extcheck.c:stream_add_srv_conn Unexecuted instantiation: filters.c:stream_add_srv_conn Unexecuted instantiation: flt_http_comp.c:stream_add_srv_conn Unexecuted instantiation: frontend.c:stream_add_srv_conn Unexecuted instantiation: haterm.c:stream_add_srv_conn Unexecuted instantiation: http_ana.c:stream_add_srv_conn Unexecuted instantiation: http_ext.c:stream_add_srv_conn Unexecuted instantiation: http_fetch.c:stream_add_srv_conn Unexecuted instantiation: http_rules.c:stream_add_srv_conn Unexecuted instantiation: pattern.c:stream_add_srv_conn Unexecuted instantiation: payload.c:stream_add_srv_conn Unexecuted instantiation: proto_rhttp.c:stream_add_srv_conn Unexecuted instantiation: queue.c:stream_add_srv_conn Unexecuted instantiation: stats-html.c:stream_add_srv_conn Unexecuted instantiation: stats-json.c:stream_add_srv_conn Unexecuted instantiation: stats-proxy.c:stream_add_srv_conn Unexecuted instantiation: cache.c:stream_add_srv_conn Unexecuted instantiation: cfgparse-global.c:stream_add_srv_conn Unexecuted instantiation: compression.c:stream_add_srv_conn Unexecuted instantiation: fcgi-app.c:stream_add_srv_conn Unexecuted instantiation: flt_spoe.c:stream_add_srv_conn Unexecuted instantiation: proto_tcp.c:stream_add_srv_conn |
313 | | |
314 | | static inline void stream_del_srv_conn(struct stream *strm) |
315 | 0 | { |
316 | 0 | struct server *srv = strm->srv_conn; |
317 | |
|
318 | 0 | if (!srv) |
319 | 0 | return; |
320 | | |
321 | 0 | MT_LIST_DELETE(&strm->by_srv); |
322 | 0 | HA_ATOMIC_STORE(&strm->srv_conn, NULL); |
323 | 0 | } Unexecuted instantiation: debug.c:stream_del_srv_conn Unexecuted instantiation: fd.c:stream_del_srv_conn Unexecuted instantiation: haproxy.c:stream_del_srv_conn Unexecuted instantiation: http_htx.c:stream_del_srv_conn Unexecuted instantiation: limits.c:stream_del_srv_conn Unexecuted instantiation: listener.c:stream_del_srv_conn Unexecuted instantiation: log.c:stream_del_srv_conn Unexecuted instantiation: mworker.c:stream_del_srv_conn Unexecuted instantiation: peers.c:stream_del_srv_conn Unexecuted instantiation: pool.c:stream_del_srv_conn Unexecuted instantiation: proto_sockpair.c:stream_del_srv_conn Unexecuted instantiation: proxy.c:stream_del_srv_conn Unexecuted instantiation: resolvers.c:stream_del_srv_conn Unexecuted instantiation: ring.c:stream_del_srv_conn Unexecuted instantiation: sample.c:stream_del_srv_conn Unexecuted instantiation: server.c:stream_del_srv_conn Unexecuted instantiation: session.c:stream_del_srv_conn Unexecuted instantiation: sink.c:stream_del_srv_conn Unexecuted instantiation: sock.c:stream_del_srv_conn Unexecuted instantiation: stats.c:stream_del_srv_conn Unexecuted instantiation: stconn.c:stream_del_srv_conn Unexecuted instantiation: stick_table.c:stream_del_srv_conn Unexecuted instantiation: stream.c:stream_del_srv_conn Unexecuted instantiation: tcp_rules.c:stream_del_srv_conn Unexecuted instantiation: tcpcheck.c:stream_del_srv_conn Unexecuted instantiation: thread.c:stream_del_srv_conn Unexecuted instantiation: tools.c:stream_del_srv_conn Unexecuted instantiation: trace.c:stream_del_srv_conn Unexecuted instantiation: vars.c:stream_del_srv_conn Unexecuted instantiation: activity.c:stream_del_srv_conn Unexecuted instantiation: applet.c:stream_del_srv_conn Unexecuted instantiation: backend.c:stream_del_srv_conn Unexecuted instantiation: cfgparse-listen.c:stream_del_srv_conn Unexecuted instantiation: cfgparse.c:stream_del_srv_conn Unexecuted instantiation: channel.c:stream_del_srv_conn Unexecuted instantiation: check.c:stream_del_srv_conn Unexecuted instantiation: cli.c:stream_del_srv_conn Unexecuted instantiation: connection.c:stream_del_srv_conn Unexecuted instantiation: dns.c:stream_del_srv_conn Unexecuted instantiation: dns_ring.c:stream_del_srv_conn Unexecuted instantiation: errors.c:stream_del_srv_conn Unexecuted instantiation: extcheck.c:stream_del_srv_conn Unexecuted instantiation: filters.c:stream_del_srv_conn Unexecuted instantiation: flt_http_comp.c:stream_del_srv_conn Unexecuted instantiation: frontend.c:stream_del_srv_conn Unexecuted instantiation: haterm.c:stream_del_srv_conn Unexecuted instantiation: http_ana.c:stream_del_srv_conn Unexecuted instantiation: http_ext.c:stream_del_srv_conn Unexecuted instantiation: http_fetch.c:stream_del_srv_conn Unexecuted instantiation: http_rules.c:stream_del_srv_conn Unexecuted instantiation: pattern.c:stream_del_srv_conn Unexecuted instantiation: payload.c:stream_del_srv_conn Unexecuted instantiation: proto_rhttp.c:stream_del_srv_conn Unexecuted instantiation: queue.c:stream_del_srv_conn Unexecuted instantiation: stats-html.c:stream_del_srv_conn Unexecuted instantiation: stats-json.c:stream_del_srv_conn Unexecuted instantiation: stats-proxy.c:stream_del_srv_conn Unexecuted instantiation: cache.c:stream_del_srv_conn Unexecuted instantiation: cfgparse-global.c:stream_del_srv_conn Unexecuted instantiation: compression.c:stream_del_srv_conn Unexecuted instantiation: fcgi-app.c:stream_del_srv_conn Unexecuted instantiation: flt_spoe.c:stream_del_srv_conn Unexecuted instantiation: proto_tcp.c:stream_del_srv_conn |
324 | | |
325 | | static inline void stream_init_srv_conn(struct stream *strm) |
326 | 0 | { |
327 | 0 | strm->srv_conn = NULL; |
328 | 0 | MT_LIST_INIT(&strm->by_srv); |
329 | 0 | } Unexecuted instantiation: debug.c:stream_init_srv_conn Unexecuted instantiation: fd.c:stream_init_srv_conn Unexecuted instantiation: haproxy.c:stream_init_srv_conn Unexecuted instantiation: http_htx.c:stream_init_srv_conn Unexecuted instantiation: limits.c:stream_init_srv_conn Unexecuted instantiation: listener.c:stream_init_srv_conn Unexecuted instantiation: log.c:stream_init_srv_conn Unexecuted instantiation: mworker.c:stream_init_srv_conn Unexecuted instantiation: peers.c:stream_init_srv_conn Unexecuted instantiation: pool.c:stream_init_srv_conn Unexecuted instantiation: proto_sockpair.c:stream_init_srv_conn Unexecuted instantiation: proxy.c:stream_init_srv_conn Unexecuted instantiation: resolvers.c:stream_init_srv_conn Unexecuted instantiation: ring.c:stream_init_srv_conn Unexecuted instantiation: sample.c:stream_init_srv_conn Unexecuted instantiation: server.c:stream_init_srv_conn Unexecuted instantiation: session.c:stream_init_srv_conn Unexecuted instantiation: sink.c:stream_init_srv_conn Unexecuted instantiation: sock.c:stream_init_srv_conn Unexecuted instantiation: stats.c:stream_init_srv_conn Unexecuted instantiation: stconn.c:stream_init_srv_conn Unexecuted instantiation: stick_table.c:stream_init_srv_conn Unexecuted instantiation: stream.c:stream_init_srv_conn Unexecuted instantiation: tcp_rules.c:stream_init_srv_conn Unexecuted instantiation: tcpcheck.c:stream_init_srv_conn Unexecuted instantiation: thread.c:stream_init_srv_conn Unexecuted instantiation: tools.c:stream_init_srv_conn Unexecuted instantiation: trace.c:stream_init_srv_conn Unexecuted instantiation: vars.c:stream_init_srv_conn Unexecuted instantiation: activity.c:stream_init_srv_conn Unexecuted instantiation: applet.c:stream_init_srv_conn Unexecuted instantiation: backend.c:stream_init_srv_conn Unexecuted instantiation: cfgparse-listen.c:stream_init_srv_conn Unexecuted instantiation: cfgparse.c:stream_init_srv_conn Unexecuted instantiation: channel.c:stream_init_srv_conn Unexecuted instantiation: check.c:stream_init_srv_conn Unexecuted instantiation: cli.c:stream_init_srv_conn Unexecuted instantiation: connection.c:stream_init_srv_conn Unexecuted instantiation: dns.c:stream_init_srv_conn Unexecuted instantiation: dns_ring.c:stream_init_srv_conn Unexecuted instantiation: errors.c:stream_init_srv_conn Unexecuted instantiation: extcheck.c:stream_init_srv_conn Unexecuted instantiation: filters.c:stream_init_srv_conn Unexecuted instantiation: flt_http_comp.c:stream_init_srv_conn Unexecuted instantiation: frontend.c:stream_init_srv_conn Unexecuted instantiation: haterm.c:stream_init_srv_conn Unexecuted instantiation: http_ana.c:stream_init_srv_conn Unexecuted instantiation: http_ext.c:stream_init_srv_conn Unexecuted instantiation: http_fetch.c:stream_init_srv_conn Unexecuted instantiation: http_rules.c:stream_init_srv_conn Unexecuted instantiation: pattern.c:stream_init_srv_conn Unexecuted instantiation: payload.c:stream_init_srv_conn Unexecuted instantiation: proto_rhttp.c:stream_init_srv_conn Unexecuted instantiation: queue.c:stream_init_srv_conn Unexecuted instantiation: stats-html.c:stream_init_srv_conn Unexecuted instantiation: stats-json.c:stream_init_srv_conn Unexecuted instantiation: stats-proxy.c:stream_init_srv_conn Unexecuted instantiation: cache.c:stream_init_srv_conn Unexecuted instantiation: cfgparse-global.c:stream_init_srv_conn Unexecuted instantiation: compression.c:stream_init_srv_conn Unexecuted instantiation: fcgi-app.c:stream_init_srv_conn Unexecuted instantiation: flt_spoe.c:stream_init_srv_conn Unexecuted instantiation: proto_tcp.c:stream_init_srv_conn |
330 | | |
331 | | static inline void stream_choose_redispatch(struct stream *s) |
332 | 0 | { |
333 | | /* If the "redispatch" option is set on the backend, we are allowed to |
334 | | * retry on another server. By default this redispatch occurs on the |
335 | | * last retry, but if configured we allow redispatches to occur on |
336 | | * configurable intervals, e.g. on every retry. In order to achieve this, |
337 | | * we must mark the stream unassigned, and eventually clear the DIRECT |
338 | | * bit to ignore any persistence cookie. We won't count a retry nor a |
339 | | * redispatch yet, because this will depend on what server is selected. |
340 | | * If the connection is not persistent, the balancing algorithm is not |
341 | | * determinist (round robin) and there is more than one active server, |
342 | | * we accept to perform an immediate redispatch without waiting since |
343 | | * we don't care about this particular server. |
344 | | */ |
345 | 0 | if (objt_server(s->target) && |
346 | 0 | (s->be->options & PR_O_REDISP) && !(s->flags & SF_FORCE_PRST) && |
347 | 0 | ((__objt_server(s->target)->cur_state < SRV_ST_RUNNING) || |
348 | 0 | (((s->be->redispatch_after > 0) && |
349 | 0 | (s->conn_retries % s->be->redispatch_after == 0)) || |
350 | 0 | ((s->be->redispatch_after < 0) && |
351 | 0 | (s->conn_retries % (s->max_retries + 1 + s->be->redispatch_after) == 0))) || |
352 | 0 | (!(s->flags & SF_DIRECT) && s->be->srv_act > 1 && |
353 | 0 | ((s->be->lbprm.algo & BE_LB_KIND) != BE_LB_KIND_HI)))) { |
354 | 0 | sess_change_server(s, NULL); |
355 | 0 | if (may_dequeue_tasks(objt_server(s->target), s->be)) |
356 | 0 | process_srv_queue(objt_server(s->target)); |
357 | |
|
358 | 0 | sockaddr_free(&s->scb->dst); |
359 | 0 | s->flags &= ~(SF_DIRECT | SF_ASSIGNED); |
360 | 0 | s->scb->state = SC_ST_REQ; |
361 | 0 | } else { |
362 | 0 | if (s->sv_tgcounters) |
363 | 0 | _HA_ATOMIC_INC(&s->sv_tgcounters->retries); |
364 | 0 | if (s->be_tgcounters) |
365 | 0 | _HA_ATOMIC_INC(&s->be_tgcounters->retries); |
366 | 0 | s->scb->state = SC_ST_ASS; |
367 | 0 | } |
368 | |
|
369 | 0 | } Unexecuted instantiation: debug.c:stream_choose_redispatch Unexecuted instantiation: fd.c:stream_choose_redispatch Unexecuted instantiation: haproxy.c:stream_choose_redispatch Unexecuted instantiation: http_htx.c:stream_choose_redispatch Unexecuted instantiation: limits.c:stream_choose_redispatch Unexecuted instantiation: listener.c:stream_choose_redispatch Unexecuted instantiation: log.c:stream_choose_redispatch Unexecuted instantiation: mworker.c:stream_choose_redispatch Unexecuted instantiation: peers.c:stream_choose_redispatch Unexecuted instantiation: pool.c:stream_choose_redispatch Unexecuted instantiation: proto_sockpair.c:stream_choose_redispatch Unexecuted instantiation: proxy.c:stream_choose_redispatch Unexecuted instantiation: resolvers.c:stream_choose_redispatch Unexecuted instantiation: ring.c:stream_choose_redispatch Unexecuted instantiation: sample.c:stream_choose_redispatch Unexecuted instantiation: server.c:stream_choose_redispatch Unexecuted instantiation: session.c:stream_choose_redispatch Unexecuted instantiation: sink.c:stream_choose_redispatch Unexecuted instantiation: sock.c:stream_choose_redispatch Unexecuted instantiation: stats.c:stream_choose_redispatch Unexecuted instantiation: stconn.c:stream_choose_redispatch Unexecuted instantiation: stick_table.c:stream_choose_redispatch Unexecuted instantiation: stream.c:stream_choose_redispatch Unexecuted instantiation: tcp_rules.c:stream_choose_redispatch Unexecuted instantiation: tcpcheck.c:stream_choose_redispatch Unexecuted instantiation: thread.c:stream_choose_redispatch Unexecuted instantiation: tools.c:stream_choose_redispatch Unexecuted instantiation: trace.c:stream_choose_redispatch Unexecuted instantiation: vars.c:stream_choose_redispatch Unexecuted instantiation: activity.c:stream_choose_redispatch Unexecuted instantiation: applet.c:stream_choose_redispatch Unexecuted instantiation: backend.c:stream_choose_redispatch Unexecuted instantiation: cfgparse-listen.c:stream_choose_redispatch Unexecuted instantiation: cfgparse.c:stream_choose_redispatch Unexecuted instantiation: channel.c:stream_choose_redispatch Unexecuted instantiation: check.c:stream_choose_redispatch Unexecuted instantiation: cli.c:stream_choose_redispatch Unexecuted instantiation: connection.c:stream_choose_redispatch Unexecuted instantiation: dns.c:stream_choose_redispatch Unexecuted instantiation: dns_ring.c:stream_choose_redispatch Unexecuted instantiation: errors.c:stream_choose_redispatch Unexecuted instantiation: extcheck.c:stream_choose_redispatch Unexecuted instantiation: filters.c:stream_choose_redispatch Unexecuted instantiation: flt_http_comp.c:stream_choose_redispatch Unexecuted instantiation: frontend.c:stream_choose_redispatch Unexecuted instantiation: haterm.c:stream_choose_redispatch Unexecuted instantiation: http_ana.c:stream_choose_redispatch Unexecuted instantiation: http_ext.c:stream_choose_redispatch Unexecuted instantiation: http_fetch.c:stream_choose_redispatch Unexecuted instantiation: http_rules.c:stream_choose_redispatch Unexecuted instantiation: pattern.c:stream_choose_redispatch Unexecuted instantiation: payload.c:stream_choose_redispatch Unexecuted instantiation: proto_rhttp.c:stream_choose_redispatch Unexecuted instantiation: queue.c:stream_choose_redispatch Unexecuted instantiation: stats-html.c:stream_choose_redispatch Unexecuted instantiation: stats-json.c:stream_choose_redispatch Unexecuted instantiation: stats-proxy.c:stream_choose_redispatch Unexecuted instantiation: cache.c:stream_choose_redispatch Unexecuted instantiation: cfgparse-global.c:stream_choose_redispatch Unexecuted instantiation: compression.c:stream_choose_redispatch Unexecuted instantiation: fcgi-app.c:stream_choose_redispatch Unexecuted instantiation: flt_spoe.c:stream_choose_redispatch Unexecuted instantiation: proto_tcp.c:stream_choose_redispatch |
370 | | |
371 | | /* |
372 | | * This function only has to be called once after a wakeup event in case of |
373 | | * suspected timeout. It controls the stream connection timeout and sets |
374 | | * si->flags accordingly. It does NOT close anything, as this timeout may |
375 | | * be used for any purpose. It returns 1 if the timeout fired, otherwise |
376 | | * zero. |
377 | | */ |
378 | | static inline int stream_check_conn_timeout(struct stream *s) |
379 | 0 | { |
380 | 0 | if (tick_is_expired(s->conn_exp, now_ms)) { |
381 | 0 | s->flags |= SF_CONN_EXP; |
382 | 0 | return 1; |
383 | 0 | } |
384 | 0 | return 0; |
385 | 0 | } Unexecuted instantiation: debug.c:stream_check_conn_timeout Unexecuted instantiation: fd.c:stream_check_conn_timeout Unexecuted instantiation: haproxy.c:stream_check_conn_timeout Unexecuted instantiation: http_htx.c:stream_check_conn_timeout Unexecuted instantiation: limits.c:stream_check_conn_timeout Unexecuted instantiation: listener.c:stream_check_conn_timeout Unexecuted instantiation: log.c:stream_check_conn_timeout Unexecuted instantiation: mworker.c:stream_check_conn_timeout Unexecuted instantiation: peers.c:stream_check_conn_timeout Unexecuted instantiation: pool.c:stream_check_conn_timeout Unexecuted instantiation: proto_sockpair.c:stream_check_conn_timeout Unexecuted instantiation: proxy.c:stream_check_conn_timeout Unexecuted instantiation: resolvers.c:stream_check_conn_timeout Unexecuted instantiation: ring.c:stream_check_conn_timeout Unexecuted instantiation: sample.c:stream_check_conn_timeout Unexecuted instantiation: server.c:stream_check_conn_timeout Unexecuted instantiation: session.c:stream_check_conn_timeout Unexecuted instantiation: sink.c:stream_check_conn_timeout Unexecuted instantiation: sock.c:stream_check_conn_timeout Unexecuted instantiation: stats.c:stream_check_conn_timeout Unexecuted instantiation: stconn.c:stream_check_conn_timeout Unexecuted instantiation: stick_table.c:stream_check_conn_timeout Unexecuted instantiation: stream.c:stream_check_conn_timeout Unexecuted instantiation: tcp_rules.c:stream_check_conn_timeout Unexecuted instantiation: tcpcheck.c:stream_check_conn_timeout Unexecuted instantiation: thread.c:stream_check_conn_timeout Unexecuted instantiation: tools.c:stream_check_conn_timeout Unexecuted instantiation: trace.c:stream_check_conn_timeout Unexecuted instantiation: vars.c:stream_check_conn_timeout Unexecuted instantiation: activity.c:stream_check_conn_timeout Unexecuted instantiation: applet.c:stream_check_conn_timeout Unexecuted instantiation: backend.c:stream_check_conn_timeout Unexecuted instantiation: cfgparse-listen.c:stream_check_conn_timeout Unexecuted instantiation: cfgparse.c:stream_check_conn_timeout Unexecuted instantiation: channel.c:stream_check_conn_timeout Unexecuted instantiation: check.c:stream_check_conn_timeout Unexecuted instantiation: cli.c:stream_check_conn_timeout Unexecuted instantiation: connection.c:stream_check_conn_timeout Unexecuted instantiation: dns.c:stream_check_conn_timeout Unexecuted instantiation: dns_ring.c:stream_check_conn_timeout Unexecuted instantiation: errors.c:stream_check_conn_timeout Unexecuted instantiation: extcheck.c:stream_check_conn_timeout Unexecuted instantiation: filters.c:stream_check_conn_timeout Unexecuted instantiation: flt_http_comp.c:stream_check_conn_timeout Unexecuted instantiation: frontend.c:stream_check_conn_timeout Unexecuted instantiation: haterm.c:stream_check_conn_timeout Unexecuted instantiation: http_ana.c:stream_check_conn_timeout Unexecuted instantiation: http_ext.c:stream_check_conn_timeout Unexecuted instantiation: http_fetch.c:stream_check_conn_timeout Unexecuted instantiation: http_rules.c:stream_check_conn_timeout Unexecuted instantiation: pattern.c:stream_check_conn_timeout Unexecuted instantiation: payload.c:stream_check_conn_timeout Unexecuted instantiation: proto_rhttp.c:stream_check_conn_timeout Unexecuted instantiation: queue.c:stream_check_conn_timeout Unexecuted instantiation: stats-html.c:stream_check_conn_timeout Unexecuted instantiation: stats-json.c:stream_check_conn_timeout Unexecuted instantiation: stats-proxy.c:stream_check_conn_timeout Unexecuted instantiation: cache.c:stream_check_conn_timeout Unexecuted instantiation: cfgparse-global.c:stream_check_conn_timeout Unexecuted instantiation: compression.c:stream_check_conn_timeout Unexecuted instantiation: fcgi-app.c:stream_check_conn_timeout Unexecuted instantiation: flt_spoe.c:stream_check_conn_timeout Unexecuted instantiation: proto_tcp.c:stream_check_conn_timeout |
386 | | |
387 | | /* Wake a stream up for shutdown by sending it an event. The stream must be |
388 | | * locked one way or another so that it cannot leave (i.e. when inspecting a |
389 | | * locked list or under thread isolation). Process_stream() will recognize the |
390 | | * message and complete the job. <why> only supports SF_ERR_DOWN (mapped to |
391 | | * STRM_EVT_SHUT_SRV_DOWN), SF_ERR_KILLED (mapped to STRM_EVT_KILLED) and |
392 | | * SF_ERR_UP (mapped to STRM_EVT_SHUT_SRV_UP). Other values will just be |
393 | | * ignored. The stream is woken up with TASK_WOKEN_OTHER reason. The stream |
394 | | * handler will first call function stream_shutdown_self() on wakeup to complete |
395 | | * the notification. |
396 | | */ |
397 | | static inline void stream_shutdown(struct stream *s, int why) |
398 | 0 | { |
399 | 0 | HA_ATOMIC_OR(&s->new_events, ((why == SF_ERR_DOWN) ? STRM_EVT_SHUT_SRV_DOWN : |
400 | 0 | (why == SF_ERR_KILLED) ? STRM_EVT_KILLED : |
401 | 0 | (why == SF_ERR_UP) ? STRM_EVT_SHUT_SRV_UP : |
402 | 0 | 0)); |
403 | 0 | task_wakeup(s->task, TASK_WOKEN_OTHER); |
404 | 0 | } Unexecuted instantiation: debug.c:stream_shutdown Unexecuted instantiation: fd.c:stream_shutdown Unexecuted instantiation: haproxy.c:stream_shutdown Unexecuted instantiation: http_htx.c:stream_shutdown Unexecuted instantiation: limits.c:stream_shutdown Unexecuted instantiation: listener.c:stream_shutdown Unexecuted instantiation: log.c:stream_shutdown Unexecuted instantiation: mworker.c:stream_shutdown Unexecuted instantiation: peers.c:stream_shutdown Unexecuted instantiation: pool.c:stream_shutdown Unexecuted instantiation: proto_sockpair.c:stream_shutdown Unexecuted instantiation: proxy.c:stream_shutdown Unexecuted instantiation: resolvers.c:stream_shutdown Unexecuted instantiation: ring.c:stream_shutdown Unexecuted instantiation: sample.c:stream_shutdown Unexecuted instantiation: server.c:stream_shutdown Unexecuted instantiation: session.c:stream_shutdown Unexecuted instantiation: sink.c:stream_shutdown Unexecuted instantiation: sock.c:stream_shutdown Unexecuted instantiation: stats.c:stream_shutdown Unexecuted instantiation: stconn.c:stream_shutdown Unexecuted instantiation: stick_table.c:stream_shutdown Unexecuted instantiation: stream.c:stream_shutdown Unexecuted instantiation: tcp_rules.c:stream_shutdown Unexecuted instantiation: tcpcheck.c:stream_shutdown Unexecuted instantiation: thread.c:stream_shutdown Unexecuted instantiation: tools.c:stream_shutdown Unexecuted instantiation: trace.c:stream_shutdown Unexecuted instantiation: vars.c:stream_shutdown Unexecuted instantiation: activity.c:stream_shutdown Unexecuted instantiation: applet.c:stream_shutdown Unexecuted instantiation: backend.c:stream_shutdown Unexecuted instantiation: cfgparse-listen.c:stream_shutdown Unexecuted instantiation: cfgparse.c:stream_shutdown Unexecuted instantiation: channel.c:stream_shutdown Unexecuted instantiation: check.c:stream_shutdown Unexecuted instantiation: cli.c:stream_shutdown Unexecuted instantiation: connection.c:stream_shutdown Unexecuted instantiation: dns.c:stream_shutdown Unexecuted instantiation: dns_ring.c:stream_shutdown Unexecuted instantiation: errors.c:stream_shutdown Unexecuted instantiation: extcheck.c:stream_shutdown Unexecuted instantiation: filters.c:stream_shutdown Unexecuted instantiation: flt_http_comp.c:stream_shutdown Unexecuted instantiation: frontend.c:stream_shutdown Unexecuted instantiation: haterm.c:stream_shutdown Unexecuted instantiation: http_ana.c:stream_shutdown Unexecuted instantiation: http_ext.c:stream_shutdown Unexecuted instantiation: http_fetch.c:stream_shutdown Unexecuted instantiation: http_rules.c:stream_shutdown Unexecuted instantiation: pattern.c:stream_shutdown Unexecuted instantiation: payload.c:stream_shutdown Unexecuted instantiation: proto_rhttp.c:stream_shutdown Unexecuted instantiation: queue.c:stream_shutdown Unexecuted instantiation: stats-html.c:stream_shutdown Unexecuted instantiation: stats-json.c:stream_shutdown Unexecuted instantiation: stats-proxy.c:stream_shutdown Unexecuted instantiation: cache.c:stream_shutdown Unexecuted instantiation: cfgparse-global.c:stream_shutdown Unexecuted instantiation: compression.c:stream_shutdown Unexecuted instantiation: fcgi-app.c:stream_shutdown Unexecuted instantiation: flt_spoe.c:stream_shutdown Unexecuted instantiation: proto_tcp.c:stream_shutdown |
405 | | |
406 | | /* Map task states to stream events. TASK_WOKEN_* are mapped on |
407 | | * STRM_EVT_*. Not all states/flags are mapped, only those explicitly used by |
408 | | * the stream. |
409 | | */ |
410 | | static inline unsigned int stream_map_task_state(unsigned int state) |
411 | 0 | { |
412 | 0 | return ((state & TASK_WOKEN_TIMER) ? STRM_EVT_TIMER : 0) | |
413 | 0 | ((state & TASK_WOKEN_RES) ? STRM_EVT_RES : 0) | |
414 | 0 | ((state & TASK_WOKEN_MSG) ? STRM_EVT_MSG : 0) | |
415 | 0 | ((state & TASK_F_UEVT1) ? STRM_EVT_SHUT_SRV_DOWN : 0) | |
416 | 0 | ((state & TASK_F_UEVT3) ? STRM_EVT_SHUT_SRV_UP : 0) | |
417 | 0 | ((state & TASK_F_UEVT2) ? STRM_EVT_KILLED : 0) | |
418 | 0 | 0; |
419 | 0 | } Unexecuted instantiation: debug.c:stream_map_task_state Unexecuted instantiation: fd.c:stream_map_task_state Unexecuted instantiation: haproxy.c:stream_map_task_state Unexecuted instantiation: http_htx.c:stream_map_task_state Unexecuted instantiation: limits.c:stream_map_task_state Unexecuted instantiation: listener.c:stream_map_task_state Unexecuted instantiation: log.c:stream_map_task_state Unexecuted instantiation: mworker.c:stream_map_task_state Unexecuted instantiation: peers.c:stream_map_task_state Unexecuted instantiation: pool.c:stream_map_task_state Unexecuted instantiation: proto_sockpair.c:stream_map_task_state Unexecuted instantiation: proxy.c:stream_map_task_state Unexecuted instantiation: resolvers.c:stream_map_task_state Unexecuted instantiation: ring.c:stream_map_task_state Unexecuted instantiation: sample.c:stream_map_task_state Unexecuted instantiation: server.c:stream_map_task_state Unexecuted instantiation: session.c:stream_map_task_state Unexecuted instantiation: sink.c:stream_map_task_state Unexecuted instantiation: sock.c:stream_map_task_state Unexecuted instantiation: stats.c:stream_map_task_state Unexecuted instantiation: stconn.c:stream_map_task_state Unexecuted instantiation: stick_table.c:stream_map_task_state Unexecuted instantiation: stream.c:stream_map_task_state Unexecuted instantiation: tcp_rules.c:stream_map_task_state Unexecuted instantiation: tcpcheck.c:stream_map_task_state Unexecuted instantiation: thread.c:stream_map_task_state Unexecuted instantiation: tools.c:stream_map_task_state Unexecuted instantiation: trace.c:stream_map_task_state Unexecuted instantiation: vars.c:stream_map_task_state Unexecuted instantiation: activity.c:stream_map_task_state Unexecuted instantiation: applet.c:stream_map_task_state Unexecuted instantiation: backend.c:stream_map_task_state Unexecuted instantiation: cfgparse-listen.c:stream_map_task_state Unexecuted instantiation: cfgparse.c:stream_map_task_state Unexecuted instantiation: channel.c:stream_map_task_state Unexecuted instantiation: check.c:stream_map_task_state Unexecuted instantiation: cli.c:stream_map_task_state Unexecuted instantiation: connection.c:stream_map_task_state Unexecuted instantiation: dns.c:stream_map_task_state Unexecuted instantiation: dns_ring.c:stream_map_task_state Unexecuted instantiation: errors.c:stream_map_task_state Unexecuted instantiation: extcheck.c:stream_map_task_state Unexecuted instantiation: filters.c:stream_map_task_state Unexecuted instantiation: flt_http_comp.c:stream_map_task_state Unexecuted instantiation: frontend.c:stream_map_task_state Unexecuted instantiation: haterm.c:stream_map_task_state Unexecuted instantiation: http_ana.c:stream_map_task_state Unexecuted instantiation: http_ext.c:stream_map_task_state Unexecuted instantiation: http_fetch.c:stream_map_task_state Unexecuted instantiation: http_rules.c:stream_map_task_state Unexecuted instantiation: pattern.c:stream_map_task_state Unexecuted instantiation: payload.c:stream_map_task_state Unexecuted instantiation: proto_rhttp.c:stream_map_task_state Unexecuted instantiation: queue.c:stream_map_task_state Unexecuted instantiation: stats-html.c:stream_map_task_state Unexecuted instantiation: stats-json.c:stream_map_task_state Unexecuted instantiation: stats-proxy.c:stream_map_task_state Unexecuted instantiation: cache.c:stream_map_task_state Unexecuted instantiation: cfgparse-global.c:stream_map_task_state Unexecuted instantiation: compression.c:stream_map_task_state Unexecuted instantiation: fcgi-app.c:stream_map_task_state Unexecuted instantiation: flt_spoe.c:stream_map_task_state Unexecuted instantiation: proto_tcp.c:stream_map_task_state |
420 | | |
421 | | static inline void stream_report_term_evt(struct stconn *sc, enum strm_term_event_type type) |
422 | 0 | { |
423 | 0 | struct stream *s = sc_strm(sc); |
424 | 0 | enum term_event_loc loc = tevt_loc_strm; |
425 | |
|
426 | 0 | if (!s) |
427 | 0 | return; |
428 | | |
429 | 0 | if (sc->flags & SC_FL_ISBACK) |
430 | 0 | loc += 8; |
431 | 0 | s->term_evts_log = tevt_report_event(s->term_evts_log, loc, type); |
432 | 0 | sc->term_evts_log = tevt_report_event(sc->term_evts_log, loc, type); |
433 | 0 | } Unexecuted instantiation: debug.c:stream_report_term_evt Unexecuted instantiation: fd.c:stream_report_term_evt Unexecuted instantiation: haproxy.c:stream_report_term_evt Unexecuted instantiation: http_htx.c:stream_report_term_evt Unexecuted instantiation: limits.c:stream_report_term_evt Unexecuted instantiation: listener.c:stream_report_term_evt Unexecuted instantiation: log.c:stream_report_term_evt Unexecuted instantiation: mworker.c:stream_report_term_evt Unexecuted instantiation: peers.c:stream_report_term_evt Unexecuted instantiation: pool.c:stream_report_term_evt Unexecuted instantiation: proto_sockpair.c:stream_report_term_evt Unexecuted instantiation: proxy.c:stream_report_term_evt Unexecuted instantiation: resolvers.c:stream_report_term_evt Unexecuted instantiation: ring.c:stream_report_term_evt Unexecuted instantiation: sample.c:stream_report_term_evt Unexecuted instantiation: server.c:stream_report_term_evt Unexecuted instantiation: session.c:stream_report_term_evt Unexecuted instantiation: sink.c:stream_report_term_evt Unexecuted instantiation: sock.c:stream_report_term_evt Unexecuted instantiation: stats.c:stream_report_term_evt Unexecuted instantiation: stconn.c:stream_report_term_evt Unexecuted instantiation: stick_table.c:stream_report_term_evt Unexecuted instantiation: stream.c:stream_report_term_evt Unexecuted instantiation: tcp_rules.c:stream_report_term_evt Unexecuted instantiation: tcpcheck.c:stream_report_term_evt Unexecuted instantiation: thread.c:stream_report_term_evt Unexecuted instantiation: tools.c:stream_report_term_evt Unexecuted instantiation: trace.c:stream_report_term_evt Unexecuted instantiation: vars.c:stream_report_term_evt Unexecuted instantiation: activity.c:stream_report_term_evt Unexecuted instantiation: applet.c:stream_report_term_evt Unexecuted instantiation: backend.c:stream_report_term_evt Unexecuted instantiation: cfgparse-listen.c:stream_report_term_evt Unexecuted instantiation: cfgparse.c:stream_report_term_evt Unexecuted instantiation: channel.c:stream_report_term_evt Unexecuted instantiation: check.c:stream_report_term_evt Unexecuted instantiation: cli.c:stream_report_term_evt Unexecuted instantiation: connection.c:stream_report_term_evt Unexecuted instantiation: dns.c:stream_report_term_evt Unexecuted instantiation: dns_ring.c:stream_report_term_evt Unexecuted instantiation: errors.c:stream_report_term_evt Unexecuted instantiation: extcheck.c:stream_report_term_evt Unexecuted instantiation: filters.c:stream_report_term_evt Unexecuted instantiation: flt_http_comp.c:stream_report_term_evt Unexecuted instantiation: frontend.c:stream_report_term_evt Unexecuted instantiation: haterm.c:stream_report_term_evt Unexecuted instantiation: http_ana.c:stream_report_term_evt Unexecuted instantiation: http_ext.c:stream_report_term_evt Unexecuted instantiation: http_fetch.c:stream_report_term_evt Unexecuted instantiation: http_rules.c:stream_report_term_evt Unexecuted instantiation: pattern.c:stream_report_term_evt Unexecuted instantiation: payload.c:stream_report_term_evt Unexecuted instantiation: proto_rhttp.c:stream_report_term_evt Unexecuted instantiation: queue.c:stream_report_term_evt Unexecuted instantiation: stats-html.c:stream_report_term_evt Unexecuted instantiation: stats-json.c:stream_report_term_evt Unexecuted instantiation: stats-proxy.c:stream_report_term_evt Unexecuted instantiation: cache.c:stream_report_term_evt Unexecuted instantiation: cfgparse-global.c:stream_report_term_evt Unexecuted instantiation: compression.c:stream_report_term_evt Unexecuted instantiation: fcgi-app.c:stream_report_term_evt Unexecuted instantiation: flt_spoe.c:stream_report_term_evt Unexecuted instantiation: proto_tcp.c:stream_report_term_evt |
434 | | |
435 | | static inline void stream_set_srv_target(struct stream *s, struct server *srv) |
436 | 0 | { |
437 | 0 | s->target = &srv->obj_type; |
438 | 0 | s->sv_tgcounters = srv->counters.shared.tg[tgid - 1]; |
439 | 0 | } Unexecuted instantiation: debug.c:stream_set_srv_target Unexecuted instantiation: fd.c:stream_set_srv_target Unexecuted instantiation: haproxy.c:stream_set_srv_target Unexecuted instantiation: http_htx.c:stream_set_srv_target Unexecuted instantiation: limits.c:stream_set_srv_target Unexecuted instantiation: listener.c:stream_set_srv_target Unexecuted instantiation: log.c:stream_set_srv_target Unexecuted instantiation: mworker.c:stream_set_srv_target Unexecuted instantiation: peers.c:stream_set_srv_target Unexecuted instantiation: pool.c:stream_set_srv_target Unexecuted instantiation: proto_sockpair.c:stream_set_srv_target Unexecuted instantiation: proxy.c:stream_set_srv_target Unexecuted instantiation: resolvers.c:stream_set_srv_target Unexecuted instantiation: ring.c:stream_set_srv_target Unexecuted instantiation: sample.c:stream_set_srv_target Unexecuted instantiation: server.c:stream_set_srv_target Unexecuted instantiation: session.c:stream_set_srv_target Unexecuted instantiation: sink.c:stream_set_srv_target Unexecuted instantiation: sock.c:stream_set_srv_target Unexecuted instantiation: stats.c:stream_set_srv_target Unexecuted instantiation: stconn.c:stream_set_srv_target Unexecuted instantiation: stick_table.c:stream_set_srv_target Unexecuted instantiation: stream.c:stream_set_srv_target Unexecuted instantiation: tcp_rules.c:stream_set_srv_target Unexecuted instantiation: tcpcheck.c:stream_set_srv_target Unexecuted instantiation: thread.c:stream_set_srv_target Unexecuted instantiation: tools.c:stream_set_srv_target Unexecuted instantiation: trace.c:stream_set_srv_target Unexecuted instantiation: vars.c:stream_set_srv_target Unexecuted instantiation: activity.c:stream_set_srv_target Unexecuted instantiation: applet.c:stream_set_srv_target Unexecuted instantiation: backend.c:stream_set_srv_target Unexecuted instantiation: cfgparse-listen.c:stream_set_srv_target Unexecuted instantiation: cfgparse.c:stream_set_srv_target Unexecuted instantiation: channel.c:stream_set_srv_target Unexecuted instantiation: check.c:stream_set_srv_target Unexecuted instantiation: cli.c:stream_set_srv_target Unexecuted instantiation: connection.c:stream_set_srv_target Unexecuted instantiation: dns.c:stream_set_srv_target Unexecuted instantiation: dns_ring.c:stream_set_srv_target Unexecuted instantiation: errors.c:stream_set_srv_target Unexecuted instantiation: extcheck.c:stream_set_srv_target Unexecuted instantiation: filters.c:stream_set_srv_target Unexecuted instantiation: flt_http_comp.c:stream_set_srv_target Unexecuted instantiation: frontend.c:stream_set_srv_target Unexecuted instantiation: haterm.c:stream_set_srv_target Unexecuted instantiation: http_ana.c:stream_set_srv_target Unexecuted instantiation: http_ext.c:stream_set_srv_target Unexecuted instantiation: http_fetch.c:stream_set_srv_target Unexecuted instantiation: http_rules.c:stream_set_srv_target Unexecuted instantiation: pattern.c:stream_set_srv_target Unexecuted instantiation: payload.c:stream_set_srv_target Unexecuted instantiation: proto_rhttp.c:stream_set_srv_target Unexecuted instantiation: queue.c:stream_set_srv_target Unexecuted instantiation: stats-html.c:stream_set_srv_target Unexecuted instantiation: stats-json.c:stream_set_srv_target Unexecuted instantiation: stats-proxy.c:stream_set_srv_target Unexecuted instantiation: cache.c:stream_set_srv_target Unexecuted instantiation: cfgparse-global.c:stream_set_srv_target Unexecuted instantiation: compression.c:stream_set_srv_target Unexecuted instantiation: fcgi-app.c:stream_set_srv_target Unexecuted instantiation: flt_spoe.c:stream_set_srv_target Unexecuted instantiation: proto_tcp.c:stream_set_srv_target |
440 | | |
441 | | int stream_set_timeout(struct stream *s, enum act_timeout_name name, int timeout); |
442 | | void stream_retnclose(struct stream *s, const struct buffer *msg); |
443 | | void sess_set_term_flags(struct stream *s); |
444 | | void stream_abort(struct stream *s); |
445 | | |
446 | | void service_keywords_register(struct action_kw_list *kw_list); |
447 | | struct action_kw *service_find(const char *kw); |
448 | | void list_services(FILE *out); |
449 | | |
450 | | #endif /* _HAPROXY_STREAM_H */ |
451 | | |
452 | | /* |
453 | | * Local variables: |
454 | | * c-indent-level: 8 |
455 | | * c-basic-offset: 8 |
456 | | * End: |
457 | | */ |