netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] btf: support ints larger than 128 bits
@ 2021-01-05 14:45 Sean Young
  2021-01-05 14:45 ` [PATCH v3 1/4] btf: add support for " Sean Young
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Sean Young @ 2021-01-05 14:45 UTC (permalink / raw)
  To: Yonghong Song, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, John Fastabend,
	KP Singh, Nathan Chancellor, Nick Desaulniers, Quentin Monnet,
	Toke Høiland-Jørgensen, linux-doc, netdev, bpf,
	linux-kernel, clang-built-linux

clang supports arbitrary length ints using the _ExtInt extension. This
can be useful to hold very large values, e.g. 256 bit or 512 bit types.

Larger types (e.g. 1024 bits) are possible but I am unaware of a use
case for these.

This requires the _ExtInt extension enabled in clang, which is under
review.

Link: https://clang.llvm.org/docs/LanguageExtensions.html#extended-integer-types
Link: https://reviews.llvm.org/D93103

Signed-off-by: Sean Young <sean@mess.org>

changes since v2:
 - split patches into 4 distinct patches

changes since v1:
 - added tests as suggested by Yonghong Song
 - added kernel pretty-printer


Sean Young (4):
  btf: add support for ints larger than 128 bits
  libbpf: add support for ints larger than 128 bits
  bpftool: add support for ints larger than 128 bits
  bpf: add tests for ints larger than 128 bits

 Documentation/bpf/btf.rst                     |   4 +-
 include/uapi/linux/btf.h                      |   2 +-
 kernel/bpf/btf.c                              |  54 +-
 tools/bpf/bpftool/btf_dumper.c                |  40 ++
 tools/include/uapi/linux/btf.h                |   2 +-
 tools/lib/bpf/btf.c                           |   2 +-
 tools/testing/selftests/bpf/Makefile          |   3 +-
 tools/testing/selftests/bpf/prog_tests/btf.c  |   3 +-
 .../selftests/bpf/progs/test_btf_extint.c     |  50 ++
 tools/testing/selftests/bpf/test_extint.py    | 535 ++++++++++++++++++
 10 files changed, 679 insertions(+), 16 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_btf_extint.c
 create mode 100755 tools/testing/selftests/bpf/test_extint.py

-- 
2.29.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-01-06  5:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 14:45 [PATCH v3 0/4] btf: support ints larger than 128 bits Sean Young
2021-01-05 14:45 ` [PATCH v3 1/4] btf: add support for " Sean Young
2021-01-06  5:10   ` Andrii Nakryiko
2021-01-06  5:16     ` Andrii Nakryiko
2021-01-05 14:45 ` [PATCH v3 2/4] libbpf: " Sean Young
2021-01-05 14:45 ` [PATCH v3 3/4] bpftool: " Sean Young
2021-01-06  5:13   ` Andrii Nakryiko
2021-01-05 14:45 ` [PATCH v3 4/4] bpf: add tests " Sean Young
2021-01-06  5:26   ` Andrii Nakryiko
2021-01-05 19:51 ` [PATCH v3 0/4] btf: support " Martin KaFai Lau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).