On Mon, Mar 22, 2021 at 12:36 PM Rafael David Tinoco <rafaeldtinoco@xxxxxxxxxx> wrote: > > > >> +LIBBPF_API int bpf_object__set_kversion(struct bpf_object *obj, __u32 > >> kern_version); > > > > have you run libbpf's Makefile? It should have complained about > > bpf_object__set_kversion symbol mismatches/etc. That means that this > > API needs to be listed in libbpf.map file, please add it there (to > > latest version, 0.4, and also preserve alphabetical order). Thanks. > > Alright, sending a v3 with changes. I had only static builds on > my side and it didn’t run assigned linker version-script. Will > include in my tests before further submissions. > > Oh, I just noticed that you based your patch on top of Github repository. libbpf sources actually live and are developed against bpf-next kernel tree. Github repository is periodically synced from kernel trees with a special script. Please do the development against libbpf sources in the kernel tree (in tools/lib/bpf). You should also try running selftests from tools/testing/selftests/bpf, especially `sudo ./test_progs`. You'll need very recent Clang built from sources to build and run everything. But at least you won't have to spend efforts setting up your VM for testing, see vmtest.sh script in selftests, added recently by KP Singh. It will build latest kernel and will spin up qemu VM to run tests. It's a bit of an upfront setup, but if you are intending to keep contributing to libbpf and kernel, it's worth it :) Also we have CI that would automatically test submitted patch sets (see [0]). See also [1] for the build for your v2. [0] https://github.com/kernel-patches/bpf/pulls [1] https://travis-ci.com/github/kernel-patches/bpf/builds/220716720 >