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>
This commit is contained in:
parent
4c1017aa80
commit
cd67cd5eb2
5 changed files with 219 additions and 136 deletions
|
|
@ -358,6 +358,8 @@ enum {
|
|||
|
||||
IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */
|
||||
|
||||
IPVS_SVC_ATTR_STATS64, /* nested attribute for service stats */
|
||||
|
||||
__IPVS_SVC_ATTR_MAX,
|
||||
};
|
||||
|
||||
|
|
@ -387,6 +389,8 @@ enum {
|
|||
|
||||
IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */
|
||||
|
||||
IPVS_DEST_ATTR_STATS64, /* nested attribute for dest stats */
|
||||
|
||||
__IPVS_DEST_ATTR_MAX,
|
||||
};
|
||||
|
||||
|
|
@ -410,7 +414,8 @@ enum {
|
|||
/*
|
||||
* Attributes used to describe service or destination entry statistics
|
||||
*
|
||||
* Used inside nested attributes IPVS_SVC_ATTR_STATS and IPVS_DEST_ATTR_STATS
|
||||
* Used inside nested attributes IPVS_SVC_ATTR_STATS, IPVS_DEST_ATTR_STATS,
|
||||
* IPVS_SVC_ATTR_STATS64 and IPVS_DEST_ATTR_STATS64.
|
||||
*/
|
||||
enum {
|
||||
IPVS_STATS_ATTR_UNSPEC = 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue