alistair23-linux/tools/testing
Craig Gallek bae30468df bpf: Add uniqueness invariant to trivial lpm test implementation
The 'trivial' lpm implementation in this test allows equivalent nodes
to be added (that is, nodes consisting of the same prefix and prefix
length).  For lookup operations, this is fine because insertion happens
at the head of the (singly linked) list and the first, best match is
returned.  In order to support deletion, the tlpm data structue must
first enforce uniqueness.  This change modifies the insertion algorithm
to search for equivalent nodes and remove them.  Note: the
BPF_MAP_TYPE_LPM_TRIE already has a uniqueness invariant that is
implemented as node replacement.

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>
2017-09-19 13:55:15 -07:00
..
fault-injection
ktest
nvdimm libnvdimm, nd_blk: remove mmio_flush_range() 2017-08-31 15:05:10 -07:00
radix-tree
selftests bpf: Add uniqueness invariant to trivial lpm test implementation 2017-09-19 13:55:15 -07:00