All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Ignatov <rdna@fb.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>,
	Lawrence Brakmo <brakmo@fb.com>, Yonghong Song <yhs@fb.com>,
	Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH bpf-next v3 7/8] bpf: add documentation for eBPF helpers (51-57)
Date: Tue, 17 Apr 2018 10:55:29 -0700	[thread overview]
Message-ID: <20180417175529.GA68667@rdna-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20180417143438.7018-8-quentin.monnet@netronome.com>

Quentin Monnet <quentin.monnet@netronome.com> [Tue, 2018-04-17 07:36 -0700]:
> 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:
> 
> Helpers from Lawrence:
> - bpf_setsockopt()
> - bpf_getsockopt()
> - bpf_sock_ops_cb_flags_set()
> 
> Helpers from Yonghong:
> - bpf_perf_event_read_value()
> - bpf_perf_prog_read_value()
> 
> Helper from Josef:
> - bpf_override_return()
> 
> Helper from Andrey:
> - bpf_bind()
> 
> v3:
> - bpf_perf_event_read_value(): Fix time of selection for perf event type
>   in description. Remove occurences of "cores" to avoid confusion with
>   "CPU".
> - bpf_bind(): Remove last paragraph of description, which was off topic.
> 
> Cc: Lawrence Brakmo <brakmo@fb.com>
> Cc: Yonghong Song <yhs@fb.com>
> Cc: Josef Bacik <jbacik@fb.com>
> Cc: Andrey Ignatov <rdna@fb.com>
> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
> 
> fix patch 7: Yonghong and Andrey
> ---
>  include/uapi/linux/bpf.h | 178 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 178 insertions(+)
> 
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index dd79a1c82adf..350459c583de 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> + *
> + * int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int addr_len)
> + * 	Description
> + * 		Bind the socket associated to *ctx* to the address pointed by
> + * 		*addr*, of length *addr_len*. This allows for making outgoing
> + * 		connection from the desired IP address, which can be useful for
> + * 		example when all processes inside a cgroup should use one
> + * 		single IP address on a host that has multiple IP configured.
> + *
> + * 		This helper works for IPv4 and IPv6, TCP and UDP sockets. The
> + * 		domain (*addr*\ **->sa_family**) must be **AF_INET** (or
> + * 		**AF_INET6**). Looking for a free port to bind to can be
> + * 		expensive, therefore binding to port is not permitted by the
> + * 		helper: *addr*\ **->sin_port** (or **sin6_port**, respectively)
> + * 		must be set to zero.
> + * 	Return
> + * 		0 on success, or a negative error in case of failure.

Acked-by: Andrey Ignatov <rdna@fb.com>
for bpf_bind() helper.

-- 
Andrey Ignatov

WARNING: multiple messages have this Message-ID (diff)
From: Andrey Ignatov <rdna@fb.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>,
	Lawrence Brakmo <brakmo@fb.com>, Yonghong Song <yhs@fb.com>,
	Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH bpf-next v3 7/8] bpf: add documentation for eBPF helpers (51-57)
Date: Tue, 17 Apr 2018 10:55:29 -0700	[thread overview]
Message-ID: <20180417175529.GA68667@rdna-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20180417143438.7018-8-quentin.monnet@netronome.com>

