From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: "Martin KaFai Lau" <martin.lau@linux.dev>,
"Alexis Lothoré (eBPF Foundation)" <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 4/5] selftests/bpf: integrate test_tc_tunnel.sh tests into test_progs
Date: Sun, 19 Oct 2025 10:45:28 +0200 [thread overview]
Message-ID: <DDM60XIK0NUQ.S2QMK9E7HQ2U@bootlin.com> (raw)
In-Reply-To: <2477894b-3325-4bc2-9d3c-a066b3cbb8f6@linux.dev>
Hello Martin,
On Sat Oct 18, 2025 at 2:18 AM CEST, Martin KaFai Lau wrote:
> On 10/17/25 7:29 AM, Alexis Lothoré (eBPF Foundation) wrote:
>> The test_tc_tunnel.sh script checks that a large variety of tunneling
>> mechanisms handled by the kernel can be handled as well by eBPF
>> programs. While this test shares similarities with test_tunnel.c (which
>> is already integrated in test_progs), those are testing slightly
>> different things:
>> - test_tunnel.c creates a tunnel interface, and then get and set tunnel
>> keys in packet metadata, from BPF programs.
>> - test_tc_tunnels.sh manually parses/crafts packets content
>>
>> Bring the tests covered by test_tc_tunnel.sh into the test_progs
>> framework, by creating a dedicated test_tc_tunnel.sh. This new test
>> defines a "generic" runner which, for each test configuration:
>> - will bring the relevant veth pair, each of those isolated in a
>> dedicated namespace
>> - will check that traffic will fail if there is only an encapsulating
>> program attached to one veth egress
>> - will check that traffic succeed if we enable some decapsulation module
>> on kernel side
>> - will check that traffic still succeeds if we replace the kernel
>> decapsulation with some eBPF ingress decapsulation.
>>
>> Example of the new test execution:
>>
>> # ./test_progs -a tc_tunnel
>> #447/1 tc_tunnel/ipip_none:OK
>> #447/2 tc_tunnel/ipip6_none:OK
>> #447/3 tc_tunnel/ip6tnl_none:OK
>> #447/4 tc_tunnel/sit_none:OK
>> #447/5 tc_tunnel/vxlan_eth:OK
>> #447/6 tc_tunnel/ip6vxlan_eth:OK
>> #447/7 tc_tunnel/gre_none:OK
>> #447/8 tc_tunnel/gre_eth:OK
>> #447/9 tc_tunnel/gre_mpls:OK
>> #447/10 tc_tunnel/ip6gre_none:OK
>> #447/11 tc_tunnel/ip6gre_eth:OK
>> #447/12 tc_tunnel/ip6gre_mpls:OK
>> #447/13 tc_tunnel/udp_none:OK
>> #447/14 tc_tunnel/udp_eth:OK
>> #447/15 tc_tunnel/udp_mpls:OK
>> #447/16 tc_tunnel/ip6udp_none:OK
>> #447/17 tc_tunnel/ip6udp_eth:OK
>> #447/18 tc_tunnel/ip6udp_mpls:OK
>> #447 tc_tunnel:OK
>> Summary: 1/18 PASSED, 0 SKIPPED, 0 FAILED
>
> Thanks for working on this!
Thanks for the prompt and detailed review !
>
> One high level comment is to minimize switching netns to make the test
> easier to follow.
Yeah, all the NS switches make the overall setup a bit tedious. I'll give a
try to your suggestions and see if we can reduce the number of NS
open/close pairs.
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-10-19 8:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 14:29 [PATCH bpf-next 0/5] selftests/bpf: convert test_tc_tunnel.sh to test_progs Alexis Lothoré (eBPF Foundation)
2025-10-17 14:29 ` [PATCH bpf-next 1/5] testing/selftests: rename tc_helpers.h to tcx_helpers.h Alexis Lothoré (eBPF Foundation)
2025-10-17 14:29 ` [PATCH bpf-next 2/5] selftests/bpf: add tc helpers Alexis Lothoré (eBPF Foundation)
2025-10-17 23:26 ` Martin KaFai Lau
2025-10-20 8:54 ` Alexis Lothoré
2025-10-17 14:29 ` [PATCH bpf-next 3/5] selftests/bpf: make test_tc_tunnel.bpf.c compatible with big endian platforms Alexis Lothoré (eBPF Foundation)
2025-10-17 23:34 ` Martin KaFai Lau
2025-10-17 14:29 ` [PATCH bpf-next 4/5] selftests/bpf: integrate test_tc_tunnel.sh tests into test_progs Alexis Lothoré (eBPF Foundation)
2025-10-18 0:18 ` Martin KaFai Lau
2025-10-19 8:45 ` Alexis Lothoré [this message]
2025-10-17 14:29 ` [PATCH bpf-next 5/5] selftests/bpf: remove test_tc_tunnel.sh 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=DDM60XIK0NUQ.S2QMK9E7HQ2U@bootlin.com \
--to=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=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®