All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Quentin Monnet <quentin.monnet@netronome.com>
Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org,
	oss-drivers@netronome.com, linux-doc@vger.kernel.org,
	linux-man@vger.kernel.org, Kaixu Xia <xiakaixu@huawei.com>,
	Martin KaFai Lau <kafai@fb.com>,
	Sargun Dhillon <sargun@sargun.me>, Thomas Graf <tgraf@suug.ch>,
	Gianluca Borello <g.borello@gmail.com>,
	Chenbo Feng <fengc@google.com>
Subject: Re: [PATCH bpf-next v3 6/8] bpf: add documentation for eBPF helpers (42-50)
Date: Wed, 18 Apr 2018 16:29:22 -0700	[thread overview]
Message-ID: <20180418232920.xqwxoqy7rlv54pvg@ast-mbp> (raw)
In-Reply-To: <20180417143438.7018-7-quentin.monnet@netronome.com>

On Tue, Apr 17, 2018 at 03:34:36PM +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 commit of the patch series, in order to provide a RST document
> that can later be converted into a man page.
> 
> The objective is to make the documentation easily understandable and
> accessible to all eBPF developers, including beginners.
> 
> This patch contains descriptions for the following helper functions:
> 
> Helper from Kaixu:
> - bpf_perf_event_read()
> 
> Helpers from Martin:
> - bpf_skb_under_cgroup()
> - bpf_xdp_adjust_head()
> 
> Helpers from Sargun:
> - bpf_probe_write_user()
> - bpf_current_task_under_cgroup()
> 
> Helper from Thomas:
> - bpf_skb_change_head()
> 
> Helper from Gianluca:
> - bpf_probe_read_str()
> 
> Helpers from Chenbo:
> - bpf_get_socket_cookie()
> - bpf_get_socket_uid()
> 
> v3:
> - bpf_perf_event_read(): Fix time of selection for perf event type in
>   description. Remove occurences of "cores" to avoid confusion with
>   "CPU".
> 
> Cc: Kaixu Xia <xiakaixu@huawei.com>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: Sargun Dhillon <sargun@sargun.me>
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Gianluca Borello <g.borello@gmail.com>
> Cc: Chenbo Feng <fengc@google.com>
> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
...
> + *
> + * u64 bpf_get_socket_cookie(struct sk_buff *skb)
> + * 	Description
> + * 		Retrieve the socket cookie generated by the kernel from a
> + * 		**struct sk_buff** with a known socket. If none has been set

this bit could use some improvement, since it reads as cookie is
generated from sk_buff, whereas it has nothing to do with this particular
sk_buff. Cookie belongs to the socket and generated for the socket.
Would be good to explain that cookie is stable for the life of the socket.

For the rest:
Acked-by: Alexei Starovoitov <ast@kernel.org>

WARNING: multiple messages have this Message-ID (diff)
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Quentin Monnet <quentin.monnet@netronome.com>
Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org,
	oss-drivers@netronome.com, linux-doc@vger.kernel.org,
	linux-man@vger.kernel.org, Kaixu Xia <xiakaixu@huawei.com>,
	Martin KaFai Lau <kafai@fb.com>,
	Sargun Dhillon <sargun@sargun.me>, Thomas Graf <tgraf@suug.ch>,
	Gianluca Borello <g.borello@gmail.com>,
	Chenbo Feng <fengc@google.com>
Subject: Re: [PATCH bpf-next v3 6/8] bpf: add documentation for eBPF helpers (42-50)
Date: Wed, 18 Apr 2018 16:29:22 -0700	[thread overview]
Message-ID: <20180418232920.xqwxoqy7rlv54pvg@ast-mbp> (raw)
In-Reply-To: <20180417143438.7018-7-quentin.monnet@netronome.com>

On Tue, Apr 17, 2018 at 03:34:36PM +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 commit of the patch series, in order to provide a RST document
> that can later be converted into a man page.
> 
> The objective is to make the documentation easily understandable and
> accessible to all eBPF developers, including beginners.
> 
> This patch contains descriptions for the following helper functions:
> 
> Helper from Kaixu:
> - bpf_perf_event_read()
> 
> Helpers from Martin:
> - bpf_skb_under_cgroup()
> - bpf_xdp_adjust_head()
> 
> Helpers from Sargun:
> - bpf_probe_write_user()
> - bpf_current_task_under_cgroup()
> 
> Helper from Thomas:
> - bpf_skb_change_head()
> 
> Helper from Gianluca:
> - bpf_probe_read_str()
> 
> Helpers from Chenbo:
> - bpf_get_socket_cookie()
> - bpf_get_socket_uid()
> 
> v3:
> - bpf_perf_event_read(): Fix time of selection for perf event type in
>   description. Remove occurences of "cores" to avoid confusion with
>   "CPU".
> 
> Cc: Kaixu Xia <xiakaixu@huawei.com>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: Sargun Dhillon <sargun@sargun.me>
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Gianluca Borello <g.borello@gmail.com>
> Cc: Chenbo Feng <fengc@google.com>
> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
...
> + *
> + * u64 bpf_get_socket_cookie(struct sk_buff *skb)
> + * 	Description
> + * 		Retrieve the socket cookie generated by the kernel from a
> + * 		**struct sk_buff** with a known socket. If none has been set

