Re: [PATCH bpf-next 1/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

2018-01-26 Thread Yonghong Song
On 1/25/18 8:47 PM, Eric Dumazet wrote: On Thu, 2018-01-18 at 15:08 -0800, Yonghong Song wrote: +find_leftmost: + /* Find the leftmost non-intermediate node, all intermediate nodes +* have exact two children, so this function will never return NULL. +*/ syzbot [1] disa

Re: [PATCH bpf-next 1/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

2018-01-25 Thread Eric Dumazet
On Thu, 2018-01-18 at 15:08 -0800, Yonghong Song wrote: > +find_leftmost: > + /* Find the leftmost non-intermediate node, all intermediate nodes > + * have exact two children, so this function will never return NULL. > + */ syzbot [1] disagrees violently with this comment. > +

Re: [PATCH bpf-next 1/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

2018-01-22 Thread Yonghong Song
On 1/22/18 11:28 AM, Eric Dumazet wrote: On Thu, 2018-01-18 at 15:08 -0800, Yonghong Song wrote: Current LPM_TRIE map type does not implement MAP_GET_NEXT_KEY command. This command is handy when users want to enumerate keys. Otherwise, a different map which supports key enumeration may be requ

Re: [PATCH bpf-next 1/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

2018-01-22 Thread Eric Dumazet
On Thu, 2018-01-18 at 15:08 -0800, Yonghong Song wrote: > Current LPM_TRIE map type does not implement MAP_GET_NEXT_KEY > command. This command is handy when users want to enumerate > keys. Otherwise, a different map which supports key > enumeration may be required to store the keys. If the > map d

[PATCH bpf-next 1/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

2018-01-18 Thread Yonghong Song
Current LPM_TRIE map type does not implement MAP_GET_NEXT_KEY command. This command is handy when users want to enumerate keys. Otherwise, a different map which supports key enumeration may be required to store the keys. If the map data is sparse and all map data are to be deleted without closing f