public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Sipek <jeffpc@optonline.net>
To: "Pavel Machek" <pavel@ucw.cz>, "Markus Hästbacka" <midian@ihme.org>
Cc: Kernel Mailinglist <linux-kernel@vger.kernel.org>
Subject: Re: [NET] 64 bit byte counter for 2.6.3
Date: Mon, 23 Feb 2004 06:34:23 -0500	[thread overview]
Message-ID: <200402230634.33531.jeffpc@optonline.net> (raw)
In-Reply-To: <20040222173622.GB1371@elf.ucw.cz>

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

On Sunday 22 February 2004 12:36, Pavel Machek wrote:
> Hi!
>
> > --- linux-2.6.3-rc1/net/core/dev.c	2004-02-08 01:07:55.000000000 +0200
> > +++ linux-2.6.3-rc1-b/net/core/dev.c	2004-02-07 15:29:32.000000000 +0200
> > @@ -2042,8 +2042,8 @@
> >  	if (dev->get_stats) {
> >  		struct net_device_stats *stats = dev->get_stats(dev);
> >
> > -		seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
> > -				"%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
> > +		seq_printf(seq, "%6s:%14llu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
> > +				"%14llu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
> >  			   dev->name, stats->rx_bytes, stats->rx_packets,
> >  			   stats->rx_errors,
> >  			   stats->rx_dropped + stats->rx_missed_errors,
> > --- linux-2.6.3-rc1/include/linux/netdevice.h	2004-02-08
> > 01:05:47.000000000 +0200 +++
> > linux-2.6.3-rc1-b/include/linux/netdevice.h	2004-02-07 15:21:26.000000000
> > +0200 @@ -103,8 +103,8 @@
> >  {
> >  	unsigned long	rx_packets;		/* total packets received	*/
> >  	unsigned long	tx_packets;		/* total packets transmitted	*/
> > -	unsigned long	rx_bytes;		/* total bytes received 	*/
> > -	unsigned long	tx_bytes;		/* total bytes transmitted	*/
> > +	unsigned long long rx_bytes;		/* total bytes received 	*/
> > +	unsigned long long tx_bytes;		/* total bytes transmitted	*/
>
> Perhaps this should be u64? I'm not sure if long long is not 128-bits
> on x86-64.

Hmm...I've been told that u_int64_t is the C99 (IIRC) standard, and that it 
should be used in favor of u64. Is that so?

I'll announce my version of 64-bit net stats fairly soon.

Jeff.

- -- 
We have joy, we have fun, we have Linux on a Sun...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAOeVHwFP0+seVj/4RAv1gAKCFZZEHOi78wcrX2dWquQ4Qcth4AQCgicO0
L+vkeXdghp0YPWzgLInBpU8=
=F5rS
-----END PGP SIGNATURE-----


  reply	other threads:[~2004-02-23 11:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-18 16:51 [NET] 64 bit byte counter for 2.6.3 Markus Hästbacka
2004-02-18 18:17 ` Stephen Hemminger
2004-02-18 20:32   ` Richard B. Johnson
2004-02-18 20:43     ` Markus Hästbacka
2004-02-18 22:45       ` Richard B. Johnson
2004-02-18 22:57         ` Stephen Hemminger
2004-02-18 23:17           ` Jeff Garzik
2004-02-19  8:14   ` Meelis Roos
2004-02-19 17:27     ` Stephen Hemminger
2004-02-22 17:36 ` Pavel Machek
2004-02-23 11:34   ` Jeff Sipek [this message]
2004-02-23 12:38     ` Andreas Schwab

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=200402230634.33531.jeffpc@optonline.net \
    --to=jeffpc@optonline.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=midian@ihme.org \
    --cc=pavel@ucw.cz \
    /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