[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170525.124305.764605105083674654.davem@davemloft.net>
Date: Thu, 25 May 2017 12:43:05 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: andrew@...n.ch
Cc: f.fainelli@...il.com, hayeswang@...ltek.com, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next 1/2] Documentation:
sysfs-class-net-statistics: Clarify rx_bytes and tx_bytes
From: Andrew Lunn <andrew@...n.ch>
Date: Tue, 23 May 2017 23:10:57 +0200
> Document what is expected for the rx_bytes and tx_bytes statistics in
> /sys/class/net/<device>/statistics. The FCS should be included in the
> statistics. However, since this has been unclear until now, it is
> expected a number of drivers don't. But maybe with time they will.
>
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
Precedence has not been very kind to us here.
Also, we really I want drivers doing the simplest thing possible,
which on transmit is:
tx_bytes += skb->len;
Not:
tx_bytes += skb->len + ETH_FCS_LEN;
I understand the problem you're trying to tackle, but software stats
should be for software state, and that state is emphatically skb->len
So if we are to strive for software statistic "consistency" it should
be against the software part of the packet, not the software part
"plus X and Y link layer stuff no visible in the software packet".
Thanks.
Powered by blists - more mailing lists