RE: Packaging bpftool and libbpf: GitHub or kernel?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quentin Monnet <quentin@xxxxxxxxxxxxx> wrote:
> My point is that I've received little feedback on the mirror
> so far, so it's hard for me to figure out who's using it or whether anyone has
> been reading the changelogs.

FWIW, the ebpf-for-windows project uses both bpftool and libbpf as git submodules.
Both of them are, today, very Linux-centric and not usable directly cross-platform (something I'd like to see change in the future as I've previously discussed but not
had enough cycles to drive much).

So today the libbpf mirror is used as a submodule just to get the header files,
where ebpf-for-windows currently uses its own C implementation of the same
prototypes, to map to Windows ioctls instead of Linux syscalls.

And today bpftool is used via a github fork of the mirror, where various ifdefs
and Windows-specific alternatives are in the fork.  The intent is to clean it up
and upstream it, but I just haven't gotten to that yet.  But ebpf-for-windows
does not currently support BTF so it is like an older Linux kernel in that sense.

So we haven't updated either to commits that rely on libbpf >= 1.0 since
the APIs we support were removed.

> >>>   Does bpftool work on older kernel?
> >>
> >> It should, although it's not perfect. Most features from current
> >> bpftool should work as expected on older kernels. However, if I
> >> remember correctly you would have trouble loading programs on pre-BTF
> >> kernels, because bpftool relies on libbpf >= 1.0 and only accepts map
> >> definitions with BTF info, and attempts to create these maps with
> >> BTF, which fails and blocks the load process.
> >>
> >> But we're trying to keep backward-compatibility, so if we're only
> >> talking of kernels recent enough to support BTF, then I'd expect
> >> bpftool to work. If this is not the case, please report on this list.

Yeah, unless/until we support BTF in the future, we cannot use the current
HEAD of the libbpf or bpftool mirrors, only older commits we sync to.

In that sense, the removal of pre-1.0 APIs made the mirrors more
Linux-only and less cross-platform.

Dave





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux