lkml.org 
[lkml]   [2019]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/3] bpftool: Allow to link libbpf dynamically
On Wed, Nov 27, 2019 at 1:49 AM Jiri Olsa <jolsa@kernel.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.

\
 
 \ /
  Last update: 2019-11-27 17:42    [W:0.167 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site