blob: bcb7534afb3c0d073222a20bc7d38538e986ee27 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/* Copyright (c) 2017 Facebook
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00003 */
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);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000014void *bpf_map_fd_get_ptr(struct bpf_map *map, struct file *map_file,
15 int ufd);
16void bpf_map_fd_put_ptr(void *ptr);
17u32 bpf_map_fd_sys_lookup_elem(void *ptr);
18
19#endif