]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bpf: add get_next_key callback to LPM map
authorAlexei Starovoitov <ast@fb.com>
Sun, 5 Mar 2017 17:41:08 +0000 (09:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Mar 2017 01:55:29 +0000 (17:55 -0800)
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>
kernel/bpf/lpm_trie.c

index 8bfe0afaee1082186f805a2a37a556247cbfa608..b37bd9ab7f574242722c1d9b0503b896019488b2 100644 (file)
@@ -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,