mbox series

[bpf-next,0/2] bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map

Message ID 20180118230851.1533009-1-yhs@fb.com
Headers show
Series bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map | expand

Message

Yonghong Song Jan. 18, 2018, 11:08 p.m. UTC
This patch set implements MAP_GET_NEXT_KEY command for LPM_TRIE map.
This command is really useful for key enumeration, and for key deletion
if what keys in the trie are unknown.

Patch #1 implements the functionality in the kernel and patch #2
adds a test case in tools/testing/selftests/bpf.

Yonghong Song (2):
  bpf: implement MAP_GET_NEXT_KEY command for LPM_TRIE map
  tools/bpf: add a testcase for MAP_GET_NEXT_KEY command of LPM_TRIE map

 kernel/bpf/lpm_trie.c                      |  95 +++++++++++++++++++++-
 tools/testing/selftests/bpf/test_lpm_map.c | 122 +++++++++++++++++++++++++++++
 2 files changed, 215 insertions(+), 2 deletions(-)

Comments

Daniel Borkmann Jan. 20, 2018, 1:07 a.m. UTC | #1
On 01/19/2018 12:08 AM, Yonghong Song wrote:
> This patch set implements MAP_GET_NEXT_KEY command for LPM_TRIE map.
> This command is really useful for key enumeration, and for key deletion
> if what keys in the trie are unknown.
> 
> Patch #1 implements the functionality in the kernel and patch #2
> adds a test case in tools/testing/selftests/bpf.

Looks good to me, thanks Yonghong, applied to bpf-next!