Subject: Re: [PATCH net-next 06/14] net: dev: Add hardware stats support

From: Petr Machata <[email-masked]>
Date: Fri, 25 Feb 2022 18:00:11 +0100

Jakub Kicinski <[email-masked]> writes:

> On Fri, 25 Feb 2022 09:31:23 +0100 Petr Machata wrote:
>> >> +	struct rtnl_link_stats64 *offload_xstats_l3;  
>> >
>> > Does it make sense to stick to rtnl_link_stats64 for this? There's
>> > a lot of.. historical baggage in that struct.
>> 
>> It seemed like a reasonable default that every tool already
>> understands.
>
> What I meant is take out all the link-level / PHY stuff, I don't think
> any HW would be reporting these above the physical port. Basically when
> you look at struct rtnl_link_stats64 we can remove everything starting
> from and including collisions, right?

My thinking is that stats64 is understood, e.g. formatting this in the
iproute2 suite is just a function call away. I imagine this is similar
in other userspace tools as well. There are benefits to just reusing
what exists, despite not being optimal.

But yeah, those 120 trail bytes are very likely going to be zero.
I can shave them if you feel strongly about it.