Quentin Monnet <quentin.monnet@netronome.com> [Tue, 2018-04-17 07:36 -0700]:
> 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:
> 
> Helpers from Lawrence:
> - bpf_setsockopt()
> - bpf_getsockopt()
> - bpf_sock_ops_cb_flags_set()
> 
> Helpers from Yonghong:
> - bpf_perf_event_read_value()
> - bpf_perf_prog_read_value()
> 
> Helper from Josef:
> - bpf_override_return()
> 
> Helper from Andrey:
> - bpf_bind()
> 
> v3:
> - bpf_perf_event_read_value(): Fix time of selection for perf event type
>   in description. Remove occurences of "cores" to avoid confusion with
>   "CPU".
> - bpf_bind(): Remove last paragraph of description, which was off topic.
> 
> Cc: Lawrence Brakmo <brakmo@fb.com>
> Cc: Yonghong Song <yhs@fb.com>
> Cc: Josef Bacik <jbacik@fb.com>
> Cc: Andrey Ignatov <rdna@fb.com>
> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
> 
> fix patch 7: Yonghong and Andrey
> ---
>  include/uapi/linux/bpf.h | 178 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 178 insertions(+)
> 
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index dd79a1c82adf..350459c583de 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> + *
> + * int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int addr_len)
> + * 	Description
> + * 		Bind the socket associated to *ctx* to the address pointed by
> + * 		*addr*, of length *addr_len*. This allows for making outgoing
> + * 		connection from the desired IP address, which can be useful for
> + * 		example when all processes inside a cgroup should use one
> + * 		single IP address on a host that has multiple IP configured.
> + *
> + * 		This helper works for IPv4 and IPv6, TCP and UDP sockets. The
> + * 		domain (*addr*\ **->sa_family**) must be **AF_INET** (or
> + * 		**AF_INET6**). Looking for a free port to bind to can be
> + * 		expensive, therefore binding to port is not permitted by the
> + * 		helper: *addr*\ **->sin_port** (or **sin6_port**, respectively)
> + * 		must be set to zero.
> + * 	Return
> + * 		0 on success, or a negative error in case of failure.

Acked-by: Andrey Ignatov <rdna@fb.com>
for bpf_bind() helper.

-- 
Andrey Ignatov
--
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

WARNING: multiple messages have this Message-ID (diff)
From: Andrey Ignatov <rdna@fb.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, Lawrence Brakmo <brakmo@fb.com>,
	Yonghong Song <yhs@fb.com>, Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH bpf-next v3 7/8] bpf: add documentation for eBPF helpers (51-57)
Date: Tue, 17 Apr 2018 10:55:29 -0700	[thread overview]
Message-ID: <20180417175529.GA68667@rdna-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20180417143438.7018-8-quentin.monnet@netronome.com>

Quentin Monnet <quentin.monnet@netronome.com> [Tue, 2018-04-17 07:36 -0700]:
> 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:
> 
> Helpers from Lawrence:
> - bpf_setsockopt()
> - bpf_getsockopt()
> - bpf_sock_ops_cb_flags_set()
> 
> Helpers from Yonghong:
> - bpf_perf_event_read_value()
> - bpf_perf_prog_read_value()
> 
> Helper from Josef:
> - bpf_override_return()
> 
> Helper from Andrey:
> - bpf_bind()
> 
> v3:
> - bpf_perf_event_read_value(): Fix time of selection for perf event type
>   in description. Remove occurences of "cores" to avoid confusion with
>   "CPU".
> - bpf_bind(): Remove last paragraph of description, which was off topic.
> 
> Cc: Lawrence Brakmo <brakmo@fb.com>
> Cc: Yonghong Song <yhs@fb.com>
> Cc: Josef Bacik <jbacik@fb.com>
> Cc: Andrey Ignatov <rdna@fb.com>
> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
> 
> fix patch 7: Yonghong and Andrey
> ---
>  include/uapi/linux/bpf.h | 178 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 178 insertions(+)
> 
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index dd79a1c82adf..350459c583de 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> + *
> + * int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int addr_len)
> + * 	Description
> + * 		Bind the socket associated to *ctx* to the address pointed by
> + * 		*addr*, of length *addr_len*. This allows for making outgoing
> + * 		connection from the desired IP address, which can be useful for
> + * 		example when all processes inside a cgroup should use one
> + * 		single IP address on a host that has multiple IP configured.
> + *
> + * 		This helper works for IPv4 and IPv6, TCP and UDP sockets. The
> + * 		domain (*addr*\ **->sa_family**) must be **AF_INET** (or
> + * 		**AF_INET6**). Looking for a free port to bind to can be
> + * 		expensive, therefore binding to port is not permitted by the
> + * 		helper: *addr*\ **->sin_port** (or **sin6_port**, respectively)
> + * 		must be set to zero.
> + * 	Return
> + * 		0 on success, or a negative error in case of failure.

Acked-by: Andrey Ignatov <rdna@fb.com>
for bpf_bind() helper.

-- 
Andrey Ignatov

  parent reply	other threads:[~2018-04-17 17:56 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
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 [this message]
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=20180417175529.GA68667@rdna-mbp.dhcp.thefacebook.com \
    --to=rdna@fb.com \
    --cc=ast@kernel.org \
    --cc=brakmo@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=jbacik@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=yhs@fb.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.