summaryrefslogtreecommitdiff
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorInju Song <inju.song@navercorp.com>2018-03-27 17:14:40 +0300
committerSimon Horman <horms@verge.net.au>2018-04-09 10:10:55 +0300
commita2c09ac0fb6756d7085c359b6c020ef8b4205e0f (patch)
tree50de62dc7382363b4dce510f1d3fb31310a4170f /include/net/ip_vs.h
parent535101ec884533a288f7ea35ad93cf28c89cb764 (diff)
downloadlinux-a2c09ac0fb6756d7085c359b6c020ef8b4205e0f.tar.xz
netfilter: ipvs: Keep latest weight of destination
The hashing table in scheduler such as source hash or maglev hash should ignore the changed weight to 0 and allow changing the weight from/to non-0 values. So, struct ip_vs_dest needs to keep weight with latest non-0 weight. Signed-off-by: Inju Song <inju.song@navercorp.com> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index eb0bec043c96..0ac795b41ab8 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -668,6 +668,7 @@ struct ip_vs_dest {
volatile unsigned int flags; /* dest status flags */
atomic_t conn_flags; /* flags to copy to conn */
atomic_t weight; /* server weight */
+ atomic_t last_weight; /* server latest weight */
refcount_t refcnt; /* reference counter */
struct ip_vs_stats stats; /* statistics */