netdev
[Top] [All Lists]

Re: netdev.stats change suggestion

To: Chris Wedgwood <cw@xxxxxxxx>
Subject: Re: netdev.stats change suggestion
From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
Date: Thu, 24 Jan 2002 06:43:20 -0500
Cc: Dmitrii Tisnek <dima@xxxxxxxxx>, netdev@xxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxx>
Organization: MandrakeSoft
References: <Pine.OSF.4.30.0201231450280.15676-100000@xxxxxxxxxxx> <20020124112023.GA31956@xxxxxxxxxxxxx> <3C4FEEE6.6E44E6EE@xxxxxxxxxxxxxxxx> <20020124112904.GA31991@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Chris Wedgwood wrote:
> 
> On Thu, Jan 24, 2002 at 06:24:22AM -0500, Jeff Garzik wrote:
> 
>     We should make them 64-bit because related SNMP MIBs use 64-bits.
> 
> (1) Do we need atomic add/sub for any of these?  If so, making them
>     64-bit sucks terribly.
> 
> (2) What can't snmpd detect and deal with wrap?  I know for certain
>     SNMP operations things are supposed to be strictly increasing for
>     the life-time the machine is up --- but is this really a big deal?
>     SNMP albeit a very useful thing and times, is also horribly crude
>     and has some terrible limitations, it alone doesn't seem like a
>     good reason to me.
> 
> Comments?

With GigE you want 64-bit anyway.  Heavily loaded GigE networks will
turn over 32-bit counters pretty often.

WRT atomicity, no we shouldn't need atomicity in struct netdev_stats. 
On the net driver side, the net driver is required to do its own
locking, when it updates those stats.

Further, yet another reason is that newer NICs store the stats in 64-bit
numbers, in hardware.

I don't think this was discussed with DaveM, but since the SNMP MIBs use
64-bit numbers and newer GigE cards use 64-bit numbers, we pretty much
decided at the kernel meeting that netdev_stats should go to 64-bit.

        Jeff



-- 
Jeff Garzik      | "I went through my candy like hot oatmeal
Building 1024    |  through an internally-buttered weasel."
MandrakeSoft     |             - goats.com

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