[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1488735668-2296008-1-git-send-email-ast@fb.com>
Date: Sun, 5 Mar 2017 09:41:08 -0800
From: Alexei Starovoitov <ast@...com>
To: "David S . Miller" <davem@...emloft.net>
CC: Daniel Borkmann <daniel@...earbox.net>,
Daniel Mack <daniel@...que.org>,
Dmitry Vyukov <dvyukov@...gle.com>, <netdev@...r.kernel.org>
Subject: [PATCH net] 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@...gle.com>
Signed-off-by: Alexei Starovoitov <ast@...nel.org>
---
kernel/bpf/lpm_trie.c | 6 ++++++
1 file changed, 6 insertions(+)
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 @@ static void trie_free(struct bpf_map *map)
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,
--
2.8.0
Powered by blists - more mailing lists