Re: [RFC net-next 4/6] ethtool: add interface to read standard MAC stats

2021-04-15 Thread Saeed Mahameed
On Thu, 2021-04-15 at 16:05 -0700, Jakub Kicinski wrote: > On Thu, 15 Apr 2021 15:46:52 -0700 Saeed Mahameed wrote: > > > > best practice here is to centralize all the data structures and > > > > information definitions in one place, you define the stat id, > > > > string, > > > > and value offset,

Re: [RFC net-next 4/6] ethtool: add interface to read standard MAC stats

2021-04-15 Thread Jakub Kicinski
On Thu, 15 Apr 2021 15:46:52 -0700 Saeed Mahameed wrote: > > > best practice here is to centralize all the data structures and > > > information definitions in one place, you define the stat id, > > > string, > > > and value offset, then a generic loop can generate the strset and > > > fill > > > u

Re: [RFC net-next 4/6] ethtool: add interface to read standard MAC stats

2021-04-15 Thread Saeed Mahameed
On Thu, 2021-04-15 at 08:38 -0700, Jakub Kicinski wrote: > On Wed, 14 Apr 2021 23:12:52 -0700 Saeed Mahameed wrote: > > On Wed, 2021-04-14 at 13:23 -0700, Jakub Kicinski wrote: > > > Most of the MAC statistics are included in > > > struct rtnl_link_stats64, but some fields > > > are aggregated. Bes

Re: [RFC net-next 4/6] ethtool: add interface to read standard MAC stats

2021-04-15 Thread Jakub Kicinski
On Wed, 14 Apr 2021 23:12:52 -0700 Saeed Mahameed wrote: > On Wed, 2021-04-14 at 13:23 -0700, Jakub Kicinski wrote: > > Most of the MAC statistics are included in > > struct rtnl_link_stats64, but some fields > > are aggregated. Besides it's good to expose > > these clearly hardware stats separatel

Re: [RFC net-next 4/6] ethtool: add interface to read standard MAC stats

2021-04-14 Thread Saeed Mahameed
On Wed, 2021-04-14 at 13:23 -0700, Jakub Kicinski wrote: > Most of the MAC statistics are included in > struct rtnl_link_stats64, but some fields > are aggregated. Besides it's good to expose > these clearly hardware stats separately. > > Signed-off-by: Jakub Kicinski > --- >  include/linux/ethto

[RFC net-next 4/6] ethtool: add interface to read standard MAC stats

2021-04-14 Thread Jakub Kicinski
Most of the MAC statistics are included in struct rtnl_link_stats64, but some fields are aggregated. Besides it's good to expose these clearly hardware stats separately. Signed-off-by: Jakub Kicinski --- include/linux/ethtool.h | 31 ++ include/uapi/linux/ethtool.h |