From: Yafang Shao <laoar.shao@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>, Martin Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
john fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next 1/4] libbpf: Define DEFAULT_BPFFS
Date: Wed, 27 Apr 2022 00:12:44 +0800 [thread overview]
Message-ID: <CALOAHbDPE6iSGVR1pyNkY-N3RtoGYaptqcn+Nse-T88sWcD5Xw@mail.gmail.com> (raw)
In-Reply-To: <CAEf4Bza_8d_K22DFRzGHYAQdz_y1+9b_bfSc0t0EkdM4nyy7Hw@mail.gmail.com>
On Tue, Apr 26, 2022 at 2:45 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Sat, Apr 23, 2022 at 7:01 AM Yafang Shao <laoar.shao@gmail.com> wrote:
> >
> > Let's use a macro DEFAULT_BPFFS instead of the hard-coded "/sys/fs/bpf".
> >
> > Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> > ---
> > tools/lib/bpf/bpf_helpers.h | 2 +-
> > tools/lib/bpf/libbpf.c | 2 +-
> > tools/lib/bpf/libbpf.h | 6 ++++--
> > 3 files changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
> > index 44df982d2a5c..9161ebcd3466 100644
> > --- a/tools/lib/bpf/bpf_helpers.h
> > +++ b/tools/lib/bpf/bpf_helpers.h
> > @@ -137,7 +137,7 @@ struct bpf_map_def {
> >
> > enum libbpf_pin_type {
> > LIBBPF_PIN_NONE,
> > - /* PIN_BY_NAME: pin maps by name (in /sys/fs/bpf by default) */
> > + /* PIN_BY_NAME: pin maps by name (in DEFAULT_BPFFS by default) */
>
> how is this improving things? now I need to grep some more to find out
> what's the value of DEFAULT_BPFFS is
>
The new added one also uses the "/sys/fs/bpf", so I defined a macro
for them, then they can be kept the same.
I won't change it if you object to it.
[snip]
--
Regards
Yafang
next prev parent reply other threads:[~2022-04-26 16:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-23 14:00 [PATCH bpf-next 0/4] bpf: Generate helpers for pinning through bpf object skeleton Yafang Shao
2022-04-23 14:00 ` [PATCH bpf-next 1/4] libbpf: Define DEFAULT_BPFFS Yafang Shao
2022-04-25 13:47 ` Daniel Borkmann
2022-04-26 6:45 ` Andrii Nakryiko
2022-04-26 16:12 ` Yafang Shao [this message]
2022-04-23 14:00 ` [PATCH bpf-next 2/4] libbpf: Add helpers for pinning bpf prog through bpf object skeleton Yafang Shao
2022-04-25 13:57 ` Daniel Borkmann
2022-04-26 15:58 ` Yafang Shao
2022-04-26 23:15 ` Andrii Nakryiko
2022-04-27 14:45 ` Yafang Shao
2022-04-27 15:47 ` Yafang Shao
2022-04-27 18:51 ` Andrii Nakryiko
2022-04-23 14:00 ` [PATCH bpf-next 3/4] bpftool: Fix incorrect return in generated detach helper Yafang Shao
2022-04-26 6:47 ` Andrii Nakryiko
2022-04-26 16:14 ` Yafang Shao
2022-04-23 14:00 ` [PATCH bpf-next 4/4] bpftool: Generate helpers for pinning prog through bpf object skeleton Yafang Shao
2022-04-25 14:03 ` Daniel Borkmann
2022-04-26 16:00 ` Yafang Shao
2022-04-26 6:45 ` [PATCH bpf-next 0/4] bpf: Generate helpers for pinning " Andrii Nakryiko
2022-04-26 16:09 ` Yafang Shao
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=CALOAHbDPE6iSGVR1pyNkY-N3RtoGYaptqcn+Nse-T88sWcD5Xw@mail.gmail.com \
--to=laoar.shao@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/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).