]> git.baikalelectronics.ru Git - kernel.git/commit
selftest: bpf: Test copying a sockmap and sockhash
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 28 Sep 2020 09:08:05 +0000 (10:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 28 Sep 2020 23:48:02 +0000 (16:48 -0700)
commit0f2ede3da821fbb1c6110d847b6fd4834f3c9339
treeae664a475c782e9d22991f2672eef4b56e4fd72f
parentb8ab7abe1826ed1fb5b1bb20cbba8ba818226c68
selftest: bpf: Test copying a sockmap and sockhash

Since we can now call map_update_elem(sockmap) from bpf_iter context
it's possible to copy a sockmap or sockhash in the kernel. Add a
selftest which exercises this.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200928090805.23343-5-lmb@cloudflare.com
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
tools/testing/selftests/bpf/progs/bpf_iter_sockmap.c