mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Sipek <jeffpc@optonline.net>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@digeo.com>,
	Dave Jones <davej@codemonkey.org.uk>,
	Linus Torvalds <torvalds@osdl.org>
Subject: 64-bit network statistics (struct net_device_stats)
Date: Wed, 02 Jul 2003 16:45:44 -0400	[thread overview]
Message-ID: <200307021646.03601.jeffpc@optonline.net> (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-----


                 reply	other threads:[~2003-07-02 20:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200307021646.03601.jeffpc@optonline.net \
    --to=jeffpc@optonline.net \
    --cc=akpm@digeo.com \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®