From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
kernel-team@fb.com
Subject: Re: [PATCH v2 bpf-next 0/3] libbpf: support non-mmap()'able data sections
Date: Wed, 19 Oct 2022 13:55:31 +0530 [thread overview]
Message-ID: <20221019082531.v7fsp7hlnbni5mfr@apollo> (raw)
In-Reply-To: <20221019002816.359650-1-andrii@kernel.org>
On Wed, Oct 19, 2022 at 05:58:13AM IST, Andrii Nakryiko wrote:
> Make libbpf more conservative in using BPF_F_MMAPABLE flag with internal BPF
> array maps that are backing global data sections. See patch #2 for full
> description and justification.
>
> Changes in this dataset support having bpf_spinlock, kptr, rb_tree nodes and
> other "special" variables as global variables. Combining this with libbpf's
> existing support for multiple custom .data.* sections allows BPF programs to
> utilize multiple spinlock/rbtree_node/kptr variables in a pretty natural way
> by just putting all such variables into separate data sections (and thus ARRAY
> maps).
>
> v1->v2:
> - address Stanislav's feedback, adds acks.
>
Thanks a lot for working on this!
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
I like that __hidden also works for static variables, that allows hiding this
whole thing in a macro, like so:
#define private(name) SEC(".data." #name) __hidden
private(A) struct bpf_spin_lock lock;
private(A) struct bpf_list_head head __contains(foo, node);
next prev parent reply other threads:[~2022-10-19 8:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 0:28 [PATCH v2 bpf-next 0/3] libbpf: support non-mmap()'able data sections Andrii Nakryiko
2022-10-19 0:28 ` [PATCH v2 bpf-next 1/3] libbpf: clean up and refactor BTF fixup step Andrii Nakryiko
2022-10-19 0:28 ` [PATCH v2 bpf-next 2/3] libbpf: only add BPF_F_MMAPABLE flag for data maps with global vars Andrii Nakryiko
2022-10-19 16:04 ` Dave Marchevsky
2022-10-19 0:28 ` [PATCH v2 bpf-next 3/3] libbpf: add non-mmapable data section selftest Andrii Nakryiko
2022-10-19 8:25 ` Kumar Kartikeya Dwivedi [this message]
2022-10-19 23:50 ` [PATCH v2 bpf-next 0/3] libbpf: support non-mmap()'able data sections patchwork-bot+netdevbpf
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=20221019082531.v7fsp7hlnbni5mfr@apollo \
--to=memxor@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@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