From: Eduard Zingerman <eddyz87@gmail.com>
To: bot+bpf-ci@kernel.org, bpf@vger.kernel.org, ast@kernel.org
Cc: andrii@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
kernel-team@fb.com, yonghong.song@linux.dev,
shung-hsi.yu@suse.com, paul.chaignon@gmail.com,
harishankar.vishwanathan@gmail.com, martin.lau@kernel.org,
clm@meta.com, ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v2 1/4] bpf: representation and basic operations on circular numbers
Date: Fri, 24 Apr 2026 10:26:53 -0700 [thread overview]
Message-ID: <5d22e4ce0cca7860ccd42db8c221064d58964bd4.camel@gmail.com> (raw)
In-Reply-To: <a42da1d14e01371ec3a05d5e1d43067428195d983703523e373497834bb70796@mail.kernel.org>
On Fri, 2026-04-24 at 09:00 +0000, bot+bpf-ci@kernel.org wrote:
> > diff --git a/kernel/bpf/cnum.c b/kernel/bpf/cnum.c
> > new file mode 100644
> > index 000000000000..86142cb2aee5
> > --- /dev/null
> > +++ b/kernel/bpf/cnum.c
>
> [ ... ]
>
> > @@ -0,0 +1,120 @@
>
> [ ... ]
>
> > +/*
> > + * Suppose 'a' and 'b' are laid out as follows:
> > + *
> > + * 64-bit number axis --->
> > + *
> > + * N*2^32 (N+1)*2^32 (N+2)*2^32 (N+3)*2^32
> > + * ||------|---|=====|-------||----------|=====|-------||----------|=====|----|--||
> > + * | |< b >| |< b >| |< b >| |
> > + * | | | |
> > + * |<--+--------------------------- a ---------------------------+--->|
> > + * | |
> > + * |<-------------------------- t -------------------------->|
> > + *
> > + * In such a case it is possible to infer a more tight representation t
> > + * such that ∀ v ∈ a, (u32)v ∈ b: v ∈ t.
>
> The commit message describes this specification as "∀ v ∈ a, (u32)v ∈ b:
> v ∈ t." This typo was identified by the CI bot and you acknowledged it
> in v1 review, and the code comment was fixed to use "(u32)v" correctly.
> However, the commit message still shows "(u32)v" instead of the
> incorrect "(u32)a" from v1. Is this inconsistency intentional, or should
> the commit message match the corrected specification?
>
> Note: The CI bot pointed out that "(u32)a ∈ b" doesn't depend on v,
> making the quantifier trivial. You agreed and the code was fixed, but the
> description in the commit message appears to already have the correct
> version.
This appears to be a word salad.
Both comment and commit message say: ∀ v ∈ a, (u32)v ∈ b: v ∈ t.
> > + */
> > +struct cnum64 cnum64_cnum32_intersect(struct cnum64 a, struct cnum32 b)
>
> [ ... ]
>
> > diff --git a/kernel/bpf/cnum_defs.h b/kernel/bpf/cnum_defs.h
> > new file mode 100644
> > index 000000000000..1aa0554bf19f
> > --- /dev/null
> > +++ b/kernel/bpf/cnum_defs.h
>
> [ ... ]
>
> > @@ -0,0 +1,233 @@
>
> [ ... ]
>
> > +/*
> > + * If there exists a cnum representing an intersection of cnums 'a' and 'b',
> > + * returns this intersection in 'out' and returns true.
> > + * If such cnum does not exist:
> > + * - if intersection is empty, returns false.
> > + * - if intersection produces two ranges, returns smaller of
> > + * 'a' or 'b' in 'out'.
> > + */
> > +struct cnum_t FN(intersect)(struct cnum_t a, struct cnum_t b)
>
> Does this comment match the actual function signature? The comment
> describes returning "this intersection in 'out' and returns true" and
> "returns false" for empty intersection, which suggests an output parameter
> 'out' and a bool return type. However, the function signature shows
> (struct cnum_t a, struct cnum_t b) with no 'out' parameter, and returns
> struct cnum_t by value. Should the comment be updated to describe the
> actual return convention where the intersection cnum is returned directly,
> EMPTY is returned for empty intersection, and the smaller range is returned
> when the intersection produces two disjoint arcs?
The comment has to be fixed.
next prev parent reply other threads:[~2026-04-24 17:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 8:17 [PATCH bpf-next v2 0/4] bpf: replace min/max fields with struct cnum{32,64} Eduard Zingerman
2026-04-24 8:17 ` [PATCH bpf-next v2 1/4] bpf: representation and basic operations on circular numbers Eduard Zingerman
2026-04-24 9:00 ` bot+bpf-ci
2026-04-24 17:26 ` Eduard Zingerman [this message]
2026-04-24 8:17 ` [PATCH bpf-next v2 2/4] bpf: use accessor functions for bpf_reg_state min/max fields Eduard Zingerman
2026-04-24 8:17 ` [PATCH bpf-next v2 3/4] bpf: replace min/max fields with struct cnum{32,64} Eduard Zingerman
2026-04-24 9:12 ` bot+bpf-ci
2026-04-24 17:21 ` Eduard Zingerman
2026-04-24 8:17 ` [PATCH bpf-next v2 4/4] selftests/bpf: new cases handled by 32->64 range refinements Eduard Zingerman
2026-04-24 14:27 ` [PATCH bpf-next v2 0/4] bpf: replace min/max fields with struct cnum{32,64} Alexei Starovoitov
2026-04-24 19:01 ` Eduard Zingerman
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=5d22e4ce0cca7860ccd42db8c221064d58964bd4.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=harishankar.vishwanathan@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=paul.chaignon@gmail.com \
--cc=shung-hsi.yu@suse.com \
--cc=yonghong.song@linux.dev \
/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