[PATCH nf v4 0/3] ipvs: fix destination overload state updates
Yizhou Zhao <[email protected]> Fri, 31 Jul 2026 22:27:40 +0800
| Newsgroups | org.kernel.vger.lvs-devel,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kernel.vger.netfilter-devel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
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/[email protected]/ 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