From: Daniel Borkmann <daniel@iogearbox.net>
To: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Song Liu <songliubraving@fb.com>,
linux-kernel@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Tiezhu Yang <yangtiezhu@loongson.cn>,
netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] tools include: Add __sum16 and __wsum definitions.
Date: Mon, 8 Mar 2021 14:37:32 +0100 [thread overview]
Message-ID: <4aa2a66d-b8e4-adfe-8b61-615d98012a65@iogearbox.net> (raw)
In-Reply-To: <20210307223024.4081067-1-irogers@google.com>
On 3/7/21 11:30 PM, Ian Rogers wrote:
> This adds definitions available in the uapi version.
>
> Explanation:
> In the kernel include of types.h the uapi version is included.
> In tools the uapi/linux/types.h and linux/types.h are distinct.
> For BPF programs a definition of __wsum is needed by the generated
> bpf_helpers.h. The definition comes either from a generated vmlinux.h or
> from <linux/types.h> that may be transitively included from bpf.h. The
> perf build prefers linux/types.h over uapi/linux/types.h for
> <linux/types.h>*. To allow tools/perf/util/bpf_skel/bpf_prog_profiler.bpf.c
> to compile with the same include path used for perf then these
> definitions are necessary.
>
> There is likely a wider conversation about exactly how types.h should be
> specified and the include order used by the perf build - it is somewhat
> confusing that tools/include/uapi/linux/bpf.h is using the non-uapi
> types.h.
>
> *see tools/perf/Makefile.config:
> ...
> INC_FLAGS += -I$(srctree)/tools/include/
> INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi
> INC_FLAGS += -I$(srctree)/tools/include/uapi
> ...
> The include directories are scanned from left-to-right:
> https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
> As tools/include/linux/types.h appears before
> tools/include/uapi/linux/types.h then I say it is preferred.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
Given more related to perf build infra, I presume Arnaldo would pick
this one up?
Thanks,
Daniel
next prev parent reply other threads:[~2021-03-08 13:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-07 22:30 [PATCH] tools include: Add __sum16 and __wsum definitions Ian Rogers
2021-03-08 13:37 ` Daniel Borkmann [this message]
2021-03-08 13:41 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4aa2a66d-b8e4-adfe-8b61-615d98012a65@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@redhat.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.com \
--cc=yangtiezhu@loongson.cn \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.