diff options
author | Sven Wegener <sven.wegener@stealer.net> | 2008-09-08 07:39:04 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-09-08 19:53:08 -0400 |
commit | e9c0ce232e7a36daae1ca08282609d7f0c57c567 (patch) | |
tree | 63ddde69fadab5a68788b37fd6813814be191176 /include/net/ip_vs.h | |
parent | 2206a3f5b75be5dadf11541961bd7c924857eb5d (diff) |
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.h | 21 |
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 { | |||
254 | 254 | ||
255 | struct ip_vs_stats | 255 | struct ip_vs_stats |
256 | { | 256 | { |
257 | __u32 conns; /* connections scheduled */ | 257 | struct ip_vs_stats_user ustats; /* statistics */ |
258 | __u32 inpkts; /* incoming packets */ | 258 | struct ip_vs_estimator est; /* estimator */ |
259 | __u32 outpkts; /* outgoing packets */ | ||
260 | __u64 inbytes; /* incoming bytes */ | ||
261 | __u64 outbytes; /* outgoing bytes */ | ||
262 | |||
263 | __u32 cps; /* current connection rate */ | ||
264 | __u32 inpps; /* current in packet rate */ | ||
265 | __u32 outpps; /* current out packet rate */ | ||
266 | __u32 inbps; /* current in byte rate */ | ||
267 | __u32 outbps; /* current out byte rate */ | ||
268 | |||
269 | /* | ||
270 | * Don't add anything before the lock, because we use memcpy() to copy | ||
271 | * the members before the lock to struct ip_vs_stats_user in | ||
272 | * ip_vs_ctl.c. | ||
273 | */ | ||
274 | 259 | ||
275 | spinlock_t lock; /* spin lock */ | 260 | spinlock_t lock; /* spin lock */ |
276 | |||
277 | struct ip_vs_estimator est; /* estimator */ | ||
278 | }; | 261 | }; |
279 | 262 | ||
280 | struct dst_entry; | 263 | struct dst_entry; |