Extend the rss_ctx test suite to test that an ntuple action that
redirects to an RSS context contains that information in `ethtool -n`.
Otherwise the output from ethtool is highly deceiving. This test helps
ensure drivers are compliant with the API.
Signed-off-by: Daniel Xu
---
tools/testing
This patchset fixes a bug where bnxt driver was failing to report that
an ntuple rule is redirecting to an RSS context. First commit is the
fix, then second commit extends selftests to detect if other/new drivers
are compliant with ntuple/rss_ctx API.
Daniel Xu (2):
bnxt_en: ethtool: Supply
Hi Jakub,
On Tue, Nov 12, 2024, at 5:44 PM, Jakub Kicinski wrote:
> On Mon, 11 Nov 2024 19:23:31 -0700 Daniel Xu wrote:
>> Extend the rss_ctx test suite to test that an ntuple action that
>> redirects to an RSS context contains that information in `ethtool -n`.
>> Othe
Hi Ed,
On Tue, Nov 12, 2024, at 3:10 AM, Edward Cree wrote:
> On 12/11/2024 02:23, Daniel Xu wrote:
>> Extend the rss_ctx test suite to test that an ntuple action that
>> redirects to an RSS context contains that information in `ethtool -n`.
>> Otherwise the output f
On Fri, Sep 20, 2024 at 03:05:35PM GMT, Eduard Zingerman wrote:
> On Sun, 2024-09-15 at 21:45 -0600, Daniel Xu wrote:
> > This commit allows progs to elide a null check on statically known map
> > lookup keys. In other words, if the verifier can statically prove that
> >
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
e for when R2 can be both const and non-const
Daniel Xu (2):
bpf: verifier: Support eliding map lookup nullness
bpf: selftests: verifier: Add nullness elision tests
kernel/bpf/verifier.c | 67 ++-
tools/testing/selftests/bpf/progs/iters.c | 14 +-
...
d-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 166 ++
1 file changed, 166 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_array_access.c
index 95d7ecc12963..2e74504ddbb5 1
ck for when stack is uninitialized (no stack slot yet)
* Updated existing tests to account for null elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (2):
bpf: verifier: Support eliding map lookup nullness
bpf: selftests: verifier: Add nullness elision tests
k
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
-
d-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 183 ++
1 file changed, 183 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_array_access.c
index 95d7ecc12963..872edded1623 1
Extend the rss_ctx test suite to test that an ntuple action that
redirects to an RSS context contains that information in `ethtool -n`.
Otherwise the output from ethtool is highly deceiving. This test helps
ensure drivers are compliant with the API.
Signed-off-by: Daniel Xu
---
tools/testing
to net instead of net-next
* Make regex work with ethtool output changes
Changes from v1:
* Add selftest in patch 2
Daniel Xu (2):
bnxt_en: ethtool: Supply ntuple rss context action
selftests: drv-net: rss_ctx: Add test for ntuple rule
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8
Test that very high constant map keys are not interpreted as an error
value by the verifier. This would previously fail.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
---
.../selftests/bpf/progs/verifier_array_access.c | 15 +++
1 file changed, 15 insertions(+)
diff --git
Two fixes for nullness elision. See commits for more details.
=== Changelog ===
Changes from v1:
* Reword commit message in patch 1
* Add tags
Daniel Xu (3):
bpf: verifier: Do not extract constant map keys for irrelevant maps
bpf: selftests: Test constant key extraction on irrelevant maps
On Thu, Jan 30, 2025, at 7:41 PM, Daniel Xu wrote:
> Hi Ilya,
>
> On Thu, Jan 30, 2025, at 2:06 AM, Ilya Leoshkevich wrote:
>> On Wed, 2025-01-29 at 10:45 -0700, Daniel Xu wrote:
>>> On Wed, Jan 29, 2025 at 09:49:12AM -0700, Daniel Xu wrote:
>>> > Hi Ilya,
e. If both options are available, static linking
is chosen.
Signed-off-by: Daniel Xu
---
tools/testing/selftests/bpf/Makefile | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing/selftests/bpf/Makefile
index 67
Two fixes for nullness elision. See commits for more details.
Daniel Xu (3):
bpf: verifier: Do not extract constant map keys for irrelevant maps
bpf: selftests: Test constant key extraction on irrelevant maps
bpf: verifier: Disambiguate get_constant_map_key() errors
kernel/bpf/verifier.c
Test that very high constant map keys are not interpreted as an error
value by the verifier. This would previously fail.
Signed-off-by: Daniel Xu
---
.../selftests/bpf/progs/verifier_array_access.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/tools/testing/selftests
Hi Ilya,
On Thu, Jan 30, 2025, at 2:06 AM, Ilya Leoshkevich wrote:
> On Wed, 2025-01-29 at 10:45 -0700, Daniel Xu wrote:
>> On Wed, Jan 29, 2025 at 09:49:12AM -0700, Daniel Xu wrote:
>> > Hi Ilya,
>> >
>> > On Wed, Jan 29, 2025 at 03:58:54PM +0100, Ilya Leosh
Hi Yonghong,
On Thu, Jan 30, 2025 at 10:28:11PM -0800, Yonghong Song wrote:
>
>
>
> On 1/30/25 2:33 PM, Daniel Xu wrote:
> > Since 67ab80a01886 ("selftests/bpf: Prefer static linking for LLVM
> > libraries"), only statically linking test_progs is support
On Mon, Dec 16, 2024 at 03:24:01PM -0800, Andrii Nakryiko wrote:
> On Fri, Dec 13, 2024 at 7:13 PM Eduard Zingerman wrote:
> >
> > On Fri, 2024-12-13 at 19:44 -0700, Daniel Xu wrote:
> >
[...]
> >
> > > > with Eduard's suggestion this also becomes
On Fri, Dec 13, 2024, at 10:17 PM, Eduard Zingerman wrote:
> On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote:
>> Test that nullness elision works for common use cases. For example, we
>> want to check that both full and subreg stack slots are recognized. As
>> well as wh
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
On Thu, Dec 12, 2024 at 08:04:45PM GMT, Eduard Zingerman wrote:
> On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote:
>
> I think these changes are fine in general, but see below.
>
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index 58b36cc96
On Thu, Dec 12, 2024 at 08:04:28PM GMT, Eduard Zingerman wrote:
> On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote:
> > Previously, the verifier was treating all PTR_TO_STACK registers passed
> > to a helper call as potentially written to by the helper. However, a
ck for when stack is uninitialized (no stack slot yet)
* Updated existing tests to account for null elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (5):
bpf: verifier: Add missing newline on verbose() call
bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write
bpf
.
An additional benefit is the verifier logs are also more precise. For
this particular error, users will enjoy a slightly clearer message. See
included selftest updates for examples.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c | 45 +++
.../testing
Test that nullness elision works for common use cases. For example, we
want to check that both full and subreg stack slots are recognized. As
well as when there's both const and non-const values of R2 leading up to
a lookup. And obviously some bound checks.
Signed-off-by: Daniel Xu
---
..
On Fri, Dec 13, 2024 at 03:02:11PM GMT, Andrii Nakryiko wrote:
> On Thu, Dec 12, 2024 at 3:23 PM Daniel Xu wrote:
> >
> > This commit allows progs to elide a null check on statically known map
> > lookup keys. In other words, if the verifier can statically prove that
>
On Mon, Dec 16, 2024 at 03:24:01PM -0800, Andrii Nakryiko wrote:
> On Fri, Dec 13, 2024 at 7:13 PM Eduard Zingerman wrote:
> >
> > On Fri, 2024-12-13 at 19:44 -0700, Daniel Xu wrote:
> >
> > [...]
> >
> > > > > + /* First handle precisely t
On Thu, Dec 19, 2024 at 04:04:43PM -0800, Eduard Zingerman wrote:
> On Thu, 2024-12-19 at 14:41 -0700, Daniel Xu wrote:
>
> [...]
>
> > > > I think that if test operates on a key like:
> > > >
> > > > valid key 15
> > > >
On Thu, Dec 19, 2024 at 04:49:13PM -0800, Alexei Starovoitov wrote:
> On Thu, Dec 19, 2024 at 4:43 PM Eduard Zingerman wrote:
> >
> > On Thu, 2024-12-19 at 17:40 -0700, Daniel Xu wrote:
> >
> > [...]
> >
> > > > Ok, thinking a bit more, the best tes
* Added a check for when R2 is not a ptr to stack
* Added a check for when stack is uninitialized (no stack slot yet)
* Updated existing tests to account for null elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (5):
bpf: verifier: Add missing newline on verbose() c
ointer. So check that we disallow
both.
Signed-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 168 ++
1 file changed, 168 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_arra
.
An additional benefit is the verifier logs are also more precise. For
this particular error, users will enjoy a slightly clearer message. See
included selftest updates for examples.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c | 45
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
: Daniel Xu
---
tools/testing/selftests/bpf/veristat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/veristat.c
b/tools/testing/selftests/bpf/veristat.c
index 974c808f9321..7d0a9cb753e3 100644
--- a/tools/testing/selftests/bpf/veristat.c
On Thu, Jan 02, 2025 at 06:53:54PM -0800, Eduard Zingerman wrote:
> On Thu, 2024-12-19 at 21:09 -0700, Daniel Xu wrote:
>
> lgtm, but please see a note below.
>
> [...]
>
> > +/* Returns constant key value if possible, else negative error */
> > +static s
On Wed, Jan 29, 2025 at 09:49:12AM -0700, Daniel Xu wrote:
> Hi Ilya,
>
> On Wed, Jan 29, 2025 at 03:58:54PM +0100, Ilya Leoshkevich wrote:
> > On Tue, 2025-01-14 at 13:28 -0700, Daniel Xu wrote:
> > > This commit allows progs to elide a null check on statically known
>
Hi Ilya,
On Wed, Jan 29, 2025 at 03:58:54PM +0100, Ilya Leoshkevich wrote:
> On Tue, 2025-01-14 at 13:28 -0700, Daniel Xu wrote:
> > This commit allows progs to elide a null check on statically known
> > map
> > lookup keys. In other words, if the verifier can statically p
elision
* Added test case for when R2 can be both const and non-const
Daniel Xu (5):
bpf: verifier: Add missing newline on verbose() call
bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write
bpf: verifier: Refactor helper access type tracking
bpf: verifier: Support eliding map lookup nulln
d in sync with these changes, as the
verifier is more efficient with this change. Notable, iters.c tests had
to be changed to use a map type that still requires null checks, as it's
exercising verifier tracking logic w.r.t iterators.
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c
.
An additional benefit is the verifier logs are also more precise. For
this particular error, users will enjoy a slightly clearer message. See
included selftest updates for examples.
Acked-by: Eduard Zingerman
Signed-off-by: Daniel Xu
---
kernel/bpf/verifier.c | 45
ointer. So check that we disallow
both.
Signed-off-by: Daniel Xu
---
.../bpf/progs/verifier_array_access.c | 188 ++
1 file changed, 188 insertions(+)
diff --git a/tools/testing/selftests/bpf/progs/verifier_array_access.c
b/tools/testing/selftests/bpf/progs/verifier_arra
bpf_check(), as it currently exists, will soon be going away to make way
for loadable BPF verifier support. Fixup selftests so they fentry attach
to a more reliable location.
Signed-off-by: Daniel Xu
---
tools/testing/selftests/bpf/progs/exceptions_assert.c | 2 +-
tools/testing/selftests/bpf
On Thu, May 1, 2025, at 7:28 AM, Lorenz Bauer wrote:
> I'd like to cut down the memory usage of parsing vmlinux BTF in ebpf-go.
> With some upcoming changes the library is sitting at 5MiB for a parse.
> Most of that memory is simply copying the BTF blob into user space.
> By allowing vmlinux BTF to
101 - 147 of 147 matches
Mail list logo