From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>
Subject: [PATCH bpf-next 1/6] libbpf: stop using deprecated bpf_map__is_offload_neutral()
Date: Wed, 2 Feb 2022 14:59:11 -0800 [thread overview]
Message-ID: <20220202225916.3313522-2-andrii@kernel.org> (raw)
In-Reply-To: <20220202225916.3313522-1-andrii@kernel.org>
Open-code bpf_map__is_offload_neutral() logic in one place in
to-be-deprecated bpf_prog_load_xattr2.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 1b0936b016d9..81605de8654e 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -9505,7 +9505,7 @@ static int bpf_prog_load_xattr2(const struct bpf_prog_load_attr *attr,
}
bpf_object__for_each_map(map, obj) {
- if (!bpf_map__is_offload_neutral(map))
+ if (map->def.type != BPF_MAP_TYPE_PERF_EVENT_ARRAY)
map->map_ifindex = attr->ifindex;
}
--
2.30.2
next prev parent reply other threads:[~2022-02-02 22:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 22:59 [PATCH bpf-next 0/6] Clean up leftover uses of deprecated APIs Andrii Nakryiko
2022-02-02 22:59 ` Andrii Nakryiko [this message]
2022-02-02 22:59 ` [PATCH bpf-next 2/6] bpftool: stop supporting BPF offload-enabled feature probing Andrii Nakryiko
2022-02-03 10:24 ` Quentin Monnet
2022-02-16 10:37 ` Niklas Söderlund
2022-02-16 11:47 ` Quentin Monnet
2022-02-16 15:40 ` Niklas Söderlund
2022-02-02 22:59 ` [PATCH bpf-next 3/6] bpftool: fix uninit variable compilation warning Andrii Nakryiko
2022-02-02 22:59 ` [PATCH bpf-next 4/6] selftests/bpf: remove usage of deprecated feature probing APIs Andrii Nakryiko
2022-02-02 22:59 ` [PATCH bpf-next 5/6] selftests/bpf: redo the switch to new libbpf XDP APIs Andrii Nakryiko
2022-02-02 22:59 ` [PATCH bpf-next 6/6] samples/bpf: get rid of bpf_prog_load_xattr() use Andrii Nakryiko
2022-02-03 10:25 ` [PATCH bpf-next 0/6] Clean up leftover uses of deprecated APIs Quentin Monnet
2022-02-03 15:40 ` 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=20220202225916.3313522-2-andrii@kernel.org \
--to=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