Re: [PATCH bpf] bpf: lpm_trie: check left child of root for NULL

2019-06-08 Thread Jonathan Lemon
On 7 Jun 2019, at 19:44, Jonathan Lemon wrote: > If the root of the tree has does not have any elements on the left > branch, then trie_get_next_key (and bpftool map dump) will not look > at the rightmost branch. This leads to the traversal missing elements. I just realized this doesn't handle a

[PATCH bpf] bpf: lpm_trie: check left child of root for NULL

2019-06-07 Thread Jonathan Lemon
If the root of the tree has does not have any elements on the left branch, then trie_get_next_key (and bpftool map dump) will not look at the rightmost branch. This leads to the traversal missing elements. Lookup is not affected. Update selftest to handle this case. Reproducer: bpftool map cr