lkml.org 
[lkml]   [2003]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 64-bit fields in struct net_device_stats
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.057 / U:2.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site