From: Stephen Hemminger <shemminger@vyatta.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
David Miller <davem@davemloft.net>
Subject: Re: [Bridge] [PATCH] bridge: per-cpu packet statistics
Date: Tue, 2 Mar 2010 09:23:01 -0800 [thread overview]
Message-ID: <20100302092301.7ca9b368@nehalam> (raw)
In-Reply-To: <1267520579.2964.27.camel@edumazet-laptop>
On Tue, 02 Mar 2010 10:02:59 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
>
> Le lundi 01 mars 2010 à 16:16 -0800, Stephen Hemminger a écrit :
>
> > + for_each_online_cpu(cpu) {
> > + const struct br_cpu_netstats *bstats
> > + = per_cpu_ptr(br->stats, cpu);
> > +
> > + stats->rx_bytes += bstats->rx_bytes;
> > + stats->rx_packets += bstats->rx_packets;
> > + }
>
> And last point, we should use for_each_possible_cpu() here
>
> Here is your patch with all my comments integrated :
>
> 1) Use txq->{tx_bytes|tx_packets} counter
>
> 2) alloc_percpu(struct ...) instead of alloc_percpu(sizeof(struct ...))
>
> 3) free_netdev() in destructor
>
> 4) for_each_possible_cpu() instead of for_each_online_cpu()
>
> 5) br_get_stats() use local variables for the sake of concurrent users
No need, bridge has no queue!
next prev parent reply other threads:[~2010-03-02 17:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 0:16 [Bridge] [PATCH] bridge: per-cpu packet statistics Stephen Hemminger
2010-03-02 0:16 ` Stephen Hemminger
2010-03-02 6:01 ` [Bridge] " Eric Dumazet
2010-03-02 6:01 ` Eric Dumazet
2010-03-02 17:22 ` [Bridge] " Stephen Hemminger
2010-03-16 2:48 ` Herbert Xu
2010-03-16 2:48 ` Herbert Xu
2010-03-02 7:43 ` Eric Dumazet
2010-03-02 7:43 ` Eric Dumazet
2010-03-02 7:51 ` [Bridge] " Eric Dumazet
2010-03-02 7:51 ` Eric Dumazet
2010-03-02 9:02 ` [Bridge] " Eric Dumazet
2010-03-02 9:02 ` Eric Dumazet
2010-03-02 17:23 ` Stephen Hemminger [this message]
2010-03-16 2:51 ` [Bridge] " Herbert Xu
2010-03-16 2:51 ` Herbert Xu
2010-03-02 17:58 ` [Bridge] [PATCH] bridge: per-cpu packet statistics (v2) Stephen Hemminger
2010-03-02 17:58 ` Stephen Hemminger
2010-03-02 18:06 ` [Bridge] " Eric Dumazet
2010-03-02 18:06 ` Eric Dumazet
2010-03-02 23:32 ` [Bridge] [PATCH] bridge: per-cpu packet statistics (v3) Stephen Hemminger
2010-03-02 23:32 ` Stephen Hemminger
2010-03-03 6:09 ` Eric Dumazet
2010-03-03 6:09 ` Eric Dumazet
2010-03-03 9:16 ` David Miller
2010-03-03 9:16 ` David Miller
2010-03-17 4:27 ` David Miller
2010-03-17 4:27 ` David Miller
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=20100302092301.7ca9b368@nehalam \
--to=shemminger@vyatta.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.