mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 64-bit network statistics (struct net_device_stats)
@ 2003-07-02 20:45 Jeff Sipek
  0 siblings, 0 replies; only message in thread
From: Jeff Sipek @ 2003-07-02 20:45 UTC (permalink / raw)
  To: Kernel Mailing List; +Cc: Andrew Morton, Dave Jones, Linus Torvalds

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-02 20:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-02 20:45 64-bit network statistics (struct net_device_stats) Jeff Sipek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®