Re: [PATCH 5/6] tools: selftests/bpf: test_bpftool_synctypes: escape raw symbols

2025-01-29 Thread Quentin Monnet
2025-01-29 18:39 UTC+0100 ~ Mauro Carvalho Chehab > Modern Python versions complain about usage of "\" inside normal > strings, as they should use r-string notation. > > Change the annotations there to avoid such warnings: > > tools/testing/selftests/bpf/test_bpftool_synctypes.py:319: > S

[PATCH bpf-next v4 03/10] bpf: add documentation for eBPF helpers (12-22)

2018-04-25 Thread Quentin Monnet
t_stackid(): Add a note about PERF_MAX_STACK_DEPTH being configurable. Cc: Alexei Starovoitov Signed-off-by: Quentin Monnet Acked-by: Alexei Starovoitov --- include/uapi/linux/bpf.h | 254 +++ 1 file changed, 254 insertions(+) diff --git a/include

[PATCH bpf-next v4 02/10] bpf: add documentation for eBPF helpers (01-11)

2018-04-25 Thread Quentin Monnet
e description of BPF_F_INGRESS flag. Cc: Alexei Starovoitov Signed-off-by: Quentin Monnet Acked-by: Alexei Starovoitov --- include/uapi/linux/bpf.h | 230 +++ 1 file changed, 230 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/

[PATCH bpf-next v4 10/10] bpf: update bpf.h uapi header for tools

2018-04-25 Thread Quentin Monnet
Update tools/include/uapi/linux/bpf.h file in order to reflect the changes for BPF helper functions documentation introduced in previous commits. Signed-off-by: Quentin Monnet --- tools/include/uapi/linux/bpf.h | 1776 +++- 1 file changed, 1380 insertions

[PATCH bpf-next v4 09/10] bpf: add documentation for eBPF helpers (65-66)

2018-04-25 Thread Quentin Monnet
versions). Cc: Nikita V. Shirokov Cc: Eyal Birger Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 335ac427d43b..3b91e22f68c1 100644 --- a

[PATCH bpf-next v4 08/10] bpf: add documentation for eBPF helpers (58-64)

2018-04-25 Thread Quentin Monnet
sper Dangaard Brouer Cc: John Fastabend Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 147 +++ 1 file changed, 147 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 9fe008dd51e7..335ac427d43b 100644 ---

[PATCH bpf-next v4 05/10] bpf: add documentation for eBPF helpers (33-41)

2018-04-25 Thread Quentin Monnet
e that the helper is not restricted to programs attached to sockets. - bpf_skb_adjust_room(): Clarify comment about invalidated verifier checks. - bpf_xdp_adjust_meta(): Clarify comment about invalidated verifier checks. Cc: Daniel Borkmann Signed-off-by: Quentin Monnet Acked-by

[PATCH bpf-next v4 07/10] bpf: add documentation for eBPF helpers (51-57)

2018-04-25 Thread Quentin Monnet
description. Remove occurences of "cores" to avoid confusion with "CPU". - bpf_bind(): Remove last paragraph of description, which was off topic. Cc: Lawrence Brakmo Cc: Yonghong Song Cc: Josef Bacik Cc: Andrey Ignatov Signed-off-by: Quentin Monnet Acked-by:

[PATCH bpf-next v4 06/10] bpf: add documentation for eBPF helpers (42-50)

2018-04-25 Thread Quentin Monnet
Martin KaFai Lau Cc: Sargun Dhillon Cc: Thomas Graf Cc: Gianluca Borello Cc: Chenbo Feng Signed-off-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau [for bpf_skb_under_cgroup(), bpf_xdp_adjust_head()] --- include/uapi/linux/bpf.h | 172 ++

[PATCH bpf-next v4 01/10] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-25 Thread Quentin Monnet
page header text. - Move and fix comment on helpers introducing no overhead. - Remove "NOTES" section from man page footer. - Add "LICENSE" section to man page footer. - Edit description of file include/uapi/linux/bpf.h in man page footer. Signed-off-by: Quentin Monn

