[PATCH bpf-next v2 0/3] Add BPF_KFUNC macro for kfunc definitions

From: David Vernet
Date: Mon Jan 23 2023 - 12:15:27 EST


v2 of the patchset [0]

[0]: https://lore.kernel.org/bpf/Y7kCsjBZ%2FFrsWW%2Fe@xxxxxxxxxxxxx/T/

Changelog:
----------
v1 -> v2:
- Wrap entire function signature in BPF_KFUNC macro instead of using
__bpf_kfunc tag (Kumar)
- Update all kfunc definitions to use this macro.
- Update kfuncs.rst documentation to describe and illustrate the macro.
- Also clean up a few small parts of kfuncs.rst, e.g. some grammar, and
in general making it a bit tighter.

David Vernet (3):
bpf: Add BPF_KFUNC macro for defining kfuncs
bpf: Document usage of the new BPF_KFUNC macro
bpf: Use BPF_KFUNC macro at all kfunc definitions

Documentation/bpf/kfuncs.rst | 93 ++++++++++---------
include/linux/btf.h | 10 ++
kernel/bpf/helpers.c | 44 ++++-----
kernel/cgroup/rstat.c | 4 +-
kernel/kexec_core.c | 3 +-
kernel/trace/bpf_trace.c | 18 ++--
net/bpf/test_run.c | 64 ++++++-------
net/ipv4/tcp_bbr.c | 16 ++--
net/ipv4/tcp_cong.c | 10 +-
net/ipv4/tcp_cubic.c | 12 +--
net/ipv4/tcp_dctcp.c | 12 +--
net/netfilter/nf_conntrack_bpf.c | 34 +++----
net/netfilter/nf_nat_bpf.c | 12 +--
net/xfrm/xfrm_interface_bpf.c | 14 +--
.../selftests/bpf/bpf_testmod/bpf_testmod.c | 3 +-
15 files changed, 165 insertions(+), 184 deletions(-)

--
2.39.0