mbox series

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

Message ID cover.1652104101.git.petrm@nvidia.com (mailing list archive)
Headers show
Series ip stats: Support for xstats and afstats | expand

Message

Petr Machata May 9, 2022, 1:59 p.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 12, 2022, 5:20 p.m. UTC | #1
Hello:

This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Mon, 9 May 2022 15:59:53 +0200 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [iproute2-next,01/10] iplink: Fix formatting of MPLS stats
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=72623b73c4ea
  - [iproute2-next,02/10] iplink: Publish a function to format MPLS stats
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=dff392fd86ee
  - [iproute2-next,03/10] ipstats: Add a group "afstats", subgroup "mpls"
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=5ed8fd9d5144
  - [iproute2-next,04/10] iplink: Add JSON support to MPLS stats formatter
    (no matching commit)
  - [iproute2-next,05/10] ipstats: Add a third level of stats hierarchy, a "suite"
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=c6900b79b13d
  - [iproute2-next,06/10] ipstats: Add groups "xstats", "xstats_slave"
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=1247ed51e924
  - [iproute2-next,07/10] iplink_bridge: Split bridge_print_stats_attr()
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=79f5ad95c17c
  - [iproute2-next,08/10] ipstats: Expose bridge stats in ipstats
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=36e10429dafc
  - [iproute2-next,09/10] ipstats: Expose bond stats in ipstats
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=d9976d671c37
  - [iproute2-next,10/10] man: ip-stats.8: Describe groups xstats, xstats_slave and afstats
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=5a1ad9f8c1e6

You are awesome, thank you!