Skip to content

ip stats: Support for xstats and afstats

Petr Machata netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10iplink: Fix formatting of MPLS statsip/iplink.c+32 -120 replies
2/10iplink: Publish a function to format MPLS statsip/ip_common.h ip/iplink.c+24 -150 replies
3/10ipstats: Add a group "afstats", subgroup "mpls"ip/iplink.c ip/ipstats.c+55 -10 replies
4/10iplink: Add JSON support to MPLS stats formatterip/iplink.c+44 -250 replies
5/10ipstats: Add a third level of stats hierarchy, a "suite"ip/ipstats.c man/man8/ip-stats.8+10 -20 replies
6/10ipstats: Add groups "xstats", "xstats_slave"ip/ip_common.h ip/ipstats.c+73 -00 replies
7/10iplink_bridge: Split bridge_print_stats_attr()ip/iplink_bridge.c+133 -1210 replies
8/10ipstats: Expose bridge stats in ipstatsip/ip_common.h ip/iplink_bridge.c ip/ipstats.c+84 -00 replies
9/10ipstats: Expose bond stats in ipstatsip/ip_common.h ip/iplink_bond.c ip/ipstats.c+58 -22 replies
10/10man: ip-stats.8: Describe groups xstats, xstats_slave and afstatsman/man8/ip-stats.8+47 -00 replies

Reviews trailers per patch

9 of 10 patches have a Reviewed-by or Acked-by.

PatchIdo Schimmel
1/10R-b
2/10R-b
3/10
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH iproute2-next 00/10] ip stats: Support for xstats and afstats

The RTM_GETSTATS response attributes IFLA_STATS_LINK_XSTATS and IFLA_STATS_LINK_XSTATS_SLAVE are used to carry statistics related to, respectively, netdevices of a certain type, and netdevices enslaved to netdevices of a certain type. IFLA_STATS_AF_SPEC are similarly used to carry statistics specific to a certain address family.

In this patch set, add support for three new stats groups that cover the above attributes: xstats, xstats_slave and afstats. Add bridge and bond subgroups to the former two groups, and mpls subgroup to the latter one.

Now "group" is used for selecting the top-level attribute, and subgroup for the link-type or address-family nest below it (bridge, bond, mpls in this patchset). But xstats (both master and slave) are further subdivided. E.g. in the case of bridge statistics, the two subdivisions are called "stp" and "mcast". To make it possible to pick these sets, add to the two selector levels of group and subgroup a third level, suite, which is filtered in the userspace.

The patchset progresses as follows:

- Patches #1 and #2 fix up MPLS stats formatting and expose the helpers for reuse.
- Patch #3 adds ip stats group afstats and a subgroup mpls
- Patch #4 adds support for JSON formatting to MPLS

- Patch #5 adds support for the selector level "suite"
- Patch #6 adds groups "xstats" and "xstats_slave"
- Patches #7 and #8 first prepare helpers, then add support for the "bridge" subgroup of the xstats groups.
- Patch #9 adds the "bond" subgroup.

- Patch #10 adds manual page coverage.

Petr Machata (10):
iplink: Fix formatting of MPLS stats
iplink: Publish a function to format MPLS stats
ipstats: Add a group "afstats", subgroup "mpls"
iplink: Add JSON support to MPLS stats formatter
ipstats: Add a third level of stats hierarchy, a "suite"
ipstats: Add groups "xstats", "xstats_slave"
iplink_bridge: Split bridge_print_stats_attr()
ipstats: Expose bridge stats in ipstats
ipstats: Expose bond stats in ipstats
man: ip-stats.8: Describe groups xstats, xstats_slave and afstats

 ip/ip_common.h      |  22 +++
 ip/iplink.c         |  75 ++++++++--
 ip/iplink_bond.c    |  55 +++++++-
 ip/iplink_bridge.c  | 334 ++++++++++++++++++++++++++++----------------
 ip/ipstats.c        | 126 ++++++++++++++++-
 man/man8/ip-stats.8 |  50 ++++++-
 6 files changed, 522 insertions(+), 140 deletions(-)
Signature · 1 line
2.31.1