diff options
| author | 2026-11-03 20:00:37 +0000 | |
|---|---|---|
| committer | 2026-11-10 15:24:15 +0100 | |
| commit | 71b116cf334b517f909a574fab4fbbb17c27c7ba (patch) | |
| tree | 5f5c43cfcc0fdb04bc1520103a4fab5b6705aa10 /tools/perf/python/stackcollapse.py | |
| parent | net: fix mac_len of skbs copied by generic XDP (diff) | |
selftests: drv-net: ping: test generic XDP redirect to cpumap
The generic XDP tests in ping.py only cover XDP_PASS. Add a test that
redirects all packets to a cpumap with an xdp.frags program. It runs
the same ping and TCP checks as the other tests.
xdp_cpumap.bpf.c is a new program. It redirects every packet to entry 0
of a cpumap. It is not added to xdp_dummy.bpf.c. test_xdp_offload loads
xdp_dummy.bpf.o in offload mode, which would fail on a cpumap.
The new test extends _set_xdp_generic_mb_on() with two optional
arguments. The first argument, prog, is the XDP program file name, with
default "xdp_dummy.bpf.o". The second argument, on_attach, is a
callback function, with default None. on_attach runs right after the
program is attached. The new test passes "xdp_cpumap.bpf.o" to prog and
a lambda that adds the cpumap entry to on_attach.
Without the previous patch, the new test fails on netdevsim because ping
gets no reply.
Signed-off-by: Tianyi Gao <tianyi@cloudflare.com>
Link: https://patch.msgid.link/20261103200036.65764-4-tianyi@cloudflare.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
