From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>, Mykola Lysenko <mykolal@fb.com>,
Shuah Khan <shuah@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Lorenzo Bianconi <lorenzo@kernel.org>,
ebpf@linuxfoundation.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next] selftests/bpf: convert test_xdp_features.sh to test_progs
Date: Tue, 10 Sep 2024 09:15:26 +0200 [thread overview]
Message-ID: <b5814f3f-d262-4577-834c-a48bbcc8d005@bootlin.com> (raw)
In-Reply-To: <20240909231800.72b6b328@fedora.home>
Hey Maxime,
On 9/9/24 23:18, Maxime Chevallier wrote:
> Hi Alexis,
>
> On Mon, 09 Sep 2024 22:02:07 +0200
> Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> wrote:
[...]
>> +static void *run_dut_echo_thread(void *arg)
>> +{
>> + struct test_data *t = (struct test_data *)arg;
>> + __u32 magic;
>> +
>> + while (!t->quit_dut_echo_thread) {
>> + struct sockaddr_storage addr;
>> + socklen_t addrlen;
>> + size_t n;
>> +
>> + n = recvfrom(t->echo_server_sock, &magic, sizeof(magic),
>> + MSG_WAITALL, (struct sockaddr *)&addr, &addrlen);
>> + if (n != sizeof(magic)) {
>> + usleep(LOOP_DELAY_US);
>> + continue;
>> + }
>> +
>> + if (htonl(magic) != CMD_ECHO)
>> + continue;
>
> Shouldn't it be ntohl here ? The former code used the ntohs helper for
> that command, and you're sending the magic in send_echo_msg with a
> htonl() so I guess here you might want to convert the value back to
> host endianness.
You are right, silly mistake from me here :) That will be fixed in v2. I'll
delay a bit before sending it to allow others to take a look at v1 too.
Thanks,
Alexis
>
> Thanks,
>
> Maxime
>
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2024-09-10 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 20:02 [PATCH bpf-next] selftests/bpf: convert test_xdp_features.sh to test_progs Alexis Lothoré (eBPF Foundation)
2024-09-09 21:18 ` Maxime Chevallier
2024-09-10 7:15 ` Alexis Lothoré [this message]
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=b5814f3f-d262-4577-834c-a48bbcc8d005@bootlin.com \
--to=alexis.lothore@bootlin.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=ebpf@linuxfoundation.org \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=martin.lau@linux.dev \
--cc=maxime.chevallier@bootlin.com \
--cc=mykolal@fb.com \
--cc=netdev@vger.kernel.org \
--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