On Wed, Jan 13, 2021 at 2:17 PM Vamsi Kodavanty <vamsi@xxxxxxxxxxxxxxxxxx> wrote: > > On Mon, Jan 11, 2021 at 7:33 PM Vamsi Kodavanty > <vamsi@xxxxxxxxxxxxxxxxxx> wrote: > > > > Andrii, > > Thank you for the detailed review. I will address them as well as > > the self tests. And will send out a new patch addressing them and > > conforming to style/expectations. > > > > Cheers > > Vamsi. > > > Andrii, > I understand the `bpf` repository being a mirror of the > `bpf-next` tools/lib/bpf. Do the patches > to `bpf` go back into `bpf-next`. I see there is a script for > `bpf-next` to `bpf`syncs. > I ask because the `btf_vmlinux_override` changes only exist in > the `bpf` repo. So, I make my > changes in `bpf`?. In that case what happens to the `selftests` which > are in `bpf-next`. And they > won't have any idea of the new open option 'core_btf_path` that is > being introduced. > There are two Linux upstream repositories to which BPF and libbpf patches are applied: bpf ([0]) and bpf-next ([1]). Fixes usually go into bpf, while all the new features go into bpf-next. They are periodically merged and thus converge. Then, specifically for libbpf, there is a Github mirror ([2]), which is synced by me periodically from bpf-next and bpf trees. This Github repo is what is considered to be "canonical" libbpf repo for the purposes of building libbpf packages and consuming libbpf in user applications. You shouldn't concern yourself with this one when submitting patches, because it's a derivative of upstream repositories. What is confusing to me, though, is that all three of them have code with btf_vmlinux_override, so I'm curious which "bpf" repository did you find that doesn't yet have btf_vmlinux_override? [0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git [1] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git [2] https://github.com/libbpf/libbpf > Thanks again. Hopefully this is my last question before I come back to > you with a proper patch. > > Cheers > Vamsi. > > > On Mon, Jan 11, 2021 at 2:02 PM Andrii Nakryiko > > <andrii.nakryiko@xxxxxxxxx> wrote: > > > > > > On Fri, Jan 8, 2021 at 6:36 PM Vamsi Kodavanty <vamsi@xxxxxxxxxxxxxxxxxx> wrote: > > > > > > > > Andrii, > > > > I have made the following changes as discussed to add an option to the `open_opts` > > > > to take in the BTF. > > > > Please do take a look. Also, I am not sure what the procedure is for submitting patches/reviews. > > > > If anyone has any pointers to a webpage where this is described I can go through it. But, below are > > > > the proposed changes. > > > > > > > > > > Daniel already gave you pointers. Also make sure you add [PATCH > > > bpf-next] prefix to email subject to identify the patch is for > > > bpf-next kernel tree. > > > And with all changes like this we should also add selftests, > > > exercising new features. Please take a look at > > > tools/testing/selftests/bpf. I think updating > > > test_progs/test_core_reloc.c in there to use this instead of > > > bpf_object__load_xattr() might be enough of the testing. > > > > > > > Best Regards, > > > > Vamsi. > > > > > > > > --- > > > > src/libbpf.c | 56 +++++++++++++++++++++++++++++++++++++--------------- > > > > src/libbpf.h | 4 +++- > > > > 2 files changed, 43 insertions(+), 17 deletions(-) > > > > [...]