From: "Alexis Lothoré (eBPF Foundation)" <alexis.lothore@bootlin.com>
To: Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Mykola Lysenko <mykolal@fb.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <martin.lau@linux.dev>,
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>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>
Cc: 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, netdev@vger.kernel.org,
"Alexis Lothoré (eBPF Foundation)" <alexis.lothore@bootlin.com>
Subject: [PATCH bpf-next v2 00/13] selftests/bpf: migrate test_flow_dissector.sh to test_progs
Date: Thu, 14 Nov 2024 22:50:31 +0100 [thread overview]
Message-ID: <20241114-flow_dissector-v2-0-ee4a3be3de65@bootlin.com> (raw)
Hello,
this new series aims to migrate test_flow_dissector.sh into test_progs.
There are 2 "main" parts in test_flow_dissector.sh:
- a set of tests checking flow_dissector programs attachment to either
root namespace or non-root namespace
- dissection test
The first set is integrated in flow_dissector.c, which already contains
some existing tests for flow_dissector programs. This series uses the
opportunity to update a bit this file (use new assert, re-split tests,
etc)
The second part is migrated into a new file under test_progs,
flow_dissector_classification.c. It uses the same eBPF programs as
flow_dissector.c, but the difference is rather about how those program
are executed:
- flow_dissector.c manually runs programs with BPF_PROG_RUN
- flow_dissector_classification.c sends real packets to be dissected, and
so it also executes kernel code related to eBPF flow dissector (eg:
__skb_flow_bpf_to_target)
---
Changes in v2:
- allow tests to run in parallel
- move some generic helpers to network_helpers.h
- define proper function for ASSERT_MEMEQ
- fetch acked-by tags
- Link to v1: https://lore.kernel.org/r/20241113-flow_dissector-v1-0-27c4df0592dc@bootlin.com
---
Alexis Lothoré (eBPF Foundation) (13):
selftests/bpf: add a macro to compare raw memory
selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys
selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test
selftests/bpf: re-split main function into dedicated tests
selftests/bpf: expose all subtests from flow_dissector
selftests/bpf: add gre packets testing to flow_dissector
selftests/bpf: migrate flow_dissector namespace exclusivity test
selftests/bpf: Enable generic tc actions in selftests config
selftests/bpf: move ip checksum helper to network helpers
selftests/bpf: rename pseudo headers checksum computation
selftests/bpf: add network helpers to generate udp checksums
selftests/bpf: migrate bpf flow dissectors tests to test_progs
selftests/bpf: remove test_flow_dissector.sh
tools/testing/selftests/bpf/.gitignore | 1 -
tools/testing/selftests/bpf/Makefile | 3 +-
tools/testing/selftests/bpf/config | 1 +
tools/testing/selftests/bpf/network_helpers.h | 64 +-
.../selftests/bpf/prog_tests/flow_dissector.c | 323 +++++++--
.../bpf/prog_tests/flow_dissector_classification.c | 807 +++++++++++++++++++++
.../selftests/bpf/prog_tests/xdp_metadata.c | 24 +-
tools/testing/selftests/bpf/test_flow_dissector.c | 780 --------------------
tools/testing/selftests/bpf/test_flow_dissector.sh | 178 -----
tools/testing/selftests/bpf/test_progs.c | 15 +
tools/testing/selftests/bpf/test_progs.h | 15 +
tools/testing/selftests/bpf/xdp_hw_metadata.c | 12 +-
12 files changed, 1153 insertions(+), 1070 deletions(-)
---
base-commit: 9e71d50d3befb93a6394b0979f8ebd0dc9bd8d0f
change-id: 20241019-flow_dissector-3eb0c07fc163
Best regards,
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next reply other threads:[~2024-11-14 21:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 21:50 Alexis Lothoré (eBPF Foundation) [this message]
2024-11-14 21:50 ` [PATCH bpf-next v2 01/13] selftests/bpf: add a macro to compare raw memory Alexis Lothoré (eBPF Foundation)
2024-11-15 15:37 ` Stanislav Fomichev
2024-11-14 21:50 ` [PATCH bpf-next v2 02/13] selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys Alexis Lothoré (eBPF Foundation)
2024-11-14 21:50 ` [PATCH bpf-next v2 03/13] selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test Alexis Lothoré (eBPF Foundation)
2024-11-14 21:50 ` [PATCH bpf-next v2 04/13] selftests/bpf: re-split main function into dedicated tests Alexis Lothoré (eBPF Foundation)
2024-11-15 15:39 ` Stanislav Fomichev
2024-11-14 21:50 ` [PATCH bpf-next v2 05/13] selftests/bpf: expose all subtests from flow_dissector Alexis Lothoré (eBPF Foundation)
2024-11-14 21:50 ` [PATCH bpf-next v2 06/13] selftests/bpf: add gre packets testing to flow_dissector Alexis Lothoré (eBPF Foundation)
2024-11-14 21:50 ` [PATCH bpf-next v2 07/13] selftests/bpf: migrate flow_dissector namespace exclusivity test Alexis Lothoré (eBPF Foundation)
2024-11-15 15:41 ` Stanislav Fomichev
2024-11-14 21:50 ` [PATCH bpf-next v2 08/13] selftests/bpf: Enable generic tc actions in selftests config Alexis Lothoré (eBPF Foundation)
2024-11-14 21:50 ` [PATCH bpf-next v2 09/13] selftests/bpf: move ip checksum helper to network helpers Alexis Lothoré (eBPF Foundation)
2024-11-15 15:32 ` Stanislav Fomichev
2024-11-19 8:49 ` Alexis Lothoré
2024-11-14 21:50 ` [PATCH bpf-next v2 10/13] selftests/bpf: rename pseudo headers checksum computation Alexis Lothoré (eBPF Foundation)
2024-11-15 15:33 ` Stanislav Fomichev
2024-11-19 8:51 ` Alexis Lothoré
2024-11-14 21:50 ` [PATCH bpf-next v2 11/13] selftests/bpf: add network helpers to generate udp checksums Alexis Lothoré (eBPF Foundation)
2024-11-15 15:54 ` Stanislav Fomichev
2024-11-19 8:57 ` Alexis Lothoré
2024-11-14 21:50 ` [PATCH bpf-next v2 12/13] selftests/bpf: migrate bpf flow dissectors tests to test_progs Alexis Lothoré (eBPF Foundation)
2024-11-15 16:11 ` Stanislav Fomichev
2024-11-19 9:28 ` Alexis Lothoré
2024-11-14 21:50 ` [PATCH bpf-next v2 13/13] selftests/bpf: remove test_flow_dissector.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=20241114-flow_dissector-v2-0-ee4a3be3de65@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=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=martin.lau@linux.dev \
--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;
as well as URLs for NNTP newsgroup(s).