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.