[Top] [All Lists]

Re: netdev.stats change suggestion

To: Dmitrii Tisnek <dima@xxxxxxxxx>
Subject: Re: netdev.stats change suggestion
From: Chris Wedgwood <cw@xxxxxxxx>
Date: Thu, 24 Jan 2002 03:20:23 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <Pine.OSF.4.30.0201231450280.15676-100000@xxxxxxxxxxx>
References: <Pine.OSF.4.30.0201231450280.15676-100000@xxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.3.26i
On Wed, Jan 23, 2002 at 03:02:14PM +0200, Dmitrii Tisnek wrote:

    I've discovered that struct net_device_stats defines counters like
    rx_bytes and tx_bytes as unsigned long, which on x86 is, sadly, 32

How fast is our IO?  For most everyone, 32-bits is plenty enough.
Have a daemon/whatever check it from time-to-time and detect overflow.

    (although it seems uint64 is used in some headers, so perhaps it's
    enough to use that)

In theory we could use 'long long' on 32-bit architectures, but then
we can't do atomic add/sub operations...


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