bpf: sockhash, add release routine
authorJohn Fastabend <john.fastabend@gmail.com>
Sat, 30 Jun 2018 13:17:52 +0000 (06:17 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 30 Jun 2018 23:21:32 +0000 (01:21 +0200)
Add map_release_uref pointer to hashmap ops. This was dropped when
original sockhash code was ported into bpf-next before initial
commit.

Fixes: 81110384441a ("bpf: sockmap, add hash map support")
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/sockmap.c

index ac09b35a9567f3ecc07ad661455697b8ad924e45..cf7b6a6dbd1f3bc290eb3f740e46a63ab3eba116 100644 (file)
@@ -2496,6 +2496,7 @@ const struct bpf_map_ops sock_hash_ops = {
        .map_get_next_key = sock_hash_get_next_key,
        .map_update_elem = sock_hash_update_elem,
        .map_delete_elem = sock_hash_delete_elem,
+       .map_release_uref = sock_map_release,
 };
 
 BPF_CALL_4(bpf_sock_map_update, struct bpf_sock_ops_kern *, bpf_sock,