[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250814180113.1245565-2-yuka@yuka.dev>
Date: Thu, 14 Aug 2025 20:01:11 +0200
From: Yureka Lilian <yuka@...a.dev>
To: Andrii Nakryiko <andrii@...nel.org>,
Eduard Zingerman <eddyz87@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>
Cc: Yureka Lilian <yuka@...a.dev>,
bpf@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 0/2] libbpf: fix reuse of DEVMAP
changes in v3:
- instead of setting BPF_F_RDONLY_PROG on both sides, just
clear BPF_F_RDONLY_PROG in map_info.map_flags as suggested
by Andrii Nakryiko
- in the test, use ASSERT_* instead of CHECK
- shorten the test by using open_and_load from the skel
- in the test, drop NULL check before unloading/destroying bpf objs
- start the commit messages with "libbpf" and "selftests/bpf"
respectively instead of just "bpf"
changes in v2:
- preserve compatibility with older kernels
- add a basic selftest covering the re-use of DEVMAP maps
Yureka Lilian (2):
libbpf: fix reuse of DEVMAP
selftests/bpf: add test for DEVMAP reuse
tools/lib/bpf/libbpf.c | 11 ++++
.../bpf/prog_tests/pinning_devmap_reuse.c | 50 +++++++++++++++++++
.../selftests/bpf/progs/test_pinning_devmap.c | 20 ++++++++
3 files changed, 81 insertions(+)
create mode 100644 tools/testing/selftests/bpf/prog_tests/pinning_devmap_reuse.c
create mode 100644 tools/testing/selftests/bpf/progs/test_pinning_devmap.c
--
2.50.1
Powered by blists - more mailing lists