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