From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: "Martin KaFai Lau" <martin.lau@linux.dev>, <alexis.lothore@bootlin.com>
Cc: <ebpf@linuxfoundation.org>, <bastien.curutchet@bootlin.com>,
<thomas.petazzoni@bootlin.com>, <bpf@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<martin.lau@kernel.org>, <clm@meta.com>,
<ihor.solodrai@linux.dev>, <bot+bpf-ci@kernel.org>,
<ast@kernel.org>, <daniel@iogearbox.net>, <andrii@kernel.org>,
<eddyz87@gmail.com>, <song@kernel.org>, <yonghong.song@linux.dev>,
<john.fastabend@gmail.com>, <kpsingh@kernel.org>,
<sdf@fomichev.me>, <haoluo@google.com>, <jolsa@kernel.org>,
<shuah@kernel.org>
Subject: Re: [PATCH bpf-next 2/4] selftests/bpf: integrate test_tc_edt into test_progs
Date: Mon, 03 Nov 2025 10:39:36 +0100 [thread overview]
Message-ID: <DDYYKJWVL8KH.3UDBWDYHK2M8N@bootlin.com> (raw)
In-Reply-To: <d886e631-851b-4e2f-aecb-ecdb541dfedc@linux.dev>
On Fri Oct 31, 2025 at 8:28 PM CET, Martin KaFai Lau wrote:
> On 10/31/25 9:20 AM, bot+bpf-ci@kernel.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
next prev parent reply other threads:[~2025-11-03 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 15:55 [PATCH bpf-next 0/4] selftests/bpf: convert test_tc_edt.sh " Alexis Lothoré (eBPF Foundation)
2025-10-31 15:55 ` [PATCH bpf-next 1/4] selftests/bpf: rename test_tc_edt.bpf.c section to expose program type Alexis Lothoré (eBPF Foundation)
2025-10-31 15:55 ` [PATCH bpf-next 2/4] selftests/bpf: integrate test_tc_edt into test_progs Alexis Lothoré (eBPF Foundation)
2025-10-31 16:20 ` bot+bpf-ci
2025-10-31 19:28 ` Martin KaFai Lau
2025-11-03 9:39 ` Alexis Lothoré [this message]
2025-10-31 15:55 ` [PATCH bpf-next 3/4] selftests/bpf: remove test_tc_edt.sh Alexis Lothoré (eBPF Foundation)
2025-10-31 15:55 ` [PATCH bpf-next 4/4] selftests/bpf: do not hardcode target rate in test_tc_edt BPF program Alexis Lothoré (eBPF Foundation)
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=DDYYKJWVL8KH.3UDBWDYHK2M8N@bootlin.com \
--to=alexis.lothore@bootlin.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bastien.curutchet@bootlin.com \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=ebpf@linuxfoundation.org \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=ihor.solodrai@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=thomas.petazzoni@bootlin.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
all inboxes | Powered by JetHome®