From: Andrew Lunn <and...@lunn.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 <and...@lunn.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.

Reply via email to