OSDN Git Service

bpf: Test deletion in BPF_MAP_TYPE_LPM_TRIE
authorCraig Gallek <kraig@google.com>
Mon, 18 Sep 2017 19:30:57 +0000 (15:30 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Sep 2017 20:55:15 +0000 (13:55 -0700)
commite8d1749910b56a7248cb9a5392274348d10108bb
tree6a608398faf5eec0b503408f125bd5a61fb2b6bf
parentbae30468dfc1522464f16051addd7bc7da6da75a
bpf: Test deletion in BPF_MAP_TYPE_LPM_TRIE

Extend the 'random' operation tests to include a delete operation
(delete half of the nodes from both lpm implementions and ensure
that lookups are still equivalent).

Also, add a simple IPv4 test which verifies lookup behavior as nodes
are deleted from the tree.

Signed-off-by: Craig Gallek <kraig@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/test_lpm_map.c