bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] Documentation: Enhance readability in BPF docs
@ 2025-06-07 22:24 Eslam Khafagy
  2025-06-08 14:32 ` Yonghong Song
  2025-06-11 19:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Eslam Khafagy @ 2025-06-07 22:24 UTC (permalink / raw)
  Cc: skhan, eslam.medhat1993, David Vernet, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau,
	Eduard Zingerman, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Jonathan Corbet,
	Dave Thaler,
	open list:BPF [DOCUMENTATION] (Related to Standardization),
	open list:BPF [DOCUMENTATION] (Related to Standardization),
	open list:DOCUMENTATION, open list

The phrase "dividing -1" is one I find confusing.  E.g.,
"INT_MIN dividing -1" sounds like "-1 / INT_MIN" rather than the inverse.
"divided by" instead of "dividing" assuming the inverse is meant.

Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>
---
 Documentation/bpf/standardization/instruction-set.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/bpf/standardization/instruction-set.rst b/Documentation/bpf/standardization/instruction-set.rst
index ac950a5bb6ad..39c74611752b 100644
--- a/Documentation/bpf/standardization/instruction-set.rst
+++ b/Documentation/bpf/standardization/instruction-set.rst
@@ -350,8 +350,8 @@ Underflow and overflow are allowed during arithmetic operations, meaning
 the 64-bit or 32-bit value will wrap. If BPF program execution would
 result in division by zero, the destination register is instead set to zero.
 Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN``
-dividing -1, the destination register is instead set to ``LLONG_MIN``. For
-``ALU``, if execution would result in ``INT_MIN`` dividing -1, the
+divided by -1, the destination register is instead set to ``LLONG_MIN``. For
+``ALU``, if execution would result in ``INT_MIN`` divided by -1, the
 destination register is instead set to ``INT_MIN``.
 
 If execution would result in modulo by zero, for ``ALU64`` the value of
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH bpf-next] Documentation: Enhance readability in BPF docs
  2025-06-07 22:24 [PATCH bpf-next] Documentation: Enhance readability in BPF docs Eslam Khafagy
@ 2025-06-08 14:32 ` Yonghong Song
  2025-06-08 14:32   ` [Bpf] " Yonghong Song
  2025-06-11 19:40 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Yonghong Song @ 2025-06-08 14:32 UTC (permalink / raw)
  To: Eslam Khafagy
  Cc: skhan, David Vernet, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Jonathan Corbet, Dave Thaler,
	open list:BPF [DOCUMENTATION] (Related to Standardization),
	open list:BPF [DOCUMENTATION] (Related to Standardization),
	open list:DOCUMENTATION, open list



On 6/7/25 3:24 PM, Eslam Khafagy wrote:
> The phrase "dividing -1" is one I find confusing.  E.g.,
> "INT_MIN dividing -1" sounds like "-1 / INT_MIN" rather than the inverse.
> "divided by" instead of "dividing" assuming the inverse is meant.
>
> Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>

Acked-by: Yonghong Song <yonghong.song@linux.dev>

> ---
>   Documentation/bpf/standardization/instruction-set.rst | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/bpf/standardization/instruction-set.rst b/Documentation/bpf/standardization/instruction-set.rst
> index ac950a5bb6ad..39c74611752b 100644
> --- a/Documentation/bpf/standardization/instruction-set.rst
> +++ b/Documentation/bpf/standardization/instruction-set.rst
> @@ -350,8 +350,8 @@ Underflow and overflow are allowed during arithmetic operations, meaning
>   the 64-bit or 32-bit value will wrap. If BPF program execution would
>   result in division by zero, the destination register is instead set to zero.
>   Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN``
> -dividing -1, the destination register is instead set to ``LLONG_MIN``. For
> -``ALU``, if execution would result in ``INT_MIN`` dividing -1, the
> +divided by -1, the destination register is instead set to ``LLONG_MIN``. For
> +``ALU``, if execution would result in ``INT_MIN`` divided by -1, the
>   destination register is instead set to ``INT_MIN``.
>   
>   If execution would result in modulo by zero, for ``ALU64`` the value of


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bpf] Re: [PATCH bpf-next] Documentation: Enhance readability in BPF docs
  2025-06-08 14:32 ` Yonghong Song
@ 2025-06-08 14:32   ` Yonghong Song
  0 siblings, 0 replies; 4+ messages in thread
From: Yonghong Song @ 2025-06-08 14:32 UTC (permalink / raw)
  To: Eslam Khafagy
  Cc: skhan, David Vernet, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Jonathan Corbet, Dave Thaler,
	open list:BPF [DOCUMENTATION] (Related to Standardization),
	open list:BPF [DOCUMENTATION] (Related to Standardization),
	open list:DOCUMENTATION, open list



On 6/7/25 3:24 PM, Eslam Khafagy wrote:
> The phrase "dividing -1" is one I find confusing.  E.g.,
> "INT_MIN dividing -1" sounds like "-1 / INT_MIN" rather than the inverse.
> "divided by" instead of "dividing" assuming the inverse is meant.
>
> Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>

Acked-by: Yonghong Song <yonghong.song@linux.dev>

> ---
>   Documentation/bpf/standardization/instruction-set.rst | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/bpf/standardization/instruction-set.rst b/Documentation/bpf/standardization/instruction-set.rst
> index ac950a5bb6ad..39c74611752b 100644
> --- a/Documentation/bpf/standardization/instruction-set.rst
> +++ b/Documentation/bpf/standardization/instruction-set.rst
> @@ -350,8 +350,8 @@ Underflow and overflow are allowed during arithmetic operations, meaning
>   the 64-bit or 32-bit value will wrap. If BPF program execution would
>   result in division by zero, the destination register is instead set to zero.
>   Otherwise, for ``ALU64``, if execution would result in ``LLONG_MIN``
> -dividing -1, the destination register is instead set to ``LLONG_MIN``. For
> -``ALU``, if execution would result in ``INT_MIN`` dividing -1, the
> +divided by -1, the destination register is instead set to ``LLONG_MIN``. For
> +``ALU``, if execution would result in ``INT_MIN`` divided by -1, the
>   destination register is instead set to ``INT_MIN``.
>   
>   If execution would result in modulo by zero, for ``ALU64`` the value of

-- 
Bpf mailing list -- bpf@ietf.org
To unsubscribe send an email to bpf-leave@ietf.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH bpf-next] Documentation: Enhance readability in BPF docs
  2025-06-07 22:24 [PATCH bpf-next] Documentation: Enhance readability in BPF docs Eslam Khafagy
  2025-06-08 14:32 ` Yonghong Song
@ 2025-06-11 19:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-11 19:40 UTC (permalink / raw)
  To: Eslam Khafagy
  Cc: skhan, void, ast, daniel, andrii, martin.lau, eddyz87, song,
	yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa,
	corbet, dthaler1968, bpf, bpf, linux-doc, linux-kernel

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Sun,  8 Jun 2025 01:24:25 +0300 you wrote:
> The phrase "dividing -1" is one I find confusing.  E.g.,
> "INT_MIN dividing -1" sounds like "-1 / INT_MIN" rather than the inverse.
> "divided by" instead of "dividing" assuming the inverse is meant.
> 
> Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>
> ---
>  Documentation/bpf/standardization/instruction-set.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [bpf-next] Documentation: Enhance readability in BPF docs
    https://git.kernel.org/bpf/bpf-next/c/c9b03a11005f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-11 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-07 22:24 [PATCH bpf-next] Documentation: Enhance readability in BPF docs Eslam Khafagy
2025-06-08 14:32 ` Yonghong Song
2025-06-08 14:32   ` [Bpf] " Yonghong Song
2025-06-11 19:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).