MEDIUM: connection: get rid of CO_FL_CURR_* flags
authorWilly Tarreau <w@1wt.eu>
Fri, 17 Jan 2020 16:39:35 +0000 (17:39 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Jan 2020 16:45:12 +0000 (17:45 +0100)
commit3381bf89e39f020855e41ac00489d4f79d2308b7
tree5be74bc21035139517cfeceeeb5d2db2878207bf
parent93c9f59a9c4211784d5d3769e6f77273cbb05916
MEDIUM: connection: get rid of CO_FL_CURR_* flags

These ones used to serve as a set of switches between CO_FL_SOCK_* and
CO_FL_XPRT_*, and now that the SOCK layer is gone, they're always a
copy of the last know CO_FL_XPRT_* ones that is resynchronized before
I/O events by calling conn_refresh_polling_flags(), and that are pushed
back to FDs when detecting changes with conn_xprt_polling_changes().

While these functions are not particularly heavy, what they do is
totally redundant by now because the fd_want_*/fd_stop_*() actions
already perform test-and-set operations to decide to create an entry
or not, so they do the exact same thing that is done by
conn_xprt_polling_changes(). As such it is pointless to call that
one, and given that the only reason to keep CO_FL_CURR_* is to detect
changes there, we can now remove them.

Even if this does only save very few cycles, this removes a significant
complexity that has been responsible for many bugs in the past, including
the last one affecting FreeBSD.

All tests look good, and no performance regressions were observed.
contrib/debug/flags.c
include/proto/connection.h
include/types/connection.h
src/connection.c
src/raw_sock.c
src/ssl_sock.c