Make bpf_endian.h compatible with vmlinux.h
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 2 repliesIn review
- v22 patches 2 repliesSuperseded
- v11 patch 2 repliesSuperseded
Changes in v3 from the cover letter
- explicit zero-initialization of global variables (Daniel);
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libbpf: make bpf_endian co-exist with vmlinux.htools/ | +35 | 0 replies | |
| 2/2 | selftests/bpf: add byte swapping selftesttools/ tools/ | +90 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Yonghong Song |
|---|---|
| Series | A-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 bpf-next 0/2] Make bpf_endian.h compatible with vmlinux.h
Change libbpf's bpf_endian.h header to be compatible when used with system headers and when using just vmlinux.h. This is a frequent request for users writing BPF CO-RE applications. Do this by re-implementing byte swap compile-time macros. Also add simple tests validating correct results both for byte-swapping built-ins and macros.
v2->v3:
- explicit zero-initialization of global variables (Daniel);
v1->v2:
- reimplement byte swapping macros (Alexei).
Andrii Nakryiko (2):
libbpf: make bpf_endian co-exist with vmlinux.h
selftests/bpf: add byte swapping selftest
tools/lib/bpf/bpf_endian.h | 43 ++++++++++++--- .../testing/selftests/bpf/prog_tests/endian.c | 53 +++++++++++++++++++ .../testing/selftests/bpf/progs/test_endian.c | 37 +++++++++++++ 3 files changed, 125 insertions(+), 8 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/endian.c create mode 100644 tools/testing/selftests/bpf/progs/test_endian.c
Signature · 1 line
2.24.1