netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Petr Machata <petrm@nvidia.com>
Cc: <netdev@vger.kernel.org>, David Ahern <dsahern@gmail.com>,
	Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH iproute2-next 09/10] ipstats: Expose bond stats in ipstats
Date: Thu, 26 May 2022 17:13:13 -0700	[thread overview]
Message-ID: <20220526171313.592cbdb1@hermes.local> (raw)
In-Reply-To: <5c0de4f4844bd23a3c7035826ec93d6bf71ae666.1652104101.git.petrm@nvidia.com>

On Mon, 9 May 2022 16:00:02 +0200
Petr Machata <petrm@nvidia.com> wrote:

> Describe xstats and xstats_slave subgroups for bond netdevices.
> 
> For example:
> 
>  # ip stats show dev swp1 group xstats_slave subgroup bond
>  56: swp1: group xstats_slave subgroup bond suite 802.3ad
>                      LACPDU Rx 0
>                      LACPDU Tx 0
>                      LACPDU Unknown type Rx 0
>                      LACPDU Illegal Rx 0
>                      Marker Rx 0
>                      Marker Tx 0
>                      Marker response Rx 0
>                      Marker response Tx 0
>                      Marker unknown type Rx 0
> 
>  # ip -j stats show dev swp1 group xstats_slave subgroup bond | jq
>  [
>    {
>      "ifindex": 56,
>      "ifname": "swp1",
>      "group": "xstats_slave",
>      "subgroup": "bond",
>      "suite": "802.3ad",
>      "802.3ad": {
>        "lacpdu_rx": 0,
>        "lacpdu_tx": 0,
>        "lacpdu_unknown_rx": 0,
>        "lacpdu_illegal_rx": 0,
>        "marker_rx": 0,
>        "marker_tx": 0,
>        "marker_response_rx": 0,
>        "marker_response_tx": 0,
>        "marker_unknown_rx": 0
>      }
>    }
>  ]
> 
> Signed-off-by: Petr Machata <petrm@nvidia.com>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
> ---
>  ip/ip_common.h   |  3 +++
>  ip/iplink_bond.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++--
>  ip/ipstats.c     |  2 ++
>  3 files changed, 58 insertions(+), 2 deletions(-)

This change won't build if clang is used to build iproute2.
It has valid warning:

    CC       iplink_bond.o
iplink_bond.c:935:10: error: initializer element is not a compile-time constant
        .desc = ipstats_stat_desc_bond_tmpl_lacp,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iplink_bond.c:957:10: error: initializer element is not a compile-time constant
        .desc = ipstats_stat_desc_bond_tmpl_lacp,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Since desc is a structure, you can't just assign an existing data structure
to the new initializer.  It needs to be a pointer or macro.

  reply	other threads:[~2022-05-27  0:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 13:59 [PATCH iproute2-next 00/10] ip stats: Support for xstats and afstats Petr Machata
2022-05-09 13:59 ` [PATCH iproute2-next 01/10] iplink: Fix formatting of MPLS stats Petr Machata
2022-05-09 13:59 ` [PATCH iproute2-next 02/10] iplink: Publish a function to format " Petr Machata
2022-05-09 13:59 ` [PATCH iproute2-next 03/10] ipstats: Add a group "afstats", subgroup "mpls" Petr Machata
2022-05-09 13:59 ` [PATCH iproute2-next 04/10] iplink: Add JSON support to MPLS stats formatter Petr Machata
2022-05-09 13:59 ` [PATCH iproute2-next 05/10] ipstats: Add a third level of stats hierarchy, a "suite" Petr Machata
2022-05-09 13:59 ` [PATCH iproute2-next 06/10] ipstats: Add groups "xstats", "xstats_slave" Petr Machata
2022-05-09 14:00 ` [PATCH iproute2-next 07/10] iplink_bridge: Split bridge_print_stats_attr() Petr Machata
2022-05-09 14:00 ` [PATCH iproute2-next 08/10] ipstats: Expose bridge stats in ipstats Petr Machata
2022-05-09 14:00 ` [PATCH iproute2-next 09/10] ipstats: Expose bond " Petr Machata
2022-05-27  0:13   ` Stephen Hemminger [this message]
2022-05-27 14:50     ` Petr Machata
2022-05-09 14:00 ` [PATCH iproute2-next 10/10] man: ip-stats.8: Describe groups xstats, xstats_slave and afstats Petr Machata
2022-05-12 17:20 ` [PATCH iproute2-next 00/10] ip stats: Support for xstats " patchwork-bot+netdevbpf

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=20220526171313.592cbdb1@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dsahern@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).