blob: a507bf6ef8b93af4bf3644e23cc7e7474e82df75 [file] [log] [blame]
Thomas Gleixner25763b32019-05-28 10:10:09 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Martin KaFai Lau56f668d2017-03-22 10:00:33 -07002/* Copyright (c) 2017 Facebook
Martin KaFai Lau56f668d2017-03-22 10:00:33 -07003 */
4#ifndef __MAP_IN_MAP_H__
5#define __MAP_IN_MAP_H__
6
7#include <linux/types.h>
8
9struct file;
10struct bpf_map;
11
12struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd);
13void bpf_map_meta_free(struct bpf_map *map_meta);
14bool bpf_map_meta_equal(const struct bpf_map *meta0,
15 const struct bpf_map *meta1);
16void *bpf_map_fd_get_ptr(struct bpf_map *map, struct file *map_file,
17 int ufd);
18void bpf_map_fd_put_ptr(void *ptr);
Martin KaFai Lau14dc6f02017-06-27 23:08:34 -070019u32 bpf_map_fd_sys_lookup_elem(void *ptr);
Martin KaFai Lau56f668d2017-03-22 10:00:33 -070020
21#endif