]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/selftests: Add check for updating XDP bpf_link with wrong program type
authorToke Høiland-Jørgensen <toke@redhat.com>
Fri, 7 Jan 2022 22:11:15 +0000 (23:11 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 11 Jan 2022 17:44:06 +0000 (09:44 -0800)
commitdcfd20a1b1794c525a36ef5f8151fd8a3e8de220
treec128bcf26d072175917ad3dbe484207c6780a5b3
parent9eea91d6999f75b2da68ad92b2d57e54ea0a481f
bpf/selftests: Add check for updating XDP bpf_link with wrong program type

Add a check to the xdp_link selftest that the kernel rejects replacing an
XDP program with a different program type on link update.

v2:
- Split this out into its own patch.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20220107221115.326171-3-toke@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/xdp_link.c
tools/testing/selftests/bpf/progs/test_xdp_link.c