History

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

Julian Anastasov committed 11 years ago

Commit cd67cd51 parent 4c1017a5 files · +226 −143Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/ip_vs.h+6−1
@@ -358,6 +358,8 @@ enum { · 357 unmodified lines
358358
359359 IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */
360360
361+ IPVS_SVC_ATTR_STATS64, /* nested attribute for service stats */
362+
361363 __IPVS_SVC_ATTR_MAX,
362364 };
363365
@@ -387,6 +389,8 @@ enum { · 23 unmodified lines
387389
388390 IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */
389391
392+ IPVS_DEST_ATTR_STATS64, /* nested attribute for dest stats */
393+
390394 __IPVS_DEST_ATTR_MAX,
391395 };
392396
@@ -410,7 +414,8 @@ enum { · 17 unmodified lines
410414 /*
411415 * Attributes used to describe service or destination entry statistics
412416 *
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.
414419 */
415420 enum {
416421 IPVS_STATS_ATTR_UNSPEC = 0,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t