Skip to content

bpf: support __int128 in BTF

Yonghong Song netdev 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5bpf: btf: support 128 bit integer typekernel/bpf/btf.c+85 -190 replies
2/5tools/bpf: add int128 raw test in test_btftools/testing/selftests/bpf/test_btf.c+93 -00 replies
3/5tools/bpf: refactor test_btf pretty printing for multiple map value formatstools/testing/selftests/bpf/test_btf.c+75 -370 replies
4/5tools/bpf: add bpffs pretty print test for int128tools/testing/selftests/bpf/test_btf.c+79 -00 replies
5/5tools/bpf: support __int128 in bpftool map pretty dumpertools/bpf/bpftool/btf_dumper.c+86 -120 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchMartin KaFai Lau
1/5A-b
2/5A-b
3/5A-b
4/5A-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/5] bpf: support __int128 in BTF

Previous maximum supported integer bit width is 64. But the __int128 type has been supported by most (if not all) 64bit architectures including bpf for both gcc and clang.

The kernel itself uses __int128 for x64 and arm64. Some bcc tools are using __int128 in bpf programs to describe ipv6 addresses. Without 128bit int support, the vmlinux BTF won't work and those bpf programs using __int128 cannot utilize BTF.

This patch set implemented BTF __int128 support. Patch #1 added __int128 support in the kernel. Patch #2 added raw test for __int128 in test_btf. Patch #3 refactored test_btf bpffs pretty print test to
allow different map value structures.
Patch #4 added bpffs pretty print test for __int128. Patch #5 added __int128 support in bpftool map pretty dumper.

Yonghong Song (5):
bpf: btf: support 128 bit integer type
tools/bpf: add int128 raw test in test_btf
tools/bpf: refactor test_btf pretty printing for multiple map value
formats
tools/bpf: add bpffs pretty print test for int128 tools/bpf: support __int128 in bpftool map pretty dumper

 kernel/bpf/btf.c                       | 104 +++++++--
 tools/bpf/bpftool/btf_dumper.c         |  98 +++++++--
 tools/testing/selftests/bpf/test_btf.c | 284 +++++++++++++++++++++----
 3 files changed, 418 insertions(+), 68 deletions(-)
Signature · 1 line
2.17.1