From: John Fastabend <john.fastabend@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
Alexei Starovoitov <ast@plumgrid.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Eric Dumazet <edumazet@gmail.com>
Subject: Re: [PATCH net-next 1/6] net: sched: extend percpu stats helpers
Date: Thu, 02 Jul 2015 08:19:45 -0700 [thread overview]
Message-ID: <55955691.9070609@gmail.com> (raw)
In-Reply-To: <1435842455-30501-2-git-send-email-edumazet@google.com>
On 15-07-02 06:07 AM, Eric Dumazet wrote:
> qdisc_bstats_update_cpu() and other helpers were added to support
> percpu stats for qdisc.
>
> We want to add percpu stats for tc action, so this patch add common
> helpers.
>
> qdisc_bstats_update_cpu() is renamed to qdisc_bstats_cpu_update()
> qdisc_qstats_drop_cpu() is renamed to qdisc_qstats_cpu_drop()
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Alexei Starovoitov <ast@plumgrid.com>
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: John Fastabend <john.fastabend@gmail.com>
> ---
Acked-by: John Fastabend <john.r.fastabend@intel.com>
stupid nit below,
> include/net/sch_generic.h | 27 +++++++++++++++++----------
> net/core/dev.c | 4 ++--
> 2 files changed, 19 insertions(+), 12 deletions(-)
>
> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
> index 2738f6f87908..0cd49b21b211 100644
> --- a/include/net/sch_generic.h
> +++ b/include/net/sch_generic.h
> @@ -513,17 +513,21 @@ static inline void bstats_update(struct gnet_stats_basic_packed *bstats,
> bstats->packets += skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1;
> }
>
> -static inline void qdisc_bstats_update_cpu(struct Qdisc *sch,
> - const struct sk_buff *skb)
> +static inline void bstats_cpu_update(struct gnet_stats_basic_cpu *bstats,
> + const struct sk_buff *skb)
> {
> - struct gnet_stats_basic_cpu *bstats =
> - this_cpu_ptr(sch->cpu_bstats);
> -
> u64_stats_update_begin(&bstats->syncp);
> bstats_update(&bstats->bstats, skb);
> u64_stats_update_end(&bstats->syncp);
> }
>
> +static inline void qdisc_bstats_cpu_update(struct Qdisc *sch,
> + const struct sk_buff *skb)
> +{
> + bstats_cpu_update(this_cpu_ptr(sch->cpu_bstats), skb);
> +
spurious new line.
> +}
> +
next prev parent reply other threads:[~2015-07-02 15:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 13:07 [PATCH net-next 0/6] net_sched: act: lockless operation Eric Dumazet
2015-07-02 13:07 ` [PATCH net-next 1/6] net: sched: extend percpu stats helpers Eric Dumazet
2015-07-02 15:19 ` John Fastabend [this message]
2015-07-03 10:44 ` Jamal Hadi Salim
2015-07-02 13:07 ` [PATCH net-next 2/6] net: sched: add percpu stats to actions Eric Dumazet
2015-07-02 15:31 ` John Fastabend
2015-07-03 10:48 ` Jamal Hadi Salim
2015-07-02 13:07 ` [PATCH net-next 3/6] net_sched: act: make tcfg_pval non zero Eric Dumazet
2015-07-02 15:33 ` John Fastabend
2015-07-02 16:58 ` Alexei Starovoitov
2015-07-03 10:49 ` Jamal Hadi Salim
2015-07-04 7:18 ` Eric Dumazet
2015-07-02 13:07 ` [PATCH net-next 4/6] net_sched: act: use a separate packet counters for gact_determ() Eric Dumazet
2015-07-02 15:44 ` John Fastabend
2015-07-03 10:50 ` Jamal Hadi Salim
2015-07-02 13:07 ` [PATCH net-next 5/6] net_sched: act: read tcfg_ptype once Eric Dumazet
2015-07-02 15:47 ` John Fastabend
2015-07-03 10:57 ` Jamal Hadi Salim
2015-07-02 13:07 ` [PATCH net-next 6/6] net_sched: act: remove spinlock in fast path Eric Dumazet
2015-07-02 16:35 ` John Fastabend
2015-07-02 20:59 ` Eric Dumazet
2015-07-03 11:25 ` Jamal Hadi Salim
2015-07-03 12:08 ` Eric Dumazet
2015-07-03 17:21 ` John Fastabend
2015-07-02 17:13 ` Alexei Starovoitov
2015-07-03 11:07 ` Jamal Hadi Salim
2015-07-04 5:45 ` Eric Dumazet
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=55955691.9070609@gmail.com \
--to=john.fastabend@gmail.com \
--cc=ast@plumgrid.com \
--cc=davem@davemloft.net \
--cc=edumazet@gmail.com \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.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 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).