]> git.proxmox.com Git - mirror_iproute2.git/blame - include/bpf_elf.h
netlink: Add flag to suppress print of nlmsg error
[mirror_iproute2.git] / include / bpf_elf.h
CommitLineData
6256f8c9
DB
1#ifndef __BPF_ELF__
2#define __BPF_ELF__
3
4#include <asm/types.h>
5
6/* Note:
7 *
8 * Below ELF section names and bpf_elf_map structure definition
9 * are not (!) kernel ABI. It's rather a "contract" between the
10 * application and the BPF loader in tc. For compatibility, the
11 * section names should stay as-is. Introduction of aliases, if
12 * needed, are a possibility, though.
13 */
14
15/* ELF section names, etc */
16#define ELF_SECTION_LICENSE "license"
17#define ELF_SECTION_MAPS "maps"
c7272ca7 18#define ELF_SECTION_PROG "prog"
6256f8c9
DB
19#define ELF_SECTION_CLASSIFIER "classifier"
20#define ELF_SECTION_ACTION "action"
21
22#define ELF_MAX_MAPS 64
23#define ELF_MAX_LICENSE_LEN 128
24
32e93fb7
DB
25/* Object pinning settings */
26#define PIN_NONE 0
27#define PIN_OBJECT_NS 1
28#define PIN_GLOBAL_NS 2
29
6256f8c9
DB
30/* ELF map definition */
31struct bpf_elf_map {
32 __u32 type;
33 __u32 size_key;
34 __u32 size_value;
35 __u32 max_elem;
4dd3f50a 36 __u32 flags;
6256f8c9 37 __u32 id;
f6793eec 38 __u32 pinning;
6256f8c9
DB
39};
40
41#endif /* __BPF_ELF__ */