this bit could use some improvement, since it reads as cookie is
generated from sk_buff, whereas it has nothing to do with this particular
sk_buff. Cookie belongs to the socket and generated for the socket.
Would be good to explain that cookie is stable for the life of the socket.

For the rest:
Acked-by: Alexei Starovoitov <ast@kernel.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-04-18 23:29 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 14:34 [PATCH bpf-next v3 0/8] bpf: document eBPF helpers and add a script to generate man page Quentin Monnet
2018-04-17 14:34 ` Quentin Monnet
2018-04-17 14:34 ` [PATCH bpf-next v3 1/8] bpf: add script and prepare bpf.h for new helpers documentation Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-17 14:34 ` [PATCH bpf-next v3 2/8] bpf: add documentation for eBPF helpers (01-11) Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-18  1:04   ` Alexei Starovoitov
2018-04-18  1:04     ` Alexei Starovoitov
2018-04-19 10:02   ` Daniel Borkmann
2018-04-19 10:02     ` Daniel Borkmann
2018-04-17 14:34 ` [PATCH bpf-next v3 3/8] bpf: add documentation for eBPF helpers (12-22) Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-18 22:10   ` Alexei Starovoitov
2018-04-18 22:10     ` Alexei Starovoitov
2018-04-19 10:29   ` Daniel Borkmann
2018-04-19 10:29     ` Daniel Borkmann
2018-04-17 14:34 ` [PATCH bpf-next v3 4/8] bpf: add documentation for eBPF helpers (23-32) Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-18 22:11   ` Alexei Starovoitov
2018-04-18 22:11     ` Alexei Starovoitov
2018-04-19 11:16   ` Daniel Borkmann
2018-04-19 11:16     ` Daniel Borkmann
2018-04-20 18:54     ` Quentin Monnet
2018-04-20 18:54       ` Quentin Monnet
2018-04-23  9:11       ` Daniel Borkmann
2018-04-23  9:11         ` Daniel Borkmann
2018-04-17 14:34 ` [PATCH bpf-next v3 5/8] bpf: add documentation for eBPF helpers (33-41) Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-18 22:23   ` Alexei Starovoitov
2018-04-18 22:23     ` Alexei Starovoitov
2018-04-19 12:27   ` Daniel Borkmann
2018-04-19 12:27     ` Daniel Borkmann
2018-04-17 14:34 ` [PATCH bpf-next v3 6/8] bpf: add documentation for eBPF helpers (42-50) Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-18 23:29   ` Alexei Starovoitov [this message]
2018-04-18 23:29     ` Alexei Starovoitov
2018-04-18 23:42   ` Martin KaFai Lau
2018-04-18 23:42     ` Martin KaFai Lau
2018-04-18 23:42     ` Martin KaFai Lau
2018-04-19 12:40   ` Daniel Borkmann
2018-04-19 12:40     ` Daniel Borkmann
2018-04-17 14:34 ` [PATCH bpf-next v3 7/8] bpf: add documentation for eBPF helpers (51-57) Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-17 17:51   ` Yonghong Song
2018-04-17 17:51     ` Yonghong Song
2018-04-17 17:51     ` Yonghong Song
2018-04-17 17:55   ` Andrey Ignatov
2018-04-17 17:55     ` Andrey Ignatov
2018-04-17 17:55     ` Andrey Ignatov
2018-04-19 12:47   ` Daniel Borkmann
2018-04-19 12:47     ` Daniel Borkmann
2018-04-17 14:34 ` [PATCH bpf-next v3 8/8] bpf: add documentation for eBPF helpers (58-64) Quentin Monnet
2018-04-17 14:34   ` Quentin Monnet
2018-04-18 13:34   ` Jesper Dangaard Brouer
2018-04-18 13:34     ` Jesper Dangaard Brouer
2018-04-18 14:09     ` Quentin Monnet
2018-04-18 14:09       ` Quentin Monnet
2018-04-18 15:43       ` Jesper Dangaard Brouer
2018-04-18 15:43         ` Jesper Dangaard Brouer
2018-04-19 12:44         ` Quentin Monnet
2018-04-19 12:44           ` Quentin Monnet
2018-04-19 12:58           ` Jesper Dangaard Brouer
2018-04-19 12:58             ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180418232920.xqwxoqy7rlv54pvg@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=fengc@google.com \
    --cc=g.borello@gmail.com \
    --cc=kafai@fb.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=quentin.monnet@netronome.com \
    --cc=sargun@sargun.me \
    --cc=tgraf@suug.ch \
    --cc=xiakaixu@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.