Thread (3 messages) 3 messages, 2 authors, 2021-09-04

Re: [PATCH bpf-next] bpf: add helpers documentation about GPL compatibility

From: Alexei Starovoitov <hidden>
Date: 2021-08-24 00:10:18

On Sun, Aug 22, 2021 at 01:59:00PM +0200, Lorenzo Fontana wrote:
When writing BPF programs one might refer to the man page
to lookup helpers. When you do so, however you don't have
a way to immediately know if you can use the helper
based on your program licensing requirements.

This patch adds a specific line in the man bpf-helpers
to show that information straight away.

Signed-off-by: Lorenzo Fontana <redacted>
...
quoted hunk ↗ jump to hunk
  * long bpf_trace_printk(const char *fmt, u32 fmt_size, ...)
  * 	Description
@@ -1613,6 +1621,8 @@ union bpf_attr {
  * 	Return
  * 		The number of bytes written to the buffer, or a negative error
  * 		in case of failure.
+ * 	GPL Compatibility
+ * 		Required
I think manually annotating the docs is too easy to get wrong.
I think scripts/bpf_doc.py should be able to pick it up from the code somehow?
or rely on dynamic discovery by bpftool?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help