libbpf: Improve BPF_PROG2 macro code quality and description
authorYonghong Song <yhs@fb.com>
Sat, 10 Sep 2022 02:52:14 +0000 (19:52 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 22 Sep 2022 00:05:31 +0000 (17:05 -0700)
commit9f2f5d7830ddfeeca147595f473e14eadbeb3db1
tree3611f3ead2bdf30e6565cef12c2efef84fd9e0cc
parentc12a03766788befbb65fc2a87891c9ece8abad07
libbpf: Improve BPF_PROG2 macro code quality and description

Commit 34586d29f8df ("libbpf: Add new BPF_PROG2 macro") added BPF_PROG2
macro for trampoline based programs with struct arguments. Andrii
made a few suggestions to improve code quality and description.
This patch implemented these suggestions including better internal
macro name, consistent usage pattern for __builtin_choose_expr(),
simpler macro definition for always-inline func arguments and
better macro description.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20220910025214.1536510-1-yhs@fb.com
tools/lib/bpf/bpf_tracing.h