aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2011-02-04 04:33:01 -0500
committerSimon Horman <horms@verge.net.au>2011-03-14 20:36:57 -0400
commit59e0350eada0516a810cb780db37746165f1d516 (patch)
treee97d575d951909aea0e47598c3c830850b79e033 /include/net
parent0cfa558e2c21644a0dd6c21cfadd8bbeaf9fe1a0 (diff)
IPVS: Add {sysctl_sync_threshold,period}()
In preparation for not including sysctl_sync_threshold in struct netns_ipvs when CONFIG_SYCTL is not defined. Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_vs.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 7ca5be247256..253736db476b 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -909,6 +909,35 @@ struct netns_ipvs {
909 struct net *net; /* Needed by timer routines */ 909 struct net *net; /* Needed by timer routines */
910}; 910};
911 911
912#define DEFAULT_SYNC_THRESHOLD 3
913#define DEFAULT_SYNC_PERIOD 50
914
915#ifdef CONFIG_SYSCTL
916
917static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs)
918{
919 return ipvs->sysctl_sync_threshold[0];
920}
921
922static inline int sysctl_sync_period(struct netns_ipvs *ipvs)
923{
924 return ipvs->sysctl_sync_threshold[1];
925}
926
927#else
928
929static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs)
930{
931 return DEFAULT_SYNC_THRESHOLD;
932}
933
934static inline int sysctl_sync_period(struct netns_ipvs *ipvs)
935{
936 return DEFAULT_SYNC_PERIOD;
937}
938
939#endif
940
912/* 941/*
913 * IPVS core functions 942 * IPVS core functions
914 * (from ip_vs_core.c) 943 * (from ip_vs_core.c)