[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190223022938.hq3jys6as5e5kyjr@ast-mbp.dhcp.thefacebook.com>
Date: Fri, 22 Feb 2019 18:29:39 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Alexei Starovoitov <ast@...nel.org>, davem@...emloft.net,
daniel@...earbox.net, netdev@...r.kernel.org, bpf@...r.kernel.org,
kernel-team@...com
Subject: Re: [PATCH bpf-next 1/4] bpf: enable program stats
On Fri, Feb 22, 2019 at 04:05:55PM -0800, Eric Dumazet wrote:
>
>
> On 02/22/2019 03:36 PM, Alexei Starovoitov wrote:
>
> >
> > +static void bpf_prog_get_stats(const struct bpf_prog *prog,
> > + struct bpf_prog_stats *stats)
> > +{
> > + u64 nsecs = 0, cnt = 0;
> > + int cpu;
> > +
> > + for_each_possible_cpu(cpu) {
> > + nsecs += per_cpu(prog->aux->stats->nsecs, cpu);
> > + cnt += per_cpu(prog->aux->stats->cnt, cpu);
>
> This does not work reliably for 32 bit kernels.
right. my mind was in probe_read thread. will fix.
Powered by blists - more mailing lists