qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] ebpf: fix compatibility with libbpf 1.0+


From: Daniel P . Berrangé
Subject: Re: [PATCH] ebpf: fix compatibility with libbpf 1.0+
Date: Mon, 19 Dec 2022 13:49:37 +0000
User-agent: Mutt/2.2.7 (2022-08-07)

On Mon, Dec 19, 2022 at 07:14:54PM +0530, Shreesh Adiga wrote:
> Hi Daniel,
> 
> On Mon, Dec 19, 2022 at 10:56:57AM +0000, Daniel P. Berrangé wrote:
> > On Sun, Dec 18, 2022 at 08:09:27PM +0530, Shreesh Adiga wrote:
> > > The current implementation fails to load on a system with
> > > libbpf 1.0 and reports that legacy map definitions in 'maps'
> > > section are not supported by libbpf v1.0+. This commit updates
> > > the Makefile to add BTF (-g flag) and appropriately updates
> > > the maps in rss.bpf.c and update the skeleton file in repo.
> >
> > Can you split this into two pieces - one updating the build
> > system for new compiler usage, and one updating the program
> > to remove the legacy map defs.
> >
> If I just update the Makefile first, rss.bpf.c doesn't compile
> and throws error:
> rss.bpf.c:80:1: error: variable has incomplete type 'struct bpf_map_def'
> 
> Similarly if first rss.bpf.c only is updated, then error is thrown:
> libbpf: BTF is required, but is missing or corrupted
> Hence, it would seem logical to update both of them together in same
> commit.
> 
> Do you mean first commit should update the Makefile and rss.bpf.c
> together and second commit should be updating the rss.bpf.skeleton.h
> file? I was under the impression that every commit should result in
> compilable sources, hence wanted to clarify this.

Yes, it must be compilable. I was under the impression from the
commit that these were independant changes, but I was wrong.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]