[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c64a4c79-03e3-9286-1b45-29d5dfaa0502@gmail.com>
Date: Sun, 1 May 2022 21:56:16 -0700
From: David Ahern <dsahern@...il.com>
To: Ido Schimmel <idosch@...sch.org>, Petr Machata <petrm@...dia.com>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH iproute2-next 06/11] ipstats: Add a group "link"
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. The ABI breakage is
when an entry is added in the middle.
>
>> + return -EINVAL;
>> + }
>> +
>> + open_json_object("stats64");
>> + print_stats64(stdout, stats, NULL, NULL);
>> + close_json_object();
>> + return 0;
>> +}
Powered by blists - more mailing lists