Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread Jakub Kicinski
On Thu, 3 Sep 2020 16:02:28 -0700 Jakub Kicinski wrote: > > > +This simple interface is convenient especially in constrained/embedded > > > +environments without access to tools. However, it's sightly inefficient > > > > > > > sightly seems like the wrong word. Did you mean 'highly inefficien

Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread Jakub Kicinski
On Thu, 3 Sep 2020 16:40:54 -0600 David Ahern wrote: > On 9/2/20 8:03 PM, Jakub Kicinski wrote: > > +sysfs > > +- > > + > > +Each device directory in sysfs contains a `statistics` directory (e.g. > > +`/sys/class/net/lo/statistics/`) with files corresponding to > > +members of :c:type:`struct r

Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread David Ahern
On 9/2/20 8:03 PM, Jakub Kicinski wrote: > diff --git a/Documentation/networking/statistics.rst > b/Documentation/networking/statistics.rst > new file mode 100644 > index ..487b17c166e8 > --- /dev/null > +++ b/Documentation/networking/statistics.rst ... > + > +sysfs > +- > + > +E

Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread Jakub Kicinski
On Thu, 3 Sep 2020 13:48:39 -0700 Florian Fainelli wrote: > >>> + * @rx_bytes: Number of good incoming bytes, corresponding to > >>> @rx_packets. > >>> + * @tx_bytes: Number of good incoming bytes, corresponding to > >>> @tx_packets. > >> > >> Including or excluding FCS? > > > > Good point,

Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread Florian Fainelli
On 9/3/2020 1:45 PM, Jakub Kicinski wrote: On Thu, 3 Sep 2020 09:29:22 -0700 Edwin Peer wrote: On Wed, Sep 2, 2020 at 7:03 PM Jakub Kicinski wrote: +Drivers should report all statistics which have a matching member in +:c:type:`struct rtnl_link_stats64 ` exclusively +via `.ndo_get_stats64`.

Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread Jakub Kicinski
On Thu, 3 Sep 2020 09:29:22 -0700 Edwin Peer wrote: > On Wed, Sep 2, 2020 at 7:03 PM Jakub Kicinski wrote: > > +Drivers should report all statistics which have a matching member in > > +:c:type:`struct rtnl_link_stats64 ` exclusively > > +via `.ndo_get_stats64`. Reporting such standard stats via e

Re: [PATCH net-next] net: tighten the definition of interface statistics

2020-09-03 Thread Edwin Peer
On Wed, Sep 2, 2020 at 7:03 PM Jakub Kicinski wrote: > +Drivers should report all statistics which have a matching member in > +:c:type:`struct rtnl_link_stats64 ` exclusively > +via `.ndo_get_stats64`. Reporting such standard stats via ethtool > +or debugfs will not be accepted. Should existing

[PATCH net-next] net: tighten the definition of interface statistics

2020-09-02 Thread Jakub Kicinski
This patch is born out of an investigation into which IEEE statistics correspond to which struct rtnl_link_stats64 members. Turns out that there seems to be reasonable consensus on the matter, among many drivers. To save others the time (and it took more time than I'm comfortable admitting) I'm add