aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/ip_vs.h
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2015-02-06 02:44:44 -0500
committerSimon Horman <horms@verge.net.au>2015-02-09 02:59:03 -0500
commitcd67cd5eb25ae9a7bafbfd3d52d4c05e1d80af3b (patch)
tree085939ed6ccffc6da505420513519d5d4c86dfc4 /include/uapi/linux/ip_vs.h
parent4c1017aa80c95a74703139bb95c4ce0d130efe4d (diff)
ipvs: use 64-bit rates in stats
IPVS stats are limited to 2^(32-10) conns/s and packets/s, 2^(32-5) bytes/s. It is time to use 64 bits: * Change all conn/packet kernel counters to 64-bit and update them in u64_stats_update_{begin,end} section * In kernel use struct ip_vs_kstats instead of the user-space struct ip_vs_stats_user and use new func ip_vs_export_stats_user to export it to sockopt users to preserve compatibility with 32-bit values * Rename cpu counters "ustats" to "cnt" * To netlink users provide additionally 64-bit stats: IPVS_SVC_ATTR_STATS64 and IPVS_DEST_ATTR_STATS64. Old stats remain for old binaries. * We can use ip_vs_copy_stats in ip_vs_stats_percpu_show Thanks to Chris Caputo for providing initial patch for ip_vs_est.c Signed-off-by: Chris Caputo <ccaputo@alt.net> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/uapi/linux/ip_vs.h')
-rw-r--r--include/uapi/linux/ip_vs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index cabe95d5b461..3199243f2028 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -358,6 +358,8 @@ enum {
358 358
359 IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */ 359 IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */
360 360
361 IPVS_SVC_ATTR_STATS64, /* nested attribute for service stats */
362
361 __IPVS_SVC_ATTR_MAX, 363 __IPVS_SVC_ATTR_MAX,
362}; 364};
363 365
@@ -387,6 +389,8 @@ enum {
387 389
388 IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */ 390 IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */
389 391
392 IPVS_DEST_ATTR_STATS64, /* nested attribute for dest stats */
393
390 __IPVS_DEST_ATTR_MAX, 394 __IPVS_DEST_ATTR_MAX,
391}; 395};
392 396
@@ -410,7 +414,8 @@ enum {
410/* 414/*
411 * Attributes used to describe service or destination entry statistics 415 * Attributes used to describe service or destination entry statistics
412 * 416 *
413 * Used inside nested attributes IPVS_SVC_ATTR_STATS and IPVS_DEST_ATTR_STATS 417 * Used inside nested attributes IPVS_SVC_ATTR_STATS, IPVS_DEST_ATTR_STATS,
418 * IPVS_SVC_ATTR_STATS64 and IPVS_DEST_ATTR_STATS64.
414 */ 419 */
415enum { 420enum {
416 IPVS_STATS_ATTR_UNSPEC = 0, 421 IPVS_STATS_ATTR_UNSPEC = 0,