64-bit network statistics (struct net_device_stats)

Jeff Sipek (jeffpc@optonline.net)
Wed, 02 Jul 2003 16:45:44 -0400


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everyone,
I've been hacking for some time on those 64-bit statistics and I got to this
question:

Does it make sense to make a new API layer to prevent network drivers from
accessing struct net_device_stats directly? Yes, I know someone (we - I?)
would have to check all the network drivers and change them accordingly.

My idea would be something like this:

net_stats_add(<original field name>,<pointer to struct>,<number to be added>)
net_stats_inc(<original field name>,<pointer to struct>)
net_stats_set(<original field name>,<pointer to struct>,<number to set to>)
net_stats_get(<original field name>,<pointer to struct>)

The point is that this new layer would enable us (me) to make changes to the
type of the fields in the struct (with minimal breakage).

(I actually have done this [64-bit stats] - it appears to work ok, I'll hack
on a bit more, and release it to the masses.)

Any thoughts?

Jeff.

- --
bad pun of the week: the formula 1 control computer suffered from a race
condition
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/A0R/wFP0+seVj/4RAnqrAKCaNUwBGqgPHj1+Scq6C91bxo6nMACgle6h
vm1MXVm2c4Mr9zI+LuH43OM=
=uPyq
-----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/