aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-09-21 13:02:49 -0500
committerSimon Horman <horms@verge.net.au>2015-09-24 09:34:42 +0900
commit570329487437d4531eb806accdf98726923367ae (patch)
tree93645296803b88209bb74d41f51c99af69a33dbe /include/net/ip_vs.h
parentipvs: Better derivation of ipvs in ip_vs_in_stats and ip_vs_out_stats (diff)
downloadlinux-dev-570329487437d4531eb806accdf98726923367ae.tar.xz
linux-dev-570329487437d4531eb806accdf98726923367ae.zip
ipvs: Wrap sysctl_cache_bypass and remove ifdefs in ip_vs_leave
With sysctl_cache_bypass now a compile time constant the compiler can figue out that it can elimiate all of the code that depends on sysctl_cache_bypass being true. Also remove the duplicate computation of net previously necessitated by #ifdef CONFIG_SYSCTL Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index c68c2c8ae48a..dacd873e8bb9 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1101,6 +1101,11 @@ static inline int sysctl_ignore_tunneled(struct netns_ipvs *ipvs)
return ipvs->sysctl_ignore_tunneled;
}
+static inline int sysctl_cache_bypass(struct netns_ipvs *ipvs)
+{
+ return ipvs->sysctl_cache_bypass;
+}
+
#else
static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs)
@@ -1183,6 +1188,11 @@ static inline int sysctl_ignore_tunneled(struct netns_ipvs *ipvs)
return 0;
}
+static inline int sysctl_cache_bypass(struct netns_ipvs *ipvs)
+{
+ return 0;
+}
+
#endif
/* IPVS core functions