Merge branch 'kfunc-annotation'
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 1 Feb 2023 23:25:14 +0000 (00:25 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 1 Feb 2023 23:25:38 +0000 (00:25 +0100)
commit36b0fb13b5474b2f5412435e3c62c639dc626689
tree7ba09ec45bc7c8865844287480a39f8f5984dd3d
parent10d1b0e4dacccd617c502a926cd6299a19d40b65
parent6aed15e330bfec6a423f40582b2a8b53d9ce1757
Merge branch 'kfunc-annotation'

David Vernet says:

====================
This is v3 of the patchset [0]. v2 can be found at [1].

[0]: https://lore.kernel.org/bpf/Y7kCsjBZ%2FFrsWW%2Fe@maniforge.lan/T/
[1]: https://lore.kernel.org/lkml/20230123171506.71995-1-void@manifault.com/

Changelog:
----------
v2 -> v3:
- Go back to the __bpf_kfunc approach from v1. The BPF_KFUNC macro
  received pushback as it didn't match the more typical EXPORT_SYMBOL*
  APIs used elsewhere in the kernel. It's the longer term plan, but for
  now we're proposing something less controversial to fix kfuncs and BTF
  encoding.
- Add __bpf_kfunc macro to newly added cpumask kfuncs.
- Add __bpf_kfunc macro to newly added XDP metadata kfuncs, which were
  failing to be BTF encoded in the thread in [2].
- Update patch description(s) to reference the discussions in [2].
- Add a selftest that validates that a static kfunc with unused args is
  properly BTF encoded and can be invoked.

[2]: https://lore.kernel.org/all/fe5d42d1-faad-d05e-99ad-1c2c04776950@oracle.com/

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.
====================

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>