Commit f38837b0 authored by Alexei Starovoitov's avatar Alexei Starovoitov Committed by David S. Miller

bpf: add get_next_key callback to LPM map

map_get_next_key callback is mandatory. Supply dummy handler.

Fixes: b95a5c4d ("bpf: add a longest prefix match trie map implementation")
Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8d70eeb8
...@@ -500,9 +500,15 @@ static void trie_free(struct bpf_map *map) ...@@ -500,9 +500,15 @@ static void trie_free(struct bpf_map *map)
raw_spin_unlock(&trie->lock); raw_spin_unlock(&trie->lock);
} }
static int trie_get_next_key(struct bpf_map *map, void *key, void *next_key)
{
return -ENOTSUPP;
}
static const struct bpf_map_ops trie_ops = { static const struct bpf_map_ops trie_ops = {
.map_alloc = trie_alloc, .map_alloc = trie_alloc,
.map_free = trie_free, .map_free = trie_free,
.map_get_next_key = trie_get_next_key,
.map_lookup_elem = trie_lookup_elem, .map_lookup_elem = trie_lookup_elem,
.map_update_elem = trie_update_elem, .map_update_elem = trie_update_elem,
.map_delete_elem = trie_delete_elem, .map_delete_elem = trie_delete_elem,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment