lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGOV7BkUgb83clqV@boxer>
Date: Tue, 16 May 2023 16:40:44 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: Magnus Karlsson <magnus.karlsson@...il.com>
CC: <magnus.karlsson@...el.com>, <bjorn@...nel.org>, <ast@...nel.org>,
	<daniel@...earbox.net>, <netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
	<yhs@...com>, <andrii@...nel.org>, <martin.lau@...ux.dev>, <song@...nel.org>,
	<john.fastabend@...il.com>, <kpsingh@...nel.org>, <sdf@...gle.com>,
	<haoluo@...gle.com>, <jolsa@...nel.org>, <tirthendu.sarkar@...el.com>
Subject: Re: [PATCH bpf-next v2 07/10] selftests/xsx: test for huge pages
 only once

On Tue, May 16, 2023 at 04:25:30PM +0200, Magnus Karlsson wrote:
> On Tue, 16 May 2023 at 14:58, Maciej Fijalkowski
> <maciej.fijalkowski@...el.com> wrote:
> >
> > On Tue, May 16, 2023 at 12:31:06PM +0200, Magnus Karlsson wrote:
> > > From: Magnus Karlsson <magnus.karlsson@...el.com>
> > >
> > > Test for hugepages only once at the beginning of the execution of the
> > > whole test suite, instead of before each test that needs huge
> > > pages. These are the tests that use unaligned mode. As more unaligned
> > > tests will be added, so the current system just does not scale.
> > >
> > > With this change, there are now three possible outcomes of a test run:
> > > fail, pass, or skip. To simplify the handling of this, the function
> > > testapp_validate_traffic() now returns this value to the main loop. As
> > > this function is used by nearly all tests, it meant a small change to
> > > most of them.
> >
> > I don't get the need for that change. Why couldn't we just store the
> > retval to test_spec and then check it in run_pkt_test() just like we check
> > test->fail currently? Am i missing something?
> 
> I think it is nicer to have the test return fail/pass/skip, just like
> most functions return non-zero if there is an error, instead of using
> a variable embedded in a struct. But maybe it is too much for a single
> patch. How about breaking out the void -> int conversion of the return
> value in one patch and then have the "remember unaligned mode" in a
> separate one? The first one is just a means to be able to reach the
> second one. What do you think?

Yes, please, this would make this patch content to do only what subject of
it relates to. s/void/int does not belong here and is a good candidate for
a preceding patch, so please just pull it out. Thanks!

> 
> > >
> > > Signed-off-by: Magnus Karlsson <magnus.karlsson@...el.com>
> > > ---
> > >  tools/testing/selftests/bpf/xskxceiver.c | 186 +++++++++++------------
> > >  tools/testing/selftests/bpf/xskxceiver.h |   2 +
> > >  2 files changed, 94 insertions(+), 94 deletions(-)
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