]> 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)
commitbf5f35727e6325f096af265df57f763abd88b38b
treec128bcf26d072175917ad3dbe484207c6780a5b3
parent427415119b781ab6814c3c39f494e14697f342d2
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