From: Martin KaFai Lau <martin.lau@linux.dev>
To: "Alexis Lothoré" <alexis.lothore@bootlin.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
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>, Shuah Khan <shuah@kernel.org>,
ebpf@linuxfoundation.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Bastien Curutchet <bastien.curutchet@bootlin.com>,
bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 3/4] selftests/bpf: integrate test_tc_tunnel.sh tests into test_progs
Date: Thu, 30 Oct 2025 09:21:28 -0700 [thread overview]
Message-ID: <efa3540a-1f52-46ca-9f49-e631a5e3e48c@linux.dev> (raw)
In-Reply-To: <DDVPPGIO5P1F.E3DWINA74BJ6@bootlin.com>
On 10/30/25 7:04 AM, Alexis Lothoré wrote:
>>> + int family = cfg->ipproto == 6 ? AF_INET6 : AF_INET;
>>> +
>>> + cfg->server_fd = start_reuseport_server(family, SOCK_STREAM,
>>> + cfg->server_addr, TEST_PORT,
>>> + TIMEOUT_MS, 1);
>>
>> Why reuseport is needed? Does it have issue in bind() to the same
>> ip/port in the later sub-test?
>
> Yes, I observed that is I use the bare start_server, I systematically have
> the first test passing, an all the others failing on the server startup
> with errno 98 (Address already in use). I have been assuming that it is due
> to some TIME_WAIT state on the freshly closed socket, but I may be missing
> something ?
Thanks for confirming. You are right. It should be the TIME_WAIT. Using
SO_REUSEPORT works but become confusing on what the test is trying to do
by starting only 1 reuseport server. reuseport is usually used with >1
server listening on the same address. A better thing to do is to always
setsockopt(SO_REUSEADDR) in start_server_addr for TCP.
next prev parent reply other threads:[~2025-10-30 16:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 14:51 [PATCH bpf-next v3 0/4] selftests/bpf: convert test_tc_tunnel.sh to test_progs Alexis Lothoré (eBPF Foundation)
2025-10-27 14:51 ` [PATCH bpf-next v3 1/4] selftests/bpf: add tc helpers Alexis Lothoré (eBPF Foundation)
2025-10-27 14:51 ` [PATCH bpf-next v3 2/4] selftests/bpf: make test_tc_tunnel.bpf.c compatible with big endian platforms Alexis Lothoré (eBPF Foundation)
2025-10-27 14:51 ` [PATCH bpf-next v3 3/4] selftests/bpf: integrate test_tc_tunnel.sh tests into test_progs Alexis Lothoré (eBPF Foundation)
2025-10-29 19:56 ` Martin KaFai Lau
2025-10-30 14:04 ` Alexis Lothoré
2025-10-30 16:21 ` Martin KaFai Lau [this message]
2025-10-30 16:27 ` Alexis Lothoré
2025-10-27 14:51 ` [PATCH bpf-next v3 4/4] selftests/bpf: remove test_tc_tunnel.sh Alexis Lothoré (eBPF Foundation)
2025-10-29 19:40 ` [PATCH bpf-next v3 0/4] selftests/bpf: convert test_tc_tunnel.sh to test_progs patchwork-bot+netdevbpf
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=efa3540a-1f52-46ca-9f49-e631a5e3e48c@linux.dev \
--to=martin.lau@linux.dev \
--cc=alexis.lothore@bootlin.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bastien.curutchet@bootlin.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=ebpf@linuxfoundation.org \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--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=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