lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55955691.9070609@gmail.com>
Date:	Thu, 02 Jul 2015 08:19:45 -0700
From:	John Fastabend <john.fastabend@...il.com>
To:	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>
CC:	netdev <netdev@...r.kernel.org>,
	Alexei Starovoitov <ast@...mgrid.com>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Eric Dumazet <edumazet@...il.com>
Subject: Re: [PATCH net-next 1/6] net: sched: extend percpu stats helpers

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@...gle.com>
> Cc: Alexei Starovoitov <ast@...mgrid.com>
> Cc: Jamal Hadi Salim <jhs@...atatu.com>
> Cc: John Fastabend <john.fastabend@...il.com>
> ---

Acked-by: John Fastabend <john.r.fastabend@...el.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.

> +}
> +

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