OSDN Git Service

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)
commit5b87adc3ceee3c3131e24e9bc9ef92dd41db089f
treeae664a475c782e9d22991f2672eef4b56e4fd72f
parent27870317337a6c24af503304620de8064c8d2e4a
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