haproxy/src
Amaury Denoyelle af02c57406 BUG/MEDIUM: config: fix cpu-map notation with both process and threads
The application of a cpu-map statement with both process and threads
is broken (P-Q/1 or 1/P-Q notation).

For example, before the fix, when using P-Q/1, proc_t1 would be updated.
Then it would be AND'ed with thread which is still 0 and thus does
nothing.

Another problem is when using 1/1[-Q], thread[0] is defined. But if
there is multiple processes, every processes will use this define
affinity even if it should be applied only to 1st process.

The solution to the fix is a little bit too complex for my taste and
there is maybe a simpler solution but I did not wish to break the
storage of global.cpu_map, as it is quite painful to test all the
use-cases. Besides, this code will probably be clean up when
multiprocess support removed on the future version.

Let's try to explain my logic.

* either haproxy runs in multiprocess or multithread mode. If on
  multiprocess, we should consider proc_t1 (P-Q/1 notation). If on
  multithread, we should consider thread (1/P-Q notation). However
  during parsing, the final number of processes or threads is unknown,
  thus we have to consider the two possibilities.

* there is a special case for the first thread / first process which is
  present in both execution modes. And as a matter of fact cpu-map 1 or
  1/1 notation represents the same thing. Thus, thread[0] and proc_t1[0]
  represents the same thing. To solve this problem, only thread[0] is
  used for this special case.

