Skip to contentSkip to conversation

64-bit network statistics (struct net_device_stats)

DISCUSSION Jeff Sipek 1 participant 1 message Jul 2, 2003

lore
Share & tools
lore

Jeff Sipek

author
#0 lore raw

-----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-----