From: Petr Machata <petrm@nvidia.com>
To: David Ahern <dsahern@gmail.com>, <netdev@vger.kernel.org>
Cc: Ido Schimmel <idosch@nvidia.com>,
Nikolay Aleksandrov <razor@blackwall.org>,
Petr Machata <petrm@nvidia.com>
Subject: [PATCH iproute2-next 0/4] ip: Support bridge VLAN stats in `ip stats'
Date: Fri, 6 Jun 2025 17:04:49 +0200 [thread overview]
Message-ID: <cover.1749220201.git.petrm@nvidia.com> (raw)
ip stats displays bridge-related multicast and STP stats, but not VLAN
stats. There is code for requesting, decoding and formatting these stats
accessible through `bridge -s vlan', but the `ip stats' suite lacks it. In
this patchset, extract the `bridge vlan' code to a generally accessible
place and extend `ip stats' to use it.
This reuses the existing display and JSON format, and plugs it into the
existing `ip stats' hierarchy:
# ip stats show dev v2 group xstats_slave subgroup bridge suite vlan
2: v2: group xstats_slave subgroup bridge suite vlan
10
RX: 776 bytes 10 packets
TX: 224 bytes 4 packets
20
RX: 684 bytes 7 packets
TX: 0 bytes 0 packets
# ip -j -p stats show dev v2 group xstats_slave subgroup bridge suite vlan
[ {
"ifindex": 2,
"ifname": "v2",
"group": "xstats_slave",
"subgroup": "bridge",
"suite": "vlan",
"vlans": [ {
"vid": 10,
"rx_bytes": 552,
"rx_packets": 6,
"tx_bytes": 0,
"tx_packets": 0
},{
"vid": 20,
"rx_bytes": 684,
"rx_packets": 7,
"tx_bytes": 0,
"tx_packets": 0
} ]
} ]
Petr Machata (4):
ip: ipstats: Iterate all xstats attributes
ip: ip_common: Drop ipstats_stat_desc_xstats::inner_max
lib: bridge: Add a module for bridge-related helpers
ip: iplink_bridge: Support bridge VLAN stats in `ip stats'
bridge/vlan.c | 50 +++++-----------------------------------------
include/bridge.h | 11 ++++++++++
ip/ip_common.h | 1 -
ip/iplink_bond.c | 2 --
ip/iplink_bridge.c | 40 +++++++++++++++++++++++++++++++++----
ip/ipstats.c | 18 ++++++++---------
lib/Makefile | 3 ++-
lib/bridge.c | 47 +++++++++++++++++++++++++++++++++++++++++++
8 files changed, 110 insertions(+), 62 deletions(-)
create mode 100644 include/bridge.h
create mode 100644 lib/bridge.c
--
2.49.0
next reply other threads:[~2025-06-06 15:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 15:04 Petr Machata [this message]
2025-06-06 15:04 ` [PATCH iproute2-next 1/4] ip: ipstats: Iterate all xstats attributes Petr Machata
2025-06-08 14:23 ` Ido Schimmel
2025-06-09 14:10 ` Petr Machata
2025-06-06 15:04 ` [PATCH iproute2-next 2/4] ip: ip_common: Drop ipstats_stat_desc_xstats::inner_max Petr Machata
2025-06-08 14:24 ` Ido Schimmel
2025-06-06 15:04 ` [PATCH iproute2-next 3/4] lib: bridge: Add a module for bridge-related helpers Petr Machata
2025-06-06 15:32 ` Nikolay Aleksandrov
2025-06-09 13:39 ` Petr Machata
2025-06-08 14:26 ` Ido Schimmel
2025-06-09 14:42 ` Petr Machata
2025-06-06 15:04 ` [PATCH iproute2-next 4/4] ip: iplink_bridge: Support bridge VLAN stats in `ip stats' Petr Machata
2025-06-08 14:44 ` Ido Schimmel
2025-06-09 14:10 ` Petr Machata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1749220201.git.petrm@nvidia.com \
--to=petrm@nvidia.com \
--cc=dsahern@gmail.com \
--cc=idosch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=razor@blackwall.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.