Re: [PATCH v2 bpf] bpf: lpm_trie: check left child of last leftmost node for NULL

2019-06-11 Thread Daniel Borkmann
On 06/08/2019 09:54 PM, Jonathan Lemon wrote: > If the leftmost parent node of the tree has does not have a child > on the left side, then trie_get_next_key (and bpftool map dump) will > not look at the child on the right. This leads to the traversal > missing elements. > > Lookup is not affected

Re: [PATCH v2 bpf] bpf: lpm_trie: check left child of last leftmost node for NULL

2019-06-10 Thread Martin Lau
On Sat, Jun 08, 2019 at 12:54:19PM -0700, Jonathan Lemon wrote: > If the leftmost parent node of the tree has does not have a child > on the left side, then trie_get_next_key (and bpftool map dump) will > not look at the child on the right. This leads to the traversal > missing elements. Good catc

[PATCH v2 bpf] bpf: lpm_trie: check left child of last leftmost node for NULL

2019-06-08 Thread Jonathan Lemon
If the leftmost parent node of the tree has does not have a child on the left side, then trie_get_next_key (and bpftool map dump) will not look at the child on the right. This leads to the traversal missing elements. Lookup is not affected. Update selftest to handle this case. Reproducer: bpf