mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] libbpf: fix reuse of DEVMAP
@ 2025-08-14 18:01 Yureka Lilian
  2025-08-14 18:01 ` [PATCH v3 1/2] " Yureka Lilian
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yureka Lilian @ 2025-08-14 18:01 UTC (permalink / raw)
  To: Andrii Nakryiko, Eduard Zingerman, Alexei Starovoitov,
	Daniel Borkmann, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
  Cc: Yureka Lilian, bpf, linux-kernel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-15 23:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-14 18:01 [PATCH v3 0/2] libbpf: fix reuse of DEVMAP Yureka Lilian
2025-08-14 18:01 ` [PATCH v3 1/2] " Yureka Lilian
2025-08-14 18:01 ` [PATCH v3 2/2] selftests/bpf: add test for DEVMAP reuse Yureka Lilian
2025-08-14 18:08   ` Eduard Zingerman
2025-08-16  0:00 ` [PATCH v3 0/2] libbpf: fix reuse of DEVMAP patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®