]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
selftest: Add tests for XDP programs in devmap entries
authorDavid Ahern <dsahern@kernel.org>
Fri, 29 May 2020 22:07:16 +0000 (16:07 -0600)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:48:32 +0000 (14:48 -0700)
commitd39aec79e5923bf984df991ffe51d4a2b7a9e746
tree315a7405aabf602bdff8a8d95450829cd25f61ba
parent2778797037a658be71a6c55b54700bf58ba21eb7
selftest: Add tests for XDP programs in devmap entries

Add tests to verify ability to add an XDP program to a
entry in a DEVMAP.

Add negative tests to show DEVMAP programs can not be
attached to devices as a normal XDP program, and accesses
to egress_ifindex require BPF_XDP_DEVMAP attach type.

Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20200529220716.75383-6-dsahern@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_xdp_devmap_helpers.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_xdp_with_devmap_helpers.c [new file with mode: 0644]