From: Alexei Starovoitov Date: Mon, 25 Nov 2024 22:00:05 +0000 (-0800) Subject: Merge branch 'selftests-bpf-migrate-test_flow_dissector-sh-to-test_progs' X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3eb87b81e64e875eb6f970a02621145e4a2ff501;p=users%2Fjedix%2Flinux-maple.git Merge branch 'selftests-bpf-migrate-test_flow_dissector-sh-to-test_progs' Alexis Lothoré says: ==================== This is the revision 3 of test_flow_dissector_migration.sh into test_progs. This revision addresses comments from Stanislas, especially about proper reuse of pseudo-header checksuming in new network helpers. 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 v3: - Keep new helpers name in sync with kernel ones - Document some existing network helpers - Properly reuse pseudo-header csum helper in transport layer csum helper - Drop duplicate assert - Use const for test structure in the migrated test - Simplify shutdown callchain for basic test - collect Acked-by - Link to v2: https://lore.kernel.org/r/20241114-flow_dissector-v2-0-ee4a3be3de65@bootlin.com 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 ==================== Signed-off-by: Alexei Starovoitov --- 3eb87b81e64e875eb6f970a02621145e4a2ff501