[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZmFELN7wzTPhQBfoQFaZkFO9EkUG+9Ws+FJsSCZu9+Sg@mail.gmail.com>
Date: Thu, 3 Oct 2019 14:25:32 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Song Liu <liu.song.a23@...il.com>
Cc: Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
Alexei Starovoitov <ast@...com>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <kernel-team@...com>
Subject: Re: [PATCH v2 bpf-next 6/7] libbpf: add BPF_CORE_READ/BPF_CORE_READ_INTO
helpers
On Thu, Oct 3, 2019 at 1:35 PM Song Liu <liu.song.a23@...il.com> wrote:
>
> On Wed, Oct 2, 2019 at 3:02 PM Andrii Nakryiko <andriin@...com> wrote:
> >
> > Add few macros simplifying BCC-like multi-level probe reads, while also
> > emitting CO-RE relocations for each read.
> >
> > Acked-by: John Fastabend <john.fastabend@...il.com>
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
> > ---
> > tools/lib/bpf/bpf_helpers.h | 143 ++++++++++++++++++++++++++++++++++++
> > 1 file changed, 143 insertions(+)
> >
> > diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
> > index cb9d4d2224af..847dfd7125e4 100644
> > --- a/tools/lib/bpf/bpf_helpers.h
> > +++ b/tools/lib/bpf/bpf_helpers.h
> > @@ -19,6 +19,10 @@
> > */
> > #define SEC(NAME) __attribute__((section(NAME), used))
> >
> > +#ifndef __always_inline
> > +#define __always_inline __attribute__((always_inline))
> > +#endif
> > +
> > /* helper functions called from eBPF programs written in C */
> > static void *(*bpf_map_lookup_elem)(void *map, const void *key) =
> > (void *) BPF_FUNC_map_lookup_elem;
> > @@ -312,4 +316,143 @@ struct bpf_map_def {
> > bpf_probe_read(dst, sz, \
> > (const void *)__builtin_preserve_access_index(src))
> >
> > +/*
>
> nit: extra /*.
>
> Well, I actually don't have a strong preference with this. Just to highlight
> we are mixing two styles, which we already do in current bpf_helpers.h.
I made it consistent, thanks.
>
> There are multiple other instances below.
>
> Besides these.
>
> Acked-by: Song Liu <songliubraving@...com>
Powered by blists - more mailing lists