RFC Add btf__permute API
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libbpf: Add BTF permutation support for type reorderingtools/ tools/ tools/ | +230 | 1 reply | |
| 2/2 | selftests/bpf: Add test cases for btf__permute functionalitytools/ | +626 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] Add btf__permute API
From: Donglin Peng <[email protected]>
This patch adds btf__permute() function that reorganizes BTF types according to a provided ID mapping array, updating all internal type references to maintain consistency after permutation.
The API enables custom BTF type layouts for specialized use cases such as BTF sorting optimizations.
This series is extracted from the previous patch set:
https://lore.kernel.org/all/[email protected]/
Key difference: this implementation adopts the ID mapping approach suggested by Andrii Nakryiko.
Link to v4:
https://lore.kernel.org/all/[email protected]/
Link to v3:
https://lore.kernel.org/all/[email protected]/
Link to v2:
https://lore.kernel.org/all/[email protected]/
Link to v1:
https://lore.kernel.org/all/[email protected]/
Donglin Peng (2):
libbpf: Add BTF permutation support for type reordering selftests/bpf: Add test cases for btf__permute functionality
tools/lib/bpf/btf.c | 186 ++++++ tools/lib/bpf/btf.h | 43 ++ tools/lib/bpf/libbpf.map | 1 + .../selftests/bpf/prog_tests/btf_permute.c | 626 ++++++++++++++++++ 4 files changed, 856 insertions(+) create mode 100644 tools/testing/selftests/bpf/prog_tests/btf_permute.c
Signature · 1 line
2.34.1