bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vamsi Kodavanty <vamsi@araalinetworks.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf v1] Add `core_btf_path` to `bpf_object_open_opts` to pass BTF path from skeleton program
Date: Wed, 13 Jan 2021 19:52:06 -0800	[thread overview]
Message-ID: <CADmGQ+3DQ2NVwDZJX-oS75MBhFaCNW2rgzGKFWPHugBVc=EMTw@mail.gmail.com> (raw)
In-Reply-To: <CAEf4BzY9VsZi4mJWy3iKRbJw4d_kOJVivPWPstWiG6xcOh6Efg@mail.gmail.com>

On Wed, Jan 13, 2021 at 7:21 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Wed, Jan 13, 2021 at 2:17 PM Vamsi Kodavanty
> <vamsi@araalinetworks.com> wrote:
> >
> > On Mon, Jan 11, 2021 at 7:33 PM Vamsi Kodavanty
> > <vamsi@araalinetworks.com> 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
>

Thank you again. I was looking at [1]. I cloned the repo today morning and
noticed the absence. I just did a 'git pull' and it seems to have the
`btf_vmlinux_override` now. So, I will use `bpf-next`. Thank you for the
repo links. Also, my earlier diffs were incorrectly using the `libbpf` repo.

Regards
Vamsi.

> > 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@gmail.com> wrote:
> > > >
> > > > On Fri, Jan 8, 2021 at 6:36 PM Vamsi Kodavanty <vamsi@araalinetworks.com> 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(-)
> > > > >
>
> [...]

  reply	other threads:[~2021-01-14  3:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09  2:36 [PATCH bpf v1] Add `core_btf_path` to `bpf_object_open_opts` to pass BTF path from skeleton program Vamsi Kodavanty
2021-01-11 14:13 ` Daniel Borkmann
2021-01-11 19:07   ` Vamsi Kodavanty
2021-01-11 22:02 ` Andrii Nakryiko
2021-01-12  3:33   ` Vamsi Kodavanty
2021-01-13 22:16     ` Vamsi Kodavanty
2021-01-14  3:21       ` Andrii Nakryiko
2021-01-14  3:52         ` Vamsi Kodavanty [this message]
2021-03-03  4:11           ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADmGQ+3DQ2NVwDZJX-oS75MBhFaCNW2rgzGKFWPHugBVc=EMTw@mail.gmail.com' \
    --to=vamsi@araalinetworks.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=bpf@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).