summaryrefslogtreecommitdiff
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorSven Wegener <sven.wegener@stealer.net>2008-09-08 15:39:04 +0400
committerSimon Horman <horms@verge.net.au>2008-09-09 03:53:08 +0400
commite9c0ce232e7a36daae1ca08282609d7f0c57c567 (patch)
tree63ddde69fadab5a68788b37fd6813814be191176 /include/net/ip_vs.h
parent2206a3f5b75be5dadf11541961bd7c924857eb5d (diff)
downloadlinux-e9c0ce232e7a36daae1ca08282609d7f0c57c567.tar.xz
ipvs: Embed user stats structure into kernel stats structure
Instead of duplicating the fields, integrate a user stats structure into the kernel stats structure. This is more robust when the members are changed, because they are now automatically kept in sync. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Reviewed-by: Julius Volz <juliusv@google.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 38f4f690b186..33e2ac6ceb3e 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -254,27 +254,10 @@ struct ip_vs_estimator {
struct ip_vs_stats
{
- __u32 conns; /* connections scheduled */
- __u32 inpkts; /* incoming packets */
- __u32 outpkts; /* outgoing packets */
- __u64 inbytes; /* incoming bytes */
- __u64 outbytes; /* outgoing bytes */
-
- __u32 cps; /* current connection rate */
- __u32 inpps; /* current in packet rate */
- __u32 outpps; /* current out packet rate */
- __u32 inbps; /* current in byte rate */
- __u32 outbps; /* current out byte rate */
-
- /*
- * Don't add anything before the lock, because we use memcpy() to copy
- * the members before the lock to struct ip_vs_stats_user in
- * ip_vs_ctl.c.
- */
+ struct ip_vs_stats_user ustats; /* statistics */
+ struct ip_vs_estimator est; /* estimator */
spinlock_t lock; /* spin lock */
-
- struct ip_vs_estimator est; /* estimator */
};
struct dst_entry;