ipvs: add sync_persist_mode flag
Add sync_persist_mode flag to reduce sync traffic by syncing only persistent templates. Signed-off-by: Julian Anastasov <ja@ssi.bg> Tested-by: Aleksey Chudov <aleksey.chudov@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:

committed by
Simon Horman

parent
eba3b5a787
commit
4d0c875dcc
@@ -975,6 +975,7 @@ struct netns_ipvs {
|
||||
int sysctl_snat_reroute;
|
||||
int sysctl_sync_ver;
|
||||
int sysctl_sync_ports;
|
||||
int sysctl_sync_persist_mode;
|
||||
unsigned long sysctl_sync_qlen_max;
|
||||
int sysctl_sync_sock_size;
|
||||
int sysctl_cache_bypass;
|
||||
@@ -1076,6 +1077,11 @@ static inline int sysctl_sync_ports(struct netns_ipvs *ipvs)
|
||||
return ACCESS_ONCE(ipvs->sysctl_sync_ports);
|
||||
}
|
||||
|
||||
static inline int sysctl_sync_persist_mode(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return ipvs->sysctl_sync_persist_mode;
|
||||
}
|
||||
|
||||
static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return ipvs->sysctl_sync_qlen_max;
|
||||
@@ -1139,6 +1145,11 @@ static inline int sysctl_sync_ports(struct netns_ipvs *ipvs)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int sysctl_sync_persist_mode(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline unsigned long sysctl_sync_qlen_max(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return IPVS_SYNC_QLEN_MAX;
|
||||
|
Reference in New Issue
Block a user