Re: [PATCH] libbpf: Remove from kernel tree.
From: Andrii Nakryiko
Date: Sun Jul 18 2021 - 17:54:46 EST
On Sun, Jul 18, 2021 at 12:36 PM Michal Suchánek <msuchanek@xxxxxxx> wrote:
>
> On Sun, Jul 18, 2021 at 09:04:16PM +0200, Daniel Borkmann wrote:
> > On 7/18/21 8:50 AM, Michal Suchanek wrote:
> > > libbpf shipped by the kernel is outdated and has problems. Remove it.
> > >
> > > Current version of libbpf is available at
> > >
> > > https://github.com/libbpf/libbpf
This patch made me day :) libbpf sources in the kernel tree is *the
source* of libbpf. Quoting Details section ([0]) of libbpf README:
Details
This is a mirror of bpf-next Linux source tree's tools/lib/bpf
directory plus its supporting header files.
All the gory details of syncing can be found in scripts/sync-kernel.sh script.
Some header files in this repo (include/linux/*.h) are reduced
versions of their counterpart files at bpf-next's
tools/include/linux/*.h to make compilation successful.
> > >
> > > Link: https://lore.kernel.org/bpf/b07015ebd7bbadb06a95a5105d9f6b4ed5817b2f.camel@xxxxxxxxxx/
> > > Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
> >
> > NAK, I'm not applying any of this. If there are issues, then fix them. If
>
> They are fixed in the github version.
>
> > you would have checked tools/lib/bpf/ git history, you would have found
> > that libbpf is under active development in the upstream kernel tree and
>
> So is the github version.
See above, Github is a projection of the kernel sources. Yes, Makefile
here and on Github are different, but that's by necessity. We do ask
all distros to package libbpf from the Github version, but there are
kernel projects (bpftool, perf, selftests) using libbpf from the
kernel sources themselves.
>
> > you could have spared yourself this patch.
>
> You could have spared me a lot of problems if there was only one source
> for libbpf.
>
> Can't you BPF people agree on one place to develop the library?
We can. We did. We even wrote that down. And we do develop libbpf in
one place, here. Github repo only accepts PRs for Github Makefile and
various parts of CI process which is Github-specific.
>
> Thanks
>
> Michal