Re: 64-bit fields in struct net_device_stats

Jeff
2003-06-16T13:49:06Z

On Monday 16 June 2003 01:47, Lincoln Dale wrote:
> why not a set of counters which are toggled between.
>
> e.g.
> struct netdevice... {
> uint64 tx_pkts_counter[2];
> uint64 tx_octets_counter[2];
> uint64 rx_pkts_counter[2];
> uint64 rx_octets_counter[2];
> int counter_bounce;
> ...
> }
<snip>

Hmm, interesting idea. The one thing is: There are 23 fields in struct
net_device_stats right now; if each of them is 64bits (=8 bytes), the whole
structure would be 184 bytes (with u_int64.) Now if I have two of each, the
size would grow to 368 bytes (plus the 4 bytes for counter_bounce). Now, the
question: would it be acceptable to have something that size?

Jeff.

- --
*NOTE: This message is ROT-13 encrypted twice for extra protection*
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+7c4FwFP0+seVj/4RAtGxAJsE+YY48y1mp+Y90FFH2Jz+hmU+fgCeK+gj
6ksJ8KxDYVo7rwxODwSAeT8=
=Sxo5