netdev
[Top] [All Lists]

Re: How to count tx and rx bytes?

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Subject: Re: How to count tx and rx bytes?
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Mon, 15 Dec 2003 14:54:22 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <3FDE39E3.4000408@candelatech.com>
References: <3FDE13AE.3050402@candelatech.com> <20031215141729.15387fc1.davem@redhat.com> <3FDE39E3.4000408@candelatech.com>
Sender: netdev-bounce@xxxxxxxxxxx
On Mon, 15 Dec 2003 14:46:59 -0800
Ben Greear <greearb@xxxxxxxxxxxxxxx> wrote:

> Maybe the stats-polling code in the driver could do the necessary subtraction
> to remove the FCS from the results (ie, subtract (packets-since-last-sample * 
> 4) bytes.

The whole reason to use the chip internally computed stats is to avoid
having to do "stats->foo++" at all, your suggestion basically eliminates
this purpose.

<Prev in Thread] Current Thread [Next in Thread>