[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+04C7BCH+UCMXLuHoP3vWcKmmycaZa-bMJDSFBUddo1g@mail.gmail.com>
Date: Wed, 27 Nov 2019 08:41:36 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Michael Petlan <mpetlan@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>
Subject: Re: [PATCH 3/3] bpftool: Allow to link libbpf dynamically
On Wed, Nov 27, 2019 at 1:49 AM Jiri Olsa <jolsa@...nel.org> wrote:
>
> diff --git a/tools/build/feature/test-libbpf.c b/tools/build/feature/test-libbpf.c
> index a508756cf4cc..93566d105a64 100644
> --- a/tools/build/feature/test-libbpf.c
> +++ b/tools/build/feature/test-libbpf.c
> @@ -3,5 +3,14 @@
>
> int main(void)
> {
> +#ifdef BPFTOOL
> + /*
> + * libbpf_netlink_open (LIBBPF_0.0.6) is the latest
> + * we need for bpftool at the moment
> + */
> + libbpf_netlink_open(NULL);
> + return 0;
> +#else
> return bpf_object__open("test") ? 0 : -1;
> +#endif
Such hack should be a clear sign that it's not appropriate for libbpf to
be public netlink api library. Few functions that it already has are for
libbpf and bpftool internal usage only.
Powered by blists - more mailing lists