public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: Quentin Monnet <quentin@isovalent.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>,
	bpf@vger.kernel.org, Jakub Wilk <jwilk@jwilk.net>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	linux-man@vger.kernel.org
Subject: Re: [PATCH bpf-next v3] bpf: Fix a few typos in BPF helpers documentation
Date: Fri, 26 Aug 2022 00:12:25 +0200	[thread overview]
Message-ID: <ebbae976-b452-c359-fd67-5b0511c3ef10@gmail.com> (raw)
In-Reply-To: <20220825220806.107143-1-quentin@isovalent.com>


[-- Attachment #1.1: Type: text/plain, Size: 6486 bytes --]

Hi Quentin,

On 8/26/22 00:08, Quentin Monnet wrote:
> Address a few typos in the documentation for the BPF helper functions.
> They were reported by Jakub [0], who ran spell checkers on the generated
> man page [1].
> 
> [0] https://lore.kernel.org/linux-man/d22dcd47-023c-8f52-d369-7b5308e6c842@gmail.com/T/#mb02e7d4b7fb61d98fa914c77b581184e9a9537af
> [1] https://lore.kernel.org/linux-man/eb6a1e41-c48e-ac45-5154-ac57a2c76108@gmail.com/T/#m4a8d1b003616928013ffcd1450437309ab652f9f
> 
> v3: Do not copy unrelated (and breaking) elements to tools/ header
> v2: Turn a ',' into a ';'
> 
> Cc: Alejandro Colomar <alx.manpages@gmail.com>
> Cc: Jakub Wilk <jwilk@jwilk.net>
> Cc: Jesper Dangaard Brouer <brouer@redhat.com>
> Cc: linux-man@vger.kernel.org
> Reported-by: Jakub Wilk <jwilk@jwilk.net>
> Signed-off-by: Quentin Monnet <quentin@isovalent.com>
> ---
>   include/uapi/linux/bpf.h       | 16 ++++++++--------
>   tools/include/uapi/linux/bpf.h | 16 ++++++++--------
>   2 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
> index 0f61f09f467a..01c54a462352 100644
> --- a/include/uapi/linux/bpf.h
> +++ b/include/uapi/linux/bpf.h
> @@ -4456,7 +4456,7 @@ union bpf_attr {
>    *
>    *		**-EEXIST** if the option already exists.
>    *
> - *		**-EFAULT** on failrue to parse the existing header options.
> + *		**-EFAULT** on failure to parse the existing header options.
>    *
>    *		**-EPERM** if the helper cannot be used under the current
>    *		*skops*\ **->op**.
> @@ -4665,7 +4665,7 @@ union bpf_attr {
>    *		a *map* with *task* as the **key**.  From this
>    *		perspective,  the usage is not much different from
>    *		**bpf_map_lookup_elem**\ (*map*, **&**\ *task*) except this
> - *		helper enforces the key must be an task_struct and the map must also
> + *		helper enforces the key must be a task_struct and the map must also
>    *		be a **BPF_MAP_TYPE_TASK_STORAGE**.
>    *
>    *		Underneath, the value is stored locally at *task* instead of
> @@ -4723,7 +4723,7 @@ union bpf_attr {
>    *
>    * long bpf_ima_inode_hash(struct inode *inode, void *dst, u32 size)
>    *	Description
> - *		Returns the stored IMA hash of the *inode* (if it's avaialable).
> + *		Returns the stored IMA hash of the *inode* (if it's available).
>    *		If the hash is larger than *size*, then only *size*
>    *		bytes will be copied to *dst*
>    *	Return
> @@ -4747,12 +4747,12 @@ union bpf_attr {
>    *
>    *		The argument *len_diff* can be used for querying with a planned
>    *		size change. This allows to check MTU prior to changing packet
> - *		ctx. Providing an *len_diff* adjustment that is larger than the

I just noticed:  groff(1) uses double spaces after an end-of-sentence 
period.  Otherwise, it is understood as something like initials, or an 
abbreviature, and it causes some issues.  Please check the whole 
document, as I've seen a mix of styles.

Search for something like '.\. [^ ]'

Cheers,

Alex

> + *		ctx. Providing a *len_diff* adjustment that is larger than the
>    *		actual packet size (resulting in negative packet size) will in
> - *		principle not exceed the MTU, why it is not considered a
> - *		failure.  Other BPF-helpers are needed for performing the
> - *		planned size change, why the responsability for catch a negative
> - *		packet size belong in those helpers.
> + *		principle not exceed the MTU, which is why it is not considered
> + *		a failure.  Other BPF helpers are needed for performing the
> + *		planned size change; therefore the responsibility for catching
> + *		a negative packet size belongs in those helpers.
>    *
>    *		Specifying *ifindex* zero means the MTU check is performed
>    *		against the current net device.  This is practical if this isn't
> diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
> index 5056cef2112f..d45dda46aa42 100644
> --- a/tools/include/uapi/linux/bpf.h
> +++ b/tools/include/uapi/linux/bpf.h
> @@ -4456,7 +4456,7 @@ union bpf_attr {
>    *
>    *		**-EEXIST** if the option already exists.
>    *
> - *		**-EFAULT** on failrue to parse the existing header options.
> + *		**-EFAULT** on failure to parse the existing header options.
>    *
>    *		**-EPERM** if the helper cannot be used under the current
>    *		*skops*\ **->op**.
> @@ -4665,7 +4665,7 @@ union bpf_attr {
>    *		a *map* with *task* as the **key**.  From this
>    *		perspective,  the usage is not much different from
>    *		**bpf_map_lookup_elem**\ (*map*, **&**\ *task*) except this
> - *		helper enforces the key must be an task_struct and the map must also
> + *		helper enforces the key must be a task_struct and the map must also
>    *		be a **BPF_MAP_TYPE_TASK_STORAGE**.
>    *
>    *		Underneath, the value is stored locally at *task* instead of
> @@ -4723,7 +4723,7 @@ union bpf_attr {
>    *
>    * long bpf_ima_inode_hash(struct inode *inode, void *dst, u32 size)
>    *	Description
> - *		Returns the stored IMA hash of the *inode* (if it's avaialable).
> + *		Returns the stored IMA hash of the *inode* (if it's available).
>    *		If the hash is larger than *size*, then only *size*
>    *		bytes will be copied to *dst*
>    *	Return
> @@ -4747,12 +4747,12 @@ union bpf_attr {
>    *
>    *		The argument *len_diff* can be used for querying with a planned
>    *		size change. This allows to check MTU prior to changing packet
> - *		ctx. Providing an *len_diff* adjustment that is larger than the
> + *		ctx. Providing a *len_diff* adjustment that is larger than the
>    *		actual packet size (resulting in negative packet size) will in
> - *		principle not exceed the MTU, why it is not considered a
> - *		failure.  Other BPF-helpers are needed for performing the
> - *		planned size change, why the responsability for catch a negative
> - *		packet size belong in those helpers.
> + *		principle not exceed the MTU, which is why it is not considered
> + *		a failure.  Other BPF helpers are needed for performing the
> + *		planned size change; therefore the responsibility for catching
> + *		a negative packet size belongs in those helpers.
>    *
>    *		Specifying *ifindex* zero means the MTU check is performed
>    *		against the current net device.  This is practical if this isn't

-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-08-25 22:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 22:08 [PATCH bpf-next v3] bpf: Fix a few typos in BPF helpers documentation Quentin Monnet
2022-08-25 22:12 ` Alejandro Colomar [this message]
2022-08-26  9:44   ` Quentin Monnet
2022-08-26 17:17     ` Alejandro Colomar
2022-08-27  5:20 ` patchwork-bot+netdevbpf

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=ebbae976-b452-c359-fd67-5b0511c3ef10@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jwilk@jwilk.net \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=quentin@isovalent.com \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox