Skip to content

Make BPF skeleton easier to use from C++ code

Andrii Nakryiko bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- use default argument values in T::open() (Alexei).

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpftool: add C++-specific open/load/etc skeleton wrapperstools/bpf/bpftool/gen.c+22 -20 repliesApplied
2/2selftests/bpf: add Skeleton templated wrapper as an exampletools/testing/selftests/bpf/test_cpp.cpp+85 -20 repliesApplied

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/2] Make BPF skeleton easier to use from C++ code

Add minimal C++-specific additions to BPF skeleton codegen to facilitate easier use of C skeletons in C++ applications. These additions don't add any extra ongoing maintenance and allows C++ users to fit pure C skeleton better into their C++ code base. All that without the need to design, implement and support a separate C++ BPF skeleton implementation.

v1->v2:
- use default argument values in T::open() (Alexei).

Andrii Nakryiko (2):
bpftool: add C++-specific open/load/etc skeleton wrappers selftests/bpf: add Skeleton templated wrapper as an example

 tools/bpf/bpftool/gen.c                  | 24 ++++++-
 tools/testing/selftests/bpf/test_cpp.cpp | 87 +++++++++++++++++++++++-
 2 files changed, 107 insertions(+), 4 deletions(-)
Signature · 1 line
2.30.2