netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Junchang Wang <junchangwang@gmail.com>,
	davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] r8169: Add 64bit statistics
Date: Sun, 04 Mar 2012 15:32:16 -0800	[thread overview]
Message-ID: <1330903936.2474.0.camel@edumazet-laptop> (raw)
In-Reply-To: <20120304232453.GA32314@electric-eye.fr.zoreil.com>

Le lundi 05 mars 2012 à 00:24 +0100, Francois Romieu a écrit :
> Eric Dumazet <eric.dumazet@gmail.com> :
> [...]
> > small point : Using this means you have a 32bit hole here (on 32bit
> > build). Its minor, you dont need to change.
> 
> Ok.
> 
> [...]
> > 	You could try to put these somewhere else, to try to keep this portion
> > as read only memory, to be more SMP friendly.
> > (Some loaded server could have one CPU serving RX stuff, and other cpus
> > doing TX stuff) 
> 
> Point taken. It could make sense to rework the rtl8169_private struct a bit
> more.
> 
> [...]
> > > @@ -6070,20 +6084,49 @@ static void rtl_set_rx_mode(struct net_device *dev)
> > >  }
> > >  
> > >  /**
> > > - *  rtl8169_get_stats - Get rtl8169 read/write statistics
> > > + *  rtl8169_get_stats64 - Get rtl8169 read/write statistics
> > >   *  @dev: The Ethernet Device to get statistics for
> > 
> > missing @stats
> 
> This documentation is almost useless anyway. I removed it.
> 
> [...]
> > You dont need _bytes and _packets temp variables, as @stats points to a
> > private memory, we can use it as working storage, just do :
> > 
> >        do {
> >                start = u64_stats_fetch_begin_bh(&tp->rx_stats.syncp);
> >                stats->rx_packets = tp->rx_stats.packets;
> >                stats->rx_bytes = tp->rx_stats.bytes;
> >        } while (u64_stats_fetch_retry_bh(&tp->rx_stats.syncp, start));
> 
> It should give something like the patch below.
> 
> If I understand correctly we do not care much about the error counters,
> right ?
> 
> From: Junchang Wang <junchangwang@gmail.com>
> Date: Sun, 4 Mar 2012 23:30:32 +0100
> Subject: [PATCH 1/2] r8169: add 64bit statistics.
> 
> Switch to use ndo_get_stats64 to get 64bit statistics.
> Two sync entries are used (one for Rx and one for Tx).
> 
> Signed-off-by: Junchang Wang <junchangwang@gmail.com>
> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> ---
>  drivers/net/ethernet/realtek/r8169.c |   59 ++++++++++++++++++++++++++--------
>  1 files changed, 45 insertions(+), 14 deletions(-)
> 

Seems Good To Me, thanks !

  parent reply	other threads:[~2012-03-04 23:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-04  9:37 [PATCH net-next] r8169: Add 64bit statistics Junchang Wang
2012-03-04 15:44 ` Eric Dumazet
2012-03-04 23:24   ` Francois Romieu
2012-03-04 23:28     ` [PATCH net-next] r8169: add byte queue limit support Francois Romieu
2012-03-04 23:39       ` Eric Dumazet
2012-03-04 23:46         ` Francois Romieu
2012-03-04 23:32     ` Eric Dumazet [this message]
2012-03-05  1:03       ` [PATCH net-next] r8169: Add 64bit statistics Junchang Wang
  -- strict thread matches above, loose matches on Subject: below --
2011-11-17  6:48 Junchang Wang
2011-11-17  7:03 ` Stephen Hemminger
2011-11-17  7:46   ` Junchang Wang
2011-11-17  8:11     ` Eric Dumazet
2011-11-17 10:59       ` Junchang Wang
2011-11-17 11:13         ` David Laight
2011-11-17 12:58           ` Eric Dumazet
2011-11-17 14:01             ` David Laight
2011-11-17 14:27               ` Eric Dumazet
2011-11-17 13:02         ` Eric Dumazet
2011-11-17  7:21 ` Eric Dumazet
2011-11-17  7:39   ` Junchang Wang
2011-11-17  9:36 ` Francois Romieu
2011-11-17 10:51   ` Eric Dumazet
2011-11-18  2:24   ` Junchang Wang
2011-11-18  9:18     ` Francois Romieu

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=1330903936.2474.0.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=junchangwang@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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;
as well as URLs for NNTP newsgroup(s).