Skip to content

RFC Introduce bpf_prog ID and iteration

Martin KaFai Lau netdev oe-lkp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: Introduce bpf_prog IDinclude/linux/filter.h include/uapi/linux/bpf.h kernel/bpf/syscall.c+53 -11 reply
2/2bpf: Test for bpf_prog ID and BPF_PROG_GET_NEXT_IDtools/include/uapi/linux/bpf.h tools/lib/bpf/bpf.c tools/lib/bpf/bpf.h +2 more+112 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC net-next 0/2] Introduce bpf_prog ID and iteration

This patchset introduces the bpf_prog ID and a new bpf cmd to iterate all bpf_prog in the system.

It is still incomplete. The idea can be extended to bpf_map.

Martin KaFai Lau (2):
bpf: Introduce bpf_prog ID
bpf: Test for bpf_prog ID and BPF_PROG_GET_NEXT_ID

 include/linux/filter.h                     |  1 +
 include/uapi/linux/bpf.h                   |  6 ++
 kernel/bpf/syscall.c                       | 47 ++++++++++++++-
 tools/include/uapi/linux/bpf.h             |  6 ++
 tools/lib/bpf/bpf.c                        | 11 ++++
 tools/lib/bpf/bpf.h                        |  1 +
 tools/testing/selftests/bpf/Makefile       |  2 +-
 tools/testing/selftests/bpf/test_prog_id.c | 93 ++++++++++++++++++++++++++++++
 8 files changed, 165 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/test_prog_id.c
Signature · 1 line
2.9.3