Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1294660

Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF

From Daniel Borkmann <daniel@iogearbox.net>
Newsgroups linux.kernel
Subject Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF
Date 2015-12-18 12:00 +0100
Message-ID <qH0Vs-4xe-15@gated-at.bofh.it> (permalink)
References (1 earlier) <qGziy-3tt-7@gated-at.bofh.it> <qGQ01-66V-11@gated-at.bofh.it> <qGSlb-7uA-1@gated-at.bofh.it> <qGWIa-1Xj-5@gated-at.bofh.it> <qGXkR-2qN-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/18/2015 08:04 AM, Wangnan (F) wrote:
...
> What I want to do in this patchset is not only removing original libbpf.c
> and bpf_load.c. In fact I want libbpf in tools/lib/bpf becomes a public
> available library for other userspace tools (tc for example).

Having this as a possible user space library seems fine.

Only speaking for the tc case specifically here (since you mention it as
one example), there's currently no additional value for it. The current
loader code there is functional and partially tailored for tc's needs and
having this together with the iproute2 repo, it allows us to easily change/
adapt the internal code whenever needed.

The only dependency the loader code has is that the BPF syscall got compiled
into the kernel and libelf, that's all. libelf is effectively available
in distros for more than a decade(s?). And iproute2 is being shipped
everywhere already as well (hence also iproute2's minimalism on library
dependencies).

Switching that code would mean that iproute2 would then depend on libbpf
which itself would depend on libelf, until every distro that ships iproute2
will also ship libbpf, it will take a bit. Changes on the code would then
need to go through libbpf first, and iproute2 would need to wait until it
becomes available to make use of it and probably need to implement some
compat code for the time being. Further, as both are decoupled also testing
effort increases to make sure nothing breaks among different versions.

That said, I prefer that tc's {cls,act}_bpf front-end is shipped to users
as it's being done already and that they can use it /now/ as-is. Don't get me
wrong, for other tools etc coming up in future, as mentioned, offering it as a
public library makes totally sense as not every application developer would
want to choose writing his own loader code.

Cheers,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 08/10] bpf samples: Add utils.[ch] for using BPF Wang Nan <wangnan0@huawei.com> - 2015-12-17 06:30 +0100
  Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-12-18 00:20 +0100
    Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF "Wangnan (F)" <wangnan0@huawei.com> - 2015-12-18 02:50 +0100
      Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-12-18 07:30 +0100
        Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF "Wangnan (F)" <wangnan0@huawei.com> - 2015-12-18 08:10 +0100
          Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF "Wangnan (F)" <wangnan0@huawei.com> - 2015-12-18 08:20 +0100
          Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF Daniel Borkmann <daniel@iogearbox.net> - 2015-12-18 12:00 +0100
            Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF Daniel Borkmann <daniel@iogearbox.net> - 2015-12-18 12:30 +0100
            Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF pi3orama <pi3orama@163.com> - 2015-12-18 12:30 +0100
          Re: [PATCH 08/10] bpf samples: Add utils.[ch] for using BPF Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-12-19 01:40 +0100

csiph-web