[PATCH bpf-next v4 04/10] bpf: add documentation for eBPF helpers (23-32)

2018-04-25 Thread Quentin Monnet
g a task in net_cls controller disables cgroup-bpf. - bpf_get_route_realm(): State that CONFIG_CGROUP_NET_CLASSID is required to use this helper. - bpf_skb_load_bytes(): Fix comment on current use cases for the helper. Cc: Daniel Borkmann Signed-off-by: Quentin Monnet Acked-by: Alexei Starovoitov

[PATCH bpf-next v4 00/10] bpf: document eBPF helpers and add a script to generate man page

2018-04-25 Thread Quentin Monnet
mment on top of the description list to explain how this documentation is supposed to be processed. - Update Python script accordingly (remove the same sections, and remove paragraphs on program types and GPL restrictions from man page header). - Split series into several patches. Cc: linux-doc@vge

Re: [PATCH bpf-next v3 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-20 Thread Quentin Monnet
2018-04-19 13:16 UTC+0200 ~ Daniel Borkmann > On 04/17/2018 04:34 PM, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the Python script provided in >> another commit of the patch series,

Re: [PATCH bpf-next v3 8/8] bpf: add documentation for eBPF helpers (58-64)

2018-04-19 Thread Quentin Monnet
2018-04-18 17:43 UTC+0200 ~ Jesper Dangaard Brouer > On Wed, 18 Apr 2018 15:09:41 +0100 > Quentin Monnet wrote: > >> 2018-04-18 15:34 UTC+0200 ~ Jesper Dangaard Brouer >>> On Tue, 17 Apr 2018 15:34:38 +0100 >>> Quentin Monnet wrote: >>> >>&g

Re: [PATCH bpf-next v3 8/8] bpf: add documentation for eBPF helpers (58-64)

2018-04-18 Thread Quentin Monnet
2018-04-18 15:34 UTC+0200 ~ Jesper Dangaard Brouer > On Tue, 17 Apr 2018 15:34:38 +0100 > Quentin Monnet wrote: > >> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h >> index 350459c583de..3d329538498f 100644 >> --- a/include/uapi/linux/bpf.h >&g

[PATCH bpf-next v3 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-17 Thread Quentin Monnet
emove last paragraph of description, which was off topic. Cc: Lawrence Brakmo Cc: Yonghong Song Cc: Josef Bacik Cc: Andrey Ignatov Signed-off-by: Quentin Monnet fix patch 7: Yonghong and Andrey --- include/uapi/linux/bpf.h | 178 +++ 1 file cha

[PATCH bpf-next v3 6/8] bpf: add documentation for eBPF helpers (42-50)

2018-04-17 Thread Quentin Monnet
. Remove occurences of "cores" to avoid confusion with "CPU". Cc: Kaixu Xia Cc: Martin KaFai Lau Cc: Sargun Dhillon Cc: Thomas Graf Cc: Gianluca Borello Cc: Chenbo Feng Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 158 +++

[PATCH bpf-next v3 8/8] bpf: add documentation for eBPF helpers (58-64)

2018-04-17 Thread Quentin Monnet
. Cc: Jesper Dangaard Brouer Cc: John Fastabend Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 140 +++ 1 file changed, 140 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 350459c583de..3d329538498f

[PATCH bpf-next v3 5/8] bpf: add documentation for eBPF helpers (33-41)

2018-04-17 Thread Quentin Monnet
() - bpf_get_numa_node_id() - bpf_set_hash() - bpf_skb_adjust_room() - bpf_xdp_adjust_meta() Cc: Daniel Borkmann Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 155 +++ 1 file changed, 155 insertions(+) diff --git a/include/uapi/linux/bpf.h b

[PATCH bpf-next v3 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-17 Thread Quentin Monnet
: Quentin Monnet --- include/uapi/linux/bpf.h | 210 +++ 1 file changed, 210 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 45f77f01e672..02b7d522b3c0 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux

[PATCH bpf-next v3 1/8] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-17 Thread Quentin Monnet
s" in man page header text. - Move and fix comment on helpers introducing no overhead. - Remove "NOTES" section from man page footer. - Add "LICENSE" section to man page footer. - Edit description of file include/uapi/linux/bpf.h in

[PATCH bpf-next v3 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-17 Thread Quentin Monnet
. - bpf_perf_event_output(): Fix first sentence of description. Delete wrong statement on context being evaluated as a struct pt_reg. Remove the long yet incomplete example. - bpf_get_stackid(): Add a note about PERF_MAX_STACK_DEPTH being configurable. Cc: Alexei Starovoitov Signed-off-by: Quentin Monnet

[PATCH bpf-next v3 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-17 Thread Quentin Monnet
(): State that CONFIG_CGROUP_NET_CLASSID is required to use this helper. - bpf_skb_load_bytes(): Fix comment on current use cases for the helper. Cc: Daniel Borkmann Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 152 +++ 1 file changed

[PATCH bpf-next v3 0/8] bpf: document eBPF helpers and add a script to generate man page

2018-04-17 Thread Quentin Monnet
essed. - Update Python script accordingly (remove the same sections, and remove paragraphs on program types and GPL restrictions from man page header). - Split series into several patches. Cc: linux-doc@vger.kernel.org Cc: linux-...@vger.kernel.org Quentin Monnet (8): bpf: add script and

Re: [RFC bpf-next v2 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-13 Thread Quentin Monnet
2018-04-12 17:28 UTC-0700 ~ Alexei Starovoitov > On Tue, Apr 10, 2018 at 03:41:53PM +0100, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the Python script provided in >> another commi

Re: [RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-11 Thread Quentin Monnet
2018-04-11 16:44 UTC+0100 ~ Quentin Monnet > 2018-04-10 09:58 UTC-0700 ~ Yonghong Song >> On 4/10/18 7:41 AM, Quentin Monnet wrote: >>> Add documentation for eBPF helper functions to bpf.h user header file. >>> This documentation can be parsed with the Python scr

[RFC bpf-next v2 8/8] bpf: add documentation for eBPF helpers (58-64)

2018-04-11 Thread Quentin Monnet
2018-04-11 12:17 UTC+0200 ~ Jesper Dangaard Brouer > On Tue, 10 Apr 2018 15:41:57 +0100 > Quentin Monnet wrote: > >> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h >> index 7343af4196c8..db090ad03626 100644 >> --- a/include/uapi/linux/bpf.h >&g

[RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-11 Thread Quentin Monnet
2018-04-10 10:50 UTC-0700 ~ Andrey Ignatov > Quentin Monnet [Tue, 2018-04-10 07:43 -0700]: >> + * int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int >> addr_len) >> + * Description >> + * Bind the socket associated to *ctx

[RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-11 Thread Quentin Monnet
2018-04-10 09:58 UTC-0700 ~ Yonghong Song > On 4/10/18 7:41 AM, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the Python script provided in >> another commit of the patch series, in o

[RFC bpf-next v2 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-11 Thread Quentin Monnet
2018-04-10 15:43 UTC-0700 ~ Alexei Starovoitov > On Tue, Apr 10, 2018 at 03:41:52PM +0100, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the Python script provided in >> another commi

[RFC bpf-next v2 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-11 Thread Quentin Monnet
2018-04-10 10:56 UTC-0700 ~ Alexei Starovoitov > On Tue, Apr 10, 2018 at 03:41:51PM +0100, Quentin Monnet wrote: >> Add documentation for eBPF helper functions to bpf.h user header file. >> This documentation can be parsed with the Python script provided in >> another commi

[RFC bpf-next v2 1/8] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-11 Thread Quentin Monnet
2018-04-10 11:16 UTC-0700 ~ Alexei Starovoitov > On Tue, Apr 10, 2018 at 03:41:50PM +0100, Quentin Monnet wrote: >> Remove previous "overview" of eBPF helpers from user bpf.h header. >> Replace it by a comment explaining how to process the new documentation >> (to

[RFC bpf-next v2 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-10 Thread Quentin Monnet
() - bpf_skb_load_bytes() - bpf_csum_diff() - bpf_skb_get_tunnel_opt() - bpf_skb_set_tunnel_opt() - bpf_skb_change_proto() - bpf_skb_change_type() Cc: Daniel Borkmann Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 125 +++ 1 file changed, 125 insertions

[RFC bpf-next v2 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-10 Thread Quentin Monnet
() - bpf_skb_get_tunnel_key() - bpf_skb_set_tunnel_key() - bpf_redirect() - bpf_perf_event_output() - bpf_get_stackid() - bpf_get_current_task() Cc: Alexei Starovoitov Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 237 +++ 1 file changed

[RFC bpf-next v2 0/8] bpf: document eBPF helpers and add a script to generate man page

2018-04-10 Thread Quentin Monnet
documentation is supposed to be processed. - Update Python script accordingly (remove the same sections, and remove paragraphs on program types and GPL restrictions from man page header). - Split series into several patches. Cc: linux-doc@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-

[RFC bpf-next v2 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-10 Thread Quentin Monnet
() - bpf_trace_printk() - bpf_skb_store_bytes() - bpf_l3_csum_replace() - bpf_l4_csum_replace() - bpf_tail_call() - bpf_clone_redirect() Cc: Alexei Starovoitov Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 199 +++ 1 file changed, 199 insertions

[RFC bpf-next v2 8/8] bpf: add documentation for eBPF helpers (58-64)

2018-04-10 Thread Quentin Monnet
() - bpf_msg_cork_bytes() - bpf_msg_pull_data() Cc: John Fastabend Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 140 +++ 1 file changed, 140 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 7343af4196c8

[RFC bpf-next v2 1/8] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-10 Thread Quentin Monnet
not available directly in the header files (pre-processor directives are used to produce them at the beginning of the compilation process). Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 406 ++-- scripts/bpf_helpers_doc.py | 414

[RFC bpf-next v2 6/8] bpf: add documentation for eBPF helpers (42-50)

2018-04-10 Thread Quentin Monnet
Borello Cc: Chenbo Feng Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 158 +++ 1 file changed, 158 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index af429ec79f50..15d9ccafebbe 100644 --- a/include/uapi

[RFC bpf-next v2 5/8] bpf: add documentation for eBPF helpers (33-41)

2018-04-10 Thread Quentin Monnet
() - bpf_get_numa_node_id() - bpf_set_hash() - bpf_skb_adjust_room() - bpf_xdp_adjust_meta() Cc: Daniel Borkmann Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 155 +++ 1 file changed, 155 insertions(+) diff --git a/include/uapi/linux/bpf.h b

[RFC bpf-next v2 7/8] bpf: add documentation for eBPF helpers (51-57)

2018-04-10 Thread Quentin Monnet
() - bpf_perf_prog_read_value() Helper from Josef: - bpf_override_return() Helper from Andrey: - bpf_bind() Cc: Lawrence Brakmo Cc: Yonghong Song Cc: Josef Bacik Cc: Andrey Ignatov Signed-off-by: Quentin Monnet --- include/uapi/linux/bpf.h | 184

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-10 Thread Quentin Monnet
2018-04-09 18:47 UTC-0700 ~ Alexei Starovoitov > On Mon, Apr 09, 2018 at 02:25:26PM +0100, Quentin Monnet wrote: >> >> Anyway, I am fine with keeping just signatures, descriptions and return >> values for now. I will submit a new version with only those items. > > Tha

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Quentin Monnet
2018-04-09 12:52 UTC+0200 ~ Markus Heiser > >> Am 09.04.2018 um 12:08 schrieb Daniel Borkmann : > [...] > >>> May I completely misunderstood you, so correct my if I'am wrong: >>> >>> - ./scripts/bpf_helpers_doc.py : produces reST markup from C-comments >>> - ./scripts/kerne-doc : produc

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Quentin Monnet
2018-04-09 11:01 UTC+0200 ~ Daniel Borkmann > On 04/06/2018 01:11 PM, Quentin Monnet wrote: >> eBPF helper functions can be called from within eBPF programs to perform >> a variety of tasks that would be otherwise hard or impossible to do with >> eBPF itself. There is a g