Re: [PATCH bpf-next v6 00/15] selftests/bpf: Integrate test_xsk.c to test_progs framework

From: Alexei Starovoitov

Date: Wed Oct 29 2025 - 14:54:33 EST


On Wed, Oct 29, 2025 at 6:52 AM Bastien Curutchet (eBPF Foundation)
<bastien.curutchet@xxxxxxxxxxx> wrote:
>
> Hi all,
>
> The test_xsk.sh script covers many AF_XDP use cases. The tests it runs
> are defined in xksxceiver.c. Since this script is used to test real
> hardware, the goal here is to leave it as it is, and only integrate the
> tests that run on veth peers into the test_progs framework.
>
> I've looked into what could improve the speed in the CI:
> - some tests are skipped when run on veth peers in a VM (because they
> rely on huge page allocation or HW rings). This skipping logic still
> takes some time and can be easily avoided.
> - the TEARDOWN test is quite long (several seconds on its own) because
> it runs the same test 10 times in a row to ensure the teardown process
> works properly
>
> With theses tests fully skipped in the CI and the veth setup done only
> once for each mode (DRV / SKB), the execution time is reduced to about 5
> seconds on my setup.
> ```
> $ tools/testing/selftests/bpf/vmtest.sh -d $HOME/ebpf/output-regular/ -- time ./test_progs -t xsk
> [...]
> real 0m 5.04s
> user 0m 0.38s
> sys 0m 1.61s

This is fine. I see
Summary: 2/48 PASSED, 0 SKIPPED, 0 FAILED

real 0m8.165s
user 0m1.795s
sys 0m4.740s

on debug kernel with kasan which is ok.

But it conflicts with itself :(

$ test_progs -j -t xsk

All error logs:
setup_veth:FAIL:ip link add veth0 numtxqueues 4 numrxqueues 4 type
veth peer name veth1 numtxqueues 4 numrxqueues 4 unexpected error: 512
(errno 2)
test_xsk_drv:FAIL:setup veth unexpected error: -1 (errno 2)
#664 xsk_drv:FAIL
Summary: 1/24 PASSED, 0 SKIPPED, 1 FAILED

Pls fix the parallel run and not by adding "_serial", of course.

pw-bot: cr