This fix must be backported up to 2.0.
2021-04-21 15:18:57 +02:00
..
acl.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
action.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
activity.c CLEANUP: config: make the cfg_keyword parsers take a const for the defproxy 2021-03-09 10:09:43 +01:00
applet.c MEDIUM: dynbuf: remove last usages of b_alloc_margin() 2021-03-22 16:27:59 +01:00
arg.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
auth.c CLEANUP: tree-wide: replace free(x);x=NULL with ha_free(&x) 2021-02-26 21:21:09 +01:00
backend.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
base64.c MINOR: sample: add ub64dec and ub64enc converters 2021-04-13 17:28:13 +02:00
cache.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
calltrace.c BUILD: trace: include tools.h 2020-09-25 17:54:48 +02:00
cfgdiag.c MINOR: diag: diag if servers use the same cookie value 2021-04-01 18:03:37 +02:00
cfgparse-global.c BUG/MEDIUM: config: fix cpu-map notation with both process and threads 2021-04-21 15:18:57 +02:00
cfgparse-listen.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
cfgparse-ssl.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
cfgparse-tcp.c MINOR: server: prepare parsing for dynamic servers 2021-03-18 15:51:12 +01:00
cfgparse-unix.c MINOR: listener: create a new struct "settings" in bind_conf 2020-09-16 20:13:13 +02:00
cfgparse.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
channel.c CLEANUP: channel: fix comment in ci_putblk. 2021-02-13 09:43:17 +01:00
check.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
chunk.c MINOR: pool: move pool declarations to read_mostly 2021-04-10 19:27:41 +02:00
cli.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
compression.c MINOR: pool: move pool declarations to read_mostly 2021-04-10 19:27:41 +02:00
connection.c MINOR: connection: Make bc_http_major compatible with tcp-checks 2021-04-19 08:31:05 +02:00
debug.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
dgram.c
dict.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
dns.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
dynbuf.c CLEANUP: pools: re-merge pool_refill_alloc() and __pool_refill_alloc() 2021-04-19 15:24:33 +02:00
eb32sctree.c
eb32tree.c
eb64tree.c
ebimtree.c
ebistree.c
ebmbtree.c
ebpttree.c
ebsttree.c
ebtree.c
ev_epoll.c MINOR: epoll: move epoll_fd to read_mostly 2021-04-10 19:27:41 +02:00
ev_evports.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
ev_kqueue.c MINOR: kqueue: move kqueue_fd to read_mostly 2021-04-10 19:27:41 +02:00
ev_poll.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
ev_select.c CLEANUP: Remove useless malloc() casts 2021-04-08 20:11:58 +02:00
extcheck.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
fcgi-app.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
fcgi.c
fd.c MINOR: fd: move a few read-mostly variables to their own section 2021-04-10 19:27:41 +02:00
filters.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
fix.c CLEANUP: assorted typo fixes in the code and comments 2020-12-21 11:24:48 +01:00
flt_http_comp.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
flt_spoe.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
flt_trace.c CLEANUP: Use istadv(const struct ist, const size_t) whenever possible 2021-03-03 05:07:10 +01:00
freq_ctr.c MEDIUM: freq_ctr: replace the per-second counters with the generic ones 2021-04-11 11:12:55 +02:00
frontend.c MINOR: http-ana: Simplify creation/destruction of HTTP transactions 2021-04-01 11:06:48 +02:00
h1_htx.c MINOR: h1: Raise the chunk size limit up to (2^52 - 1) 2021-01-28 16:37:14 +01:00
h1.c MEDIUM: h1: add a WebSocket key on handshake if needed 2021-01-28 16:37:14 +01:00
h2.c CLEANUP: Replace for loop with only a condition by while 2021-03-05 08:28:53 +01:00
haproxy.c BUG/MEDIUM: config: fix cpu-map notation with both process and threads 2021-04-21 15:18:57 +02:00
hash.c
hlua_fcn.c BUG/MINOR: hlua: Don't strip last non-LWS char in hlua_pushstrippedstring() 2021-03-03 19:48:12 +01:00
hlua.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
hpack-dec.c CLEANUP: Use isttest(const struct ist) whenever possible 2021-03-03 05:07:10 +01:00
hpack-enc.c
hpack-huff.c CONTRIB: move some dev-specific tools to dev/ 2021-04-02 17:48:42 +02:00
hpack-tbl.c MINOR: pool: move pool declarations to read_mostly 2021-04-10 19:27:41 +02:00
http_acl.c CLEANUP: acl: don't reference the generic pattern deletion function anymore 2020-11-05 19:27:09 +01:00
http_act.c MINOR: uri_normalizer: Add a strip-dot normalizer 2021-04-21 12:15:14 +02:00
http_ana.c MINOR: pool: move pool declarations to read_mostly 2021-04-10 19:27:41 +02:00
http_conv.c MINOR: http-conv: Don't check if argument list is set in sample converters 2021-01-29 13:26:02 +01:00
http_fetch.c BUG/MINOR: http-fetch: Make method smp safe if headers were already forwarded 2021-04-19 08:31:05 +02:00
http_htx.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
http_rules.c MINOR: http-rules: suggest approaching action names on mismatch 2021-03-12 14:13:21 +01:00
http.c MINOR: http: Add HTTP 501-not-implemented error message 2021-01-21 15:21:12 +01:00
htx.c CLEANUP: Use istadv(const struct ist, const size_t) whenever possible 2021-03-03 05:07:10 +01:00
init.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
lb_chash.c MINOR: lb/chash: use a read lock in chash_get_server_hash() 2020-10-17 20:15:49 +02:00
lb_fas.c OPTIM: lb-first: do not take the server lock on take_conn/drop_conn 2021-02-18 10:06:45 +01:00
lb_fwlc.c OPTIM: lb-leastconn: do not unlink the server if it did not change 2021-02-18 10:06:45 +01:00
lb_fwrr.c MINOR: backend: replace the lbprm lock with an rwlock 2020-10-17 18:51:41 +02:00
lb_map.c MINOR: lb/map: use seek lock and read locks where appropriate 2020-10-17 19:04:27 +02:00
listener.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
log.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
lru.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
mailers.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
map.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
mjson.c MINOR: sample: converter: Add mjson library. 2021-04-15 17:05:38 +02:00
mqtt.c CLEANUP: assorted typo fixes in the code and comments 2020-12-21 11:24:48 +01:00
mux_fcgi.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
mux_h1.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
mux_h2.c BUG/MEDIUM: mux-h2: Fix dfl calculation when merging CONTINUATION frames 2021-04-21 12:13:12 +02:00
mux_pt.c MINOR: trace: make trace sources read_mostly 2021-04-10 19:29:26 +02:00
mworker-prog.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
mworker.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
namespace.c
pattern.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
payload.c BUG/MINOR: payload/htx: Ingore L6 sample fetches for HTX streams/checks 2021-04-01 15:31:55 +02:00
peers.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
pipe.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
pool.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
proto_quic.c MINOR: fd: move .linger_risk into fdtab[].state 2021-04-07 18:07:49 +02:00
proto_sockpair.c MINOR: fd: move .linger_risk into fdtab[].state 2021-04-07 18:07:49 +02:00
proto_tcp.c MINOR: fd: move .linger_risk into fdtab[].state 2021-04-07 18:07:49 +02:00
proto_udp.c MINOR: udp: export udp_suspend_receiver() and udp_resume_receiver() 2020-12-08 18:10:18 +01:00
proto_uxdg.c BUG/MINOR: protocol: add missing support of dgram unix socket. 2021-03-18 18:30:29 +01:00
proto_uxst.c MINOR: fd: move .linger_risk into fdtab[].state 2021-04-07 18:07:49 +02:00
protocol.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
proxy.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
qpack-tbl.c CLEANUP: qpack: Wrong comment about the draft for QPACK static header table. 2021-01-04 12:31:28 +01:00
queue.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
quic_cc_newreno.c MINOR: quic: Add traces to congestion avoidance NewReno callback. 2020-12-23 11:57:26 +01:00
quic_cc.c MINOR: quic: Import C source code files for QUIC protocol. 2020-12-23 11:57:26 +01:00
quic_frame.c CLEANUP: assorted typo fixes in the code and comments 2021-01-06 16:26:50 +01:00
quic_sock.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
quic_tls.c MINOR: quic: Update the initial salt to that of draft-29. 2020-12-23 11:57:26 +01:00
raw_sock.c MINOR: fd: move .linger_risk into fdtab[].state 2021-04-07 18:07:49 +02:00
regex.c OPTIM: regex: PCRE2 use JIT match when JIT optimisation occured. 2020-08-14 07:53:40 +02:00
resolvers.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
ring.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
sample.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
server_state.c BUG/MINOR: server-state: use the argument, not the global state 2021-03-12 14:13:07 +01:00
server.c BUG/MINOR: server: fix potential null gcc error in delete server 2021-04-21 12:02:30 +02:00
session.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
sha1.c
shctx.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
signal.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
sink.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
sock_inet.c MINOR: fd: move .exported into fdtab[].state 2021-04-07 18:10:36 +02:00
sock_unix.c MINOR: fd: move .exported into fdtab[].state 2021-04-07 18:10:36 +02:00
sock.c MINOR: fd: move .linger_risk into fdtab[].state 2021-04-07 18:07:49 +02:00
ssl_ckch.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
ssl_crtlist.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
ssl_sample.c BUG/MINOR: ssl-samples: Fix ssl_bc_* samples when called from a health-check 2021-04-19 08:31:05 +02:00
ssl_sock.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
ssl_utils.c CLEANUP: ssl: ssl_sock_crt2der semicolon and spaces 2020-08-07 15:38:40 +02:00
stats.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
stick_table.c MINOR: freq_ctr: unify freq_ctr and freq_ctr_period into freq_ctr 2021-04-11 11:11:27 +02:00
stream_interface.c CLEANUP: task: make sure tasklet handlers always indicate their statuses 2021-03-13 11:30:19 +01:00
stream.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
task.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
tcp_act.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
tcp_rules.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
tcp_sample.c MINOR: tcp_samples: Be able to call bc_src/bc_dst from the health-checks 2021-04-19 08:31:05 +02:00
tcpcheck.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
thread.c MINOR: threads: Only consider running threads to end a thread harmeless period 2021-04-17 11:14:58 +02:00
time.c MEDIUM: time: make the clock offset global and no per-thread 2021-04-11 23:59:37 +02:00
tools.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
trace.c MINOR: trace: Add the checks as a possible trace source 2021-04-12 12:09:36 +02:00
uri_auth.c CLEANUP: Compare the return value of XXXcmp() functions with zero 2021-01-04 10:09:02 +01:00
uri_normalizer.c MINOR: uri_normalizer: Add a strip-dot normalizer 2021-04-21 12:15:14 +02:00
vars.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
version.c
wdt.c CLEANUP: config: Return ERR_NONE from config callbacks instead of 0 2020-11-13 16:26:10 +01:00
xprt_handshake.c MEDIUM: connections: Implement a start() method for xprt_handshake. 2021-03-19 15:33:04 +01:00
xprt_quic.c CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00