BUG/MINOR: ssl: use atomic ops to update global shctx stats
authorWilly Tarreau <w@1wt.eu>
Tue, 15 Jun 2021 14:39:22 +0000 (16:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Jun 2021 16:23:46 +0000 (18:23 +0200)
commit0123d48081c98ae693cb9015cf09bc9f999219df
tree2c8a4a621c231d927cee3db4c499d8cee65d793b
parentcc4386bf0747582f17d835ad935e5b0533955b26
BUG/MINOR: ssl: use atomic ops to update global shctx stats

The global shctx lookups and misses was updated without using atomic
ops, so the stats available in "show info" are very likely off by a few
units over time. This should be backported as far as 1.8. Versions
without _HA_ATOMIC_INC() can use HA_ATOMIC_ADD(,1).

(cherry picked from commit 4c19e996218f6c205c1716a0b4718f9bced7f893)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 37d69399648e489fea9f93b7e9fae02dfa59acbb)
[wt: s/_HA_ATOMIC_INC/_HA_ATOMIC_ADD(,1)]
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ssl_sock.c