netdev
[Top] [All Lists]

Re: netdev.stats change suggestion

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: netdev.stats change suggestion
From: Andi Kleen <ak@xxxxxxx>
Date: Thu, 24 Jan 2002 16:28:25 +0100
Cc: Robert.Olsson@xxxxxxxxxxx, jgarzik@xxxxxxxxxxxxxxxx, cw@xxxxxxxx, dima@xxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20020124.062650.66057933.davem@redhat.com>
References: <20020124112904.GA31991@tapu.f00f.org> <3C4FF358.B4B35B12@mandrakesoft.com> <15440.6499.131678.563214@robur.slu.se> <20020124.062650.66057933.davem@redhat.com>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.3.22.1i
On Thu, Jan 24, 2002 at 06:26:50AM -0800, David S. Miller wrote:
>    From: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>
>    Date: Thu, 24 Jan 2002 15:25:39 +0100
> 
>    Jeff Garzik writes:
>     > 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.
>    
>     I put my vote there too.
> 
> I have no problems with it, as long as we don't horribly break tools
> that parse the values we export now.

Unfortunately they will very likely. glibc scanf and strtoul() have overflow
checking and will return ERANGE or stop (*scanf).  nettools uses sscanf
for example. 

The only way I see to do it in a compatible way is to still supply %INT_MAX
values in the old fields and add new fields for the 64bit values. 
There are also a lot of broken /proc/net/dev parsers around so it may be a 
good idea to use a new /proc/net file and leave the old alone.

-Andi



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