From: Ido Schimmel <idosch@idosch.org>
To: David Ahern <dsahern@gmail.com>
Cc: Petr Machata <petrm@nvidia.com>,
netdev@vger.kernel.org,
Stephen Hemminger <stephen@networkplumber.org>,
Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH iproute2-next 06/11] ipstats: Add a group "link"
Date: Mon, 2 May 2022 09:19:12 +0300 [thread overview]
Message-ID: <Ym934BkT7TAsu2kZ@shredder> (raw)
In-Reply-To: <c64a4c79-03e3-9286-1b45-29d5dfaa0502@gmail.com>
On Sun, May 01, 2022 at 09:56:16PM -0700, David Ahern wrote:
> On 5/1/22 8:52 AM, Ido Schimmel wrote:
> > When I tested this on 5.15 / 5.16 everything was fine, but now I get:
> >
> > $ ip stats show dev lo group link
> > 1: lo: group link
> > Error: attribute payload too short
> >
>
> ...
>
> >
> > Note the difference in size of IFLA_STATS_LINK_64 which carries struct
> > rtnl_link_stats64: 196 bytes vs. 204 bytes
> >
> > The 8 byte difference is most likely from the addition of
> > rx_otherhost_dropped at the end:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=794c24e9921f32ded4422833a990ccf11dc3c00e
> >
> > I guess it worked for me because I didn't have this member in my copy of
> > the uAPI file, but it's now in iproute2-next:
> >
> > https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=bba95837524d09ee2f0efdf6350b83a985f4b2f8
> >
> > I was under the impression that such a size increase in a uAPI struct is
> > forbidden, which is why we usually avoid passing structs over netlink.
>
> extending structs at the end is typically allowed.
In this case, the iproute2 check needs to be modified as new iproute2
should work with old kernels.
> The ABI breakage is when an entry is added in the middle.
Sure, that's well understood.
Thanks!
>
>
> >
> >> + return -EINVAL;
> >> + }
> >> +
> >> + open_json_object("stats64");
> >> + print_stats64(stdout, stats, NULL, NULL);
> >> + close_json_object();
> >> + return 0;
> >> +}
>
next prev parent reply other threads:[~2022-05-02 6:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 8:30 [PATCH iproute2-next 00/11] ip stats: A new front-end for RTM_GETSTATS / RTM_SETSTATS Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 01/11] libnetlink: Add filtering to rtnl_statsdump_req_filter() Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 02/11] ip: Publish functions for stats formatting Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 03/11] ip: Add a new family of commands, "stats" Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 04/11] ipstats: Add a "set" command Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 05/11] ipstats: Add a shell of "show" command Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 06/11] ipstats: Add a group "link" Petr Machata
2022-05-01 14:52 ` Ido Schimmel
2022-05-02 4:56 ` David Ahern
2022-05-02 6:19 ` Ido Schimmel [this message]
2022-05-02 9:37 ` Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 07/11] ipstats: Add a group "offload", subgroup "cpu_hit" Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 08/11] ipstats: Add offload subgroup "hw_stats_info" Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 09/11] ipstats: Add offload subgroup "l3_stats" Petr Machata
2022-04-22 8:30 ` [PATCH iproute2-next 10/11] ipmonitor: Add monitoring support for stats events Petr Machata
2022-04-22 8:31 ` [PATCH iproute2-next 11/11] man: Add man pages for the "stats" functions Petr Machata
2022-04-28 2:20 ` [PATCH iproute2-next 00/11] ip stats: A new front-end for RTM_GETSTATS / RTM_SETSTATS 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=Ym934BkT7TAsu2kZ@shredder \
--to=idosch@idosch.org \
--cc=dsahern@gmail.com \
--cc=idosch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=stephen@networkplumber.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox