]> 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)
commite89c54e032f3d28b919a51eb20d66ae5036096cd
treeae664a475c782e9d22991f2672eef4b56e4fd72f
parent3e1553ea050b8919886e358aa82b867fe19b3c41
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