diff options
author | Alexei Starovoitov <ast@fb.com> | 2017-03-05 09:41:08 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-05 17:55:29 -0800 |
commit | f38837b08d23e66de17d46d030e0d9ac5172ad1f (patch) | |
tree | 7b8ebd54fad763393978ab68950188b631367490 /kernel/bpf | |
parent | 8d70eeb84ab277377c017af6a21d0a337025dede (diff) | |
download | linux-f38837b08d23e66de17d46d030e0d9ac5172ad1f.tar.bz2 |
bpf: add get_next_key callback to LPM map
map_get_next_key callback is mandatory. Supply dummy handler.
Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/lpm_trie.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c index 8bfe0afaee10..b37bd9ab7f57 100644 --- a/kernel/bpf/lpm_trie.c +++ b/kernel/bpf/lpm_trie.c @@ -500,9 +500,15 @@ unlock: 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 = { .map_alloc = trie_alloc, .map_free = trie_free, + .map_get_next_key = trie_get_next_key, .map_lookup_elem = trie_lookup_elem, .map_update_elem = trie_update_elem, .map_delete_elem = trie_delete_elem, |