[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ffc76427-8268-4d48-ae5a-430b1129f6b0@bootlin.com>
Date: Tue, 19 Nov 2024 10:28:01 +0100
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: Stanislav Fomichev <stfomichev@...il.com>
Cc: Andrii Nakryiko <andrii@...nel.org>, Eduard Zingerman
<eddyz87@...il.com>, Mykola Lysenko <mykolal@...com>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Shuah Khan <shuah@...nel.org>,
"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Jesper Dangaard Brouer <hawk@...nel.org>, ebpf@...uxfoundation.org,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Bastien Curutchet <bastien.curutchet@...tlin.com>, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v2 12/13] selftests/bpf: migrate bpf flow
dissectors tests to test_progs
On 11/15/24 17:11, Stanislav Fomichev wrote:
> On 11/14, Alexis Lothoré (eBPF Foundation) wrote:
>> + if (!ASSERT_GE(err, 0, "do_rx"))
>> + break;
>
> You seem to be already doing similar ASSERT_GE inside the do_rx, maybe
> drop one?
True, I'll drop the inner ASSERTS to align with do_tx.
[...]
>> +static void port_range_shutdown(void)
>> +{
>> + remove_filter();
>> +}
>
> nit: Maybe use remove_filter directly as .test_teardown? These extra
> wrappers are not adding anything (imho).
Yeah, I initially added port_range_shutdown to make init and shutdown functions
"symmetrical", but in the end that's purely cosmetic. I'll use directly
remove_filter.
[...]
>> + test = (struct test_configuration *)&tests_input[i];
>
> nit: What's the purpose of the cast? Is it to de-constify? Can we
> change run_test arguments to accept const struct test_configuration
> ptr instead?
Yes, that's an omission on my side. I initially thought about making the test
runner function rewrite some fields in the test configuration, but I finally did
not need to do this. I'll drop the cast and propagate the const
Thanks again for the review ! I'll prepare the next revision with all your
comments addressed.
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists