[PATCH v2 0/2] bpf: fix reuse of DEVMAP

Yureka Lilian posted 2 patches 1 month, 3 weeks ago
tools/lib/bpf/libbpf.c                        | 14 +++-
.../bpf/prog_tests/pinning_devmap_reuse.c     | 68 +++++++++++++++++++
.../selftests/bpf/progs/test_pinning_devmap.c | 20 ++++++
3 files changed, 101 insertions(+), 1 deletion(-)
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
[PATCH v2 0/2] bpf: fix reuse of DEVMAP
Posted by Yureka Lilian 1 month, 3 weeks ago
This patch series includes the previous fix to libbpf for re-using DEVMAP
maps, but modifies it to preserve compatibility with older kernels, thanks
to the feedback given by Martin KaFai Lau.

Additionally adds a basic selftest covering the re-use of DEVMAP maps, as
requested by Eduard Zingerman.


Yureka Lilian (2):
  bpf: fix reuse of DEVMAP
  bpf: add test for DEVMAP reuse

 tools/lib/bpf/libbpf.c                        | 14 +++-
 .../bpf/prog_tests/pinning_devmap_reuse.c     | 68 +++++++++++++++++++
 .../selftests/bpf/progs/test_pinning_devmap.c | 20 ++++++
 3 files changed, 101 insertions(+), 1 deletion(-)
 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
Re: [PATCH v2 0/2] bpf: fix reuse of DEVMAP
Posted by Eduard Zingerman 1 month, 3 weeks ago
On Wed, 2025-08-13 at 22:09 +0200, Yureka Lilian wrote:
> This patch series includes the previous fix to libbpf for re-using DEVMAP
> maps, but modifies it to preserve compatibility with older kernels, thanks
> to the feedback given by Martin KaFai Lau.
> 
> Additionally adds a basic selftest covering the re-use of DEVMAP maps, as
> requested by Eduard Zingerman.

Nit: could you please use tag `libbpf` instead of `bpf`?

> 
> Yureka Lilian (2):
>   bpf: fix reuse of DEVMAP
>   bpf: add test for DEVMAP reuse
> 
>  tools/lib/bpf/libbpf.c                        | 14 +++-
>  .../bpf/prog_tests/pinning_devmap_reuse.c     | 68 +++++++++++++++++++
>  .../selftests/bpf/progs/test_pinning_devmap.c | 20 ++++++
>  3 files changed, 101 insertions(+), 1 deletion(-)
>  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