[PATCH nf v4 0/3] ipvs: fix destination overload state updates

From: Yizhou Zhao

Date: Fri Jul 31 2026 - 10:36:32 EST


IPVS schedulers read destination overload state while connection accounting
and destination configuration can update it concurrently.

The first patch adds a single total connection counter. The second patch
uses it to identify threshold crossings precisely, and updates OVERLOAD at
the crossings and on a threshold edit under dst_lock. The third patch moves
configuration-controlled AVAILABLE to a separate cflags word, so it cannot
clobber OVERLOAD through an unrelated read-modify-write update.

Readers can still observe stale destination state. This series does not
provide a cross-field consistent snapshot.

Changes in v4:
- Add the total connection counter and threshold-crossing overload updates.
- Update OVERLOAD under dst_lock at threshold crossings and destination edits.
- Keep OVERLOAD in dest->flags; drop the flags2/bitops approach.
- Move AVAILABLE to the separate cflags word, avoiding RMW interference
between availability and overload updates.
- Link to v3: https://lore.kernel.org/netfilter-devel/cover.1783931964.git.zhaoyz24@xxxxxxxxxxxxxxxxxxxxx/

Julian Anastasov (2):
ipvs: add totalconns for dest
ipvs: properly update the overload flag on dest edit

Yizhou Zhao (1):
ipvs: separate destination availability state

include/net/ip_vs.h | 27 +++++++--
include/uapi/linux/ip_vs.h | 6 --
net/netfilter/ipvs/ip_vs_conn.c | 45 +++++----------
net/netfilter/ipvs/ip_vs_core.c | 6 +-
net/netfilter/ipvs/ip_vs_ctl.c | 81 ++++++++++++++++++++++-----
net/netfilter/ipvs/ip_vs_dh.c | 4 +-
net/netfilter/ipvs/ip_vs_lblc.c | 2 +-
net/netfilter/ipvs/ip_vs_lblcr.c | 8 +--
net/netfilter/ipvs/ip_vs_lc.c | 4 +-
net/netfilter/ipvs/ip_vs_proto_sctp.c | 2 -
net/netfilter/ipvs/ip_vs_proto_tcp.c | 2 -
net/netfilter/ipvs/ip_vs_sync.c | 7 +--
net/netfilter/ipvs/ip_vs_xmit.c | 4 +-
13 files changed, 118 insertions(+), 80 deletions(-)


base-commit: 2195424c3da2ef1829a63b807e3a900a90e57d85
--
2.34.1