[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DDYYKJWVL8KH.3UDBWDYHK2M8N@bootlin.com>
Date: Mon, 03 Nov 2025 10:39:36 +0100
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: "Martin KaFai Lau" <martin.lau@...ux.dev>, <alexis.lothore@...tlin.com>
Cc: <ebpf@...uxfoundation.org>, <bastien.curutchet@...tlin.com>,
<thomas.petazzoni@...tlin.com>, <bpf@...r.kernel.org>,
<linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<martin.lau@...nel.org>, <clm@...a.com>, <ihor.solodrai@...ux.dev>,
<bot+bpf-ci@...nel.org>, <ast@...nel.org>, <daniel@...earbox.net>,
<andrii@...nel.org>, <eddyz87@...il.com>, <song@...nel.org>,
<yonghong.song@...ux.dev>, <john.fastabend@...il.com>,
<kpsingh@...nel.org>, <sdf@...ichev.me>, <haoluo@...gle.com>,
<jolsa@...nel.org>, <shuah@...nel.org>
Subject: Re: [PATCH bpf-next 2/4] selftests/bpf: integrate test_tc_edt into
test_progs
On Fri Oct 31, 2025 at 8:28 PM CET, Martin KaFai Lau wrote:
> On 10/31/25 9:20 AM, bot+bpf-ci@...nel.org wrote:
[...]
>>> + while (true) {
>>> + send(conn->client_conn_fd, (void *)tx_buffer, BUFFER_LEN, 0);
>>> + ts_end = get_time_ns();
>>> + if ((ts_end - ts_start)/100000 >= TIMEOUT_MS) {
>> ^^^^^^
>>
>> Does this time conversion use the correct divisor? The timeout check
>> appears to divide nanoseconds by 100000, but TIMEOUT_MS is 2000
>> milliseconds. Converting nanoseconds to milliseconds requires dividing
>> by 1000000, not 100000. With the current calculation, the timeout would
>> trigger after 200 milliseconds rather than 2000 milliseconds.
>
> The report is correct, there is a typo in the denominator.
Gaaaah, that's one stupid mistake, and so I possibly got too enthusiastic
about the initial results. I'll redo some more tests with this point fixed.
> Use the send_recv_data() helper in network_helpers.c. It should simplify
> this test and no need to pthread_create, while loop, ....etc.
> send_recv_data limits by the number of bytes instead of the length of
> time. There is a target rate in this test, so it should be easy to
> convert from time limit to byte limit and reuse the send_recv_data.
Nice, thanks for the hint, I'll then simplify the whole test by using this
helper.
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists