public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* Exact meaning of rx_bytes and tx_bytes
@ 2006-10-09 15:39 Jean Delvare
  2006-10-09 16:22 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2006-10-09 15:39 UTC (permalink / raw)
  To: netdev

Hi all,

I am wondering what exactly the rx_bytes and tx_bytes values exported 
under statistics/ in sysfs are supposed to represent.

Most popular ethernet drivers (8139too, e100, 3c59x) count the bytes in 
software, so they only take into account the bytes they actually send and 
receive. This excludes the 4-byte ethernet CRC if I understand correctly.

Other drivers, on the other hand, get the transfered bytes statistics from 
hardware registers, and these appear to include the 4-byte CRC in the 
total count. This is the case of sk98lin and e1000, for example.

So my question is, which drivers are right? Are we counting the emitted 
and received bytes at software level or at hardware level? Or do we just 
not care about the 4-byte/packet difference and both are acceptable?

Thanks,
-- 
Jean Delvare
Suse L3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Exact meaning of rx_bytes and tx_bytes
  2006-10-09 15:39 Exact meaning of rx_bytes and tx_bytes Jean Delvare
@ 2006-10-09 16:22 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2006-10-09 16:22 UTC (permalink / raw)
  To: Jean Delvare; +Cc: netdev

On Mon, 9 Oct 2006 17:39:02 +0200
Jean Delvare <jdelvare@suse.de> wrote:

> Hi all,
> 
> I am wondering what exactly the rx_bytes and tx_bytes values exported 
> under statistics/ in sysfs are supposed to represent.
> 
> Most popular ethernet drivers (8139too, e100, 3c59x) count the bytes in 
> software, so they only take into account the bytes they actually send and 
> receive. This excludes the 4-byte ethernet CRC if I understand correctly.
> 
> Other drivers, on the other hand, get the transfered bytes statistics from 
> hardware registers, and these appear to include the 4-byte CRC in the 
> total count. This is the case of sk98lin and e1000, for example.
> 
> So my question is, which drivers are right? Are we counting the emitted 
> and received bytes at software level or at hardware level? Or do we just 
> not care about the 4-byte/packet difference and both are acceptable?
> 
> Thanks,

Does it really mater that much, unless you are charging people per
byte.


-- 
Stephen Hemminger <shemminger@osdl.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-09 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09 15:39 Exact meaning of rx_bytes and tx_bytes Jean Delvare
2006-10-09 16:22 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox