[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200628195051.GD2988321@krava>
Date: Sun, 28 Jun 2020 21:50:51 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Martin KaFai Lau <kafai@...com>,
David Miller <davem@...hat.com>,
John Fastabend <john.fastabend@...il.com>,
Wenbo Zhang <ethercflow@...il.com>,
KP Singh <kpsingh@...omium.org>,
Andrii Nakryiko <andriin@...com>,
Brendan Gregg <bgregg@...flix.com>,
Florent Revest <revest@...omium.org>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH v4 bpf-next 03/14] bpf: Add BTF_ID_LIST/BTF_ID macros
On Fri, Jun 26, 2020 at 02:32:48PM -0700, Andrii Nakryiko wrote:
SNIP
>
> [...]
>
> > diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h
> > new file mode 100644
> > index 000000000000..f7f9dc4d9a9f
> > --- /dev/null
> > +++ b/include/linux/btf_ids.h
> > @@ -0,0 +1,69 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +
> > +#ifndef _LINUX_BTF_IDS_H
> > +#define _LINUX_BTF_IDS_H 1
>
> this "1", is it necessary? I think it's always just `#define HEADER_GUARD`?
I followed btf.h header:
#ifndef _LINUX_BTF_H
#define _LINUX_BTF_H 1
I don't mind changing it
>
> > +
> > +#include <linux/compiler.h> /* for __PASTE */
> > +
>
> [...]
>
> > +#define __BTF_ID_LIST(name) \
> > +asm( \
> > +".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \
> > +".local " #name "; \n" \
> > +#name ":; \n" \
> > +".popsection; \n"); \
> > +
> > +#define BTF_ID_LIST(name) \
> > +__BTF_ID_LIST(name) \
> > +extern int name[];
>
> nit: extern u32 (or __u32) perhaps?
right, should be u32
thanks,
jirka
Powered by blists - more mailing lists